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 @@
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "BinReaderWriterDefines.h"
#ifdef _WIN32
#include "FontCutter.h"
#include "FontCutter.h"
#endif
//#include "../../DesktopEditor/fontengine/FontManager.h"
......@@ -21,15 +21,16 @@ namespace NSFontCutter
CString m_strFontsDir;
BOOL m_bIsEmbeddedFonts;
CEmbeddedFontsManager m_oEmbeddedFonts;
#ifdef _WIN32
CEmbeddedFontsManager m_oEmbeddedFonts;
#endif
public:
CFontDstManager() : m_mapPicks()
{
m_strFontsDir = _T("");
m_pFontManager = NULL;
m_bIsEmbeddedFonts = FALSE;
}
~CFontDstManager()
......@@ -78,9 +79,10 @@ namespace NSFontCutter
{
sRes = CString(pFontInfo->m_wsFontName.c_str());
if (m_bIsEmbeddedFonts)
#ifdef _WIN32
if (m_bIsEmbeddedFonts)
m_oEmbeddedFonts.CheckFont(sRes, m_pFontManager);
#endif
m_mapPicks.insert(std::pair<CString,CString>(sInputSave, sRes));
}
......@@ -115,7 +117,9 @@ public:
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;
}
HRESULT SetEmbeddedFontsParam(LONG lParam)
......@@ -136,12 +140,16 @@ public:
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;
}
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;
}
......@@ -167,8 +175,10 @@ public:
{
return &m_oPicker;
}
NSFontCutter::CEmbeddedFontsManager* GetNativeCutter()
#ifdef _WIN32
NSFontCutter::CEmbeddedFontsManager* GetNativeCutter()
{
return &m_oPicker.m_oEmbeddedFonts;
}
#endif
};
......@@ -4,10 +4,6 @@
#include "../../DesktopEditor/graphics/IRenderer.h"
#include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h"
#ifndef WIN32
#include <boost/locale.hpp>
#endif
namespace NSBinPptxRW
{
static std::wstring g_bstr_nodeopen = L"<";
......@@ -584,7 +580,7 @@ namespace NSBinPptxRW
delete[] pWStr;
#endif
#else
saStr = boost::locale::conv::to_utf(strData);
saStr = stringWstingToUtf8String(strData);
#endif
CFile oFile;
......
......@@ -53,8 +53,10 @@ namespace PPTX
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);
#endif
}
public:
......@@ -65,4 +67,4 @@ namespace PPTX
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_BUCHAR_INCLUDE_H
\ No newline at end of file
#endif // PPTX_LOGIC_BUCHAR_INCLUDE_H
......@@ -278,11 +278,11 @@ namespace PPTX
CStringA __s = (CStringA)strUrl;
int len = __s.GetLength();
int dstLenTemp = Base64DecodeGetRequiredLength(len);
int dstLenTemp = Base64::Base64DecodeGetRequiredLength(len);
BYTE* pDstBuffer = new BYTE[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");
CFile oTempFile;
......
......@@ -116,8 +116,10 @@ namespace PPTX
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);
#endif
}
void SetText(const CString& src)
......@@ -147,4 +149,4 @@ namespace PPTX
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_FLD_INCLUDE_H
\ No newline at end of file
#endif // PPTX_LOGIC_FLD_INCLUDE_H
......@@ -97,8 +97,10 @@ namespace PPTX
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);
#endif
}
virtual CString GetText()const{return text.get_value_or(_T(""));};
......@@ -120,4 +122,4 @@ namespace PPTX
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_RUN_INCLUDE_H
\ No newline at end of file
#endif // PPTX_LOGIC_RUN_INCLUDE_H
......@@ -440,7 +440,7 @@ namespace PPTX
}
const OOX::CPath GetPathBySpid(const CString& spid)const
{
OOX::CPath filename = _T("");
OOX::CPath filename;
if((Vml.is_init()) && (spid != _T("")))
{
std::map<CString, OOX::CPath>::const_iterator pPair = Vml->SpIds.find(spid);
......
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
......@@ -635,17 +635,17 @@ namespace NSPresentationEditor
CString strXml = _T("");
if (hasBullet.is_init() && (TRUE == hasBullet.get()))
{
strXml += _T("<bulletflag>255</bulletflag>");
strXml += (_T("<bulletflag>255</bulletflag>"));
if (!bulletChar.is_init())
{
strXml += _T("<bulletchar></bulletchar>");
strXml += (_T("<bulletchar></bulletchar>"));
}
}
if (bulletChar.is_init())
{
strXml += _T("<bulletchar></bulletchar>");
strXml += (_T("<bulletchar></bulletchar>"));
}
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