mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-10 23:03:14 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67468 954022d7-b5bf-4e40-9824-e11837661b57
52 lines
1.8 KiB
C++
52 lines
1.8 KiB
C++
#ifndef DOCX_SERIALIZER
|
|
#define DOCX_SERIALIZER
|
|
|
|
#if defined(_WIN32) || defined (_WIN64)
|
|
#include <atlbase.h>
|
|
#include <atlstr.h>
|
|
#else
|
|
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
|
|
#endif
|
|
|
|
namespace Writers
|
|
{
|
|
class FileWriter;
|
|
}
|
|
namespace NSBinPptxRW
|
|
{
|
|
class CBinaryFileReader;
|
|
class CBinaryFileWriter;
|
|
}
|
|
namespace BinDocxRW
|
|
{
|
|
class BinaryFileWriter;
|
|
class CDocxSerializer
|
|
{
|
|
private:
|
|
CString m_sFontDir;
|
|
CString m_sEmbeddedFontsDir;
|
|
bool m_bIsNoBase64Save;
|
|
bool m_bSaveChartAsImg;
|
|
BinaryFileWriter* m_oBinaryFileWriter;
|
|
Writers::FileWriter* m_pCurFileWriter;
|
|
public:
|
|
CDocxSerializer();
|
|
bool ConvertDocxToDoct(const CString& sSrcFileName, const CString& sDstFileName, const CString& sTmpDir, const CString& sXMLOptions);
|
|
bool ConvertDoctToDocx(const CString& sSrcFileName, const CString& sDstFileName, const CString& sTmpDir, const CString& sXMLOptions);
|
|
|
|
bool loadFromFile(const CString& sSrcFileName, const CString& sDstPath, const CString& sXMLOptions, const CString& sThemePath, const CString& sMediaPath, const CString& sEmbedPath);
|
|
bool saveToFile(const CString& sSrcFileName, const CString& sDstPath, const CString& sXMLOptions);
|
|
|
|
bool CreateDocxFolders(CString strDirectory, CString& sThemePath, CString& sMediaPath, CString& sEmbedPath);
|
|
|
|
bool getXmlContent(NSBinPptxRW::CBinaryFileReader& oBufferedStream, long lLength, CString& sOutputXml);
|
|
bool getBinaryContent(const CString& bsTxContent, NSBinPptxRW::CBinaryFileWriter& oBufferedStream, long& lDataSize);
|
|
|
|
void setFontDir(const CString& sFontDir);
|
|
void setEmbeddedFontsDir(const CString& sEmbeddedFontsDir);
|
|
void setIsNoBase64Save(bool bIsNoBase64Save);
|
|
void setSaveChartAsImg(bool bSaveChartAsImg);
|
|
};
|
|
}
|
|
#endif // #ifndef DOCX_SERIALIZER
|