Commit f218af78 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

добавлен флаг для подбора шрифтов. Убран экспорт PdfWriter, HtmlFile

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64843 954022d7-b5bf-4e40-9824-e11837661b57
parent 51ab7e4b
......@@ -1115,16 +1115,17 @@ void CFontList::ToBuffer(BYTE** pDstData, LONG* pLen, std::wstring strDirectory,
*pLen = lDataSize;
}
CFontInfo* CFontList::GetByParams(CFontSelectFormat& oSelect)
CFontInfo* CFontList::GetByParams(CFontSelectFormat& oSelect, bool bIsDictionaryUse)
{
int nFontsCount = m_pList.GetCount();
if (0 == nFontsCount)
return NULL;
#if 1
// дубликат не делаем!!! Серега создает объект только для подбора и дальше его не использует
NSFontDictionary::CorrectParamsFromDictionary(oSelect);
#endif
if (bIsDictionaryUse)
{
// дубликат не делаем!!! Серега создает объект только для подбора и дальше его не использует
NSFontDictionary::CorrectParamsFromDictionary(oSelect);
}
int nMinIndex = 0; // Номер шрифта в списке с минимальным весом
int nMinPenalty = 0; // Минимальный вес
......
......@@ -189,7 +189,7 @@ public:
void LoadFromFolder(const std::wstring& strDirectory);
bool CheckLoadFromFolderBin(const std::wstring& strDirectory);
void Add(CFontInfo* pInfo);
CFontInfo* GetByParams(CFontSelectFormat& oSelect);
CFontInfo* GetByParams(CFontSelectFormat& oSelect, bool bIsDictionaryUse = true);
CArray<CFontInfo*> GetAllByName(const std::wstring& strFontName);
void SetDefaultFont(std::wstring& sName);
};
......
......@@ -590,12 +590,12 @@ int CFontManager::Release()
delete this;
return ret;
}
CFontInfo* CFontManager::GetFontInfoByParams(CFontSelectFormat& oFormat)
CFontInfo* CFontManager::GetFontInfoByParams(CFontSelectFormat& oFormat, bool bIsDictionaryUse)
{
CFontInfo* pRes = NULL;
if (NULL != m_pApplication)
{
pRes = m_pApplication->GetList()->GetByParams(oFormat);
pRes = m_pApplication->GetList()->GetByParams(oFormat, bIsDictionaryUse);
}
return pRes;
}
......
......@@ -160,7 +160,7 @@ public:
virtual int AddRef();
virtual int Release();
CFontInfo* GetFontInfoByParams(CFontSelectFormat& oFormat);
CFontInfo* GetFontInfoByParams(CFontSelectFormat& oFormat, bool bIsDictionaryUse = true);
CArray<CFontInfo*> GetAllStylesByFontName(const std::wstring& strName);
INT LoadFontByName(const std::wstring& sName, const double& dSize, const LONG& lStyle, const double& dDpiX, const double& dDpiY);
INT LoadFontFromFile(const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY);
......
......@@ -57,6 +57,9 @@ shared {
linux-g++ | linux-g++-64 | linux-g++-32 {
CONFIG += plugin
TARGET_EXT = .so
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CFLAGS += -fvisibility=hidden
}
}
################################################
......
......@@ -1495,7 +1495,7 @@ void CPdfRenderer::UpdateFont()
oFontSelect.wsName = new std::wstring(m_oFont.GetName());
oFontSelect.bItalic = new INT(m_oFont.IsItalic() ? 1 : 0);
oFontSelect.bBold = new INT(m_oFont.IsBold() ? 1 : 0);
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelect);
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelect, false);
wsFontPath = pFontInfo->m_wsFontPath;
lFaceIndex = pFontInfo->m_lIndex;
......
......@@ -65,6 +65,9 @@ shared {
linux-g++ | linux-g++-64 | linux-g++-32 {
CONFIG += plugin
TARGET_EXT = .so
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CFLAGS += -fvisibility=hidden
}
}
################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment