mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 11:47:00 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52730 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
56f12541be
commit
f43059a16f
@ -680,6 +680,7 @@ public:
|
||||
m_lDefIndex = -1;
|
||||
|
||||
m_pFonts = new CList();
|
||||
m_wsWinFontDir[0] = '\0';
|
||||
|
||||
WIN32_FIND_DATA oFD;
|
||||
|
||||
@ -861,6 +862,7 @@ public:
|
||||
m_lDefIndex = -1;
|
||||
|
||||
m_pFonts = new CList();
|
||||
m_wsWinFontDir[0] = '\0';
|
||||
|
||||
XmlUtils::CXmlNode oMainNode;
|
||||
oMainNode.FromXmlString( sWinFontsXml );
|
||||
@ -887,6 +889,7 @@ public:
|
||||
m_lDefIndex = -1;
|
||||
|
||||
m_pFonts = new CList();
|
||||
m_wsWinFontDir[0] = '\0';
|
||||
|
||||
LONG lCount = *((LONG*)pBuffer);
|
||||
pBuffer += g_lSizeofLONG;
|
||||
|
||||
@ -98,6 +98,33 @@ public:
|
||||
{
|
||||
SaveAllFontsJS((CString)ParamValue.bstrVal);
|
||||
}
|
||||
if ( _T("InitializeFromFolder") == sParamName && VT_BSTR == ParamValue.vt )
|
||||
{
|
||||
if ((GetFileAttributes(ParamValue.bstrVal) & FILE_ATTRIBUTE_DIRECTORY) != 0)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> font_selection.bin
|
||||
CFile oFile;
|
||||
if (S_OK == oFile.OpenFile(((CString)ParamValue.bstrVal) + _T("\\font_selection.bin")))
|
||||
{
|
||||
LONG lSize = (LONG)oFile.GetFileSize();
|
||||
BYTE* pData = new BYTE[lSize];
|
||||
oFile.ReadFile(pData, (DWORD)lSize);
|
||||
|
||||
m_pList = new CWinFontList(pData, (CString)ParamValue.bstrVal);
|
||||
RELEASEARRAYOBJECTS(pData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Init(ParamValue.bstrVal, VARIANT_TRUE, VARIANT_FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Init(L"", VARIANT_TRUE, VARIANT_FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
|
||||
@ -205,8 +232,6 @@ public:
|
||||
SaveBinaryData(pFontsData, (ULONG)lFontsDataLen);
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(pFontsData);
|
||||
|
||||
oInfo.m_lCount = 1;
|
||||
m_oSS.m_lLength = (LONG64)lFontsDataLen;
|
||||
|
||||
@ -229,6 +254,8 @@ public:
|
||||
|
||||
WinFontsInfoStorage oInfo;
|
||||
m_pInfoStorage->ReadStruct( &oInfo );
|
||||
|
||||
m_pList = new CWinFontList(oInfo.m_pBuffer, strFolder);
|
||||
}
|
||||
}
|
||||
while ( STIF_CREATING == m_oSS.m_sStatus );
|
||||
|
||||
Reference in New Issue
Block a user