mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix SetCMapMemory
This commit is contained in:
@ -47,7 +47,7 @@ public:
|
|||||||
if (nType == 0)
|
if (nType == 0)
|
||||||
{
|
{
|
||||||
pReader = new PdfReader::CPdfReader(pApplicationFonts);
|
pReader = new PdfReader::CPdfReader(pApplicationFonts);
|
||||||
((PdfReader::CPdfReader*)pReader)->SetCMapFolder(L" ");
|
((PdfReader::CPdfReader*)pReader)->SetCMapMemory();
|
||||||
}
|
}
|
||||||
else if (nType == 1)
|
else if (nType == 1)
|
||||||
pReader = new CDjVuFile(pApplicationFonts);
|
pReader = new CDjVuFile(pApplicationFonts);
|
||||||
|
|||||||
@ -481,6 +481,11 @@ return 0;
|
|||||||
if (globalParams)
|
if (globalParams)
|
||||||
((GlobalParamsAdaptor*)globalParams)->SetCMapFolder(m_pInternal->m_wsCMapFolder.c_str());
|
((GlobalParamsAdaptor*)globalParams)->SetCMapFolder(m_pInternal->m_wsCMapFolder.c_str());
|
||||||
}
|
}
|
||||||
|
void CPdfReader::SetCMapMemory()
|
||||||
|
{
|
||||||
|
if (globalParams)
|
||||||
|
((GlobalParamsAdaptor*)globalParams)->SetCMapMemory();
|
||||||
|
}
|
||||||
NSFonts::IFontManager* CPdfReader::GetFontManager()
|
NSFonts::IFontManager* CPdfReader::GetFontManager()
|
||||||
{
|
{
|
||||||
return m_pInternal->m_pFontManager;
|
return m_pInternal->m_pFontManager;
|
||||||
|
|||||||
@ -94,7 +94,8 @@ namespace PdfReader
|
|||||||
bool ExtractAllImages(const wchar_t* wsDstPath, const wchar_t* wsPrefix = 0);
|
bool ExtractAllImages(const wchar_t* wsDstPath, const wchar_t* wsPrefix = 0);
|
||||||
int GetImagesCount();
|
int GetImagesCount();
|
||||||
|
|
||||||
void SetCMapFolder(const wchar_t* wsCMapFolder);
|
void SetCMapFolder(const wchar_t* wsCMapFolder);
|
||||||
|
void SetCMapMemory();
|
||||||
NSFonts::IFontManager* GetFontManager();
|
NSFonts::IFontManager* GetFontManager();
|
||||||
|
|
||||||
std::wstring ToXml(const std::wstring& wsXmlPath, bool isPrintStreams = false);
|
std::wstring ToXml(const std::wstring& wsXmlPath, bool isPrintStreams = false);
|
||||||
|
|||||||
@ -47,6 +47,13 @@ void GlobalParamsAdaptor::SetCMapFolder(const std::wstring &wsFolder)
|
|||||||
|
|
||||||
toUnicodeDirs->append(sFolder->copy()->append("/CMap"));
|
toUnicodeDirs->append(sFolder->copy()->append("/CMap"));
|
||||||
}
|
}
|
||||||
|
void GlobalParamsAdaptor::SetCMapMemory()
|
||||||
|
{
|
||||||
|
cidToUnicodes->add(new GString("Adobe-GB1"), new GString());
|
||||||
|
cidToUnicodes->add(new GString("Adobe-Korea1"), new GString());
|
||||||
|
cidToUnicodes->add(new GString("Adobe-KR"), new GString());
|
||||||
|
cidToUnicodes->add(new GString("Adobe-Japan1"), new GString());
|
||||||
|
}
|
||||||
void GlobalParamsAdaptor::AddNameToUnicode(const char* sFile)
|
void GlobalParamsAdaptor::AddNameToUnicode(const char* sFile)
|
||||||
{
|
{
|
||||||
char *tok1, *tok2;
|
char *tok1, *tok2;
|
||||||
|
|||||||
@ -38,7 +38,8 @@ public:
|
|||||||
m_wsTempFolder = folder;
|
m_wsTempFolder = folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCMapFolder(const std::wstring &wsFolder);
|
void SetCMapFolder(const std::wstring &wsFolder);
|
||||||
|
void SetCMapMemory();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void AddNameToUnicode(const char* sFile);
|
void AddNameToUnicode(const char* sFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user