Commit 8fc3c1e3 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59067 954022d7-b5bf-4e40-9824-e11837661b57
parent 3b6606af
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "../../Common/DocxFormat/Source/SystemUtility/File.h" #include "../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "BinReaderWriterDefines.h" #include "BinReaderWriterDefines.h"
#ifdef _WIN32 #ifdef _WIN32
#include "FontCutter.h" #include "FontCutter.h"
#endif #endif
//#include "../../DesktopEditor/fontengine/FontManager.h" //#include "../../DesktopEditor/fontengine/FontManager.h"
...@@ -21,15 +21,16 @@ namespace NSFontCutter ...@@ -21,15 +21,16 @@ namespace NSFontCutter
CString m_strFontsDir; CString m_strFontsDir;
BOOL m_bIsEmbeddedFonts; BOOL m_bIsEmbeddedFonts;
CEmbeddedFontsManager m_oEmbeddedFonts;
#ifdef _WIN32
CEmbeddedFontsManager m_oEmbeddedFonts;
#endif
public: public:
CFontDstManager() : m_mapPicks() CFontDstManager() : m_mapPicks()
{ {
m_strFontsDir = _T(""); m_strFontsDir = _T("");
m_pFontManager = NULL; m_pFontManager = NULL;
m_bIsEmbeddedFonts = FALSE; m_bIsEmbeddedFonts = FALSE;
} }
~CFontDstManager() ~CFontDstManager()
...@@ -78,9 +79,10 @@ namespace NSFontCutter ...@@ -78,9 +79,10 @@ namespace NSFontCutter
{ {
sRes = CString(pFontInfo->m_wsFontName.c_str()); sRes = CString(pFontInfo->m_wsFontName.c_str());
if (m_bIsEmbeddedFonts) #ifdef _WIN32
if (m_bIsEmbeddedFonts)
m_oEmbeddedFonts.CheckFont(sRes, m_pFontManager); m_oEmbeddedFonts.CheckFont(sRes, m_pFontManager);
#endif
m_mapPicks.insert(std::pair<CString,CString>(sInputSave, sRes)); m_mapPicks.insert(std::pair<CString,CString>(sInputSave, sRes));
} }
...@@ -115,7 +117,9 @@ public: ...@@ -115,7 +117,9 @@ public:
HRESULT SetEmbeddedFontsDirectory(const CString& bsFontsDirectory) HRESULT SetEmbeddedFontsDirectory(const CString& bsFontsDirectory)
{ {
m_oPicker.m_oEmbeddedFonts.m_strEmbeddedFontsFolder = (CString)bsFontsDirectory; #ifdef _WIN32
m_oPicker.m_oEmbeddedFonts.m_strEmbeddedFontsFolder = (CString)bsFontsDirectory;
#endif
return S_OK; return S_OK;
} }
HRESULT SetEmbeddedFontsParam(LONG lParam) HRESULT SetEmbeddedFontsParam(LONG lParam)
...@@ -136,12 +140,16 @@ public: ...@@ -136,12 +140,16 @@ public:
HRESULT CheckString(const CString& bsText) HRESULT CheckString(const CString& bsText)
{ {
m_oPicker.m_oEmbeddedFonts.CheckString((CString)bsText); #ifdef _WIN32
m_oPicker.m_oEmbeddedFonts.CheckString((CString)bsText);
#endif
return S_OK; return S_OK;
} }
HRESULT CheckFont(const CString& bsFontName) HRESULT CheckFont(const CString& bsFontName)
{ {
m_oPicker.m_oEmbeddedFonts.CheckFont((CString)bsFontName, m_oPicker.m_pFontManager); #ifdef _WIN32
m_oPicker.m_oEmbeddedFonts.CheckFont((CString)bsFontName, m_oPicker.m_pFontManager);
#endif
return S_OK; return S_OK;
} }
...@@ -167,8 +175,10 @@ public: ...@@ -167,8 +175,10 @@ public:
{ {
return &m_oPicker; return &m_oPicker;
} }
NSFontCutter::CEmbeddedFontsManager* GetNativeCutter() #ifdef _WIN32
NSFontCutter::CEmbeddedFontsManager* GetNativeCutter()
{ {
return &m_oPicker.m_oEmbeddedFonts; return &m_oPicker.m_oEmbeddedFonts;
} }
#endif
}; };
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
#include "../../DesktopEditor/graphics/IRenderer.h" #include "../../DesktopEditor/graphics/IRenderer.h"
#include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h" #include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h"
#ifndef WIN32
#include <boost/locale.hpp>
#endif
namespace NSBinPptxRW namespace NSBinPptxRW
{ {
static std::wstring g_bstr_nodeopen = L"<"; static std::wstring g_bstr_nodeopen = L"<";
...@@ -584,7 +580,7 @@ namespace NSBinPptxRW ...@@ -584,7 +580,7 @@ namespace NSBinPptxRW
delete[] pWStr; delete[] pWStr;
#endif #endif
#else #else
saStr = boost::locale::conv::to_utf(strData); saStr = stringWstingToUtf8String(strData);
#endif #endif
CFile oFile; CFile oFile;
......
...@@ -53,8 +53,10 @@ namespace PPTX ...@@ -53,8 +53,10 @@ namespace PPTX
pWriter->EndRecord(); pWriter->EndRecord();
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts) #ifdef _WIN32
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts)
pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(Char); pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(Char);
#endif
} }
public: public:
...@@ -65,4 +67,4 @@ namespace PPTX ...@@ -65,4 +67,4 @@ namespace PPTX
} // namespace Logic } // namespace Logic
} // namespace PPTX } // namespace PPTX
#endif // PPTX_LOGIC_BUCHAR_INCLUDE_H #endif // PPTX_LOGIC_BUCHAR_INCLUDE_H
\ No newline at end of file
...@@ -278,11 +278,11 @@ namespace PPTX ...@@ -278,11 +278,11 @@ namespace PPTX
CStringA __s = (CStringA)strUrl; CStringA __s = (CStringA)strUrl;
int len = __s.GetLength(); int len = __s.GetLength();
int dstLenTemp = Base64DecodeGetRequiredLength(len); int dstLenTemp = Base64::Base64DecodeGetRequiredLength(len);
BYTE* pDstBuffer = new BYTE[dstLenTemp]; BYTE* pDstBuffer = new BYTE[dstLenTemp];
int dstLen = dstLenTemp; int dstLen = dstLenTemp;
Base64Decode(__s.GetBuffer(), len, pDstBuffer, &dstLen); Base64::Base64Decode(__s.GetBuffer(), len, pDstBuffer, &dstLen);
strTempFile = pReader->m_strFolder + _T("\\media\\temp.jpg"); strTempFile = pReader->m_strFolder + _T("\\media\\temp.jpg");
CFile oTempFile; CFile oTempFile;
......
...@@ -116,8 +116,10 @@ namespace PPTX ...@@ -116,8 +116,10 @@ namespace PPTX
pWriter->EndRecord(); pWriter->EndRecord();
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts) #ifdef _WIN32
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts)
pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(text); pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(text);
#endif
} }
void SetText(const CString& src) void SetText(const CString& src)
...@@ -147,4 +149,4 @@ namespace PPTX ...@@ -147,4 +149,4 @@ namespace PPTX
} // namespace Logic } // namespace Logic
} // namespace PPTX } // namespace PPTX
#endif // PPTX_LOGIC_FLD_INCLUDE_H #endif // PPTX_LOGIC_FLD_INCLUDE_H
\ No newline at end of file
...@@ -97,8 +97,10 @@ namespace PPTX ...@@ -97,8 +97,10 @@ namespace PPTX
pWriter->EndRecord(); pWriter->EndRecord();
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts) #ifdef _WIN32
if (pWriter->m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts)
pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(text); pWriter->m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(text);
#endif
} }
virtual CString GetText()const{return text.get_value_or(_T(""));}; virtual CString GetText()const{return text.get_value_or(_T(""));};
...@@ -120,4 +122,4 @@ namespace PPTX ...@@ -120,4 +122,4 @@ namespace PPTX
} // namespace Logic } // namespace Logic
} // namespace PPTX } // namespace PPTX
#endif // PPTX_LOGIC_RUN_INCLUDE_H #endif // PPTX_LOGIC_RUN_INCLUDE_H
\ No newline at end of file
...@@ -440,7 +440,7 @@ namespace PPTX ...@@ -440,7 +440,7 @@ namespace PPTX
} }
const OOX::CPath GetPathBySpid(const CString& spid)const const OOX::CPath GetPathBySpid(const CString& spid)const
{ {
OOX::CPath filename = _T(""); OOX::CPath filename;
if((Vml.is_init()) && (spid != _T(""))) if((Vml.is_init()) && (spid != _T("")))
{ {
std::map<CString, OOX::CPath>::const_iterator pPair = Vml->SpIds.find(spid); std::map<CString, OOX::CPath>::const_iterator pPair = Vml->SpIds.find(spid);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2014-10-20T18:50:52. --> <!-- Written by QtCreator 3.0.1, 2014-10-21T12:22:06. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
......
...@@ -635,17 +635,17 @@ namespace NSPresentationEditor ...@@ -635,17 +635,17 @@ namespace NSPresentationEditor
CString strXml = _T(""); CString strXml = _T("");
if (hasBullet.is_init() && (TRUE == hasBullet.get())) if (hasBullet.is_init() && (TRUE == hasBullet.get()))
{ {
strXml += _T("<bulletflag>255</bulletflag>"); strXml += (_T("<bulletflag>255</bulletflag>"));
if (!bulletChar.is_init()) if (!bulletChar.is_init())
{ {
strXml += _T("<bulletchar></bulletchar>"); strXml += (_T("<bulletchar></bulletchar>"));
} }
} }
if (bulletChar.is_init()) if (bulletChar.is_init())
{ {
strXml += _T("<bulletchar></bulletchar>"); strXml += (_T("<bulletchar></bulletchar>"));
} }
strXml += ToNode(bulletFontRef, _T("bulletfontref")); strXml += ToNode(bulletFontRef, _T("bulletfontref"));
......
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