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

печать (не доделано)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62326 954022d7-b5bf-4e40-9824-e11837661b57
parent e5fc5b7f
...@@ -793,7 +793,7 @@ namespace NSFile ...@@ -793,7 +793,7 @@ namespace NSFile
} }
return true; return true;
} }
static bool Decode(char* pDataSrc, int nLenSrc, BYTE*& pDataDst, int& nLenDst) static bool Decode(const char* pDataSrc, int nLenSrc, BYTE*& pDataDst, int& nLenDst)
{ {
if (!pDataSrc || nLenSrc < 1) if (!pDataSrc || nLenSrc < 1)
return false; return false;
......
...@@ -68,11 +68,7 @@ CApplicationFontStreams::CApplicationFontStreams() ...@@ -68,11 +68,7 @@ CApplicationFontStreams::CApplicationFontStreams()
} }
CApplicationFontStreams::~CApplicationFontStreams() CApplicationFontStreams::~CApplicationFontStreams()
{ {
for (std::map<std::wstring, CFontStream*>::iterator iter = m_mapStreams.begin(); iter != m_mapStreams.end(); ++iter) Clear();
{
CFontStream* pFile = iter->second;
RELEASEOBJECT(pFile);
}
} }
CFontStream* CApplicationFontStreams::GetStream(const std::wstring &strFile) CFontStream* CApplicationFontStreams::GetStream(const std::wstring &strFile)
...@@ -93,6 +89,16 @@ void CApplicationFontStreams::CheckStreams(std::map<std::wstring,bool> &mapFiles ...@@ -93,6 +89,16 @@ void CApplicationFontStreams::CheckStreams(std::map<std::wstring,bool> &mapFiles
// TODO: // TODO:
} }
void CApplicationFontStreams::Clear()
{
for (std::map<std::wstring, CFontStream*>::iterator iter = m_mapStreams.begin(); iter != m_mapStreams.end(); ++iter)
{
CFontStream* pFile = iter->second;
RELEASEOBJECT(pFile);
}
m_mapStreams.clear();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////
CFontFile* CFontManager::LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex) CFontFile* CFontManager::LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex)
{ {
......
...@@ -41,6 +41,7 @@ public: ...@@ -41,6 +41,7 @@ public:
public: public:
CFontStream* GetStream(const std::wstring& strFile); CFontStream* GetStream(const std::wstring& strFile);
void CheckStreams(std::map<std::wstring, bool>& mapFiles); void CheckStreams(std::map<std::wstring, bool>& mapFiles);
void Clear();
}; };
class CFontsCache class CFontsCache
...@@ -146,4 +147,4 @@ public: ...@@ -146,4 +147,4 @@ public:
static CFontFile* LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex); static CFontFile* LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex);
}; };
#endif // _BUILD_FONT_ENGINE_FONTMANAGER_H_ #endif // _BUILD_FONT_ENGINE_FONTMANAGER_H_
\ No newline at end of file
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