Remove development

This commit is contained in:
Svetlana Kulikova
2024-05-17 18:10:30 +03:00
parent d853d42090
commit 05366635c1
15 changed files with 118 additions and 409 deletions

View File

@ -47,14 +47,17 @@
class CPdfEditor
{
public:
int GetError() { return 0; }
void Close() {}
bool EditPage(int nPageIndex) { return false; }
bool DeletePage(int nPageIndex) { return false; }
bool AddPage(int nPageIndex) { return false; }
bool EditAnnot(int nPageIndex, int nID) { return false; }
bool DeleteAnnot(int nID) { return false; }
bool EditWidgets(IAdvancedCommand* pCommand) { return false; }
int GetPagesCount() { return 0; }
int GetRotate(int nPageIndex) { return 0; }
void GetPageInfo(int nPageIndex, double* pdWidth, double* pdHeight, double* pdDpiX, double* pdDpiY) {}
int GetRotate(int nPageIndex) { return 0; }
bool IsEditPage() { return false; }
void AddShapeXML(const std::string& sXML) {}
void EndMarkedContent() {}
@ -888,19 +891,16 @@ HRESULT CPdfFile::put_FontName(const std::wstring& wsName)
wsFontName.erase(0, 10);
bool bBold = false, bItalic = false;
std::wstring wsFontPath;
if (m_pInternal->pEditor->IsBase14(wsFontName, bBold, bItalic, wsFontPath))
if (m_pInternal->pEditor->IsBase14(wsFontName, bBold, bItalic, wsFontPath) && (bBold || bItalic))
{
m_pInternal->pWriter->AddFont(wsFontName, bBold, bItalic, wsFontPath, 0);
if (bBold || bItalic)
{
LONG lStyle = 0;
if (bBold)
lStyle |= 1;
if (bItalic)
lStyle |= 2;
put_FontStyle(lStyle);
}
LONG lStyle = 0;
if (bBold)
lStyle |= 1;
if (bItalic)
lStyle |= 2;
put_FontStyle(lStyle);
}
m_pInternal->pWriter->AddFont(wsFontName, bBold, bItalic, wsFontPath, 0);
}
return m_pInternal->pWriter->put_FontName(wsFontName);
}