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

возможность передавать AllFonts.js извне

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@66700 954022d7-b5bf-4e40-9824-e11837661b57
parent 1cdde8ad
......@@ -164,7 +164,7 @@ namespace NSDoctRenderer
std::wstring m_sErrorsLogFile;
public:
CDoctRenderer_Private()
CDoctRenderer_Private(const std::wstring& sAllFontsPath = L"")
{
m_bIsInitTypedArrays = false;
......@@ -184,6 +184,13 @@ namespace NSDoctRenderer
oNodes.GetAt(i, _node);
std::wstring strFilePath = _node.GetText();
if (!sAllFontsPath.empty())
{
std::wstring::size_type nPos = strFilePath.rfind(L"AllFonts.js");
if (nPos != std::wstring::npos && ((nPos + 11) == strFilePath.length())) // 11 = std::wstring(L"AllFonts.js").length();
strFilePath = sAllFontsPath;
}
if (NSFile::CFileBinary::Exists(strFilePath) &&
!NSFile::CFileBinary::Exists(m_strConfigDir + strFilePath))
m_arrFiles.Add(strFilePath);
......@@ -876,9 +883,9 @@ namespace NSDoctRenderer
}
};
CDoctrenderer::CDoctrenderer()
CDoctrenderer::CDoctrenderer(const std::wstring& sAllFontsPath)
{
m_pInternal = new CDoctRenderer_Private();
m_pInternal = new CDoctRenderer_Private(sAllFontsPath);
}
CDoctrenderer::~CDoctrenderer()
......
......@@ -59,7 +59,7 @@ namespace NSDoctRenderer
class Q_DECL_EXPORT CDoctrenderer
{
public:
CDoctrenderer();
CDoctrenderer(const std::wstring& sAllFontsPath = L"");
~CDoctrenderer();
public:
......
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