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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52730 954022d7-b5bf-4e40-9824-e11837661b57
parent 56f12541
......@@ -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)
{
// 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 );
......
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