mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61920 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
d57265249b
commit
f49c8a052c
11
.gitattributes
vendored
11
.gitattributes
vendored
@ -355,6 +355,17 @@ ASCOfficePPTFile/trunk/PPTFormatLib svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTFile/trunk/PPTFormatLib/Linux svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTFile/trunk/PPTFormatLib/Win32 svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTFile/trunk/Win32 svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Drawing svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/project.xcworkspace svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/project.xcworkspace/xcuserdata svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/project.xcworkspace/xcuserdata/alexey.musinov.xcuserdatad/UserInterfaceState.xcuserstate svn_mime_002dtype=application%2Foctet-stream
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/xcuserdata svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad svnc_tsvn_003alogminsize=5
|
||||
ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj/xcuserdata/alexey.musinov.xcuserdatad/xcschemes svnc_tsvn_003alogminsize=5
|
||||
ASCOfficeXlsFile/ASCWorksheetConverter/Documents/22_04_09[!!-~]Презентация/xls-xlsx.odp svn_mime_002dtype=application%2Foctet-stream
|
||||
ASCOfficeXlsFile/ASCWorksheetConverter/Documents/22_04_09[!!-~]Презентация/xls-xlsx_short.odp svn_mime_002dtype=application%2Foctet-stream
|
||||
ASCOfficeXlsFile/ASCWorksheetConverter/Documents/22_04_09[!!-~]Презентация/Презентация[!!-~]конвертера[!!-~]XLSX.doc svn_mime_002dtype=application%2Foctet-stream
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -78,6 +78,11 @@ ASCOfficeOdpFile/ODPFormat/Release
|
||||
ASCOfficeOdpFile/Odp2DrawingXML/Debug
|
||||
ASCOfficeOdpFile/Odp2DrawingXML/Release
|
||||
ASCOfficeOdtFile/Projects/*
|
||||
ASCOfficePPTXFile/*.suo
|
||||
ASCOfficePPTXFile/Debug
|
||||
ASCOfficePPTXFile/PPTXFormat/!_
|
||||
ASCOfficePPTXFile/PPTXFormat/_
|
||||
ASCOfficePPTXFile/Release
|
||||
_tags/rev_61879/ASCImageStudio3/AVSImageRaw3/trunk/dcraw_8-94/Output
|
||||
_tags/rev_61879/ASCImageStudio3/AVSImageRaw3/trunk/dcraw_8-94/Test/AVSImageRawSimpleConverter/bin
|
||||
_tags/rev_61879/ASCImageStudio3/AVSImageRaw3/trunk/dcraw_8-94/Test/AVSImageRawSimpleConverter/obj
|
||||
|
||||
4192
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
Normal file
4192
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
Normal file
File diff suppressed because it is too large
Load Diff
243
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
Normal file
243
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
Normal file
@ -0,0 +1,243 @@
|
||||
#ifndef ASC_OFFICE_DRAWING_CONVERTER
|
||||
#define ASC_OFFICE_DRAWING_CONVERTER
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <atlbase.h>
|
||||
#include <atlstr.h>
|
||||
#else
|
||||
#include "../DesktopEditor/common/ASCVariant.h"
|
||||
#endif
|
||||
|
||||
#include "../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../Common/DocxFormat/Source/Base/Nullable.h"
|
||||
|
||||
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/PPTShapeEnum.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class IRenderer;
|
||||
class CShape;
|
||||
class CPPTShape;
|
||||
class CFontManager;
|
||||
class COfficeFontPicker;
|
||||
|
||||
namespace XmlUtils
|
||||
{
|
||||
class CXmlNode;
|
||||
}
|
||||
namespace NSCommon
|
||||
{
|
||||
template<typename Type> class smart_ptr;
|
||||
}
|
||||
namespace BinDocxRW
|
||||
{
|
||||
class CDocxSerializer;
|
||||
}
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
class CBinaryFileWriter;
|
||||
class CBinaryFileReader;
|
||||
class CImageManager2;
|
||||
class CXmlWriter;
|
||||
}
|
||||
namespace PPTX
|
||||
{
|
||||
class WrapperFile;
|
||||
class WrapperWritingElement;
|
||||
class CCommonRels;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
class SpTreeElem;
|
||||
class Xfrm;
|
||||
class Shape;
|
||||
}
|
||||
|
||||
class CStringTrimmer
|
||||
{
|
||||
public:
|
||||
std::vector<CString> m_arParams;
|
||||
TCHAR m_Separator;
|
||||
|
||||
public:
|
||||
CStringTrimmer();
|
||||
~CStringTrimmer();
|
||||
|
||||
public:
|
||||
void LoadFromString(CString& strParams);
|
||||
|
||||
double GetParameter(int nIndex, double dDefault);
|
||||
};
|
||||
|
||||
class CCSS
|
||||
{
|
||||
public:
|
||||
std::map<CString, CString> m_mapSettings;
|
||||
CString m_strClassName;
|
||||
|
||||
public:
|
||||
CCSS();
|
||||
~CCSS();
|
||||
AVSINLINE void Clear();
|
||||
|
||||
public:
|
||||
void LoadFromString(CString& strParams);
|
||||
void LoadFromString2(CString& strParams);
|
||||
};
|
||||
|
||||
class CStylesCSS
|
||||
{
|
||||
public:
|
||||
std::vector<CCSS> m_arStyles;
|
||||
|
||||
public:
|
||||
CStylesCSS();
|
||||
~CStylesCSS();
|
||||
AVSINLINE void Clear();
|
||||
|
||||
public:
|
||||
void LoadStyles(CString& strParams);
|
||||
};
|
||||
}
|
||||
class CSpTreeElemProps
|
||||
{
|
||||
public:
|
||||
LONG X;
|
||||
LONG Y;
|
||||
LONG Width;
|
||||
LONG Height;
|
||||
|
||||
bool IsTop;
|
||||
|
||||
public:
|
||||
CSpTreeElemProps();
|
||||
};
|
||||
|
||||
class CElementProps
|
||||
{
|
||||
public:
|
||||
std::map<LONG, VARIANT> m_Properties;
|
||||
|
||||
public:
|
||||
CElementProps();
|
||||
|
||||
~CElementProps();
|
||||
|
||||
void FinalRelease();
|
||||
|
||||
public:
|
||||
HRESULT(GetProperty)(LONG lId, VARIANT* pProp);
|
||||
HRESULT(SetProperty)(LONG lId, VARIANT prop);
|
||||
|
||||
public:
|
||||
static bool CopyProperty(VARIANT& oDst, const VARIANT& oSrc);
|
||||
|
||||
};
|
||||
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
class CDrawingConverter
|
||||
{
|
||||
public:
|
||||
class CElement
|
||||
{
|
||||
public:
|
||||
PPTX::WrapperWritingElement* m_pElement;
|
||||
CElementProps* m_pProps;
|
||||
|
||||
public:
|
||||
CElement();
|
||||
~CElement();
|
||||
|
||||
CElement& operator=(const CElement& oSrc);
|
||||
CElement(const CElement& oSrc);
|
||||
};
|
||||
|
||||
|
||||
std::map<CString, CShape*> m_mapShapeTypes;
|
||||
std::map<CString, NSCommon::smart_ptr<PPTX::CCommonRels>> m_mapRels;
|
||||
CString m_strCurrentRelsPath;
|
||||
|
||||
NSBinPptxRW::CBinaryFileWriter* m_pBinaryWriter;
|
||||
int m_lNextId;
|
||||
|
||||
int m_lCurrentObjectTop;
|
||||
|
||||
NSBinPptxRW::CBinaryFileReader* m_pReader;
|
||||
NSBinPptxRW::CImageManager2* m_pImageManager;
|
||||
NSBinPptxRW::CXmlWriter* m_pXmlWriter;
|
||||
int m_nCurrentIndexObject;
|
||||
IRenderer* m_pOOXToVMLRenderer;
|
||||
BOOL m_bIsUseConvertion2007;
|
||||
|
||||
NSCommon::smart_ptr<PPTX::WrapperFile>* m_pTheme;
|
||||
NSCommon::smart_ptr<PPTX::WrapperWritingElement>* m_pClrMap;
|
||||
|
||||
CString m_strFontDirectory;
|
||||
public:
|
||||
|
||||
CDrawingConverter();
|
||||
|
||||
~CDrawingConverter();
|
||||
public:
|
||||
HRESULT SetMainDocument (BinDocxRW::CDocxSerializer* pDocument);
|
||||
HRESULT SetRelsPath (const CString& bsRelsPath);
|
||||
CString GetRelsPath();
|
||||
HRESULT SetMediaDstPath (const CString& bsMediaPath);
|
||||
|
||||
HRESULT AddShapeType(const CString& bsXml);
|
||||
HRESULT AddObject(const CString& bsXml, CString** pMainProps);
|
||||
HRESULT GetThemeBinary(BYTE** ppBinary, long& lBinarySize, const CString& bsThemeFilePath);
|
||||
|
||||
HRESULT SaveThemeXml(LONG lStart, LONG lLength, const CString& bsThemePath);
|
||||
HRESULT SaveObject(LONG lStart, LONG lLength, const CString& bsMainProps, CString** bsXml);
|
||||
HRESULT SaveObjectEx(LONG lStart, LONG lLength, const CString& bsMainProps, LONG lDocType, CString** bsXml);
|
||||
|
||||
HRESULT GetRecordBinary(LONG lRecordType, const CString& bsXml);
|
||||
HRESULT GetRecordXml(LONG lStart, LONG lLength, LONG lRecType, LONG lDocType, CString** bsXml);
|
||||
|
||||
HRESULT SetDstContentRels();
|
||||
HRESULT SaveDstContentRels(const CString& bsRelsPath);
|
||||
HRESULT WriteRels (const CString& bsType, const CString& bsTarget, const CString& bsTargetMode, LONG* lId);
|
||||
HRESULT LoadClrMap (const CString& bsXml);
|
||||
|
||||
HRESULT(GetTxBodyBinary)(const CString& bsXml);
|
||||
HRESULT(GetTxBodyXml)(LONG lStart, LONG lLength, CString** pbstrXml);
|
||||
HRESULT(SetFontDir)(const CString& bsFontDir);
|
||||
|
||||
HRESULT SetFontPicker(COfficeFontPicker* pFontPicker);
|
||||
HRESULT(SetAdditionalParam)(const CString& ParamName, BYTE *pArray, size_t szCount);
|
||||
HRESULT(SetAdditionalParam)(const CString& ParamName, VARIANT ParamValue);
|
||||
HRESULT(GetAdditionalParam)(const CString& ParamName, BYTE **pArray, size_t& szCount);
|
||||
HRESULT(GetAdditionalParam)(const CString& ParamName, VARIANT* ParamValue);
|
||||
public:
|
||||
void SetFontManager(CFontManager* pFontManager);
|
||||
protected:
|
||||
nullable<PPTX::Logic::Xfrm> m_oxfrm_override;
|
||||
|
||||
bool ParceObject(const CString& strXml, CString** pMainProps);
|
||||
void SendMainProps(const CString& strMainProps, CString**& pMainProps);
|
||||
|
||||
PPTX::Logic::SpTreeElem doc_LoadShape(XmlUtils::CXmlNode& oNodeShape, CString**& pMainProps, bool bIsTop = true);
|
||||
PPTX::Logic::SpTreeElem doc_LoadGroup(XmlUtils::CXmlNode& oNode, CString**& pMainProps, bool bIsTop = true);
|
||||
|
||||
CString GetVMLShapeXml(CPPTShape* pPPTShape);
|
||||
CString GetVMLShapeXml(PPTX::Logic::SpTreeElem& oElem);
|
||||
|
||||
void CheckBrushShape(PPTX::Logic::SpTreeElem& oElem, XmlUtils::CXmlNode& oNode, PPTShapes::ShapeType eType, CPPTShape* pPPTShape);
|
||||
void CheckPenShape(PPTX::Logic::SpTreeElem& oElem, XmlUtils::CXmlNode& oNode, PPTShapes::ShapeType eType, CPPTShape* pPPTShape);
|
||||
|
||||
void LoadCoordSize(XmlUtils::CXmlNode& oNode, ::CShape* pShape);
|
||||
CString GetDrawingMainProps(XmlUtils::CXmlNode& oNode, PPTX::CCSS& oCssStyles, CSpTreeElemProps& oProps);
|
||||
|
||||
void ConvertMainPropsToVML(const CString& bsMainProps, NSBinPptxRW::CXmlWriter& oWriter, PPTX::Logic::SpTreeElem& oElem);
|
||||
void ConvertShapeVML(PPTX::Logic::SpTreeElem& oShape, const CString& bsMainProps, NSBinPptxRW::CXmlWriter& oWriter);
|
||||
void ConvertGroupVML(PPTX::Logic::SpTreeElem& oGroup, const CString& bsMainProps, NSBinPptxRW::CXmlWriter& oWriter);
|
||||
|
||||
void ConvertTextVML(XmlUtils::CXmlNode &nodeTextBox, PPTX::Logic::Shape* pShape);
|
||||
|
||||
void Clear();
|
||||
HRESULT SetCurrentRelsPath();
|
||||
};
|
||||
}
|
||||
#endif //OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
262
ASCOfficePPTXFile/ASCOfficeDrawingConverterComInterface.h
Normal file
262
ASCOfficePPTXFile/ASCOfficeDrawingConverterComInterface.h
Normal file
@ -0,0 +1,262 @@
|
||||
// AVSOfficeDrawingConverter.h : Declaration of the CAVSOfficeDrawingConverter.h
|
||||
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "../Common/OfficeFileTemplate.h"
|
||||
#include "ASCOfficeDrawingConverter.h"
|
||||
|
||||
// IAVSODObjectProps
|
||||
[object, uuid("44B693E1-F4F9-4547-ACEF-0AE037C84485"), dual, pointer_default(unique)]
|
||||
__interface IAVSODObjectProps : IDispatch
|
||||
{
|
||||
[id(1)] HRESULT GetProperty([in] LONG lId, [out, retval] VARIANT* pProp);
|
||||
[id(2)] HRESULT SetProperty([in] LONG lId, [in] VARIANT prop);
|
||||
|
||||
[id(1000)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
|
||||
[id(1001)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
|
||||
};
|
||||
|
||||
// IAVSOfficeDrawingConverter
|
||||
[object, uuid("8E0FBC40-9B34-40bf-B68A-0FA320E1B004"), dual, pointer_default(unique)]
|
||||
__interface IAVSOfficeDrawingConverter : IDispatch
|
||||
{
|
||||
[id(1)] HRESULT SetMainDocument([in] IUnknown* pDocument);
|
||||
[id(2)] HRESULT SetRelsPath([in] BSTR bsRelsPath);
|
||||
[id(3)] HRESULT SetMediaDstPath([in] BSTR bsMediaPath);
|
||||
|
||||
[id(9)] HRESULT AddShapeType([in] BSTR bsXml);
|
||||
[id(10)] HRESULT AddObject([in] BSTR bsXml, [out] BSTR* pMainProps, [out, satype("BYTE")] SAFEARRAY** ppBinary);
|
||||
[id(11)] HRESULT SaveObject([in, satype("BYTE")] SAFEARRAY* pBinaryObj, [in] LONG lStart, [in] LONG lLength, [in] BSTR bsMainProps, [out] BSTR* bsXml);
|
||||
[id(12)] HRESULT SaveObjectEx([in, satype("BYTE")] SAFEARRAY* pBinaryObj, [in] LONG lStart, [in] LONG lLength, [in] BSTR bsMainProps, [in] LONG lDocType, [out] BSTR* bsXml);
|
||||
|
||||
[id(13)] HRESULT GetRecordBinary([in] LONG lRecordType, [in] BSTR bsXml, [out, satype("BYTE")] SAFEARRAY** ppBinary);
|
||||
[id(14)] HRESULT GetRecordXml([in, satype("BYTE")] SAFEARRAY* pBinaryObj, [in] LONG lStart, [in] LONG lLength, [in] LONG lRecType, [in] LONG lDocType, [out] BSTR* bsXml);
|
||||
|
||||
[id(20)] HRESULT AddObject2([in] BSTR bsXml, [in, satype("BYTE")] SAFEARRAY* pBinaryObj, [out] BSTR* pXmlOutput);
|
||||
|
||||
[id(30)] HRESULT GetThemeBinary([in] BSTR bsThemeFilePath, [out, satype("BYTE")] SAFEARRAY** ppBinary);
|
||||
[id(31)] HRESULT SaveThemeXml([in, satype("BYTE")] SAFEARRAY* pBinaryTheme, [in] LONG lStart, [in] LONG lLength, [in] BSTR bsThemePath);
|
||||
|
||||
[id(40)] HRESULT SetDstContentRels();
|
||||
[id(41)] HRESULT SaveDstContentRels([in] BSTR bsRelsPath);
|
||||
[id(42)] HRESULT WriteRels([in] BSTR bsType, [in] BSTR bsTarget, [in] BSTR bsTargetMode, [out] LONG* lId);
|
||||
|
||||
[id(50)] HRESULT LoadClrMap([in] BSTR bsXml);
|
||||
|
||||
[id(60)] HRESULT GetTxBodyBinary([in] BSTR bsXml, [out, satype("BYTE")] SAFEARRAY** ppBinary);
|
||||
[id(61)] HRESULT GetTxBodyXml([in, satype("BYTE")] SAFEARRAY* pBinary, [in] LONG lStart, [in] LONG lLength, BSTR* pbstrXml);
|
||||
[id(62)] HRESULT SetFontDir([in] BSTR bsFontDir);
|
||||
|
||||
[id(1000)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
|
||||
[id(1001)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
|
||||
};
|
||||
|
||||
// CAVSODObjectProps
|
||||
[coclass, uuid("4AB04382-4B51-4674-A691-BE2691A5F387"), threading(apartment), vi_progid("AVSOfficePPTXFile.ODObjectProps"), progid("AVSOfficePPTXFile.ODObjectProps.1"), version(1.0), registration_script("control.rgs")]
|
||||
class ATL_NO_VTABLE CAVSODObjectProps
|
||||
: public IAVSODObjectProps
|
||||
{
|
||||
private:
|
||||
CElementProps m_oProps;
|
||||
|
||||
public:
|
||||
|
||||
CAVSODObjectProps() : m_oProps()
|
||||
{
|
||||
}
|
||||
|
||||
~CAVSODObjectProps()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
STDMETHOD(GetProperty)(LONG lId, VARIANT* pProp)
|
||||
{
|
||||
return m_oProps.GetProperty(lId, pProp);
|
||||
}
|
||||
STDMETHOD(SetProperty)(LONG lId, VARIANT prop)
|
||||
{
|
||||
return m_oProps.SetProperty(lId, prop);
|
||||
}
|
||||
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
};
|
||||
|
||||
// CAVSOfficeDrawingConverter
|
||||
[coclass, uuid("BA240E3F-CFE4-45d7-96BB-97CDD73F63C3"), event_source(com), threading(apartment), vi_progid("AVSOfficePPTXFile.ODConverter"), progid("AVSOfficePPTXFile.ODConverter.1"), version(1.0), registration_script("control.rgs")]
|
||||
class ATL_NO_VTABLE CAVSOfficeDrawingConverter
|
||||
: public IAVSOfficeDrawingConverter
|
||||
{
|
||||
private:
|
||||
NSBinPptxRW::CDrawingConverter m_oDrawingConverter;
|
||||
public:
|
||||
|
||||
__event __interface _IAVSOfficeFileTemplateEvents2;
|
||||
|
||||
CAVSOfficeDrawingConverter()
|
||||
{
|
||||
}
|
||||
|
||||
~CAVSOfficeDrawingConverter()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
STDMETHOD(SetMainDocument)(IUnknown* pDocument)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.SetMainDocument(pDocument);
|
||||
}
|
||||
STDMETHOD(SetRelsPath)(BSTR bsRelsPath)
|
||||
{
|
||||
return m_oDrawingConverter.SetRelsPath(CString(bsRelsPath));
|
||||
}
|
||||
STDMETHOD(SetMediaDstPath)(BSTR bsMediaPath)
|
||||
{
|
||||
return m_oDrawingConverter.SetMediaDstPath(CString(bsMediaPath));
|
||||
}
|
||||
|
||||
STDMETHOD(AddShapeType)(BSTR bsXml)
|
||||
{
|
||||
return m_oDrawingConverter.AddShapeType(CString(bsXml));
|
||||
}
|
||||
STDMETHOD(AddObject)(BSTR bsXml, BSTR* pMainProps, SAFEARRAY** ppBinary)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.AddObject(bsXml, pMainProps, ppBinary);
|
||||
}
|
||||
STDMETHOD(AddObject2)(BSTR bsXml, SAFEARRAY* pBinaryObj, BSTR* pXmlOutput)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(GetThemeBinary)(BSTR bsThemeFilePath, SAFEARRAY** ppBinary)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.GetThemeBinary(bsThemeFilePath, ppBinary);
|
||||
}
|
||||
|
||||
STDMETHOD(SaveThemeXml)(SAFEARRAY* pBinaryTheme, LONG lStart, LONG lLength, BSTR bsThemePath)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.SaveThemeXml(pBinaryTheme, lStart, lLength, bsThemePath);
|
||||
}
|
||||
STDMETHOD(SaveObject)(SAFEARRAY* pBinaryObj, LONG lStart, LONG lLength, BSTR bsMainProps, BSTR* bsXml)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.SaveObject(pBinaryObj, lStart, lLength, bsMainProps, bsXml);
|
||||
}
|
||||
STDMETHOD(SaveObjectEx)(SAFEARRAY* pBinaryObj, LONG lStart, LONG lLength, BSTR bsMainProps, LONG lDocType, BSTR* bsXml)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.SaveObjectEx(pBinaryObj, lStart, lLength, bsMainProps, lDocType, bsXml);
|
||||
}
|
||||
|
||||
STDMETHOD(GetRecordBinary)(LONG lRecordType, BSTR bsXml, SAFEARRAY** ppBinary)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.GetRecordBinary(lRecordType, bsXml, ppBinary);
|
||||
}
|
||||
STDMETHOD(GetRecordXml)(SAFEARRAY* pBinaryObj, LONG lStart, LONG lLength, LONG lRecType, LONG lDocType, BSTR* bsXml)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.GetRecordXml(pBinaryObj, lStart, lLength, lRecType, lDocType, bsXml);
|
||||
}
|
||||
|
||||
STDMETHOD(SetDstContentRels)()
|
||||
{
|
||||
return m_oDrawingConverter.SetDstContentRels();
|
||||
}
|
||||
STDMETHOD(SaveDstContentRels)(BSTR bsRelsPath)
|
||||
{
|
||||
return m_oDrawingConverter.SaveDstContentRels(CString(bsRelsPath));
|
||||
}
|
||||
STDMETHOD(WriteRels)(BSTR bsType, BSTR bsTarget, BSTR bsTargetMode, LONG* lId)
|
||||
{
|
||||
return m_oDrawingConverter.WriteRels(CString(bsType), CString(bsTarget), CString(bsTargetMode), lId);
|
||||
}
|
||||
|
||||
STDMETHOD(LoadClrMap)(BSTR bsXml)
|
||||
{
|
||||
return m_oDrawingConverter.LoadClrMap(CString(bsXml));
|
||||
}
|
||||
|
||||
STDMETHOD(GetTxBodyBinary)(BSTR bsXml, SAFEARRAY** ppBinary)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.GetTxBodyBinary(bsXml, ppBinary);
|
||||
}
|
||||
STDMETHOD(GetTxBodyXml)(SAFEARRAY* pBinary, LONG lStart, LONG lLength, BSTR *pbstrXml)
|
||||
{
|
||||
return S_OK;//m_oDrawingConverter.GetTxBodyXml(pBinary, lStart, lLength, pbstrXml);
|
||||
}
|
||||
STDMETHOD(SetFontDir)(BSTR bsFontDir)
|
||||
{
|
||||
return m_oDrawingConverter.SetFontDir(CString(bsFontDir));
|
||||
}
|
||||
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
CString name = (CString)ParamName;
|
||||
if (name == _T("SerializeImageManager") || name == _T("SerializeImageManager2"))
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SAFEARRAY *pArray = ParamValue.parray;
|
||||
return m_oDrawingConverter.SetAdditionalParam(CString(ParamName), (BYTE*) pArray->pvData, pArray->rgsabound[0].cElements);
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
return m_oDrawingConverter.SetAdditionalParam(CString(ParamName), ParamValue);
|
||||
}
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
// convert
|
||||
CString name = (CString)ParamName;
|
||||
|
||||
if (name == _T("SerializeImageManager") || name == _T("SerializeImageManager2"))
|
||||
{
|
||||
BYTE* pBuffer = NULL;
|
||||
size_t nCount = 0;
|
||||
HRESULT hRes = m_oDrawingConverter.GetAdditionalParam(CString(ParamName), &pBuffer, nCount);
|
||||
if (S_OK == hRes && NULL != pBuffer)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SAFEARRAY* pArray = SafeArrayCreateVector(VT_UI1, nCount);
|
||||
|
||||
BYTE* pDataD = (BYTE*) pArray->pvData;
|
||||
memcpy(pDataD, pBuffer, nCount);
|
||||
|
||||
ParamValue->vt = VT_ARRAY;
|
||||
ParamValue->parray = pArray;
|
||||
#endif
|
||||
}
|
||||
delete [] pBuffer;
|
||||
return hRes;
|
||||
}
|
||||
else
|
||||
return m_oDrawingConverter.GetAdditionalParam(CString(ParamName), ParamValue);
|
||||
}
|
||||
};
|
||||
13
ASCOfficePPTXFile/ASCOfficePPTXFile.cpp
Normal file
13
ASCOfficePPTXFile/ASCOfficePPTXFile.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
//ASCOfficePPTXFile.cpp : Implementation of DLL Exports.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "ASCOfficePPTXFileComInterface.h"
|
||||
#include "ASCOfficeDrawingConverterComInterface.h"
|
||||
|
||||
// The module attribute causes DllMain, DllRegisterServer and DllUnregisterServer to be automatically implemented for you
|
||||
[ module(dll, uuid = "{95DEE027-7707-4078-A314-33D35AE842FD}",
|
||||
name = "ASCOfficePPTXFile",
|
||||
helpstring = "ASCOfficePPTXFile 1.0 Type Library",
|
||||
resource_name = "IDR_ASCOFFICEPPTXFILE") ];
|
||||
101
ASCOfficePPTXFile/ASCOfficePPTXFile.h
Normal file
101
ASCOfficePPTXFile/ASCOfficePPTXFile.h
Normal file
@ -0,0 +1,101 @@
|
||||
#ifndef ASC_OFFICE_PPTX_FILE
|
||||
#define ASC_OFFICE_PPTX_FILE
|
||||
|
||||
//todo
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <atlbase.h>
|
||||
#include <atlstr.h>
|
||||
#else
|
||||
#include "../DesktopEditor/common/ASCVariant.h"
|
||||
#include "../Common/DocxFormat/Source/Base/ASCString.h"
|
||||
#endif
|
||||
|
||||
#include "../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "PPTXFormat/PPTXEvent.h"
|
||||
|
||||
|
||||
typedef void (*load_from_resource)(void*, int, CString&);
|
||||
typedef bool (*extract_to_directory)(void*, CString&, CString&);
|
||||
typedef bool (*compress_from_directory)(void*, CString&, CString&);
|
||||
typedef bool (*progress_operation)(void*, long, long);
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Folder;
|
||||
}
|
||||
|
||||
class CPPTXFile : public PPTX::IPPTXEvent
|
||||
{
|
||||
private:
|
||||
//todo
|
||||
//OfficeUtils::IOfficeUtils* m_pOfficeUtils;
|
||||
PPTX::Folder* m_pFolder;
|
||||
CString m_strTempDir;
|
||||
CString m_strDirectory;
|
||||
|
||||
// writer to ppty
|
||||
CString m_strFontDirectory;
|
||||
CString m_strMediaDirectory;
|
||||
BOOL m_bIsUseSystemFonts;
|
||||
CString m_strEmbeddedFontsDirectory;
|
||||
|
||||
CString m_strFolderThemes;
|
||||
|
||||
//load_from_resource m_fCallbackResource;
|
||||
extract_to_directory m_fCallbackExtract;
|
||||
compress_from_directory m_fCallbackCompress;
|
||||
progress_operation m_fCallbackProgress;
|
||||
void* m_pCallbackArg;
|
||||
public:
|
||||
|
||||
CPPTXFile(extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg);
|
||||
|
||||
~CPPTXFile();
|
||||
|
||||
HRESULT LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions);
|
||||
|
||||
HRESULT SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions);
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
STDMETHOD(get_TempDirectory)(BSTR* pVal);
|
||||
STDMETHOD(put_TempDirectory)(BSTR newVal);
|
||||
|
||||
STDMETHOD(GetDVDXml)(BSTR* pbstrPTTXml);
|
||||
STDMETHOD(GetBluRayXml)(BSTR* pbstrDVDXml);
|
||||
|
||||
STDMETHOD(get_DrawingXml)(BSTR* pVal);
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue);
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue);
|
||||
virtual bool Progress(long ID, long Percent);
|
||||
// to PPTY
|
||||
STDMETHOD(SetMediaDir)(BSTR bsMediaDir);
|
||||
STDMETHOD(SetFontDir)(BSTR bsFontDir);
|
||||
STDMETHOD(SetThemesDir)(BSTR bsDir);
|
||||
STDMETHOD(SetUseSystemFonts)(VARIANT_BOOL useSystemFonts);
|
||||
STDMETHOD(OpenFileToPPTY)(BSTR bsInput, BSTR bsOutput);
|
||||
STDMETHOD(OpenDirectoryToPPTY)(BSTR bsInput, BSTR bsOutput);
|
||||
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput);
|
||||
#else
|
||||
HRESULT get_TempDirectory(BSTR* pVal);
|
||||
HRESULT put_TempDirectory(BSTR newVal);
|
||||
|
||||
HRESULT GetDVDXml(BSTR* pbstrPTTXml);
|
||||
HRESULT GetBluRayXml(BSTR* pbstrDVDXml);
|
||||
|
||||
HRESULT get_DrawingXml(BSTR* pVal);
|
||||
HRESULT SetAdditionalParam(BSTR ParamName, VARIANT ParamValue);
|
||||
HRESULT GetAdditionalParam(BSTR ParamName, VARIANT* ParamValue);
|
||||
|
||||
virtual bool Progress(long ID, long Percent);
|
||||
|
||||
// to PPTY
|
||||
HRESULT SetMediaDir(BSTR bsMediaDir);
|
||||
HRESULT SetFontDir(BSTR bsFontDir);
|
||||
HRESULT SetThemesDir(BSTR bsDir);
|
||||
HRESULT SetUseSystemFonts(VARIANT_BOOL useSystemFonts);
|
||||
HRESULT OpenFileToPPTY(BSTR bsInput, BSTR bsOutput);
|
||||
HRESULT OpenDirectoryToPPTY(BSTR bsInput, BSTR bsOutput);
|
||||
HRESULT ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput);
|
||||
#endif
|
||||
};
|
||||
#endif //ASC_OFFICE_PPTX_FILE
|
||||
145
ASCOfficePPTXFile/ASCOfficePPTXFile.rc
Normal file
145
ASCOfficePPTXFile/ASCOfficePPTXFile.rc
Normal file
@ -0,0 +1,145 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#define COMPONENT_NAME "OfficePPTXFile"
|
||||
#include "../Common/FileInfo.h"
|
||||
#include "version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION INTVER
|
||||
PRODUCTVERSION INTVER
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION_ACTIVEX
|
||||
VALUE "FileVersion", STRVER
|
||||
VALUE "InternalName", COMPONENT_FILE_NAME_DLL
|
||||
VALUE "LegalCopyright", LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", COMPONENT_FILE_NAME_DLL
|
||||
VALUE "ProductName", FILE_DESCRIPTION_ACTIVEX
|
||||
VALUE "ProductVersion", STRVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_ASCOFFICEPPTXFILE REGISTRY "ASCOfficePPTXFile.rgs"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROJNAME "ASCOfficePPTXFile"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
11
ASCOfficePPTXFile/ASCOfficePPTXFile.rgs
Normal file
11
ASCOfficePPTXFile/ASCOfficePPTXFile.rgs
Normal file
@ -0,0 +1,11 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove AppID
|
||||
{
|
||||
'%APPID%' = s 'ASCOfficePPTXFile'
|
||||
'ASCOfficePPTXFile.DLL'
|
||||
{
|
||||
val AppID = s '%APPID%'
|
||||
}
|
||||
}
|
||||
}
|
||||
771
ASCOfficePPTXFile/ASCOfficePPTXFile.sln
Normal file
771
ASCOfficePPTXFile/ASCOfficePPTXFile.sln
Normal file
@ -0,0 +1,771 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficePPTXFile", "ASCOfficePPTXFile.vcproj", "{70078FE7-BE4F-493C-84F3-F98F151587F5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C} = {DC24710E-8DF2-4A7A-B7C3-2313E294143C}
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCHTMLRenderer", "..\ASCHTMLRenderer\ASCHTMLRendererLib.vcproj", "{DC24710E-8DF2-4A7A-B7C3-2313E294143C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81} = {7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
|
||||
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\DesktopEditor\cximage\zlib\zlib_vs2005.vcproj", "{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcproj", "{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Multithreaded|Win32 = Debug Multithreaded|Win32
|
||||
Debug Multithreaded|x64 = Debug Multithreaded|x64
|
||||
Debug Singlethreaded|Win32 = Debug Singlethreaded|Win32
|
||||
Debug Singlethreaded|x64 = Debug Singlethreaded|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release Multithreaded|Win32 = Release Multithreaded|Win32
|
||||
Release Multithreaded|x64 = Release Multithreaded|x64
|
||||
Release Singlethreaded|Win32 = Release Singlethreaded|Win32
|
||||
Release Singlethreaded|x64 = Release Singlethreaded|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
ReleaseASC|Win32 = ReleaseASC|Win32
|
||||
ReleaseASC|x64 = ReleaseASC|x64
|
||||
ReleaseOpenSource|Win32 = ReleaseOpenSource|Win32
|
||||
ReleaseOpenSource|x64 = ReleaseOpenSource|x64
|
||||
Unicode Debug|Win32 = Unicode Debug|Win32
|
||||
Unicode Debug|x64 = Unicode Debug|x64
|
||||
Unicode Release|Win32 = Unicode Release|Win32
|
||||
Unicode Release|x64 = Unicode Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Multithreaded|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Multithreaded|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Multithreaded|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Singlethreaded|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Singlethreaded|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release Singlethreaded|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release|Win32.Build.0 = Release|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Release|x64.ActiveCfg = Release|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseASC|Win32.ActiveCfg = ReleaseASC|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseASC|Win32.Build.0 = ReleaseASC|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseASC|x64.ActiveCfg = ReleaseASC|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseOpenSource|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseOpenSource|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.ReleaseOpenSource|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{70078FE7-BE4F-493C-84F3-F98F151587F5}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{DC24710E-8DF2-4A7A-B7C3-2313E294143C}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.ActiveCfg = Debug Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.Build.0 = Debug Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.ActiveCfg = Debug Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.ActiveCfg = Debug Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.Build.0 = Debug Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.ActiveCfg = Debug Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.ActiveCfg = Release Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.Build.0 = Release Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.ActiveCfg = Release Multithreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.Build.0 = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseASC|Win32.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseASC|Win32.Build.0 = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseASC|x64.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|Win32.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|Win32.Build.0 = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|x64.ActiveCfg = Release Singlethreaded|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Multithreaded|x64.Build.0 = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug Singlethreaded|x64.Build.0 = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Debug|x64.Build.0 = Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Multithreaded|Win32.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Multithreaded|x64.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Multithreaded|x64.Build.0 = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Singlethreaded|x64.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release Singlethreaded|x64.Build.0 = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release|Win32.Build.0 = Release|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release|x64.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Release|x64.Build.0 = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseASC|Win32.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseASC|x64.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseASC|x64.Build.0 = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.ReleaseOpenSource|x64.Build.0 = Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Debug|x64.ActiveCfg = Unicode Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Debug|x64.Build.0 = Unicode Debug|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Release|Win32.Build.0 = Unicode Release|Win32
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Release|x64.ActiveCfg = Unicode Release|x64
|
||||
{7B53D2C7-1B4A-4A53-A7D3-E25B92470B81}.Unicode Release|x64.Build.0 = Unicode Release|x64
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Multithreaded|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Multithreaded|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Multithreaded|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Singlethreaded|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Singlethreaded|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release Singlethreaded|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|Win32.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|Win32.Build.0 = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|x64.ActiveCfg = ReleaseOpenSource|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Multithreaded|Win32.Build.0 = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Multithreaded|x64.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug Singlethreaded|x64.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Multithreaded|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Multithreaded|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Multithreaded|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Singlethreaded|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release Singlethreaded|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseASC|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseASC|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseASC|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseOpenSource|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseOpenSource|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.ReleaseOpenSource|x64.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Debug|Win32.Build.0 = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Release|Win32.ActiveCfg = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Release|Win32.Build.0 = Release|Win32
|
||||
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Unicode Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
638
ASCOfficePPTXFile/ASCOfficePPTXFile.vcproj
Normal file
638
ASCOfficePPTXFile/ASCOfficePPTXFile.vcproj
Normal file
@ -0,0 +1,638 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="ASCOfficePPTXFile"
|
||||
ProjectGUID="{70078FE7-BE4F-493C-84F3-F98F151587F5}"
|
||||
RootNamespace="ASCOfficePPTXFile"
|
||||
Keyword="AtlProj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/ASCOfficePPTXFile.tlb"
|
||||
HeaderFileName="ASCOfficePPTXFile.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="ASCOfficePPTXFile_i.c"
|
||||
ProxyFileName="ASCOfficePPTXFile_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../Addons/ZLib;../Common/DocxFormat/Source/XML/libxml2/XML/include;"../DesktopEditor/freetype-2.5.2/include""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;_USE_MATH_DEFINES;USE_LIBXML2_READER_"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
AdditionalDependencies="Msimg32.lib"
|
||||
OutputFile="$(OutDir)/ASCOfficePPTXFile.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/../Common/DocxFormat/Source/XML/libxml2/win_build/Release"
|
||||
IgnoreDefaultLibraryNames="LIBC;LIBCD"
|
||||
ModuleDefinitionFile=""
|
||||
MergedIDLBaseFileName="_ASCOfficePPTXFile.idl"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/ASCOfficePPTXFile.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="..\Redist\VersionControl.exe "$(ProjectDir)\version.h""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/ASCOfficePPTXFile.tlb"
|
||||
HeaderFileName="ASCOfficePPTXFile.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="ASCOfficePPTXFile_i.c"
|
||||
ProxyFileName="ASCOfficePPTXFile_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="../../../../Addons/ZLib;../Common/DocxFormat/Source/XML/libxml2/XML/include;"../DesktopEditor/freetype-2.5.2/include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_ATL_ATTRIBUTES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;_USE_MATH_DEFINES;USE_LIBXML2_READER_"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
AdditionalDependencies="Msimg32.lib"
|
||||
OutputFile="$(OutDir)/ASCOfficePPTXFile.dll"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCMT"
|
||||
MergedIDLBaseFileName="_ASCOfficePPTXFile.idl"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/ASCOfficePPTXFile.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="copy $(TargetPath) ..\Redist\ASCOfficePPTXFile.dll"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseASC|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/ASCOfficePPTXFile.tlb"
|
||||
HeaderFileName="ASCOfficePPTXFile.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="ASCOfficePPTXFile_i.c"
|
||||
ProxyFileName="ASCOfficePPTXFile_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\Common;..\..\..\..\Addons\ZLib"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG; ASCBUILD"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
AdditionalDependencies="Msimg32.lib"
|
||||
OutputFile="$(OutDir)/ASCOfficePPTXFile.dll"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCMT"
|
||||
MergedIDLBaseFileName="_ASCOfficePPTXFile.idl"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/ASCOfficePPTXFile.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="copy $(TargetPath) ..\..\..\..\..\ASC\Redist\ASCOfficeStudio\ASCOfficePPTXFile.dll"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseOpenSource|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="..\Redist\VersionControl.exe "$(ProjectDir)\version.h""
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/ASCOfficePPTXFile.tlb"
|
||||
HeaderFileName="ASCOfficePPTXFile.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="ASCOfficePPTXFile_i.c"
|
||||
ProxyFileName="ASCOfficePPTXFile_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\Common;..\..\..\..\Addons\ZLib"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;BUILD_CONFIG_OPENSOURCE_VERSION"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
AdditionalDependencies="Msimg32.lib"
|
||||
OutputFile="$(OutDir)/ASCOfficePPTXFile.dll"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="LIBC,LIBCMT"
|
||||
MergedIDLBaseFileName="_ASCOfficePPTXFile.idl"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/ASCOfficePPTXFile.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="copy to RedistOpenSource"
|
||||
CommandLine="copy $(TargetPath) ..\Redist\ASCOfficePPTXFile.dll"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFile.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFileRealization.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseASC|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseOpenSource|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="DocxReaderWriter"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\XlsxSerializerCom\Common\Common.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XlsxSerializerCom\Reader\CommonWriter.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XlsxSerializerCom\Reader\CSVReader.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XlsxSerializerCom\Writer\CSVWriter.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="_"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ASCOfficeDrawingConverter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASCOfficeDrawingConverterComInterface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFile.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFileComInterface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stdafx.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFile.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASCOfficePPTXFile.rgs"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
215
ASCOfficePPTXFile/ASCOfficePPTXFileComInterface.h
Normal file
215
ASCOfficePPTXFile/ASCOfficePPTXFileComInterface.h
Normal file
@ -0,0 +1,215 @@
|
||||
// CAVSOfficePPTXFile.h : Declaration of the CAVSOfficePPTXFile
|
||||
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "../Common/OfficeFileTemplate.h"
|
||||
#include "ASCOfficePPTXFile.h"
|
||||
#include "../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h"
|
||||
#include "../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
|
||||
bool comExtractFile(void* pArg, CString& sFile, CString& sDir);
|
||||
bool comCompressFile(void* pArg, CString& sDir, CString& sFile);
|
||||
bool comProgress(void* pArg, long ID, long Percent);
|
||||
|
||||
// IAVSOfficePPTXFile
|
||||
[object, uuid("ED1EC17E-EE0E-4cae-9E63-1C57235CE286"), dual, pointer_default(unique)]
|
||||
__interface IAVSOfficePPTXFile : IAVSOfficeFileTemplate
|
||||
{
|
||||
// [id(3), helpstring("method SaveAsDrawingXML")] HRESULT SaveAsDrawingXML([in] BSTR sSrcFileName, [in] BSTR sDestPath, [in] BSTR sDestXMLFileName);
|
||||
|
||||
[propget, id(4), helpstring("property TempDirectory")] HRESULT TempDirectory([out, retval] BSTR* pVal);
|
||||
[propput, id(4), helpstring("property TempDirectory")] HRESULT TempDirectory([in] BSTR newVal);
|
||||
[id(5), helpstring("method GetDVDXml")] HRESULT GetDVDXml([out,retval] BSTR* pbstrPTTXml);
|
||||
[id(6), helpstring("method GetBluRayXml")] HRESULT GetBluRayXml([out,retval] BSTR* pbstrDVDXml);
|
||||
[propget, id(7), helpstring("property DrawingXml")] HRESULT DrawingXml([out, retval] BSTR* pVal);
|
||||
|
||||
[id(2000 + 0)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
|
||||
[id(2001 + 1)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
|
||||
};
|
||||
|
||||
// IAVSOfficePPTXFile2
|
||||
[object, uuid("4F4EA472-EC78-495c-B627-5798EA364468"), dual, pointer_default(unique)]
|
||||
__interface IAVSOfficePPTXFile2 : IDispatch
|
||||
{
|
||||
[id(10000 + 0)] HRESULT OpenFileToPPTY([in] BSTR bsInputDir, [in] BSTR bsFileDst);
|
||||
[id(10000 + 1)] HRESULT OpenDirectoryToPPTY([in] BSTR bsInputDir, [in] BSTR bsFileDst);
|
||||
|
||||
[id(10000 + 2)] HRESULT SetMediaDir([in] BSTR bsMediaDir);
|
||||
[id(10000 + 3)] HRESULT SetFontDir([in] BSTR bsFontDir);
|
||||
|
||||
[id(10000 + 4)] HRESULT SetUseSystemFonts([in] VARIANT_BOOL useSystemFonts);
|
||||
[id(10000 + 5)] HRESULT ConvertPPTYToPPTX([in] BSTR bsInputFile, [in] BSTR bsFileDst);
|
||||
|
||||
[id(10000 + 6)] HRESULT SetThemesDir([in] BSTR bsThemesPath);
|
||||
};
|
||||
|
||||
// CAVSOfficePPTXFile
|
||||
[coclass, uuid("5731F488-94FF-44b7-8A3E-54CBB746F5B1"), event_source(com), threading(apartment), vi_progid("AVSOfficePPTXFile.OfficePPTXFile"), progid("AVSOfficePPTXFile.OfficePPTXFile.1"), version(1.0), registration_script("control.rgs")]
|
||||
class ATL_NO_VTABLE CAVSOfficePPTXFile
|
||||
: public IAVSOfficePPTXFile
|
||||
, public IAVSOfficePPTXFile2
|
||||
{
|
||||
private:
|
||||
CPPTXFile m_oCPPTXFile;
|
||||
public:
|
||||
|
||||
__event __interface _IAVSOfficeFileTemplateEvents2;
|
||||
CAVSOfficePPTXFile() : m_oCPPTXFile(comExtractFile, comCompressFile, comProgress, this)
|
||||
{
|
||||
}
|
||||
|
||||
~CAVSOfficePPTXFile()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
HRESULT LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions)
|
||||
{
|
||||
return m_oCPPTXFile.LoadFromFile(sSrcFileName, sDstPath, sXMLOptions);
|
||||
}
|
||||
public:
|
||||
HRESULT SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions)
|
||||
{
|
||||
return m_oCPPTXFile.SaveToFile(sDstFileName, sSrcPath, sXMLOptions);
|
||||
}
|
||||
|
||||
public:
|
||||
STDMETHOD(get_TempDirectory)(BSTR* pVal)
|
||||
{
|
||||
return m_oCPPTXFile.get_TempDirectory(pVal);
|
||||
}
|
||||
STDMETHOD(put_TempDirectory)(BSTR newVal)
|
||||
{
|
||||
return m_oCPPTXFile.put_TempDirectory(newVal);
|
||||
}
|
||||
public:
|
||||
STDMETHOD(GetDVDXml)(BSTR* pbstrPTTXml)
|
||||
{
|
||||
return m_oCPPTXFile.GetDVDXml(pbstrPTTXml);
|
||||
}
|
||||
STDMETHOD(GetBluRayXml)(BSTR* pbstrDVDXml)
|
||||
{
|
||||
return m_oCPPTXFile.GetBluRayXml(pbstrDVDXml);
|
||||
}
|
||||
public:
|
||||
STDMETHOD(get_DrawingXml)(BSTR* pVal)
|
||||
{
|
||||
return m_oCPPTXFile.get_DrawingXml(pVal);
|
||||
}
|
||||
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
return m_oCPPTXFile.SetAdditionalParam(ParamName, ParamValue);
|
||||
}
|
||||
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
return m_oCPPTXFile.GetAdditionalParam(ParamName, ParamValue);
|
||||
}
|
||||
|
||||
// to PPTY
|
||||
STDMETHOD(SetMediaDir)(BSTR bsMediaDir)
|
||||
{
|
||||
return m_oCPPTXFile.SetMediaDir(bsMediaDir);
|
||||
}
|
||||
STDMETHOD(SetFontDir)(BSTR bsFontDir)
|
||||
{
|
||||
return m_oCPPTXFile.SetFontDir(bsFontDir);
|
||||
}
|
||||
STDMETHOD(SetThemesDir)(BSTR bsDir)
|
||||
{
|
||||
return m_oCPPTXFile.SetThemesDir(bsDir);
|
||||
}
|
||||
STDMETHOD(SetUseSystemFonts)(VARIANT_BOOL useSystemFonts)
|
||||
{
|
||||
return m_oCPPTXFile.SetUseSystemFonts(useSystemFonts);
|
||||
}
|
||||
STDMETHOD(OpenFileToPPTY)(BSTR bsInput, BSTR bsOutput)
|
||||
{
|
||||
return m_oCPPTXFile.OpenFileToPPTY(bsInput, bsOutput);
|
||||
}
|
||||
STDMETHOD(OpenDirectoryToPPTY)(BSTR bsInput, BSTR bsOutput)
|
||||
{
|
||||
return m_oCPPTXFile.OpenDirectoryToPPTY(bsInput, bsOutput);
|
||||
}
|
||||
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput)
|
||||
{
|
||||
return m_oCPPTXFile.ConvertPPTYToPPTX(bsInput, bsOutput);
|
||||
}
|
||||
void LoadResourceFile(HINSTANCE hInst, LPCTSTR sResName, LPCTSTR sResType, const CString& strDstFile)
|
||||
{
|
||||
HRSRC hrRes = FindResource(hInst, sResName, sResType);
|
||||
if (!hrRes)
|
||||
return;
|
||||
|
||||
HGLOBAL hGlobal = LoadResource(hInst, hrRes);
|
||||
DWORD sz = SizeofResource(hInst, hrRes);
|
||||
void* ptrRes = LockResource(hGlobal);
|
||||
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strDstFile);
|
||||
oFile.WriteFile(ptrRes, sz);
|
||||
|
||||
UnlockResource(hGlobal);
|
||||
FreeResource(hGlobal);
|
||||
}
|
||||
};
|
||||
|
||||
bool comExtractFile(void* pArg, CString& sFile, CString& sDir)
|
||||
{
|
||||
COfficeUtils *pOfficeUtils = new COfficeUtils(NULL);
|
||||
if (pOfficeUtils == NULL) return false;
|
||||
|
||||
BSTR bsFile = sFile.AllocSysString();
|
||||
BSTR bsDir = sDir.AllocSysString();
|
||||
|
||||
HRESULT hr = pOfficeUtils->ExtractToDirectory( bsFile, bsDir, NULL, 0);
|
||||
|
||||
SysFreeString(bsFile);
|
||||
SysFreeString(bsDir);
|
||||
|
||||
delete pOfficeUtils;
|
||||
if(hr != S_OK)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
bool comCompressFile(void* pArg, CString& sDir, CString& sFile)
|
||||
{
|
||||
COfficeUtils *pOfficeUtils = new COfficeUtils(NULL);
|
||||
if (pOfficeUtils == NULL) return false;
|
||||
|
||||
BSTR bsDir = sDir.AllocSysString();
|
||||
BSTR bsFile = sFile.AllocSysString();
|
||||
|
||||
HRESULT hr = pOfficeUtils->CompressFileOrDirectory( bsDir, bsFile, -1 );
|
||||
|
||||
SysFreeString(bsDir);
|
||||
SysFreeString(bsFile);
|
||||
|
||||
delete pOfficeUtils;
|
||||
|
||||
if(hr != S_OK)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
bool comProgress(void* pArg, long ID, long Percent)
|
||||
{
|
||||
CAVSOfficePPTXFile* pCAVSOfficePPTXFile = static_cast<CAVSOfficePPTXFile*>(pArg);
|
||||
SHORT res = 0;
|
||||
pCAVSOfficePPTXFile->OnProgressEx(ID, Percent, &res);
|
||||
return (res != 0);
|
||||
}
|
||||
392
ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp
Normal file
392
ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp
Normal file
@ -0,0 +1,392 @@
|
||||
#include "ASCOfficePPTXFile.h"
|
||||
|
||||
#include "PPTXFormat/PPTXEvent.h"
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#pragma comment( lib, "shell32.lib" ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> shell32.lib
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "Editor/PPTXWriter.h"
|
||||
|
||||
#include "PPTXFormat/PPTXEvent.h"
|
||||
#include "../ASCPresentationEditor/ASCPresentationEditorDef.h"
|
||||
|
||||
CPPTXFile::CPPTXFile(extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg)
|
||||
{
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
WCHAR buffer[4096];
|
||||
GetTempPathW(4096, buffer);
|
||||
m_strTempDir = CStringW(buffer);
|
||||
|
||||
GetLongPathName(m_strTempDir.GetString(), buffer, 4096);
|
||||
m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\");
|
||||
#else
|
||||
m_strTempDir = FileSystem::Directory::GetTempPath();
|
||||
m_strTempDir = FileSystem::Directory::GetLongPathName_(m_strTempDir) + CString("_PPTX/");
|
||||
#endif
|
||||
//
|
||||
m_strFontDirectory = _T("");
|
||||
m_strMediaDirectory = _T("");
|
||||
m_bIsUseSystemFonts = FALSE;
|
||||
m_strEmbeddedFontsDirectory = _T("");
|
||||
|
||||
m_strFolderThemes = _T("");
|
||||
|
||||
//m_fCallbackResource = fCallbackResource;
|
||||
m_fCallbackExtract = fCallbackExtract;
|
||||
m_fCallbackCompress = fCallbackCompress;
|
||||
m_fCallbackProgress = fCallbackProgress;
|
||||
m_pCallbackArg = pCallbackArg;
|
||||
|
||||
m_pFolder = NULL;
|
||||
//m_pOfficeUtils = NULL;
|
||||
|
||||
//if (S_OK != CoCreateInstance(__uuidof(OfficeUtils::COfficeUtils), NULL, CLSCTX_INPROC_SERVER, __uuidof(OfficeUtils::IOfficeUtils),(void**)&m_pOfficeUtils))
|
||||
// return S_FALSE;
|
||||
|
||||
}
|
||||
CPPTXFile::~CPPTXFile()
|
||||
{
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
}
|
||||
HRESULT CPPTXFile::LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions)
|
||||
{
|
||||
CStringW localTempDir(sDstPath);
|
||||
if((sDstPath != NULL) || (localTempDir != _T("")))
|
||||
{
|
||||
bool res = FileSystem::Directory::CreateDirectory(localTempDir);
|
||||
if (res == false) return S_FALSE;
|
||||
//int res = SHCreateDirectoryExW(NULL, localTempDir.GetString(), NULL);
|
||||
//if((res != ERROR_SUCCESS) && (res != ERROR_ALREADY_EXISTS) && (res != ERROR_FILE_EXISTS))
|
||||
// return S_FALSE;
|
||||
put_TempDirectory(sDstPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool res = FileSystem::Directory::CreateDirectory(m_strTempDir);
|
||||
if (res == false) return S_FALSE;
|
||||
// int res = SHCreateDirectoryExW(NULL, m_strTempDir, NULL);
|
||||
// if((res != ERROR_SUCCESS) && (res != ERROR_ALREADY_EXISTS) && (res != ERROR_FILE_EXISTS))
|
||||
// return S_FALSE;
|
||||
}
|
||||
localTempDir = m_strTempDir;
|
||||
|
||||
/*
|
||||
SHFILEOPSTRUCTW shfos;
|
||||
ZeroMemory(&shfos, sizeof(shfos));
|
||||
shfos.wFunc = FO_DELETE;
|
||||
CStringW _local = localTempDir + CStringW(L"*.*");
|
||||
_local.AppendChar(0);
|
||||
_local.AppendChar(0);
|
||||
shfos.pFrom = _local.GetString();
|
||||
shfos.fFlags = FOF_SILENT + FOF_NOCONFIRMATION;
|
||||
if(SHFileOperationW(&shfos) != 0)
|
||||
return S_FALSE;
|
||||
*/
|
||||
CString srcFileName = sSrcFileName;
|
||||
if (m_pCallbackArg)
|
||||
{
|
||||
if(!m_fCallbackExtract(m_pCallbackArg, srcFileName , localTempDir))
|
||||
return S_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
localTempDir = sSrcFileName;
|
||||
}
|
||||
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
m_pFolder = new PPTX::Folder();
|
||||
|
||||
if(!m_pFolder->isValid(localTempDir))
|
||||
{
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
return S_FALSE;
|
||||
}
|
||||
m_pFolder->read(localTempDir, (PPTX::IPPTXEvent*)this);
|
||||
if(GetPercent() < 1000000)
|
||||
{
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
return S_FALSE;
|
||||
}
|
||||
smart_ptr<PPTX::Presentation> presentation = m_pFolder->get(PPTX::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (!presentation.is_init())
|
||||
{
|
||||
FileSystem::Directory::DeleteDirectory(m_strTempDir, false);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
m_strDirectory = (CString)sSrcFileName;
|
||||
int nIndex = m_strDirectory.ReverseFind(FILE_SEPARATOR_CHAR);
|
||||
if (-1 != nIndex)
|
||||
m_strDirectory = m_strDirectory.Mid(0, nIndex);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions)
|
||||
{
|
||||
if (NULL == m_pFolder)
|
||||
return S_FALSE;
|
||||
|
||||
OOX::CPath oPath;
|
||||
oPath.m_strFilename = CString(sSrcPath);
|
||||
m_pFolder->write(oPath);
|
||||
|
||||
CString srcFilePath = sSrcPath;
|
||||
CString dstFileName = sDstFileName;
|
||||
return m_fCallbackCompress ? (m_fCallbackCompress(m_pCallbackArg, srcFilePath, dstFileName) ? S_OK : S_FALSE) : S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::get_TempDirectory(BSTR* pVal)
|
||||
{
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
*pVal = m_strTempDir.AllocSysString();
|
||||
#else
|
||||
*pVal = m_strTempDir;
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::put_TempDirectory(BSTR newVal)
|
||||
{
|
||||
CStringW TempStr(newVal);
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
if(PathIsDirectoryW(TempStr.GetString()))
|
||||
{
|
||||
if(TempStr.Right(1) != L"\\")
|
||||
TempStr += L"\\";
|
||||
m_strTempDir = TempStr;
|
||||
return S_OK;
|
||||
}
|
||||
#else
|
||||
if(FileSystem::Directory::PathIsDirectory(TempStr))
|
||||
{
|
||||
if(TempStr.Right(1) != _T("/"))
|
||||
TempStr += _T("/");
|
||||
m_strTempDir = TempStr;
|
||||
}
|
||||
#endif
|
||||
return S_FALSE;
|
||||
}
|
||||
HRESULT CPPTXFile::GetDVDXml(BSTR* pbstrPTTXml)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::GetBluRayXml(BSTR* pbstrDVDXml)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::get_DrawingXml(BSTR* pVal)
|
||||
{
|
||||
if ((NULL == m_pFolder) || (NULL == pVal))
|
||||
return S_FALSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPPTXFile::SetAdditionalParam(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
CString sParamName; sParamName = ParamName;
|
||||
if (_T("EmbeddedFontsDirectory") == sParamName && ParamValue.vt == VT_BSTR)
|
||||
{
|
||||
m_strEmbeddedFontsDirectory = ParamValue.bstrVal;
|
||||
return S_OK;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPPTXFile::GetAdditionalParam(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
if (NULL == ParamValue)
|
||||
return S_FALSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
bool CPPTXFile::Progress(long ID, long Percent)
|
||||
{
|
||||
percent = Percent;
|
||||
if (m_pCallbackArg == NULL)
|
||||
{
|
||||
if (Percent == 1000000 ) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return m_fCallbackProgress(m_pCallbackArg, ID, Percent);
|
||||
}
|
||||
|
||||
// to PPTY
|
||||
HRESULT CPPTXFile::SetMediaDir(BSTR bsMediaDir)
|
||||
{
|
||||
m_strMediaDirectory = bsMediaDir;
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::SetFontDir(BSTR bsFontDir)
|
||||
{
|
||||
m_strFontDirectory = bsFontDir;
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::SetThemesDir(BSTR bsDir)
|
||||
{
|
||||
m_strFolderThemes = bsDir;
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::SetUseSystemFonts(VARIANT_BOOL useSystemFonts)
|
||||
{
|
||||
m_bIsUseSystemFonts = (VARIANT_TRUE == useSystemFonts);
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPPTXFile::OpenFileToPPTY(BSTR bsInput, BSTR bsOutput)
|
||||
{
|
||||
if (m_strTempDir.GetLength() < 1)
|
||||
{
|
||||
m_strTempDir = FileSystem::Directory::GetTempPath();
|
||||
}
|
||||
|
||||
FileSystem::Directory::CreateDirectory(m_strTempDir);
|
||||
|
||||
OOX::CPath pathLocalInputTemp = FileSystem::Directory::CreateDirectoryWithUniqueName(m_strTempDir);
|
||||
|
||||
bool notDeleteInput = false;
|
||||
|
||||
if (m_fCallbackExtract)
|
||||
{
|
||||
CString strInput = bsInput;
|
||||
CString strOutput = pathLocalInputTemp.GetPath();
|
||||
|
||||
if(!m_fCallbackExtract(m_pCallbackArg, strInput , strOutput))
|
||||
{
|
||||
pathLocalInputTemp = bsInput;
|
||||
notDeleteInput = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pathLocalInputTemp = bsInput;
|
||||
notDeleteInput = true;
|
||||
}
|
||||
BSTR bsLocalInputTemp;
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
bsLocalInputTemp= pathLocalInputTemp.GetPath().AllocSysString();
|
||||
#else
|
||||
bsLocalInputTemp= pathLocalInputTemp.GetPath();
|
||||
#endif
|
||||
|
||||
HRESULT hr = OpenDirectoryToPPTY(bsLocalInputTemp, bsOutput);
|
||||
|
||||
if (notDeleteInput == false)
|
||||
FileSystem::Directory::DeleteDirectory(pathLocalInputTemp.GetPath());
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
if (bsLocalInputTemp)SysFreeString(bsLocalInputTemp);
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
HRESULT CPPTXFile::OpenDirectoryToPPTY(BSTR bsInput, BSTR bsOutput)
|
||||
{
|
||||
OOX::CPath pathInputDirectory = bsInput;
|
||||
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
m_pFolder = new PPTX::Folder();
|
||||
|
||||
if (!m_pFolder->isValid(pathInputDirectory.GetPath())) // true ???
|
||||
{
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
m_pFolder->read(pathInputDirectory.GetPath() + FILE_SEPARATOR_STR, (PPTX::IPPTXEvent*)this);
|
||||
if(GetPercent() < 1000000)
|
||||
{
|
||||
RELEASEOBJECT(m_pFolder);
|
||||
return S_FALSE;
|
||||
}
|
||||
smart_ptr<PPTX::Presentation> presentation = m_pFolder->get(PPTX::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (!presentation.is_init())
|
||||
{
|
||||
FileSystem::Directory::DeleteDirectory(m_strTempDir, false);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
m_strDirectory = pathInputDirectory.GetDirectory();
|
||||
|
||||
NSBinPptxRW::CBinaryFileWriter oBinaryWriter;
|
||||
oBinaryWriter.m_pCommon->CheckFontPicker();
|
||||
oBinaryWriter.m_pCommon->m_pNativePicker->Init(m_strFontDirectory);
|
||||
|
||||
OOX::CPath pathDstFileOutput = bsOutput;
|
||||
|
||||
OOX::CPath pathMedia = pathDstFileOutput.GetDirectory() + FILE_SEPARATOR_STR + _T("media");
|
||||
|
||||
m_strMediaDirectory = pathMedia.GetPath();
|
||||
oBinaryWriter.m_strMainFolder = pathDstFileOutput.GetDirectory();
|
||||
|
||||
oBinaryWriter.m_pCommon->m_pImageManager->m_strDstMedia = m_strMediaDirectory;
|
||||
|
||||
FileSystem::Directory::CreateDirectory(m_strMediaDirectory);
|
||||
|
||||
if (_T("") != m_strEmbeddedFontsDirectory)
|
||||
{
|
||||
FileSystem::Directory::CreateDirectory(m_strEmbeddedFontsDirectory);
|
||||
|
||||
if (NULL != oBinaryWriter.m_pCommon->m_pFontPicker)
|
||||
{
|
||||
oBinaryWriter.m_pCommon->m_pNativePicker->m_bIsEmbeddedFonts = TRUE;
|
||||
oBinaryWriter.m_pCommon->m_pNativePicker->m_oEmbeddedFonts.m_strEmbeddedFontsFolder = m_strEmbeddedFontsDirectory;
|
||||
}
|
||||
}
|
||||
|
||||
PPTX2EditorAdvanced::Convert(oBinaryWriter, *m_pFolder, m_strDirectory, pathDstFileOutput.GetPath());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPPTXFile::ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput)//bsOutput <20> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
{
|
||||
OOX::CPath pathLocalTempDirectory;
|
||||
|
||||
if (m_fCallbackCompress)//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pathLocalTempDirectory = m_strTempDir ;
|
||||
else
|
||||
pathLocalTempDirectory = bsOutput; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
if (m_fCallbackCompress)
|
||||
pathLocalTempDirectory = _T("C:\\PPTMemory\\PPTX_test");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
NSBinPptxRW::CPPTXWriter oWriter;
|
||||
oWriter.Init(pathLocalTempDirectory.GetPath());
|
||||
|
||||
CFile oFileBinary;
|
||||
oFileBinary.OpenFile((CString)bsInput);
|
||||
LONG lFileSize = (LONG)oFileBinary.GetFileSize();
|
||||
BYTE* pSrcBuffer = new BYTE[lFileSize];
|
||||
oFileBinary.ReadFile(pSrcBuffer, (DWORD)lFileSize);
|
||||
oFileBinary.CloseFile();
|
||||
|
||||
CString strBsInput = bsInput;
|
||||
CString srcFolder = FileSystem::Directory::GetFolderPath(strBsInput);
|
||||
|
||||
oWriter.OpenPPTY(pSrcBuffer, lFileSize, srcFolder);
|
||||
|
||||
RELEASEARRAYOBJECTS(pSrcBuffer);
|
||||
HRESULT hRes = S_OK;
|
||||
|
||||
if (m_fCallbackCompress)
|
||||
{
|
||||
CString strOutput = bsOutput;
|
||||
CString strInput = pathLocalTempDirectory.GetPath();
|
||||
|
||||
hRes = m_fCallbackCompress(m_pCallbackArg, strInput, strOutput) ? S_OK : S_FALSE;
|
||||
|
||||
FileSystem::Directory::DeleteDirectory(strInput);
|
||||
}
|
||||
return hRes;
|
||||
}
|
||||
112
ASCOfficePPTXFile/Directory.cpp
Normal file
112
ASCOfficePPTXFile/Directory.cpp
Normal file
@ -0,0 +1,112 @@
|
||||
//#include "stdafx.h"
|
||||
|
||||
#include "Directory.h"
|
||||
//#include <strsafe.h>
|
||||
//#include <shlobj.h>
|
||||
|
||||
namespace FileSystem {
|
||||
LPCTSTR Directory::GetCurrentDirectory() {
|
||||
static const int bufferSize = MAX_PATH;
|
||||
LPTSTR directory = new TCHAR[bufferSize];
|
||||
|
||||
DWORD lenght = ::GetCurrentDirectory(bufferSize, directory);
|
||||
if (lenght == 0) {
|
||||
delete[] directory;
|
||||
directory = NULL;
|
||||
}
|
||||
|
||||
return directory;
|
||||
}
|
||||
String Directory::GetCurrentDirectoryS() {
|
||||
LPCTSTR directory = GetCurrentDirectory();
|
||||
if (directory == NULL)
|
||||
return String();
|
||||
|
||||
return String(directory);
|
||||
}
|
||||
|
||||
bool Directory::CreateDirectory(LPCTSTR path) {
|
||||
bool directoryCreated = false;
|
||||
if (::CreateDirectory(path, NULL) == TRUE)
|
||||
directoryCreated = true;
|
||||
return directoryCreated;
|
||||
}
|
||||
bool Directory::CreateDirectory(const String& path) {
|
||||
return CreateDirectory(path.c_str());
|
||||
}
|
||||
|
||||
bool Directory::CreateDirectories(LPCTSTR path)
|
||||
{
|
||||
int codeResult = ERROR_SUCCESS;
|
||||
|
||||
codeResult = ::CreateDirectory (path, NULL);
|
||||
//codeResult = SHCreateDirectory (NULL, path);
|
||||
|
||||
bool created = false;
|
||||
if (codeResult == ERROR_SUCCESS)
|
||||
created = true;
|
||||
|
||||
return created;
|
||||
}
|
||||
|
||||
StringArray Directory::GetFilesInDirectory(LPCTSTR path, const bool& andSubdirectories) {
|
||||
size_t pathLength = 0;
|
||||
StringCchLength(path, MAX_PATH, &pathLength);
|
||||
++pathLength;
|
||||
size_t pathToFilesLength = pathLength + 3;
|
||||
LPTSTR pathToFiles = new TCHAR[pathToFilesLength];
|
||||
|
||||
StringCchCopy(pathToFiles, pathLength, path);
|
||||
StringCchCat(pathToFiles, pathToFilesLength, TEXT("\\*"));
|
||||
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE findResult = FindFirstFile(pathToFiles, &findData);
|
||||
delete[] pathToFiles;
|
||||
|
||||
if (findResult == INVALID_HANDLE_VALUE)
|
||||
return StringArray();
|
||||
|
||||
StringArray files;
|
||||
do {
|
||||
if (andSubdirectories || !(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
String file = findData.cFileName;
|
||||
files.insert(files.end(), file);
|
||||
}
|
||||
} while (FindNextFile(findResult, &findData));
|
||||
|
||||
FindClose(findResult);
|
||||
|
||||
return files;
|
||||
}
|
||||
StringArray Directory::GetFilesInDirectory(const String& path, const bool& andSubdirectories) {
|
||||
LPCTSTR pathW = path.c_str();
|
||||
return GetFilesInDirectory(pathW, andSubdirectories);
|
||||
}
|
||||
|
||||
int Directory::GetFilesCount(const CString& path, const bool& recursive) {
|
||||
CString pathMask = path + _T("\\*");
|
||||
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE findResult = FindFirstFile(pathMask, &findData);
|
||||
|
||||
int filesCount = 0;
|
||||
do {
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
if (!recursive)
|
||||
continue;
|
||||
if ((CString) findData.cFileName == _T("."))
|
||||
continue;
|
||||
if ((CString) findData.cFileName == _T(".."))
|
||||
continue;
|
||||
CString innerPath = path + _T('\\') + (CString) findData.cFileName;
|
||||
filesCount += GetFilesCount(innerPath, recursive);
|
||||
}
|
||||
else
|
||||
++filesCount;
|
||||
} while (FindNextFile(findResult, &findData));
|
||||
|
||||
FindClose(findResult);
|
||||
|
||||
return filesCount;
|
||||
}
|
||||
}
|
||||
26
ASCOfficePPTXFile/Directory.h
Normal file
26
ASCOfficePPTXFile/Directory.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "Settings.h"
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
namespace FileSystem {
|
||||
class Directory {
|
||||
public:
|
||||
static LPCTSTR GetCurrentDirectory();
|
||||
static String GetCurrentDirectoryS();
|
||||
|
||||
static bool CreateDirectory(LPCTSTR path);
|
||||
static bool CreateDirectory(const String& path);
|
||||
static bool CreateDirectories(LPCTSTR path);
|
||||
|
||||
static StringArray GetFilesInDirectory(LPCTSTR path, const bool& andSubdirectories = false);
|
||||
static StringArray GetFilesInDirectory(const String& path, const bool& andSubdirectories = false);
|
||||
|
||||
static int GetFilesCount(const CString& path, const bool& recursive = false);
|
||||
};
|
||||
}
|
||||
237
ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
Normal file
237
ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
Normal file
@ -0,0 +1,237 @@
|
||||
#pragma once
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
const double eps = 0.001;
|
||||
|
||||
const double g_dKoef_mm_to_pt = 72 / (2.54 * 10);
|
||||
const double g_dKoef_mm_to_twips = 20 * g_dKoef_mm_to_pt;
|
||||
const double g_dKoef_mm_to_emu = 36000;
|
||||
const double g_dKoef_mm_to_eightpoint = 8 * g_dKoef_mm_to_pt;
|
||||
|
||||
const BYTE g_nodeAttributeStart = 0xFA;
|
||||
const BYTE g_nodeAttributeEnd = 0xFB;
|
||||
|
||||
namespace NSSerFormat
|
||||
{
|
||||
enum SerFormat
|
||||
{
|
||||
Version = 0,
|
||||
Signature = 0x50505459
|
||||
};
|
||||
}
|
||||
|
||||
namespace NSMainTables
|
||||
{
|
||||
enum MainTables
|
||||
{
|
||||
Main = 255,
|
||||
App = 1,
|
||||
Core = 2,
|
||||
Presentation = 3,
|
||||
ViewProps = 4,
|
||||
VmlDrawing = 5,
|
||||
TableStyles = 6,
|
||||
|
||||
Themes = 20,
|
||||
ThemeOverride = 21,
|
||||
SlideMasters = 22,
|
||||
SlideLayouts = 23,
|
||||
Slides = 24,
|
||||
NotesMasters = 25,
|
||||
NotesSlides = 26,
|
||||
|
||||
HandoutMasters = 30,
|
||||
|
||||
SlideRels = 40,
|
||||
ThemeRels = 41,
|
||||
|
||||
ImageMap = 42,
|
||||
FontMap = 43,
|
||||
|
||||
FontsEmbedded = 44
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#define COLOR_TYPE_NONE 0
|
||||
#define COLOR_TYPE_SRGB 1
|
||||
#define COLOR_TYPE_PRST 2
|
||||
#define COLOR_TYPE_SCHEME 3
|
||||
#define COLOR_TYPE_SYS 4
|
||||
|
||||
#define FILL_TYPE_NONE 0
|
||||
#define FILL_TYPE_BLIP 1
|
||||
#define FILL_TYPE_NOFILL 2
|
||||
#define FILL_TYPE_SOLID 3
|
||||
#define FILL_TYPE_GRAD 4
|
||||
#define FILL_TYPE_PATT 5
|
||||
|
||||
#define EFFECT_TYPE_NONE 0
|
||||
#define EFFECT_TYPE_OUTERSHDW 1
|
||||
#define EFFECT_TYPE_GLOW 2
|
||||
#define EFFECT_TYPE_DUOTONE 3
|
||||
#define EFFECT_TYPE_XFRM 4
|
||||
#define EFFECT_TYPE_BLUR 5
|
||||
#define EFFECT_TYPE_PRSTSHDW 6
|
||||
#define EFFECT_TYPE_INNERSHDW 7
|
||||
#define EFFECT_TYPE_REFLECTION 8
|
||||
#define EFFECT_TYPE_SOFTEDGE 9
|
||||
#define EFFECT_TYPE_FILLOVERLAY 10
|
||||
#define EFFECT_TYPE_ALPHACEILING 11
|
||||
#define EFFECT_TYPE_ALPHAFLOOR 12
|
||||
#define EFFECT_TYPE_TINTEFFECT 13
|
||||
#define EFFECT_TYPE_RELOFF 14
|
||||
#define EFFECT_TYPE_LUM 15
|
||||
#define EFFECT_TYPE_HSL 16
|
||||
#define EFFECT_TYPE_GRAYSCL 17
|
||||
#define EFFECT_TYPE_ELEMENT 18
|
||||
#define EFFECT_TYPE_ALPHAREPL 19
|
||||
#define EFFECT_TYPE_ALPHAOUTSET 20
|
||||
#define EFFECT_TYPE_ALPHAMODFIX 21
|
||||
#define EFFECT_TYPE_ALPHABILEVEL 22
|
||||
#define EFFECT_TYPE_BILEVEL 23
|
||||
#define EFFECT_TYPE_DAG 24
|
||||
#define EFFECT_TYPE_FILL 25
|
||||
#define EFFECT_TYPE_CLRREPL 26
|
||||
#define EFFECT_TYPE_CLRCHANGE 27
|
||||
#define EFFECT_TYPE_ALPHAINV 28
|
||||
#define EFFECT_TYPE_ALPHAMOD 29
|
||||
#define EFFECT_TYPE_BLEND 30
|
||||
|
||||
#define GEOMETRY_TYPE_NONE 0
|
||||
#define GEOMETRY_TYPE_PRST 1
|
||||
#define GEOMETRY_TYPE_CUSTOM 2
|
||||
|
||||
#define GEOMETRY_TYPE_AH_NONE 0
|
||||
#define GEOMETRY_TYPE_AH_POLAR 1
|
||||
#define GEOMETRY_TYPE_AH_XY 2
|
||||
|
||||
#define GEOMETRY_TYPE_PATH_NONE 0
|
||||
#define GEOMETRY_TYPE_PATH_MOVETO 1
|
||||
#define GEOMETRY_TYPE_PATH_LINETO 2
|
||||
#define GEOMETRY_TYPE_PATH_CLOZE 3
|
||||
#define GEOMETRY_TYPE_PATH_CUBICBEZTO 4
|
||||
#define GEOMETRY_TYPE_PATH_ARCTO 5
|
||||
#define GEOMETRY_TYPE_PATH_QUADBEZTO 6
|
||||
|
||||
#define EFFECTPROPERTIES_TYPE_NONE 0
|
||||
#define EFFECTPROPERTIES_TYPE_LIST 1
|
||||
#define EFFECTPROPERTIES_TYPE_DAG EFFECT_TYPE_DAG
|
||||
|
||||
#define BULLET_TYPE_COLOR_NONE 0
|
||||
#define BULLET_TYPE_COLOR_CLRTX 1
|
||||
#define BULLET_TYPE_COLOR_CLR 2
|
||||
|
||||
#define BULLET_TYPE_SIZE_NONE 0
|
||||
#define BULLET_TYPE_SIZE_TX 1
|
||||
#define BULLET_TYPE_SIZE_PCT 2
|
||||
#define BULLET_TYPE_SIZE_PTS 3
|
||||
|
||||
#define BULLET_TYPE_TYPEFACE_NONE 0
|
||||
#define BULLET_TYPE_TYPEFACE_TX 1
|
||||
#define BULLET_TYPE_TYPEFACE_BUFONT 2
|
||||
|
||||
#define BULLET_TYPE_BULLET_NONE 0
|
||||
#define BULLET_TYPE_BULLET_CHAR 1
|
||||
#define BULLET_TYPE_BULLET_AUTONUM 2
|
||||
#define BULLET_TYPE_BULLET_BLIP 3
|
||||
|
||||
#define PARRUN_TYPE_NONE 0
|
||||
#define PARRUN_TYPE_RUN 1
|
||||
#define PARRUN_TYPE_FLD 2
|
||||
#define PARRUN_TYPE_BR 3
|
||||
|
||||
#define SPTREE_TYPE_NONE 0
|
||||
#define SPTREE_TYPE_SHAPE 1
|
||||
#define SPTREE_TYPE_PIC 2
|
||||
#define SPTREE_TYPE_CXNSP 3
|
||||
#define SPTREE_TYPE_SPTREE 4
|
||||
#define SPTREE_TYPE_GRFRAME 5
|
||||
|
||||
static BYTE SchemeClr_GetBYTECode(const CString& sValue)
|
||||
{
|
||||
if (_T("accent1") == sValue)
|
||||
return 0;
|
||||
if (_T("accent2") == sValue)
|
||||
return 1;
|
||||
if (_T("accent3") == sValue)
|
||||
return 2;
|
||||
if (_T("accent4") == sValue)
|
||||
return 3;
|
||||
if (_T("accent5") == sValue)
|
||||
return 4;
|
||||
if (_T("accent6") == sValue)
|
||||
return 5;
|
||||
if (_T("bg1") == sValue)
|
||||
return 6;
|
||||
if (_T("bg2") == sValue)
|
||||
return 7;
|
||||
if (_T("dk1") == sValue)
|
||||
return 8;
|
||||
if (_T("dk2") == sValue)
|
||||
return 9;
|
||||
if (_T("folHlink") == sValue)
|
||||
return 10;
|
||||
if (_T("hlink") == sValue)
|
||||
return 11;
|
||||
if (_T("lt1") == sValue)
|
||||
return 12;
|
||||
if (_T("lt2") == sValue)
|
||||
return 13;
|
||||
if (_T("phClr") == sValue)
|
||||
return 14;
|
||||
if (_T("tx1") == sValue)
|
||||
return 15;
|
||||
if (_T("tx2") == sValue)
|
||||
return 16;
|
||||
return 0;
|
||||
}
|
||||
static CString SchemeClr_GetStringCode(const BYTE& val)
|
||||
{
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
return _T("accent1");
|
||||
case 1:
|
||||
return _T("accent2");
|
||||
case 2:
|
||||
return _T("accent3");
|
||||
case 3:
|
||||
return _T("accent4");
|
||||
case 4:
|
||||
return _T("accent5");
|
||||
case 5:
|
||||
return _T("accent6");
|
||||
case 6:
|
||||
return _T("bg1");
|
||||
case 7:
|
||||
return _T("bg2");
|
||||
case 8:
|
||||
return _T("dk1");
|
||||
case 9:
|
||||
return _T("dk2");
|
||||
case 10:
|
||||
return _T("folHlink");
|
||||
case 11:
|
||||
return _T("hlink");
|
||||
case 12:
|
||||
return _T("lt1");
|
||||
case 13:
|
||||
return _T("lt2");
|
||||
case 14:
|
||||
return _T("phClr");
|
||||
case 15:
|
||||
return _T("tx1");
|
||||
case 16:
|
||||
return _T("tx2");
|
||||
}
|
||||
return _T("accent1");
|
||||
}
|
||||
|
||||
#define XMLWRITER_DOC_TYPE_PPTX 0
|
||||
#define XMLWRITER_DOC_TYPE_DOCX 1
|
||||
#define XMLWRITER_DOC_TYPE_XLSX 2
|
||||
#define XMLWRITER_DOC_TYPE_CHART 3
|
||||
|
||||
#define XMLWRITER_RECORD_TYPE_SPPR 0
|
||||
#define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
|
||||
11
ASCOfficePPTXFile/Editor/BinWriters.h
Normal file
11
ASCOfficePPTXFile/Editor/BinWriters.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "../../Common/DocxFormat/Source/Base/Nullable.h"
|
||||
#include "BinReaderWriterDefines.h"
|
||||
|
||||
#include "../../Common/Base64.h"
|
||||
#include "imagemanager.h"
|
||||
#include "./XmlWriter.h"
|
||||
#include "../PPTXFormat/FileContainer.h"
|
||||
#include "../PPTXFormat/DocxFormat/WritingElement.h"
|
||||
#include "../../ASCOfficeDocxFile2/DocWrapper/DocxSerializer.h"
|
||||
#include "BinaryFileReaderWriter.h"
|
||||
1614
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
Normal file
1614
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
Normal file
File diff suppressed because it is too large
Load Diff
477
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
Normal file
477
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
Normal file
@ -0,0 +1,477 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <atlbase.h>
|
||||
#include <atlstr.h>
|
||||
#else
|
||||
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
|
||||
#include "../../DesktopEditor/common/Types.h"
|
||||
#endif
|
||||
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#define MAX_STACK_SIZE 1024
|
||||
|
||||
class COfficeFontPicker;
|
||||
|
||||
namespace NSCommon
|
||||
{
|
||||
template<typename Type> class smart_ptr;
|
||||
class nullable_string;
|
||||
class nullable_bool;
|
||||
class nullable_int;
|
||||
class nullable_double;
|
||||
class nullable_sizet;
|
||||
}
|
||||
namespace PPTX
|
||||
{
|
||||
class WritingElement;
|
||||
class FileContainer;
|
||||
class CCommonRels;
|
||||
}
|
||||
namespace BinDocxRW
|
||||
{
|
||||
class CDocxSerializer;
|
||||
}
|
||||
namespace NSShapeImageGen
|
||||
{
|
||||
class CImageManager;
|
||||
}
|
||||
namespace NSFontCutter
|
||||
{
|
||||
class CFontDstManager;
|
||||
}
|
||||
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
class CStringWriter;
|
||||
class CCommonWriter;
|
||||
class CSeekTableEntry;
|
||||
|
||||
class CMasterSlideInfo
|
||||
{
|
||||
public:
|
||||
CMasterSlideInfo();
|
||||
|
||||
public:
|
||||
_INT32 m_lThemeIndex;
|
||||
CStringA m_strImageBase64;
|
||||
|
||||
std::vector<LONG> m_arLayoutIndexes;
|
||||
std::vector<CStringA> m_arLayoutImagesBase64;
|
||||
};
|
||||
|
||||
class CCommonWriter
|
||||
{
|
||||
public:
|
||||
std::map<size_t, LONG> themes;
|
||||
std::map<size_t, LONG> slideMasters;
|
||||
std::map<size_t, LONG> slides;
|
||||
std::map<size_t, LONG> layouts;
|
||||
std::map<size_t, LONG> notes;
|
||||
std::map<size_t, LONG> notesMasters;
|
||||
|
||||
std::vector<CMasterSlideInfo> m_oRels;
|
||||
std::vector<LONG> m_oSlide_Layout_Rels;
|
||||
|
||||
NSShapeImageGen::CImageManager* m_pImageManager;
|
||||
|
||||
//NSFontCutter::CFontDstManager m_oFontPicker;
|
||||
|
||||
NSFontCutter::CFontDstManager* m_pNativePicker;
|
||||
COfficeFontPicker* m_pFontPicker;
|
||||
bool m_bDeleteFontPicker;
|
||||
|
||||
public:
|
||||
CCommonWriter();
|
||||
~CCommonWriter();
|
||||
|
||||
public:
|
||||
void CreateFontPicker(COfficeFontPicker* pPicker);
|
||||
void CheckFontPicker();
|
||||
};
|
||||
|
||||
class CImageManager2
|
||||
{
|
||||
private:
|
||||
std::map<CString, CString> m_mapImages;
|
||||
_INT32 m_lIndexNextImage;
|
||||
CString m_strDstMedia;
|
||||
|
||||
public:
|
||||
BOOL m_bIsWord;
|
||||
|
||||
public:
|
||||
CImageManager2();
|
||||
~CImageManager2();
|
||||
void Clear();
|
||||
void SetDstMedia(const CString& strDst);
|
||||
CString GetDstMedia();
|
||||
|
||||
public:
|
||||
template <typename T>
|
||||
void Serialize(T* pWriter)
|
||||
{
|
||||
pWriter->WriteBYTE(m_bIsWord ? 1 : 0);
|
||||
pWriter->WriteINT(m_lIndexNextImage);
|
||||
pWriter->WriteString(m_strDstMedia);
|
||||
|
||||
int lCount = (int)m_mapImages.size();
|
||||
pWriter->WriteINT(lCount);
|
||||
|
||||
for (std::map<CString, CString>::const_iterator pPair = m_mapImages.begin(); pPair != m_mapImages.end(); ++pPair)
|
||||
{
|
||||
pWriter->WriteString(pPair->first);
|
||||
pWriter->WriteString(pPair->second);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Deserialize(T* pReader)
|
||||
{
|
||||
m_bIsWord = ((true == pReader->GetBool()) ? TRUE : FALSE);
|
||||
m_lIndexNextImage = pReader->GetLong();
|
||||
m_strDstMedia = pReader->GetString2();
|
||||
|
||||
m_mapImages.clear();
|
||||
_INT32 lCount = pReader->GetLong();
|
||||
|
||||
for (_INT32 i = 0; i < lCount; ++i)
|
||||
{
|
||||
CString s1 = pReader->GetString2();
|
||||
CString s2 = pReader->GetString2();
|
||||
|
||||
m_mapImages [s1] = s2;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
CString GenerateImage(const CString& strInput, CString strBase64Image = _T(""));
|
||||
|
||||
void SaveImageAsPng(const CString& strFileSrc, const CString& strFileDst);
|
||||
|
||||
void SaveImageAsJPG(const CString& strFileSrc, const CString& strFileDst);
|
||||
|
||||
bool IsNeedDownload(const CString& strFile);
|
||||
CString DownloadImage(const CString& strFile);
|
||||
};
|
||||
|
||||
class CBinaryFileWriter
|
||||
{
|
||||
public:
|
||||
class CSeekTableEntry
|
||||
{
|
||||
public:
|
||||
_INT32 Type;
|
||||
_INT32 SeekPos;
|
||||
|
||||
public:
|
||||
CSeekTableEntry();
|
||||
};
|
||||
|
||||
CCommonWriter* m_pCommon;
|
||||
CString m_strMainFolder;
|
||||
|
||||
NSCommon::smart_ptr<PPTX::CCommonRels> * m_pCommonRels;
|
||||
BinDocxRW::CDocxSerializer * m_pMainDocument;
|
||||
|
||||
NSCommon::smart_ptr<PPTX::FileContainer>* ThemeDoc;
|
||||
NSCommon::smart_ptr<PPTX::WritingElement>* ClrMapDoc;
|
||||
private:
|
||||
BYTE* m_pStreamData;
|
||||
BYTE* m_pStreamCur;
|
||||
_UINT32 m_lSize;
|
||||
|
||||
_UINT32 m_lPosition;
|
||||
_UINT32 m_arStack[MAX_STACK_SIZE];
|
||||
_UINT32 m_lStackPosition;
|
||||
|
||||
std::vector<CSeekTableEntry> m_arMainTables;
|
||||
|
||||
public:
|
||||
_INT32 m_lWidthCurShape;
|
||||
_INT32 m_lHeightCurShape;
|
||||
|
||||
public:
|
||||
BYTE* GetBuffer();
|
||||
_UINT32 GetPosition();
|
||||
void SetPosition(const _UINT32& lPosition);
|
||||
void Skip(const _UINT32& lSize);
|
||||
|
||||
double GetWidthMM();
|
||||
double GetHeightMM();
|
||||
void ClearShapeCurSizes();
|
||||
|
||||
// -------------------- stream simple types -----------------------
|
||||
public:
|
||||
void Clear();
|
||||
|
||||
void SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc);
|
||||
|
||||
void ClearNoAttack();
|
||||
|
||||
void CheckBufferSize(_UINT32 lPlus);
|
||||
|
||||
void WriteBYTE(const BYTE& lValue);
|
||||
void WriteBOOL(const bool& bValue);
|
||||
void WriteUSHORT(const _UINT16& lValue);
|
||||
|
||||
void WriteULONG(const _UINT32& lValue);
|
||||
void WriteLONG(const _INT32& lValue);
|
||||
void WriteINT(const _INT32& lValue);
|
||||
|
||||
void WriteDouble(const double& dValue);
|
||||
void WriteDoubleReal(const double& dValue);
|
||||
|
||||
void WriteStringW(const WCHAR* sBuffer);
|
||||
void WriteBYTEArray(const BYTE* pBuffer, size_t len);
|
||||
void WriteStringA(const char* sBuffer);
|
||||
void WriteStringA(CStringA& sBuffer);
|
||||
void WriteStringW(CString& sBuffer);
|
||||
void WriteStringW2(const WCHAR* sBuffer);
|
||||
void WriteStringW2_2(const WCHAR* sBuffer);
|
||||
void WriteStringW2_4(const WCHAR* sBuffer);
|
||||
void WriteStringW2(CString& sBuffer);
|
||||
void WriteStringW3(const WCHAR* sBuffer);
|
||||
void WriteStringW3(CString& sBuffer);
|
||||
void WriteStringW3_2(const WCHAR* sBuffer);
|
||||
void WriteStringW3_4(const WCHAR* sBuffer);
|
||||
// --------------------------------------------------------
|
||||
void WriteLONG64(const _INT64& lValue);
|
||||
void WriteDouble64(const double& dValue);
|
||||
// --------------------------------------------------------
|
||||
|
||||
public:
|
||||
CBinaryFileWriter();
|
||||
~CBinaryFileWriter();
|
||||
|
||||
void StartRecord(_INT32 lType);
|
||||
void EndRecord();
|
||||
|
||||
void StartMainRecord(_INT32 lType);
|
||||
void WriteReserved(size_t lCount);
|
||||
|
||||
void WriteMainPart();
|
||||
|
||||
public:
|
||||
|
||||
void WriteString1(int type, const CString& val);
|
||||
void WriteString2(int type, const NSCommon::nullable_string& val);
|
||||
void WriteString(const CString& val);
|
||||
|
||||
void WriteString1Data(int type, const WCHAR* pData, _UINT32 len);
|
||||
|
||||
void WriteBool1(int type, const bool& val);
|
||||
void WriteBool2(int type, const NSCommon::nullable_bool& val);
|
||||
|
||||
void WriteInt1(int type, const int& val);
|
||||
void WriteInt2(int type, const NSCommon::nullable_int& val);
|
||||
|
||||
void WriteDouble1(int type, const double& val);
|
||||
void WriteDouble2(int type, const NSCommon::nullable_double& val);
|
||||
|
||||
void WriteSize_t1(int type, const size_t& val);
|
||||
void WriteSize_t2(int type, const NSCommon::nullable_sizet& val);
|
||||
|
||||
template<typename T>
|
||||
void WriteLimit1(int type, const T& val)
|
||||
{
|
||||
BYTE bType = (BYTE)type;
|
||||
WriteBYTE(bType);
|
||||
WriteBYTE(val.GetBYTECode());
|
||||
}
|
||||
template<typename T>
|
||||
void WriteLimit2(int type, const T& val)
|
||||
{
|
||||
if (val.is_init())
|
||||
WriteLimit1(type, *val);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void WriteRecord1(int type, const T& val)
|
||||
{
|
||||
StartRecord(type);
|
||||
val.toPPTY(this);
|
||||
EndRecord();
|
||||
}
|
||||
template<typename T>
|
||||
void WriteRecord2(int type, const T& val)
|
||||
{
|
||||
if (val.is_init())
|
||||
{
|
||||
StartRecord(type);
|
||||
val->toPPTY(this);
|
||||
EndRecord();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void WriteRecordArray(int type, int subtype, const std::vector<T>& val)
|
||||
{
|
||||
StartRecord(type);
|
||||
|
||||
_UINT32 len = (_UINT32)val.size();
|
||||
WriteULONG(len);
|
||||
|
||||
for (_UINT32 i = 0; i < len; ++i)
|
||||
WriteRecord1(subtype, val[i]);
|
||||
|
||||
EndRecord();
|
||||
}
|
||||
|
||||
void GetBase64File(const CString& sFile, CStringA& strDst64);
|
||||
|
||||
void WriteTheme64(_INT32 lIndex, const CString& sFile);
|
||||
|
||||
void WriteLayoutTheme64(_INT32 lIndexTheme, _INT32 lIndexLayout, const CString& sFile);
|
||||
|
||||
CString GetFolderForGenerateImages();
|
||||
|
||||
// embedded fonts
|
||||
void WriteEmbeddedFonts();
|
||||
|
||||
// serialize ImageManagers
|
||||
bool Serialize(NSBinPptxRW::CImageManager2* pManager, BYTE **ppArray, size_t& szCount);
|
||||
bool Serialize(NSShapeImageGen::CImageManager* pManager, BYTE **ppArray, size_t& szCount);
|
||||
|
||||
bool GetSafearray(BYTE **ppArray, size_t& szCount);
|
||||
};
|
||||
class CSlideMasterInfo
|
||||
{
|
||||
public:
|
||||
_INT32 m_lThemeIndex;
|
||||
std::vector<LONG> m_arLayouts;
|
||||
|
||||
public:
|
||||
CSlideMasterInfo();
|
||||
CSlideMasterInfo(const CSlideMasterInfo& oSrc);
|
||||
};
|
||||
|
||||
class CRelsGenerator
|
||||
{
|
||||
private:
|
||||
CStringWriter* m_pWriter;
|
||||
int m_lNextRelsID;
|
||||
std::map<CString, int> m_mapImages;
|
||||
|
||||
std::map<CString, int> m_mapLinks;
|
||||
|
||||
public:
|
||||
CImageManager2* m_pManager;
|
||||
|
||||
public:
|
||||
CRelsGenerator(CImageManager2* pManager = NULL);
|
||||
~CRelsGenerator();
|
||||
void Clear();
|
||||
|
||||
void StartRels();
|
||||
|
||||
void StartTheme();
|
||||
|
||||
void StartMaster(int nIndexTheme, const CSlideMasterInfo& oInfo);
|
||||
void StartLayout(int nIndexTheme);
|
||||
void StartSlide(int nIndexSlide, int nIndexLayout);
|
||||
void StartNote(int nIndexSlide);
|
||||
void WriteMasters(int nCount);
|
||||
void WriteThemes(int nCount);
|
||||
void WriteSlides(int nCount);
|
||||
void WriteSlideComments(int nComment);
|
||||
void EndPresentationRels(const bool& bIsCommentsAuthors);
|
||||
int GetNextId();
|
||||
void CloseRels();
|
||||
void AddRels(const CString& strRels);
|
||||
void SaveRels(const CString& strFile);
|
||||
|
||||
int WriteImage(const CString& strImagePath, CString strBase64Image);
|
||||
int WriteChart(int nChartNumber, _INT32 lDocType);
|
||||
|
||||
int WriteRels(const CString& bsType, const CString& bsTarget, const CString& bsTargetMode);
|
||||
|
||||
int WriteHyperlink(const CString& strLink, const bool& bIsActionInit);
|
||||
};
|
||||
|
||||
class CBinaryFileReader
|
||||
{
|
||||
private:
|
||||
BYTE* m_pData;
|
||||
_INT32 m_lSize;
|
||||
_INT32 m_lPos;
|
||||
BYTE* m_pDataCur;
|
||||
|
||||
_INT32 m_lNextId;
|
||||
|
||||
public:
|
||||
//CRelsGenerator m_oRels;
|
||||
CString m_strFolder;
|
||||
CString m_strFolderThemes;
|
||||
|
||||
_INT32 m_lChartNumber;
|
||||
CString m_strContentTypes;
|
||||
|
||||
BinDocxRW::CDocxSerializer* m_pMainDocument;
|
||||
|
||||
_INT32 m_lDocumentType;
|
||||
|
||||
CRelsGenerator* m_pRels;
|
||||
std::vector<CRelsGenerator*> m_stackRels;
|
||||
int m_nCurrentRelsStack;
|
||||
|
||||
public:
|
||||
CBinaryFileReader();
|
||||
~CBinaryFileReader();
|
||||
|
||||
void SetMainDocument(BinDocxRW::CDocxSerializer* pMainDoc);
|
||||
|
||||
public:
|
||||
void Init(BYTE* pData, _INT32 lStart, _INT32 lSize);
|
||||
_INT32 GenerateNextId();
|
||||
|
||||
public:
|
||||
|
||||
int Seek(_INT32 _pos);
|
||||
int Skip(_INT32 _skip);
|
||||
bool Peek(int nSizeToRead);
|
||||
|
||||
// 1 bytes
|
||||
BYTE GetUChar();
|
||||
bool GetBool();
|
||||
BYTE GetUChar_TypeNode();
|
||||
|
||||
// 2 byte
|
||||
_UINT16 GetUShort();
|
||||
|
||||
// 4 byte
|
||||
_UINT32 GetULong();
|
||||
|
||||
_INT32 GetLong();
|
||||
double GetDouble();
|
||||
// 8 byte
|
||||
_INT64 GetLong64();
|
||||
double GetDouble64();
|
||||
double GetDoubleReal();
|
||||
//String
|
||||
CString GetString(_INT32 len);
|
||||
CStringA GetString1(_INT32 len);
|
||||
CString GetString2();
|
||||
CString GetString3(_INT32 len);
|
||||
|
||||
//LPSAFEARRAY GetArray(_INT32 len);
|
||||
bool GetArray(BYTE **pBuffer, _INT32 len);
|
||||
|
||||
CStringA GetString2A();
|
||||
void SkipRecord();
|
||||
|
||||
_INT32 GetPos();
|
||||
|
||||
_INT32 GetSize();
|
||||
|
||||
BYTE* GetData();
|
||||
BYTE* GetPointer(int nSize);
|
||||
public:
|
||||
void Deserialize(NSBinPptxRW::CImageManager2* pManager, BYTE* pData, _INT32 nSize/*, LPSAFEARRAY pArray*/);
|
||||
void Deserialize(NSShapeImageGen::CImageManager* pManager, BYTE* pData, _INT32 nSize/*, LPSAFEARRAY pArray*/);
|
||||
};
|
||||
}
|
||||
87
ASCOfficePPTXFile/Editor/CalculatorCRC32.h
Normal file
87
ASCOfficePPTXFile/Editor/CalculatorCRC32.h
Normal file
@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
|
||||
const long g_clFilePartSize = 20*1024;
|
||||
class CCalculatorCRC32
|
||||
{
|
||||
public:
|
||||
CCalculatorCRC32()
|
||||
{
|
||||
m_dwMagicWord = 0xEDB88320;
|
||||
m_dwInitCrc = 0xFFFFFFFF;
|
||||
m_bInitTable = FALSE;
|
||||
}
|
||||
public:
|
||||
DWORD Calc(BYTE const*pStream, int nSize)
|
||||
{
|
||||
InitCRCTable();
|
||||
DWORD dwRes = m_dwInitCrc;
|
||||
for (int i=0;i<nSize;i++)
|
||||
{
|
||||
dwRes = m_arCRCTable[(dwRes ^ pStream[i])& 0xFF] ^ (dwRes >> 8);
|
||||
}
|
||||
|
||||
dwRes = dwRes ^ 0xFFFFFFFF;
|
||||
return dwRes;
|
||||
}
|
||||
|
||||
DWORD Calc(const CString &sStream)
|
||||
{
|
||||
InitCRCTable();
|
||||
DWORD dwRes = m_dwInitCrc;
|
||||
int nSize = sStream.GetLength();
|
||||
for (int i=0;i<nSize;i++)
|
||||
{
|
||||
dwRes = m_arCRCTable[(dwRes ^ (BYTE)sStream[i]) & 0xFF] ^ (dwRes >> 8);
|
||||
}
|
||||
|
||||
dwRes = dwRes ^ 0xFFFFFFFF;
|
||||
return dwRes;
|
||||
}
|
||||
DWORD CalcPartFile(const CString &sFilepath)
|
||||
{
|
||||
DWORD dwRet = 0xFFFFFFFF;
|
||||
//LPBYTE pBuffer = new BYTE[g_clFilePartSize];
|
||||
//if (NULL==pBuffer)
|
||||
// return dwRet;
|
||||
//FILE *pFile = fopen(sFilepath, "rb");
|
||||
//if (NULL==pFile)
|
||||
//{
|
||||
// delete [] pBuffer;
|
||||
// return dwRet;
|
||||
//}
|
||||
|
||||
//size_t nReaded = fread(pBuffer, 1, 1024, pFile);
|
||||
//fclose(pFile);
|
||||
|
||||
//dwRet = CCalculatorCRC32::Calc(pBuffer, nReaded);
|
||||
//
|
||||
////ATLTRACE("CRC32: 0x%08X\n", dwRet);
|
||||
//delete [] pBuffer;
|
||||
return dwRet;
|
||||
}
|
||||
private:
|
||||
void InitCRCTable()
|
||||
{
|
||||
if (m_bInitTable)
|
||||
return;
|
||||
|
||||
DWORD dwTemp;
|
||||
for (int i=0;i<256;i++)
|
||||
{
|
||||
dwTemp = i;
|
||||
for (int j=0;j<8;j++)
|
||||
{
|
||||
if (0x1==(dwTemp & 0x1))
|
||||
dwTemp = (dwTemp >> 1) ^ m_dwMagicWord;
|
||||
else
|
||||
dwTemp = dwTemp >> 1;
|
||||
}
|
||||
m_arCRCTable[i] = dwTemp;
|
||||
}
|
||||
}
|
||||
|
||||
DWORD m_dwMagicWord;
|
||||
DWORD m_dwInitCrc;
|
||||
DWORD m_arCRCTable[255];
|
||||
BOOL m_bInitTable;
|
||||
};
|
||||
423
ASCOfficePPTXFile/Editor/Converter.h
Normal file
423
ASCOfficePPTXFile/Editor/Converter.h
Normal file
@ -0,0 +1,423 @@
|
||||
#pragma once
|
||||
#include "../PPTXFormat/PPTX.h"
|
||||
|
||||
#include "BinWriters.h"
|
||||
|
||||
namespace PPTX2EditorAdvanced
|
||||
{
|
||||
using namespace NSBinPptxRW;
|
||||
|
||||
DWORD Convert(NSBinPptxRW::CBinaryFileWriter& oBinaryWriter, PPTX::Folder& oFolder, const CString& strSourceDirectory, const CString& strDstFile)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> main-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
NSBinPptxRW::CCommonWriter* pCommon = oBinaryWriter.m_pCommon;
|
||||
|
||||
std::vector<smart_ptr<PPTX::Theme>> _themes;
|
||||
std::vector<smart_ptr<PPTX::SlideMaster>> _slideMasters;
|
||||
std::vector<smart_ptr<PPTX::Slide>> _slides;
|
||||
std::vector<smart_ptr<PPTX::SlideLayout>> _layouts;
|
||||
std::vector<smart_ptr<PPTX::NotesSlide>> _notes;
|
||||
std::vector<smart_ptr<PPTX::NotesMaster>> _notesMasters;
|
||||
|
||||
smart_ptr<PPTX::Presentation> presentation = oFolder.get(PPTX::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
int cx = presentation->sldSz->cx;
|
||||
int cy = presentation->sldSz->cy;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
size_t nCountMasters = presentation->sldMasterIdLst.size();
|
||||
for (size_t nMaster = 0; nMaster < nCountMasters; ++nMaster)
|
||||
{
|
||||
smart_ptr<PPTX::SlideMaster> slideMaster = ((*presentation)[presentation->sldMasterIdLst[nMaster].rid.get()]).smart_dynamic_cast<PPTX::SlideMaster>();
|
||||
|
||||
if (slideMaster.IsInit() == false)
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.pptx - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> rId
|
||||
continue;
|
||||
}
|
||||
size_t pPointerSM = (size_t)(slideMaster.operator ->());
|
||||
|
||||
std::map<size_t, LONG>::const_iterator pSearchSM = pCommon->slideMasters.find(pPointerSM);
|
||||
if (pSearchSM != pCommon->slideMasters.end())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
continue;
|
||||
}
|
||||
|
||||
oBinaryWriter.m_pCommon->m_oRels.push_back (CMasterSlideInfo());
|
||||
CMasterSlideInfo& oMasterInfo = oBinaryWriter.m_pCommon->m_oRels[oBinaryWriter.m_pCommon->m_oRels.size() - 1];
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mainMaster
|
||||
LONG lCountSM = (LONG)_slideMasters.size();
|
||||
pCommon->slideMasters [pPointerSM] = lCountSM;
|
||||
_slideMasters.push_back(slideMaster);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> theme
|
||||
size_t pPointerTh = (size_t)(slideMaster->theme.operator ->());
|
||||
std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find (pPointerTh);
|
||||
if (pSearchTh == pCommon->themes.end())
|
||||
{
|
||||
LONG lCountTh = (LONG)_themes.size();
|
||||
pCommon->themes [pPointerTh] = lCountTh;
|
||||
_themes.push_back(slideMaster->theme);
|
||||
oMasterInfo.m_lThemeIndex = lCountTh;
|
||||
}
|
||||
else
|
||||
{
|
||||
oMasterInfo.m_lThemeIndex = pSearchTh->second;
|
||||
}
|
||||
|
||||
size_t nCountLayouts = slideMaster->sldLayoutIdLst.size();
|
||||
for (size_t iLayout = 0; iLayout < nCountLayouts; ++iLayout)
|
||||
{
|
||||
CString rId = slideMaster->sldLayoutIdLst[iLayout].rid.get();
|
||||
smart_ptr<PPTX::SlideLayout> slideLayout = ((*slideMaster)[rId]).smart_dynamic_cast<PPTX::SlideLayout>();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> layout
|
||||
size_t pPointerL = (size_t)(slideLayout.operator ->());
|
||||
|
||||
if (pPointerL == 0 )
|
||||
continue;
|
||||
std::map<size_t, LONG>::const_iterator pSearchL = pCommon->layouts.find(pPointerL);
|
||||
if (pSearchL == pCommon->layouts.end())
|
||||
{
|
||||
LONG lCountL = (LONG)_layouts.size();
|
||||
pCommon->layouts [pPointerL] = lCountL;
|
||||
_layouts.push_back(slideLayout);
|
||||
|
||||
oMasterInfo.m_arLayoutIndexes.push_back(lCountL);
|
||||
oMasterInfo.m_arLayoutImagesBase64.push_back("");
|
||||
}
|
||||
else
|
||||
{
|
||||
oMasterInfo.m_arLayoutIndexes.push_back(pSearchL->second);
|
||||
oMasterInfo.m_arLayoutImagesBase64.push_back("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> notesMasters
|
||||
size_t nCountNoteMasters = presentation->notesMasterIdLst.size();
|
||||
for (size_t nNote = 0; nNote < nCountNoteMasters; ++nNote)
|
||||
{
|
||||
smart_ptr<PPTX::NotesMaster> noteMaster = ((*presentation)[presentation->notesMasterIdLst[nNote].rid.get()]).smart_dynamic_cast<PPTX::NotesMaster>();
|
||||
size_t pPointerNM = (size_t)(noteMaster.operator ->());
|
||||
|
||||
std::map<size_t, LONG>::const_iterator pSearchNM = pCommon->notesMasters.find(pPointerNM);
|
||||
if (pSearchNM != pCommon->notesMasters.end())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
continue;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mainMaster
|
||||
LONG lCountNM = (LONG)_notesMasters.size();
|
||||
pCommon->notesMasters[pPointerNM] = lCountNM;
|
||||
_notesMasters.push_back(noteMaster);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> theme
|
||||
size_t pPointerTh = (size_t)(noteMaster->theme_.operator ->());
|
||||
std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find(pPointerTh);
|
||||
if (pSearchTh == pCommon->themes.end())
|
||||
{
|
||||
LONG lCountTh = (LONG)_themes.size();
|
||||
pCommon->themes [pPointerTh] = lCountTh;
|
||||
_themes.push_back(noteMaster->theme_);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
size_t nCount = presentation->sldIdLst.size();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
CString rId = presentation->sldIdLst[i].rid.get();
|
||||
smart_ptr<PPTX::Slide> slide = ((*presentation)[rId]).smart_dynamic_cast<PPTX::Slide>();
|
||||
|
||||
if (slide.IsInit() == false)
|
||||
{
|
||||
continue;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ... <20><><EFBFBD><EFBFBD><EFBFBD> 38 <20> FY10_September_Partner_Call.pptx
|
||||
}
|
||||
size_t pPointerS = (size_t)(slide.operator ->());
|
||||
|
||||
std::map<size_t, LONG>::const_iterator pSearchS = pCommon->slides.find(pPointerS);
|
||||
if (pSearchS != pCommon->slides.end())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
continue;
|
||||
}
|
||||
|
||||
size_t pPointerL = (size_t)(slide->Layout.operator ->());
|
||||
std::map<size_t, LONG>::const_iterator pSearchL = pCommon->layouts.find(pPointerL);
|
||||
if (pSearchL == pCommon->layouts.end())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
oBinaryWriter.m_pCommon->m_oSlide_Layout_Rels.push_back(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
oBinaryWriter.m_pCommon->m_oSlide_Layout_Rels.push_back(pSearchL->second);
|
||||
}
|
||||
|
||||
LONG lCountS = (LONG)_slides.size();
|
||||
pCommon->slides [pPointerS] = lCountS;
|
||||
_slides.push_back(slide);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> note
|
||||
size_t pPointerN = (size_t)(slide->Note.operator ->());
|
||||
|
||||
if (NULL != pPointerN)
|
||||
{
|
||||
std::map<size_t, LONG>::const_iterator pSearchN = pCommon->notes.find(pPointerN);
|
||||
if (pSearchN == pCommon->notes.end())
|
||||
{
|
||||
LONG lCountN = (LONG)_notes.size();
|
||||
pCommon->notes [pPointerN] = lCountN;
|
||||
_notes.push_back(slide->Note);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> maintables. <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - 5 <20><><EFBFBD><EFBFBD> (<28><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>)
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 30. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
oBinaryWriter.WriteReserved(5 * 30);
|
||||
|
||||
// Main
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Main);
|
||||
oBinaryWriter.WriteULONG(NSSerFormat::Signature);
|
||||
oBinaryWriter.WriteULONG(0);
|
||||
|
||||
// App
|
||||
smart_ptr<PPTX::App> app = oFolder.get(PPTX::FileTypes::App).smart_dynamic_cast<PPTX::App>();
|
||||
if (app.is_init())
|
||||
{
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::App);
|
||||
app->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// Core
|
||||
smart_ptr<PPTX::Core> core = oFolder.get(PPTX::FileTypes::Core).smart_dynamic_cast<PPTX::Core>();
|
||||
if (core.is_init())
|
||||
{
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Core);
|
||||
core->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// ViewProps
|
||||
smart_ptr<PPTX::ViewProps> viewProps = presentation->get(PPTX::FileTypes::ViewProps).smart_dynamic_cast<PPTX::ViewProps>();
|
||||
if (viewProps.is_init())
|
||||
{
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::ViewProps);
|
||||
viewProps->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// TableStyles
|
||||
smart_ptr<PPTX::TableStyles> tablestyles = presentation->get(PPTX::FileTypes::TableStyles).smart_dynamic_cast<PPTX::TableStyles>();
|
||||
if (tablestyles.is_init())
|
||||
{
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::TableStyles);
|
||||
tablestyles->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// Presentation
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Presentation);
|
||||
presentation->toPPTY(&oBinaryWriter);
|
||||
|
||||
// themes
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Themes);
|
||||
ULONG nCountThemes = (ULONG)_themes.size();
|
||||
oBinaryWriter.WriteULONG(nCountThemes);
|
||||
for (ULONG i = 0; i < nCountThemes; ++i)
|
||||
{
|
||||
_themes[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slidemasters
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::SlideMasters);
|
||||
ULONG nCountSM = (ULONG)_slideMasters.size();
|
||||
oBinaryWriter.WriteULONG(nCountSM);
|
||||
for (ULONG i = 0; i < nCountSM; ++i)
|
||||
{
|
||||
_slideMasters[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slidelayouts
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::SlideLayouts);
|
||||
ULONG nCountL = 0;
|
||||
|
||||
for (ULONG i = 0; i < _layouts.size(); ++i)
|
||||
{
|
||||
if (_layouts[i].IsInit())nCountL++;
|
||||
}
|
||||
|
||||
oBinaryWriter.WriteULONG(nCountL);
|
||||
for (ULONG i = 0; i < _layouts.size(); ++i)
|
||||
{
|
||||
if (_layouts[i].IsInit() == false)
|
||||
{
|
||||
continue;
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 42 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> FY10_September_Partner_Call.pptx
|
||||
}
|
||||
_layouts[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// slides
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::Slides);
|
||||
ULONG nCountS = (ULONG)_slides.size();
|
||||
oBinaryWriter.WriteULONG(nCountS);
|
||||
for (ULONG i = 0; i < nCountS; ++i)
|
||||
{
|
||||
_slides[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
if (FALSE)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> NOTES
|
||||
|
||||
// notes
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::NotesSlides);
|
||||
ULONG nCountN = (ULONG)_notes.size();
|
||||
oBinaryWriter.WriteULONG(nCountN);
|
||||
for (ULONG i = 0; i < nCountN; ++i)
|
||||
{
|
||||
_notes[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
|
||||
// notesmasters
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::NotesMasters);
|
||||
ULONG nCountNM = (ULONG)_notesMasters.size();
|
||||
oBinaryWriter.WriteULONG(nCountNM);
|
||||
for (ULONG i = 0; i < nCountNM; ++i)
|
||||
{
|
||||
_notesMasters[i]->toPPTY(&oBinaryWriter);
|
||||
}
|
||||
}
|
||||
|
||||
// ImageMap ---------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::ImageMap);
|
||||
oBinaryWriter.StartRecord(NSMainTables::ImageMap);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
std::map<CString, NSShapeImageGen::CImageInfo>* pIMaps = &oBinaryWriter.m_pCommon->m_pImageManager->m_mapImagesFile;
|
||||
|
||||
LONG lIndexI = 0;
|
||||
for (std::map<CString, NSShapeImageGen::CImageInfo>::iterator pPair = pIMaps->begin(); pPair != pIMaps->end(); ++pPair)
|
||||
{
|
||||
NSShapeImageGen::CImageInfo& oRec = pPair->second;
|
||||
oBinaryWriter.WriteString1(lIndexI++, oRec.GetPath2());
|
||||
}
|
||||
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
oBinaryWriter.EndRecord();
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
// FontMap ----------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::FontMap);
|
||||
oBinaryWriter.StartRecord(NSMainTables::FontMap);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
std::map<CString, CString>* pFMaps = &oBinaryWriter.m_pCommon->m_pNativePicker->m_mapPicks;
|
||||
|
||||
LONG lIndexF = 0;
|
||||
for (std::map<CString, CString>::iterator pPair = pFMaps->begin(); pPair != pFMaps->end(); ++pPair)
|
||||
{
|
||||
CString& oRec = pPair->second;
|
||||
oBinaryWriter.WriteString1(lIndexF++, oRec);
|
||||
}
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
oBinaryWriter.EndRecord();
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
if (TRUE)
|
||||
{
|
||||
// SlideRels --------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::SlideRels);
|
||||
oBinaryWriter.StartRecord(NSMainTables::SlideRels);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
size_t _s_rels = oBinaryWriter.m_pCommon->m_oSlide_Layout_Rels.size();
|
||||
for (size_t i = 0; i < _s_rels; ++i)
|
||||
{
|
||||
oBinaryWriter.WriteInt1(0, oBinaryWriter.m_pCommon->m_oSlide_Layout_Rels[i]);
|
||||
}
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
oBinaryWriter.EndRecord();
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
// ThemeRels --------------------------------------
|
||||
oBinaryWriter.StartMainRecord(NSMainTables::ThemeRels);
|
||||
oBinaryWriter.StartRecord(NSMainTables::ThemeRels);
|
||||
|
||||
std::vector <NSBinPptxRW::CMasterSlideInfo>& th_rels = oBinaryWriter.m_pCommon->m_oRels;
|
||||
oBinaryWriter.WriteULONG((ULONG)th_rels.size());
|
||||
|
||||
for (size_t i = 0; i < th_rels.size(); i++)
|
||||
{
|
||||
NSBinPptxRW::CMasterSlideInfo& oTh = th_rels [i];
|
||||
|
||||
oBinaryWriter.StartRecord(0);
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
oBinaryWriter.WriteInt1(0, oTh.m_lThemeIndex);
|
||||
//oBinaryWriter.WriteBYTE(1);
|
||||
//oBinaryWriter.WriteStringA(oTh.m_strImageBase64);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
ULONG lay_count = (ULONG)oTh.m_arLayoutIndexes.size();
|
||||
oBinaryWriter.WriteULONG(lay_count);
|
||||
|
||||
for (ULONG j = 0; j < lay_count; ++j)
|
||||
{
|
||||
oBinaryWriter.StartRecord(0);
|
||||
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
oBinaryWriter.WriteInt1(0, oTh.m_arLayoutIndexes[j]);
|
||||
//oBinaryWriter.WriteBYTE(1);
|
||||
//oBinaryWriter.WriteStringA(oTh.m_arLayoutImagesBase64[j]);
|
||||
oBinaryWriter.WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
oBinaryWriter.EndRecord();
|
||||
}
|
||||
|
||||
oBinaryWriter.EndRecord();
|
||||
}
|
||||
|
||||
oBinaryWriter.EndRecord();
|
||||
}
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
oBinaryWriter.WriteEmbeddedFonts();
|
||||
oBinaryWriter.WriteMainPart();
|
||||
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
BYTE* pbBinBuffer = oBinaryWriter.GetBuffer();
|
||||
int nBinBufferLen = (int)oBinaryWriter.GetPosition();
|
||||
int nBase64BufferLen = Base64::Base64EncodeGetRequiredLength(nBinBufferLen, Base64::B64_BASE64_FLAG_NOCRLF);
|
||||
BYTE* pbBase64Buffer = new BYTE[nBase64BufferLen+64];
|
||||
// if (TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
|
||||
if (TRUE == Base64_1::Base64Encode(pbBinBuffer, nBinBufferLen, pbBase64Buffer, &nBase64BufferLen))
|
||||
{
|
||||
CFile oFile;
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
oFile.CreateFileW(strDstFile);
|
||||
#else
|
||||
oFile.CreateFile(strDstFile);
|
||||
#endif
|
||||
CString strPrefix = _T("");
|
||||
strPrefix.Format(_T("PPTY;v1;%d;"), nBinBufferLen);
|
||||
CStringA sW = (CStringA)strPrefix;
|
||||
oFile.WriteFile(sW.GetBuffer(), (DWORD)sW.GetLength());
|
||||
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(pbBase64Buffer);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
210
ASCOfficePPTXFile/Editor/DefaultNotesMaster.h
Normal file
210
ASCOfficePPTXFile/Editor/DefaultNotesMaster.h
Normal file
@ -0,0 +1,210 @@
|
||||
#ifndef DEFAULTNOTESMASTER_H
|
||||
#define DEFAULTNOTESMASTER_H
|
||||
|
||||
namespace Writers
|
||||
{
|
||||
class DefaultNotesMasterWriter
|
||||
{
|
||||
public:
|
||||
DefaultNotesMasterWriter()
|
||||
{
|
||||
}
|
||||
void Write(CString fileName)
|
||||
{
|
||||
CString s_Common = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
|
||||
s_Common += _T("<p:notesMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">\
|
||||
<p:cSld>\
|
||||
<p:bg>\
|
||||
<p:bgPr>\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"bg1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:effectLst/>\
|
||||
</p:bgPr>\
|
||||
</p:bg>\
|
||||
<p:spTree>\
|
||||
<p:nvGrpSpPr>\
|
||||
<p:cNvPr id=\"1\" name=\"\"/>\
|
||||
<p:cNvGrpSpPr/>\
|
||||
<p:nvPr/>\
|
||||
</p:nvGrpSpPr>\
|
||||
<p:grpSpPr>\
|
||||
<a:xfrm>\
|
||||
<a:off x=\"0\" y=\"0\"/>\
|
||||
<a:ext cx=\"0\" cy=\"0\"/>\
|
||||
<a:chOff x=\"0\" y=\"0\"/>\
|
||||
<a:chExt cx=\"0\" cy=\"0\"/>\
|
||||
</a:xfrm>\
|
||||
</p:grpSpPr>\
|
||||
<p:sp>\
|
||||
<p:nvSpPr>\
|
||||
<p:cNvPr id=\"11271\" name=\"Rectangle 7\"/>\
|
||||
<p:cNvSpPr>\
|
||||
<a:spLocks noGrp=\"1\" noChangeArrowheads=\"1\"/>\
|
||||
</p:cNvSpPr>\
|
||||
<p:nvPr>\
|
||||
<p:ph type=\"body\" idx=\"1\"/>\
|
||||
</p:nvPr>\
|
||||
</p:nvSpPr>\
|
||||
<p:spPr bwMode=\"auto\">\
|
||||
<a:xfrm>\
|
||||
<a:off x=\"3884613\" y=\"8685213\"/>\
|
||||
<a:ext cx=\"2971800\" cy=\"457200\"/>\
|
||||
</a:xfrm>\
|
||||
<a:prstGeom prst=\"rect\">\
|
||||
<a:avLst/>\
|
||||
</a:prstGeom>\
|
||||
<a:extLst/>\
|
||||
</p:spPr>\
|
||||
<p:txBody>\
|
||||
<a:bodyPr/>\
|
||||
<a:lstStyle>\
|
||||
<a:lvl1pPr algn=\"l\">\
|
||||
<a:defRPr sz=\"1200\">\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl1pPr>\
|
||||
</a:lstStyle>\
|
||||
<a:p>\
|
||||
<a:endParaRPr/>\
|
||||
</a:p>\
|
||||
</p:txBody>\
|
||||
</p:sp>\
|
||||
</p:spTree>\
|
||||
</p:cSld>\
|
||||
<p:clrMap bg1=\"lt1\" tx1=\"dk1\" bg2=\"lt2\" tx2=\"dk2\" accent1=\"accent1\" accent2=\"accent2\" accent3=\"accent3\" accent4=\"accent4\" accent5=\"accent5\" accent6=\"accent6\" hlink=\"hlink\" folHlink=\"folHlink\"/>\
|
||||
<p:notesStyle>\
|
||||
<a:lvl1pPr algn=\"l\" rtl=\"0\" fontAlgn=\"base\">\
|
||||
<a:spcBef>\
|
||||
<a:spcPct val=\"30000\"/>\
|
||||
</a:spcBef>\
|
||||
<a:spcAft>\
|
||||
<a:spcPct val=\"0\"/>\
|
||||
</a:spcAft>\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl1pPr>\
|
||||
<a:lvl2pPr marL=\"457200\" algn=\"l\" rtl=\"0\" fontAlgn=\"base\">\
|
||||
<a:spcBef>\
|
||||
<a:spcPct val=\"30000\"/>\
|
||||
</a:spcBef>\
|
||||
<a:spcAft>\
|
||||
<a:spcPct val=\"0\"/>\
|
||||
</a:spcAft>\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl2pPr>\
|
||||
<a:lvl3pPr marL=\"914400\" algn=\"l\" rtl=\"0\" fontAlgn=\"base\">\
|
||||
<a:spcBef>\
|
||||
<a:spcPct val=\"30000\"/>\
|
||||
</a:spcBef>\
|
||||
<a:spcAft>\
|
||||
<a:spcPct val=\"0\"/>\
|
||||
</a:spcAft>\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl3pPr>\
|
||||
<a:lvl4pPr marL=\"1371600\" algn=\"l\" rtl=\"0\" fontAlgn=\"base\">\
|
||||
<a:spcBef>\
|
||||
<a:spcPct val=\"30000\"/>\
|
||||
</a:spcBef>\
|
||||
<a:spcAft>\
|
||||
<a:spcPct val=\"0\"/>\
|
||||
</a:spcAft>\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl4pPr>\
|
||||
<a:lvl5pPr marL=\"1828800\" algn=\"l\" rtl=\"0\" fontAlgn=\"base\">\
|
||||
<a:spcBef>\
|
||||
<a:spcPct val=\"30000\"/>\
|
||||
</a:spcBef>\
|
||||
<a:spcAft>\
|
||||
<a:spcPct val=\"0\"/>\
|
||||
</a:spcAft>\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"Arial\" charset=\"0\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl5pPr>\
|
||||
<a:lvl6pPr marL=\"2286000\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"1\" latinLnBrk=\"0\" hangingPunct=\"1\">\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"+mn-lt\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl6pPr>\
|
||||
<a:lvl7pPr marL=\"2743200\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"1\" latinLnBrk=\"0\" hangingPunct=\"1\">\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"+mn-lt\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl7pPr>\
|
||||
<a:lvl8pPr marL=\"3200400\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"1\" latinLnBrk=\"0\" hangingPunct=\"1\">\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"+mn-lt\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl8pPr>\
|
||||
<a:lvl9pPr marL=\"3657600\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"1\" latinLnBrk=\"0\" hangingPunct=\"1\">\
|
||||
<a:defRPr sz=\"1200\" kern=\"1200\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"tx1\"/>\
|
||||
</a:solidFill>\
|
||||
<a:latin typeface=\"+mn-lt\"/>\
|
||||
<a:ea typeface=\"+mn-ea\"/>\
|
||||
<a:cs typeface=\"+mn-cs\"/>\
|
||||
</a:defRPr>\
|
||||
</a:lvl9pPr>\
|
||||
</p:notesStyle>\
|
||||
</p:notesMaster>");
|
||||
|
||||
OOX::CPath pathFile = fileName;
|
||||
|
||||
CFile oFile;
|
||||
oFile.CreateFile(pathFile.GetPath());
|
||||
oFile.WriteStringUTF8(s_Common);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif // DEFAULTNOTESMASTER_H
|
||||
305
ASCOfficePPTXFile/Editor/DefaultNotesTheme.h
Normal file
305
ASCOfficePPTXFile/Editor/DefaultNotesTheme.h
Normal file
@ -0,0 +1,305 @@
|
||||
#ifndef DEFAULTNOTESTHEME_H
|
||||
#define DEFAULTNOTESTHEME_H
|
||||
namespace Writers
|
||||
{
|
||||
class DefaultNotesThemeWriter
|
||||
{
|
||||
public:
|
||||
DefaultNotesThemeWriter()
|
||||
{
|
||||
}
|
||||
void Write(CString fileName)
|
||||
{
|
||||
CString s_Common = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
|
||||
s_Common += _T("<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"Office Theme\">\
|
||||
<a:themeElements>\
|
||||
<a:clrScheme name=\"\">\
|
||||
<a:dk1>\
|
||||
<a:srgbClr val=\"000000\"/>\
|
||||
</a:dk1>\
|
||||
<a:lt1>\
|
||||
<a:srgbClr val=\"FFFFFF\"/>\
|
||||
</a:lt1>\
|
||||
<a:dk2>\
|
||||
<a:srgbClr val=\"000000\"/>\
|
||||
</a:dk2>\
|
||||
<a:lt2>\
|
||||
<a:srgbClr val=\"808080\"/>\
|
||||
</a:lt2>\
|
||||
<a:accent1>\
|
||||
<a:srgbClr val=\"BBE0E3\"/>\
|
||||
</a:accent1>\
|
||||
<a:accent2>\
|
||||
<a:srgbClr val=\"333399\"/>\
|
||||
</a:accent2>\
|
||||
<a:accent3>\
|
||||
<a:srgbClr val=\"FFFFFF\"/>\
|
||||
</a:accent3>\
|
||||
<a:accent4>\
|
||||
<a:srgbClr val=\"000000\"/>\
|
||||
</a:accent4>\
|
||||
<a:accent5>\
|
||||
<a:srgbClr val=\"DAEDEF\"/>\
|
||||
</a:accent5>\
|
||||
<a:accent6>\
|
||||
<a:srgbClr val=\"2D2D8A\"/>\
|
||||
</a:accent6>\
|
||||
<a:hlink>\
|
||||
<a:srgbClr val=\"009999\"/>\
|
||||
</a:hlink>\
|
||||
<a:folHlink>\
|
||||
<a:srgbClr val=\"99CC00\"/>\
|
||||
</a:folHlink>\
|
||||
</a:clrScheme>\
|
||||
<a:fontScheme name=\"Office\">\
|
||||
<a:majorFont>\
|
||||
<a:latin typeface=\"Calibri\"/>\
|
||||
<a:ea typeface=\"\"/>\
|
||||
<a:cs typeface=\"\"/>\
|
||||
<a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/>\
|
||||
<a:font script=\"Hang\" typeface=\"맑은 고딕\"/>\
|
||||
<a:font script=\"Hans\" typeface=\"宋体\"/>\
|
||||
<a:font script=\"Hant\" typeface=\"新細明體\"/>\
|
||||
<a:font script=\"Arab\" typeface=\"Times New Roman\"/>\
|
||||
<a:font script=\"Hebr\" typeface=\"Times New Roman\"/>\
|
||||
<a:font script=\"Thai\" typeface=\"Angsana New\"/>\
|
||||
<a:font script=\"Ethi\" typeface=\"Nyala\"/>\
|
||||
<a:font script=\"Beng\" typeface=\"Vrinda\"/>\
|
||||
<a:font script=\"Gujr\" typeface=\"Shruti\"/>\
|
||||
<a:font script=\"Khmr\" typeface=\"MoolBoran\"/>\
|
||||
<a:font script=\"Knda\" typeface=\"Tunga\"/>\
|
||||
<a:font script=\"Guru\" typeface=\"Raavi\"/>\
|
||||
<a:font script=\"Cans\" typeface=\"Euphemia\"/>\
|
||||
<a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/>\
|
||||
<a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/>\
|
||||
<a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/>\
|
||||
<a:font script=\"Thaa\" typeface=\"MV Boli\"/>\
|
||||
<a:font script=\"Deva\" typeface=\"Mangal\"/>\
|
||||
<a:font script=\"Telu\" typeface=\"Gautami\"/>\
|
||||
<a:font script=\"Taml\" typeface=\"Latha\"/>\
|
||||
<a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/>\
|
||||
<a:font script=\"Orya\" typeface=\"Kalinga\"/>\
|
||||
<a:font script=\"Mlym\" typeface=\"Kartika\"/>\
|
||||
<a:font script=\"Laoo\" typeface=\"DokChampa\"/>\
|
||||
<a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/>\
|
||||
<a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/>\
|
||||
<a:font script=\"Viet\" typeface=\"Times New Roman\"/>\
|
||||
<a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/>\
|
||||
</a:majorFont>");
|
||||
s_Common += _T("<a:minorFont>\
|
||||
<a:latin typeface=\"Calibri\"/>\
|
||||
<a:ea typeface=\"\"/>\
|
||||
<a:cs typeface=\"\"/>\
|
||||
<a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/>\
|
||||
<a:font script=\"Hang\" typeface=\"맑은 고딕\"/>\
|
||||
<a:font script=\"Hans\" typeface=\"宋体\"/>\
|
||||
<a:font script=\"Hant\" typeface=\"新細明體\"/>\
|
||||
<a:font script=\"Arab\" typeface=\"Arial\"/>\
|
||||
<a:font script=\"Hebr\" typeface=\"Arial\"/>\
|
||||
<a:font script=\"Thai\" typeface=\"Cordia New\"/>\
|
||||
<a:font script=\"Ethi\" typeface=\"Nyala\"/>\
|
||||
<a:font script=\"Beng\" typeface=\"Vrinda\"/>\
|
||||
<a:font script=\"Gujr\" typeface=\"Shruti\"/>\
|
||||
<a:font script=\"Khmr\" typeface=\"DaunPenh\"/>\
|
||||
<a:font script=\"Knda\" typeface=\"Tunga\"/>\
|
||||
<a:font script=\"Guru\" typeface=\"Raavi\"/>\
|
||||
<a:font script=\"Cans\" typeface=\"Euphemia\"/>\
|
||||
<a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/>\
|
||||
<a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/>\
|
||||
<a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/>\
|
||||
<a:font script=\"Thaa\" typeface=\"MV Boli\"/>\
|
||||
<a:font script=\"Deva\" typeface=\"Mangal\"/>\
|
||||
<a:font script=\"Telu\" typeface=\"Gautami\"/>\
|
||||
<a:font script=\"Taml\" typeface=\"Latha\"/>\
|
||||
<a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/>\
|
||||
<a:font script=\"Orya\" typeface=\"Kalinga\"/>\
|
||||
<a:font script=\"Mlym\" typeface=\"Kartika\"/>\
|
||||
<a:font script=\"Laoo\" typeface=\"DokChampa\"/>\
|
||||
<a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/>\
|
||||
<a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/>\
|
||||
<a:font script=\"Viet\" typeface=\"Arial\"/>\
|
||||
<a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/>\
|
||||
</a:minorFont>\
|
||||
</a:fontScheme>\
|
||||
<a:fmtScheme name=\"Office\">\
|
||||
<a:fillStyleLst>\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"phClr\"/>\
|
||||
</a:solidFill>");
|
||||
s_Common += _T("<a:gradFill rotWithShape=\"1\">\
|
||||
<a:gsLst>\
|
||||
<a:gs pos=\"0\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"50000\"/>\
|
||||
<a:satMod val=\"300000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"35000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"37000\"/>\
|
||||
<a:satMod val=\"300000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"100000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"15000\"/>\
|
||||
<a:satMod val=\"350000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
</a:gsLst>\
|
||||
<a:lin ang=\"16200000\" scaled=\"1\"/>\
|
||||
</a:gradFill>\
|
||||
<a:gradFill rotWithShape=\"1\">\
|
||||
<a:gsLst>\
|
||||
<a:gs pos=\"0\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"51000\"/>\
|
||||
<a:satMod val=\"130000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"80000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"93000\"/>\
|
||||
<a:satMod val=\"130000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"100000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"94000\"/>\
|
||||
<a:satMod val=\"135000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
</a:gsLst>\
|
||||
<a:lin ang=\"16200000\" scaled=\"0\"/>\
|
||||
</a:gradFill>\
|
||||
</a:fillStyleLst>\
|
||||
<a:lnStyleLst>\
|
||||
<a:ln w=\"9525\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">\
|
||||
<a:solidFill>");
|
||||
s_Common += _T("<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"95000\"/>\
|
||||
<a:satMod val=\"105000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:solidFill>\
|
||||
<a:prstDash val=\"solid\"/>\
|
||||
</a:ln>\
|
||||
<a:ln w=\"25400\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"phClr\"/>\
|
||||
</a:solidFill>\
|
||||
<a:prstDash val=\"solid\"/>\
|
||||
</a:ln>\
|
||||
<a:ln w=\"38100\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"phClr\"/>\
|
||||
</a:solidFill>\
|
||||
<a:prstDash val=\"solid\"/>\
|
||||
</a:ln>\
|
||||
</a:lnStyleLst>\
|
||||
<a:effectStyleLst>\
|
||||
<a:effectStyle>\
|
||||
<a:effectLst>\
|
||||
<a:outerShdw blurRad=\"40000\" dist=\"20000\" dir=\"5400000\" rotWithShape=\"0\">\
|
||||
<a:srgbClr val=\"000000\">\
|
||||
<a:alpha val=\"38000\"/>\
|
||||
</a:srgbClr>\
|
||||
</a:outerShdw>\
|
||||
</a:effectLst>\
|
||||
</a:effectStyle>\
|
||||
<a:effectStyle>\
|
||||
<a:effectLst>\
|
||||
<a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\">\
|
||||
<a:srgbClr val=\"000000\">\
|
||||
<a:alpha val=\"35000\"/>\
|
||||
</a:srgbClr>\
|
||||
</a:outerShdw>\
|
||||
</a:effectLst>\
|
||||
</a:effectStyle>\
|
||||
<a:effectStyle>");
|
||||
s_Common += _T("<a:effectLst>\
|
||||
<a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\">\
|
||||
<a:srgbClr val=\"000000\">\
|
||||
<a:alpha val=\"35000\"/>\
|
||||
</a:srgbClr>\
|
||||
</a:outerShdw>\
|
||||
</a:effectLst>\
|
||||
<a:scene3d>\
|
||||
<a:camera prst=\"orthographicFront\">\
|
||||
<a:rot lat=\"0\" lon=\"0\" rev=\"0\"/>\
|
||||
</a:camera>\
|
||||
<a:lightRig rig=\"threePt\" dir=\"t\">\
|
||||
<a:rot lat=\"0\" lon=\"0\" rev=\"1200000\"/>\
|
||||
</a:lightRig>\
|
||||
</a:scene3d>\
|
||||
<a:sp3d>\
|
||||
<a:bevelT w=\"63500\" h=\"25400\"/>\
|
||||
</a:sp3d>\
|
||||
</a:effectStyle>\
|
||||
</a:effectStyleLst>\
|
||||
<a:bgFillStyleLst>\
|
||||
<a:solidFill>\
|
||||
<a:schemeClr val=\"phClr\"/>\
|
||||
</a:solidFill>\
|
||||
<a:gradFill rotWithShape=\"1\">\
|
||||
<a:gsLst>\
|
||||
<a:gs pos=\"0\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"40000\"/>\
|
||||
<a:satMod val=\"350000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"40000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"45000\"/>\
|
||||
<a:shade val=\"99000\"/>\
|
||||
<a:satMod val=\"350000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"100000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"20000\"/>\
|
||||
<a:satMod val=\"255000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
</a:gsLst>\
|
||||
<a:path path=\"circle\">\
|
||||
<a:fillToRect l=\"50000\" t=\"-80000\" r=\"50000\" b=\"180000\"/>\
|
||||
</a:path>\
|
||||
</a:gradFill>\
|
||||
<a:gradFill rotWithShape=\"1\">\
|
||||
<a:gsLst>\
|
||||
<a:gs pos=\"0\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:tint val=\"80000\"/>\
|
||||
<a:satMod val=\"300000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
<a:gs pos=\"100000\">\
|
||||
<a:schemeClr val=\"phClr\">\
|
||||
<a:shade val=\"30000\"/>\
|
||||
<a:satMod val=\"200000\"/>\
|
||||
</a:schemeClr>\
|
||||
</a:gs>\
|
||||
</a:gsLst>\
|
||||
<a:path path=\"circle\">\
|
||||
<a:fillToRect l=\"50000\" t=\"50000\" r=\"50000\" b=\"50000\"/>\
|
||||
</a:path>\
|
||||
</a:gradFill>\
|
||||
</a:bgFillStyleLst>\
|
||||
</a:fmtScheme>\
|
||||
</a:themeElements>\
|
||||
<a:objectDefaults/>\
|
||||
<a:extraClrSchemeLst/>\
|
||||
</a:theme>");
|
||||
|
||||
OOX::CPath pathFile= fileName;
|
||||
|
||||
CFile oFile;
|
||||
oFile.CreateFile(pathFile.GetPath());
|
||||
oFile.WriteStringUTF8(s_Common);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif // DEFAULTNOTESTHEME_H
|
||||
398
ASCOfficePPTXFile/Editor/FontCutter.h
Normal file
398
ASCOfficePPTXFile/Editor/FontCutter.h
Normal file
@ -0,0 +1,398 @@
|
||||
#pragma once
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "BinReaderWriterDefines.h"
|
||||
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
|
||||
#include "../../Common/Base64.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/Nullable.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NSFontCutter
|
||||
{
|
||||
class CEmbeddedFontsManager
|
||||
{
|
||||
private:
|
||||
class CEmbeddedFontInfo
|
||||
{
|
||||
public:
|
||||
CString Name;
|
||||
|
||||
CString PathRegular;
|
||||
LONG FaceRegular;
|
||||
|
||||
CString PathBold;
|
||||
LONG FaceBold;
|
||||
|
||||
CString PathItalic;
|
||||
LONG FaceItalic;
|
||||
|
||||
CString PathBoldItalic;
|
||||
LONG FaceBoldItalic;
|
||||
|
||||
public:
|
||||
CEmbeddedFontInfo()
|
||||
{
|
||||
Name = _T("");
|
||||
|
||||
PathRegular = _T("");
|
||||
FaceRegular = -1;
|
||||
|
||||
PathBold = _T("");
|
||||
FaceBold = -1;
|
||||
|
||||
PathItalic = _T("");
|
||||
FaceItalic = -1;
|
||||
|
||||
PathBoldItalic = _T("");
|
||||
FaceBoldItalic = -1;
|
||||
}
|
||||
|
||||
CEmbeddedFontInfo(const CEmbeddedFontInfo& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
|
||||
CEmbeddedFontInfo& operator=(const CEmbeddedFontInfo& oSrc)
|
||||
{
|
||||
Name = oSrc.Name;
|
||||
|
||||
PathRegular = oSrc.PathRegular;
|
||||
FaceRegular = oSrc.FaceRegular;
|
||||
|
||||
PathBold = oSrc.PathBold;
|
||||
FaceBold = oSrc.FaceBold;
|
||||
|
||||
PathItalic = oSrc.PathItalic;
|
||||
FaceItalic = oSrc.FaceItalic;
|
||||
|
||||
PathBoldItalic = oSrc.PathBoldItalic;
|
||||
FaceBoldItalic = oSrc.FaceBoldItalic;
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
std::map<CString, CEmbeddedFontInfo> m_mapFontsEmbeddded;
|
||||
std::map<WCHAR, BOOL> m_CharMap;
|
||||
|
||||
public:
|
||||
CString m_strEmbeddedFontsFolder;
|
||||
|
||||
public:
|
||||
CEmbeddedFontsManager()
|
||||
{
|
||||
m_strEmbeddedFontsFolder = _T("");
|
||||
}
|
||||
|
||||
void CheckFont(const CString& strName, CFontManager* pManager)
|
||||
{
|
||||
std::map<CString, CEmbeddedFontInfo>::const_iterator pPair = m_mapFontsEmbeddded.find(strName);
|
||||
if (pPair != m_mapFontsEmbeddded.end())
|
||||
return;
|
||||
|
||||
CEmbeddedFontInfo oInfo;
|
||||
oInfo.Name = strName;
|
||||
|
||||
CArray<CFontInfo*> aFontInfos = pManager->GetAllStylesByFontName(std::wstring(strName.GetString()));
|
||||
for(int i = 0; i < aFontInfos.GetCount(); ++i)
|
||||
{
|
||||
CFontInfo* pFontInfo = aFontInfos[i];
|
||||
if(FALSE != pFontInfo->m_bBold && FALSE != pFontInfo->m_bItalic)
|
||||
{
|
||||
oInfo.PathBoldItalic = CString(pFontInfo->m_wsFontPath.c_str());
|
||||
oInfo.FaceBoldItalic = pFontInfo->m_lIndex;
|
||||
}
|
||||
else if(FALSE != pFontInfo->m_bBold)
|
||||
{
|
||||
oInfo.PathBold = CString(pFontInfo->m_wsFontPath.c_str());
|
||||
oInfo.FaceBold = pFontInfo->m_lIndex;
|
||||
}
|
||||
else if(FALSE != pFontInfo->m_bItalic)
|
||||
{
|
||||
oInfo.PathItalic = CString(pFontInfo->m_wsFontPath.c_str());
|
||||
oInfo.FaceItalic = pFontInfo->m_lIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo.PathRegular = CString(pFontInfo->m_wsFontPath.c_str());
|
||||
oInfo.FaceRegular = pFontInfo->m_lIndex;
|
||||
}
|
||||
}
|
||||
|
||||
m_mapFontsEmbeddded [strName] = oInfo;
|
||||
}
|
||||
|
||||
void CheckString(const nullable_string& val)
|
||||
{
|
||||
if (val.is_init())
|
||||
CheckString(*val);
|
||||
}
|
||||
void CheckString(const CString& val)
|
||||
{
|
||||
int len = val.GetLength();
|
||||
|
||||
CString str_lower = val; str_lower.MakeLower();
|
||||
CString str_upper = val; str_upper.MakeUpper();
|
||||
|
||||
for (int i = 0; i < len; ++i)
|
||||
{
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
m_CharMap [str_lower.GetBuffer()[i]] = TRUE;
|
||||
m_CharMap [str_upper.GetBuffer()[i]] = TRUE;
|
||||
|
||||
#else
|
||||
m_CharMap [str_lower.c_str()[i]] = TRUE;
|
||||
m_CharMap [str_upper.c_str()[i]] = TRUE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void WriteEmbeddedFonts(T* pWriter)
|
||||
{
|
||||
#if defined(BUILD_CONFIG_FULL_VERSION) && !defined(DONT_WRITE_EMBEDDED_FONTS)
|
||||
ULONG nCount = 0;
|
||||
|
||||
for(std::map<CString, CEmbeddedFontInfo>::iterator pPair = m_mapFontsEmbeddded.begin(); pPair != m_mapFontsEmbeddded.end(); ++pPair)
|
||||
{
|
||||
CEmbeddedFontInfo& oInfo = pPair->second;
|
||||
|
||||
if (_T("") != oInfo.PathRegular)
|
||||
++nCount;
|
||||
|
||||
if (_T("") != oInfo.PathBold)
|
||||
++nCount;
|
||||
|
||||
if (_T("") != oInfo.PathItalic)
|
||||
++nCount;
|
||||
|
||||
if (_T("") != oInfo.PathBoldItalic)
|
||||
++nCount;
|
||||
}
|
||||
|
||||
pWriter->WriteULONG(nCount);
|
||||
|
||||
CString strFileWrite = m_strEmbeddedFontsFolder + _T("\\fonts.js");
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strFileWrite);
|
||||
|
||||
CStringA strWrite = "var embedded_fonts = [\n";
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
strWrite = ",\n";
|
||||
bool bIsFirst = true;
|
||||
ULONG lIndexF = 0;
|
||||
|
||||
|
||||
USHORT* pArrayUnicodes = NULL;
|
||||
size_t pArrayUnicodesLength = 0;
|
||||
bool bRes = GenerateSafearray(&pArrayUnicodes, pArrayUnicodesLength);
|
||||
if (!bRes) // what about error handling?
|
||||
return;
|
||||
|
||||
Fonts::IFontConverter* pFontConverter = NULL;
|
||||
CoCreateInstance(__uuidof(Fonts::CFontConverter), NULL, CLSCTX_ALL, __uuidof(Fonts::IFontConverter), (void**)&pFontConverter);
|
||||
|
||||
for(std::map<CString, CEmbeddedFontInfo>::iterator pPair = m_mapFontsEmbeddded.begin(); pPair != m_mapFontsEmbeddded.end(); ++pPair)
|
||||
{
|
||||
CEmbeddedFontInfo& oInfo = pPair->second;
|
||||
|
||||
if (_T("") != oInfo.PathRegular)
|
||||
{
|
||||
if (!bIsFirst)
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
bIsFirst = false;
|
||||
WriteFont(oInfo.Name, oInfo.FaceRegular, oInfo.PathRegular, &oFile, pArrayUnicodes, pArrayUnicodesLength, pFontConverter);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteBYTE(0);
|
||||
pWriter->WriteString(oInfo.Name);
|
||||
|
||||
pWriter->WriteBYTE(1);
|
||||
pWriter->WriteULONG(0); // regular
|
||||
|
||||
pWriter->WriteBYTE(2);
|
||||
pWriter->WriteBYTE(1); // is cutting
|
||||
|
||||
pWriter->WriteBYTE(3);
|
||||
pWriter->WriteULONG(lIndexF); // index in cutting
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
lIndexF++;
|
||||
}
|
||||
|
||||
if (_T("") != oInfo.PathBold)
|
||||
{
|
||||
if (!bIsFirst)
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
bIsFirst = false;
|
||||
WriteFont(oInfo.Name, oInfo.FaceBold, oInfo.PathBold, &oFile, pArrayUnicodes, pArrayUnicodesLength, pFontConverter);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteBYTE(0);
|
||||
pWriter->WriteString(oInfo.Name);
|
||||
|
||||
pWriter->WriteBYTE(1);
|
||||
pWriter->WriteULONG(1); // bold
|
||||
|
||||
pWriter->WriteBYTE(2);
|
||||
pWriter->WriteBYTE(1); // is cutting
|
||||
|
||||
pWriter->WriteBYTE(3);
|
||||
pWriter->WriteULONG(lIndexF); // index in cutting
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
lIndexF++;
|
||||
}
|
||||
|
||||
if (_T("") != oInfo.PathItalic)
|
||||
{
|
||||
if (!bIsFirst)
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
bIsFirst = false;
|
||||
WriteFont(oInfo.Name, oInfo.FaceItalic, oInfo.PathItalic, &oFile, pArrayUnicodes, pArrayUnicodesLength, pFontConverter);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteBYTE(0);
|
||||
pWriter->WriteString(oInfo.Name);
|
||||
|
||||
pWriter->WriteBYTE(1);
|
||||
pWriter->WriteULONG(2); // italic
|
||||
|
||||
pWriter->WriteBYTE(2);
|
||||
pWriter->WriteBYTE(1); // is cutting
|
||||
|
||||
pWriter->WriteBYTE(3);
|
||||
pWriter->WriteULONG(lIndexF); // index in cutting
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
lIndexF++;
|
||||
}
|
||||
|
||||
if (_T("") != oInfo.PathBoldItalic)
|
||||
{
|
||||
if (!bIsFirst)
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
bIsFirst = false;
|
||||
WriteFont(oInfo.Name, oInfo.FaceBoldItalic, oInfo.PathBoldItalic, &oFile, pArrayUnicodes, pArrayUnicodesLength, pFontConverter);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteBYTE(0);
|
||||
pWriter->WriteString(oInfo.Name);
|
||||
|
||||
pWriter->WriteBYTE(1);
|
||||
pWriter->WriteULONG(3); // bold italic
|
||||
|
||||
pWriter->WriteBYTE(2);
|
||||
pWriter->WriteBYTE(1); // is cutting
|
||||
|
||||
pWriter->WriteBYTE(3);
|
||||
pWriter->WriteULONG(lIndexF); // index in cutting
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
lIndexF++;
|
||||
}
|
||||
}
|
||||
|
||||
strWrite = "\n];";
|
||||
oFile.WriteFile(strWrite.GetBuffer(), strWrite.GetLength());
|
||||
|
||||
oFile.CloseFile();
|
||||
|
||||
delete [] pArrayUnicodes;
|
||||
RELEASEINTERFACE(pFontConverter);
|
||||
#endif // #if defined(BUILD_CONFIG_FULL_VERSION) && !defined(DONT_WRITE_EMBEDDED_FONTS)
|
||||
}
|
||||
|
||||
bool GenerateSafearray(USHORT **ppArray, size_t& nCount)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CheckString(_T("0123456789"));
|
||||
m_CharMap [(WCHAR)0x00B0] = TRUE;
|
||||
m_CharMap [(WCHAR)0x00B7] = TRUE;
|
||||
m_CharMap [(WCHAR)0x00B6] = TRUE;
|
||||
m_CharMap [(WCHAR)0x00A4] = TRUE;
|
||||
m_CharMap [(WCHAR)0x00A0] = TRUE;
|
||||
m_CharMap [(WCHAR)0x0022] = TRUE;
|
||||
m_CharMap [(WCHAR)0x0032] = TRUE;
|
||||
m_CharMap [(WCHAR)0x0038] = TRUE;
|
||||
m_CharMap [(WCHAR)0x0097] = TRUE;
|
||||
|
||||
nCount = (ULONG)m_CharMap.size();
|
||||
|
||||
USHORT *pArray = new USHORT [nCount];
|
||||
|
||||
if (NULL == pArray)
|
||||
return false;
|
||||
|
||||
USHORT *pBuffer = pArray;
|
||||
|
||||
for (std::map<WCHAR, BOOL>::const_iterator pPair = m_CharMap.begin(); pPair != m_CharMap.end(); ++pPair)
|
||||
{
|
||||
*pBuffer = pPair->first;
|
||||
++pBuffer;
|
||||
}
|
||||
*ppArray = pArray;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(BUILD_CONFIG_FULL_VERSION) && !defined(DONT_WRITE_EMBEDDED_FONTS)
|
||||
void WriteFont(CString& strName, LONG& lFaceIndex, CString& strFontPath, CFile* pFile, USHORT* pArrayUnicodes, size_t pArrayUnicodesLength, Fonts::IFontConverter* pFontConverter)
|
||||
{
|
||||
LONG lFontConverterFlag = 16; // truetype only
|
||||
|
||||
BSTR bsFontIn = strFontPath.AllocSysString();
|
||||
|
||||
CString _strName = strName + _T("_Embedded");
|
||||
//BSTR bsName = _strName.AllocSysString();
|
||||
|
||||
SAFEARRAYBOUND rgsab_ArrayUnicodes;
|
||||
rgsab_ArrayUnicodes.lLbound = 0;
|
||||
rgsab_ArrayUnicodes.cElements = pArrayUnicodesLength;
|
||||
|
||||
SAFEARRAY* saArrayUnicodes = SafeArrayCreate(VT_UI1, 1, &rgsab_ArrayUnicodes);
|
||||
memcpy(saArrayUnicodes->pvData, pArrayUnicodes, pArrayUnicodesLength);
|
||||
|
||||
SAFEARRAY* pArrayData = NULL;
|
||||
|
||||
pFontConverter->ToOTF2(bsFontIn, saArrayUnicodes, _strName.AllocSysString(), lFontConverterFlag, lFaceIndex, &pArrayData); // TrueType only
|
||||
|
||||
//SysFreeString(bsFontIn);
|
||||
//SysFreeString(bsName);
|
||||
|
||||
BYTE* pbBinBuffer = (BYTE*)pArrayData->pvData;
|
||||
int nBinBufferLen = pArrayData->rgsabound[0].cElements;
|
||||
int nBase64BufferLen = Base64::Base64EncodeGetRequiredLength(nBinBufferLen, Base64::B64_BASE64_FLAG_NOCRLF);
|
||||
BYTE* pbBase64Buffer = new BYTE[nBase64BufferLen];
|
||||
if (TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
|
||||
{
|
||||
CStringA s = "\"";
|
||||
pFile->WriteFile(s.GetBuffer(), s.GetLength());
|
||||
|
||||
pFile->WriteFile(pbBase64Buffer, nBase64BufferLen);
|
||||
|
||||
pFile->WriteFile(s.GetBuffer(), s.GetLength());
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(pbBase64Buffer);
|
||||
|
||||
RELEASEARRAY(pArrayData);
|
||||
}
|
||||
#endif // #if defined(BUILD_CONFIG_FULL_VERSION) && !defined(DONT_WRITE_EMBEDDED_FONTS)
|
||||
};
|
||||
}
|
||||
|
||||
#define FONT_PICKER_BINARYDATA_SAVEEMBEDDED 0
|
||||
#define FONT_PICKER_BINARYDATA_SAVEMAP 1
|
||||
53
ASCOfficePPTXFile/Editor/FontPicker.cpp
Normal file
53
ASCOfficePPTXFile/Editor/FontPicker.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
#include "BinWriters.h"
|
||||
|
||||
/*
|
||||
HRESULT COfficeFontPicker::GetBinaryData(LONG lType, SAFEARRAY** ppBinaryArray)
|
||||
{
|
||||
if (NULL == ppBinaryArray)
|
||||
return S_FALSE;
|
||||
|
||||
*ppBinaryArray = NULL;
|
||||
if (FONT_PICKER_BINARYDATA_SAVEEMBEDDED == lType)
|
||||
{
|
||||
NSBinPptxRW::CBinaryFileWriter oWriter;
|
||||
m_oPicker.m_oEmbeddedFonts.CheckString(_T(".)abcdefghijklmnopqrstuvwxyz"));
|
||||
m_oPicker.m_oEmbeddedFonts.CheckFont(_T("Wingdings 3"), m_oPicker.m_pFontManager);
|
||||
m_oPicker.m_oEmbeddedFonts.CheckFont(_T("Arial"), m_oPicker.m_pFontManager);
|
||||
|
||||
oWriter.StartRecord(NSBinPptxRW::NSMainTables::FontsEmbedded);
|
||||
m_oPicker.m_oEmbeddedFonts.WriteEmbeddedFonts(&oWriter);
|
||||
oWriter.EndRecord();
|
||||
|
||||
*ppBinaryArray = oWriter.GetSafearray();
|
||||
}
|
||||
else if (FONT_PICKER_BINARYDATA_SAVEMAP == lType)
|
||||
{
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
*/
|
||||
HRESULT COfficeFontPicker::GetBinaryData(LONG lType, BYTE** ppyArray, size_t& szCount)
|
||||
{
|
||||
if (NULL == ppyArray)
|
||||
return S_FALSE;
|
||||
|
||||
*ppyArray = NULL;
|
||||
if (FONT_PICKER_BINARYDATA_SAVEEMBEDDED == lType)
|
||||
{
|
||||
NSBinPptxRW::CBinaryFileWriter oWriter;
|
||||
m_oPicker.m_oEmbeddedFonts.CheckString(_T(".)abcdefghijklmnopqrstuvwxyz"));
|
||||
m_oPicker.m_oEmbeddedFonts.CheckFont(_T("Wingdings 3"), m_oPicker.m_pFontManager);
|
||||
m_oPicker.m_oEmbeddedFonts.CheckFont(_T("Arial"), m_oPicker.m_pFontManager);
|
||||
|
||||
oWriter.StartRecord(NSBinPptxRW::NSMainTables::FontsEmbedded);
|
||||
m_oPicker.m_oEmbeddedFonts.WriteEmbeddedFonts(&oWriter);
|
||||
oWriter.EndRecord();
|
||||
|
||||
oWriter.GetSafearray(ppyArray, szCount);
|
||||
}
|
||||
else if (FONT_PICKER_BINARYDATA_SAVEMAP == lType)
|
||||
{
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
192
ASCOfficePPTXFile/Editor/FontPicker.h
Normal file
192
ASCOfficePPTXFile/Editor/FontPicker.h
Normal file
@ -0,0 +1,192 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "BinReaderWriterDefines.h"
|
||||
|
||||
#include "FontCutter.h"
|
||||
|
||||
|
||||
//#include "../../DesktopEditor/fontengine/FontManager.h"
|
||||
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
|
||||
|
||||
namespace NSFontCutter
|
||||
{
|
||||
class CFontDstManager
|
||||
{
|
||||
public:
|
||||
std::map<CString, CString> m_mapPicks;
|
||||
CApplicationFonts m_oApplicationFonts;
|
||||
CFontManager* m_pFontManager;
|
||||
|
||||
CString m_strFontsDir;
|
||||
|
||||
BOOL m_bIsEmbeddedFonts;
|
||||
|
||||
CEmbeddedFontsManager m_oEmbeddedFonts;
|
||||
|
||||
public:
|
||||
CFontDstManager() : m_mapPicks()
|
||||
{
|
||||
m_strFontsDir = _T("");
|
||||
|
||||
m_pFontManager = NULL;
|
||||
m_bIsEmbeddedFonts = FALSE;
|
||||
}
|
||||
~CFontDstManager()
|
||||
{
|
||||
RELEASEOBJECT(m_pFontManager);
|
||||
}
|
||||
|
||||
void Init(const CString& strDir)
|
||||
{
|
||||
if(strDir.IsEmpty())
|
||||
m_oApplicationFonts.Initialize();
|
||||
else
|
||||
m_oApplicationFonts.InitializeFromFolder(string2std_string(strDir));
|
||||
CFontList* pFontList = m_oApplicationFonts.GetList();
|
||||
if(NULL != pFontList)
|
||||
{
|
||||
std::wstring sDefaultFont(_T("Arial"));
|
||||
pFontList->SetDefaultFont(sDefaultFont);
|
||||
}
|
||||
m_pFontManager = m_oApplicationFonts.GenerateFontManager();
|
||||
}
|
||||
|
||||
CString GetTypefacePickByName(const CString& strTypeface)
|
||||
{
|
||||
CString sFind = strTypeface;
|
||||
|
||||
int nFindTh = sFind.Find(_T("+mj"));
|
||||
if (0 == nFindTh)
|
||||
return sFind;
|
||||
nFindTh = sFind.Find(_T("+mn"));
|
||||
if (0 == nFindTh)
|
||||
return sFind;
|
||||
|
||||
if (_T("") == sFind)
|
||||
{
|
||||
sFind = _T("Arial");
|
||||
}
|
||||
|
||||
std::map<CString, CString>::iterator pPair = m_mapPicks.find(sFind);
|
||||
if (pPair != m_mapPicks.end())
|
||||
return pPair->second;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> js
|
||||
m_mapPicks.insert(std::pair<CString,CString>(sFind, sFind));
|
||||
return sFind;
|
||||
|
||||
CString sInputSave = sFind;
|
||||
|
||||
CFontSelectFormat oFontSelectFormat;
|
||||
oFontSelectFormat.wsName = new std::wstring;
|
||||
*oFontSelectFormat.wsName = std::wstring(sFind.GetString());
|
||||
//oFontSelectFormat.
|
||||
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
|
||||
CString sRes = _T("Arial");
|
||||
if(NULL != pFontInfo)
|
||||
{
|
||||
sRes = CString(pFontInfo->m_wsFontName.c_str());
|
||||
|
||||
|
||||
if (m_bIsEmbeddedFonts)
|
||||
m_oEmbeddedFonts.CheckFont(sRes, m_pFontManager);
|
||||
|
||||
m_mapPicks.insert(std::pair<CString,CString>(sInputSave, sRes));
|
||||
|
||||
}
|
||||
return sRes;
|
||||
}
|
||||
|
||||
template<typename TTextFont>
|
||||
CString GetTypefacePick(TTextFont& textFont)
|
||||
{
|
||||
return GetTypefacePickByName(textFont.typeface);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
class COfficeFontPicker
|
||||
{
|
||||
private:
|
||||
NSFontCutter::CFontDstManager m_oPicker;
|
||||
|
||||
public:
|
||||
|
||||
HRESULT Init(const CString& bsFontsDirectory)
|
||||
{
|
||||
m_oPicker.Init(bsFontsDirectory);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CFontManager* get_FontManager()
|
||||
{
|
||||
return m_oPicker.m_pFontManager;
|
||||
}
|
||||
|
||||
HRESULT SetEmbeddedFontsDirectory(const CString& bsFontsDirectory)
|
||||
{
|
||||
m_oPicker.m_oEmbeddedFonts.m_strEmbeddedFontsFolder = (CString)bsFontsDirectory;
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT SetEmbeddedFontsParam(LONG lParam)
|
||||
{
|
||||
switch (lParam)
|
||||
{
|
||||
case 0:
|
||||
m_oPicker.m_bIsEmbeddedFonts = FALSE;
|
||||
break;
|
||||
case 1:
|
||||
m_oPicker.m_bIsEmbeddedFonts = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CheckString(const CString& bsText)
|
||||
{
|
||||
|
||||
m_oPicker.m_oEmbeddedFonts.CheckString((CString)bsText);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CheckFont(const CString& bsFontName)
|
||||
{
|
||||
|
||||
m_oPicker.m_oEmbeddedFonts.CheckFont((CString)bsFontName, m_oPicker.m_pFontManager);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT PickFont(LONG lParamType, const CString& bsParams, CString* pDstName)
|
||||
{
|
||||
if (NULL == pDstName)
|
||||
return S_FALSE;
|
||||
|
||||
if (0 == lParamType)
|
||||
{
|
||||
CString strResult = m_oPicker.GetTypefacePickByName((CString)bsParams);
|
||||
*pDstName = strResult;//strResult.AllocSysString();
|
||||
return S_OK;
|
||||
}
|
||||
// not impl
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//HRESULT GetBinaryData(LONG lType, SAFEARRAY** ppBinaryArray);
|
||||
HRESULT GetBinaryData(LONG lType, BYTE** ppyArray, size_t& szCount);
|
||||
|
||||
NSFontCutter::CFontDstManager* GetNativePicker()
|
||||
{
|
||||
return &m_oPicker;
|
||||
}
|
||||
|
||||
NSFontCutter::CEmbeddedFontsManager* GetNativeCutter()
|
||||
{
|
||||
return &m_oPicker.m_oEmbeddedFonts;
|
||||
}
|
||||
|
||||
};
|
||||
1055
ASCOfficePPTXFile/Editor/PPTXWriter.h
Normal file
1055
ASCOfficePPTXFile/Editor/PPTXWriter.h
Normal file
File diff suppressed because it is too large
Load Diff
232
ASCOfficePPTXFile/Editor/WMFToImageConverter.h
Normal file
232
ASCOfficePPTXFile/Editor/WMFToImageConverter.h
Normal file
@ -0,0 +1,232 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <atlwin.h>
|
||||
#include <atltypes.h>
|
||||
#include <atlcoll.h>
|
||||
#endif
|
||||
#include "../../DesktopEditor/graphics/IRenderer.h"
|
||||
#include "../../ASCHTMLRenderer/ASCSVGWriter.h"
|
||||
#include "../../ASCHTMLRenderer/CASCImage.h"
|
||||
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef BUILD_CONFIG_FULL_VERSION
|
||||
|
||||
namespace NSWMFToImageConverter
|
||||
{
|
||||
class CImageExt
|
||||
{
|
||||
private:
|
||||
NSHtmlRenderer::CASCSVGWriter* m_pSVGRenderer;
|
||||
CFontManager* m_pFontManager;
|
||||
|
||||
void Init()
|
||||
{
|
||||
if (NULL != m_pSVGRenderer)
|
||||
{
|
||||
m_pSVGRenderer->ReInit();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pSVGRenderer = new NSHtmlRenderer::CASCSVGWriter();
|
||||
}
|
||||
if(NULL != m_pFontManager)
|
||||
m_pSVGRenderer->SetFontManager(m_pFontManager);
|
||||
}
|
||||
|
||||
public:
|
||||
CImageExt()
|
||||
{
|
||||
m_pSVGRenderer = NULL;
|
||||
m_pFontManager = NULL;
|
||||
}
|
||||
~CImageExt()
|
||||
{
|
||||
RELEASEOBJECT(m_pSVGRenderer);
|
||||
}
|
||||
|
||||
public:
|
||||
LONG GetImageType(CString strFile)
|
||||
{
|
||||
CFile oFile;
|
||||
if (S_OK != oFile.OpenFile(strFile))
|
||||
{
|
||||
oFile.CloseFile();
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD dwSize = (DWORD)oFile.GetFileSize();
|
||||
|
||||
if (44 > dwSize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD dwKey = 0;
|
||||
oFile.ReadFile((BYTE*)(&dwKey), 4);
|
||||
|
||||
if (0x9AC6CDD7 == dwKey)
|
||||
{
|
||||
// placeable meta
|
||||
oFile.CloseFile();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0x00000001 == dwKey)
|
||||
{
|
||||
oFile.SetPosition(40);
|
||||
oFile.ReadFile((BYTE*)(&dwKey), 4);
|
||||
oFile.CloseFile();
|
||||
|
||||
if (0x464D4520 == dwKey)
|
||||
{
|
||||
// EMF/EMF+
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
oFile.CloseFile();
|
||||
|
||||
if (0x00090001 == dwKey)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
void MetaDrawOnRenderer(IRenderer* pRenderer, BSTR strFile, double dW, double dH)
|
||||
{
|
||||
if (NULL == pRenderer)
|
||||
return;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Brush, Font, Pen, Shadow <20> <20>.<2E>.
|
||||
LONG brush_Alpha1 = 0;
|
||||
LONG brush_Alpha2 = 0;
|
||||
LONG brush_Color1 = 0;
|
||||
LONG brush_Color2 = 0;
|
||||
double brush_LinearAngle = 0;
|
||||
std::wstring brush_TexturePath;
|
||||
LONG brush_TextureMode = 0;
|
||||
LONG brush_TextureAlpha = 0;
|
||||
LONG brush_Type = 0;
|
||||
|
||||
pRenderer->get_BrushAlpha1( &brush_Alpha1 );
|
||||
pRenderer->get_BrushAlpha2( &brush_Alpha2 );
|
||||
pRenderer->get_BrushColor1( &brush_Color1 );
|
||||
pRenderer->get_BrushColor2( &brush_Color2 );
|
||||
pRenderer->get_BrushLinearAngle( &brush_LinearAngle );
|
||||
pRenderer->get_BrushTextureMode( &brush_TextureMode );
|
||||
pRenderer->get_BrushTextureAlpha( &brush_TextureAlpha );
|
||||
pRenderer->get_BrushTexturePath( &brush_TexturePath );
|
||||
pRenderer->get_BrushType( &brush_Type );
|
||||
|
||||
std::wstring font_Path;
|
||||
std::wstring font_Name;
|
||||
double font_Size = 0;
|
||||
LONG font_Style = 0;
|
||||
BOOL font_GID = 0;
|
||||
|
||||
pRenderer->get_FontName( &font_Name );
|
||||
pRenderer->get_FontPath( &font_Path );
|
||||
pRenderer->get_FontSize( &font_Size );
|
||||
pRenderer->get_FontStyle( &font_Style );
|
||||
pRenderer->get_FontStringGID( &font_GID );
|
||||
|
||||
LONG pen_Align = 0;
|
||||
LONG pen_Alpha = 0;
|
||||
LONG pen_Color = 0;
|
||||
pRenderer->get_PenAlign( &pen_Align );
|
||||
pRenderer->get_PenAlpha( &pen_Alpha );
|
||||
pRenderer->get_PenColor( &pen_Color );
|
||||
|
||||
NSHtmlRenderer::CASCImage oASCImage;
|
||||
oASCImage.put_FontManager(m_pFontManager);
|
||||
|
||||
oASCImage.LoadFromFile( strFile );
|
||||
|
||||
if (dW <= 0 && dH <= 0)
|
||||
{
|
||||
LONG _lw = 0;
|
||||
LONG _lh = 0;
|
||||
oASCImage.get_Width(&_lw);
|
||||
oASCImage.get_Height(&_lh);
|
||||
|
||||
LONG lMax = (std::max) (_lw, _lh);
|
||||
double dKoef = 1000.0 / lMax;
|
||||
|
||||
dW = (double)dKoef * _lw * 100;
|
||||
dH = (double)dKoef * _lh * 100;
|
||||
|
||||
m_pSVGRenderer->put_Width(dW);
|
||||
m_pSVGRenderer->put_Height(dH);
|
||||
}
|
||||
|
||||
oASCImage.DrawOnRenderer( pRenderer, 0, 0, dW, dH );
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pRenderer->put_BrushAlpha1( brush_Alpha1 );
|
||||
pRenderer->put_BrushAlpha2( brush_Alpha2 );
|
||||
pRenderer->put_BrushColor1( brush_Color1 );
|
||||
pRenderer->put_BrushColor2( brush_Color2 );
|
||||
pRenderer->put_BrushLinearAngle( brush_LinearAngle );
|
||||
pRenderer->put_BrushTextureMode( brush_TextureMode );
|
||||
pRenderer->put_BrushTextureAlpha( brush_TextureAlpha );
|
||||
pRenderer->put_BrushTexturePath( brush_TexturePath );
|
||||
pRenderer->put_BrushType( brush_Type );
|
||||
|
||||
pRenderer->put_FontName( font_Name );
|
||||
pRenderer->put_FontPath( font_Path );
|
||||
pRenderer->put_FontSize( font_Size );
|
||||
pRenderer->put_FontStyle( font_Style );
|
||||
pRenderer->put_FontStringGID( font_GID );
|
||||
|
||||
pRenderer->put_PenAlign( pen_Align );
|
||||
pRenderer->put_PenAlpha( pen_Alpha );
|
||||
pRenderer->put_PenColor( pen_Color );
|
||||
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> path
|
||||
pRenderer->PathCommandEnd();
|
||||
}
|
||||
public:
|
||||
bool Convert(CString strPath, LONG lWidth, LONG lHeight, CString strDstPath)
|
||||
{
|
||||
Init();
|
||||
|
||||
m_pSVGRenderer->put_Width(lWidth);
|
||||
m_pSVGRenderer->put_Height(lHeight);
|
||||
|
||||
#if !defined(_WIN32) && !defined (_WIN64)
|
||||
MetaDrawOnRenderer(m_pSVGRenderer, strPath, (double)lWidth, (double)lHeight);
|
||||
#else
|
||||
BSTR bsFilePath = strPath.AllocSysString();
|
||||
MetaDrawOnRenderer(m_pSVGRenderer, bsFilePath, (double)lWidth, (double)lHeight);
|
||||
SysFreeString(bsFilePath);
|
||||
#endif
|
||||
bool bIsRaster = false;
|
||||
m_pSVGRenderer->IsRaster(&bIsRaster);
|
||||
if (bIsRaster)
|
||||
return false;
|
||||
|
||||
m_pSVGRenderer->SaveFile(std::wstring(strDstPath.GetString()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetFontManager(CFontManager* pFontManager)
|
||||
{
|
||||
m_pFontManager = pFontManager;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
759
ASCOfficePPTXFile/Editor/XmlWriter.h
Normal file
759
ASCOfficePPTXFile/Editor/XmlWriter.h
Normal file
@ -0,0 +1,759 @@
|
||||
#pragma once
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "./BinReaderWriterDefines.h"
|
||||
#include "../../DesktopEditor/graphics/IRenderer.h"
|
||||
#include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h"
|
||||
#include "../../../Common/DocxFormat/Source/Base/Nullable.h"
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
static std::wstring g_bstr_nodeopen = L"<";
|
||||
static std::wstring g_bstr_nodeclose = L">";
|
||||
static std::wstring g_bstr_nodeopen_slash = L"</";
|
||||
static std::wstring g_bstr_nodeclose_slash = L"/>";
|
||||
static std::wstring g_bstr_node_space = L" ";
|
||||
static std::wstring g_bstr_node_equal = L"=";
|
||||
static std::wstring g_bstr_node_quote = L"\"";
|
||||
static std::wstring g_bstr_boolean_true = L"true";
|
||||
static std::wstring g_bstr_boolean_false = L"false";
|
||||
static std::wstring g_bstr_boolean_true2 = L"1";
|
||||
static std::wstring g_bstr_boolean_false2 = L"0";
|
||||
|
||||
AVSINLINE static double FABS(double dVal)
|
||||
{
|
||||
return (dVal >= 0) ? dVal : -dVal;
|
||||
}
|
||||
AVSINLINE static int round(double dVal)
|
||||
{
|
||||
return (int)(dVal + 0.5);
|
||||
}
|
||||
|
||||
class CStringWriter
|
||||
{
|
||||
private:
|
||||
wchar_t* m_pData;
|
||||
size_t m_lSize;
|
||||
|
||||
wchar_t* m_pDataCur;
|
||||
size_t m_lSizeCur;
|
||||
|
||||
public:
|
||||
CStringWriter()
|
||||
{
|
||||
m_pData = NULL;
|
||||
m_lSize = 0;
|
||||
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = m_lSize;
|
||||
}
|
||||
~CStringWriter()
|
||||
{
|
||||
RELEASEMEM(m_pData);
|
||||
}
|
||||
|
||||
AVSINLINE void AddSize(size_t nSize)
|
||||
{
|
||||
if (NULL == m_pData)
|
||||
{
|
||||
m_lSize = (std::max)(nSize, (size_t) 1024);
|
||||
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t)+64);
|
||||
|
||||
m_lSizeCur = 0;
|
||||
m_pDataCur = m_pData;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((m_lSizeCur + nSize) > m_lSize)
|
||||
{
|
||||
while ((m_lSizeCur + nSize) > m_lSize)
|
||||
{
|
||||
//m_lSize *= 2; - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ..
|
||||
m_lSize += (std::max)(nSize, (size_t) 1024);
|
||||
}
|
||||
int size_alloc = m_lSize * sizeof(wchar_t);
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
wchar_t* pRealloc = (wchar_t*)realloc(m_pData, size_alloc );
|
||||
if (NULL != pRealloc)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_pData = pRealloc;
|
||||
m_pDataCur = m_pData + m_lSizeCur;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
wchar_t* pMalloc = (wchar_t*)malloc(size_alloc );
|
||||
memcpy(pMalloc, m_pData, m_lSizeCur * sizeof(wchar_t));
|
||||
|
||||
free(m_pData);
|
||||
m_pData = pMalloc;
|
||||
m_pDataCur = m_pData + m_lSizeCur;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
AVSINLINE void WriteString(const wchar_t* pString, size_t& nLen)
|
||||
{
|
||||
AddSize(nLen);
|
||||
|
||||
memcpy(m_pDataCur, pString, nLen * sizeof(wchar_t));
|
||||
|
||||
m_pDataCur += nLen;
|
||||
m_lSizeCur += nLen;
|
||||
}
|
||||
AVSINLINE void WriteString(std::wstring& wString)
|
||||
{
|
||||
size_t nLen = wString.length();
|
||||
WriteString(wString.c_str(), nLen);
|
||||
}
|
||||
#ifdef _WIN32
|
||||
AVSINLINE void WriteString(_bstr_t& bsString)
|
||||
{
|
||||
size_t nLen = bsString.length();
|
||||
WriteString(bsString.GetBSTR(), nLen);
|
||||
}
|
||||
#endif // #ifdef _WIN32
|
||||
AVSINLINE void WriteString(const CString& sString)
|
||||
{
|
||||
size_t nLen = (size_t)sString.GetLength();
|
||||
|
||||
#ifdef _UNICODE
|
||||
CString* pString = const_cast<CString*>(&sString);
|
||||
WriteString(pString->GetBuffer(), nLen);
|
||||
pString->ReleaseBuffer();
|
||||
#else
|
||||
CStringW str = (CStringW)sString;
|
||||
WriteString(str.GetBuffer(), nLen);
|
||||
str.ReleaseBuffer();
|
||||
#endif
|
||||
}
|
||||
AVSINLINE void WriteStringXML(const CString& strValue)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
CString s = strValue;
|
||||
s.Replace(_T("&"), _T("&"));
|
||||
s.Replace(_T("'"), _T("'"));
|
||||
s.Replace(_T("<"), _T("<"));
|
||||
s.Replace(_T(">"), _T(">"));
|
||||
s.Replace(_T("\""), _T("""));
|
||||
WriteString(s);
|
||||
}
|
||||
|
||||
AVSINLINE size_t GetCurSize()
|
||||
{
|
||||
return m_lSizeCur;
|
||||
}
|
||||
|
||||
AVSINLINE void Write(CStringWriter& oWriter)
|
||||
{
|
||||
WriteString(oWriter.m_pData, oWriter.m_lSizeCur);
|
||||
}
|
||||
|
||||
AVSINLINE void WriteBefore(CStringWriter& oWriter)
|
||||
{
|
||||
size_t nNewS = oWriter.GetCurSize();
|
||||
AddSize(nNewS);
|
||||
memmove(m_pData + nNewS, m_pData, m_lSizeCur * sizeof (wchar_t));
|
||||
memcpy(m_pData, oWriter.m_pData, nNewS * sizeof (wchar_t));
|
||||
m_pDataCur += nNewS;
|
||||
m_lSizeCur += nNewS;
|
||||
}
|
||||
|
||||
inline void Clear()
|
||||
{
|
||||
RELEASEMEM(m_pData);
|
||||
|
||||
m_pData = NULL;
|
||||
m_lSize = 0;
|
||||
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = 0;
|
||||
}
|
||||
inline void ClearNoAttack()
|
||||
{
|
||||
m_pDataCur = m_pData;
|
||||
m_lSizeCur = 0;
|
||||
}
|
||||
|
||||
CString GetData()
|
||||
{
|
||||
CString str(m_pData, (int)m_lSizeCur);
|
||||
return str;
|
||||
}
|
||||
|
||||
AVSINLINE void AddCharNoCheck(const WCHAR& wc)
|
||||
{
|
||||
*m_pDataCur++ = wc;
|
||||
++m_lSizeCur;
|
||||
}
|
||||
AVSINLINE void AddIntNoCheck(int val)
|
||||
{
|
||||
if (0 == val)
|
||||
{
|
||||
*m_pDataCur++ = (WCHAR)'0';
|
||||
++m_lSizeCur;
|
||||
return;
|
||||
}
|
||||
if (val < 0)
|
||||
{
|
||||
val = -val;
|
||||
*m_pDataCur++ = (WCHAR)'-';
|
||||
++m_lSizeCur;
|
||||
}
|
||||
|
||||
int len = 0;
|
||||
int oval = val;
|
||||
while (oval > 0)
|
||||
{
|
||||
oval /= 10;
|
||||
++len;
|
||||
}
|
||||
|
||||
oval = 1;
|
||||
while (val > 0)
|
||||
{
|
||||
m_pDataCur[len - oval] = (WCHAR)('0' + (val % 10));
|
||||
++oval;
|
||||
val /= 10;
|
||||
}
|
||||
|
||||
m_pDataCur += len;
|
||||
m_lSizeCur += len;
|
||||
}
|
||||
|
||||
AVSINLINE void AddStringNoCheck(const wchar_t* pData, const int& len)
|
||||
{
|
||||
memcpy(m_pDataCur, pData, len *sizeof(wchar_t));
|
||||
|
||||
m_pDataCur += len;
|
||||
m_lSizeCur += len;
|
||||
}
|
||||
AVSINLINE void AddSpaceNoCheck()
|
||||
{
|
||||
*m_pDataCur = WCHAR(' ');
|
||||
++m_pDataCur;
|
||||
++m_lSizeCur;
|
||||
}
|
||||
};
|
||||
|
||||
class CXmlWriter
|
||||
{
|
||||
public:
|
||||
CStringWriter m_oWriter;
|
||||
|
||||
public:
|
||||
BYTE m_lDocType;
|
||||
|
||||
LONG m_lFlag;
|
||||
LONG m_lGroupIndex;
|
||||
LONG m_lObjectId;
|
||||
LONG m_lObjectIdVML;
|
||||
|
||||
public:
|
||||
BOOL m_bIsUseOffice2007;
|
||||
CString m_strStyleMain;
|
||||
CString m_strAttributesMain;
|
||||
CString m_strNodes;
|
||||
IRenderer* m_pOOXToVMLRenderer;
|
||||
bool m_bIsTop;
|
||||
|
||||
public:
|
||||
|
||||
CXmlWriter() : m_oWriter()
|
||||
{
|
||||
m_lDocType = XMLWRITER_DOC_TYPE_PPTX;
|
||||
|
||||
m_lFlag = 0;
|
||||
m_lGroupIndex = 0;
|
||||
m_lObjectId = 0;
|
||||
m_lObjectIdVML = 0;
|
||||
|
||||
m_bIsUseOffice2007 = FALSE;
|
||||
m_strStyleMain = _T("");
|
||||
m_strAttributesMain = _T("");
|
||||
m_strNodes = _T("");
|
||||
|
||||
m_pOOXToVMLRenderer = NULL;
|
||||
m_bIsTop = false;
|
||||
}
|
||||
~CXmlWriter()
|
||||
{
|
||||
}
|
||||
|
||||
AVSINLINE CString GetXmlString()
|
||||
{
|
||||
return m_oWriter.GetData();
|
||||
}
|
||||
AVSINLINE void ClearNoAttack()
|
||||
{
|
||||
m_oWriter.ClearNoAttack();
|
||||
}
|
||||
AVSINLINE int GetSize()
|
||||
{
|
||||
return (int)m_oWriter.GetCurSize();
|
||||
}
|
||||
|
||||
// write value
|
||||
AVSINLINE void WriteString(const CString& strValue)
|
||||
{
|
||||
m_oWriter.WriteString(strValue);
|
||||
}
|
||||
AVSINLINE void WriteStringXML(CString strValue)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
CString s = strValue;
|
||||
s.Replace(_T("&"), _T("&"));
|
||||
s.Replace(_T("'"), _T("'"));
|
||||
s.Replace(_T("<"), _T("<"));
|
||||
s.Replace(_T(">"), _T(">"));
|
||||
s.Replace(_T("\""), _T("""));
|
||||
m_oWriter.WriteString(s);
|
||||
}
|
||||
AVSINLINE void WriteDouble(const double& val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%lf"), val);
|
||||
m_oWriter.WriteString(str);
|
||||
}
|
||||
AVSINLINE void WriteLONG(const long& val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d"), val);
|
||||
m_oWriter.WriteString(str);
|
||||
}
|
||||
AVSINLINE void WriteINT(const int& val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%d"), val);
|
||||
m_oWriter.WriteString(str);
|
||||
}
|
||||
AVSINLINE void WriteDWORD(const DWORD& val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%u"), val);
|
||||
m_oWriter.WriteString(str);
|
||||
}
|
||||
AVSINLINE void WriteDWORD_hex(const DWORD& val)
|
||||
{
|
||||
CString str = _T("");
|
||||
str.Format(_T("%x"), val);
|
||||
m_oWriter.WriteString(str);
|
||||
}
|
||||
AVSINLINE void WriteBool(const bool& val)
|
||||
{
|
||||
if (val)
|
||||
m_oWriter.WriteString(g_bstr_boolean_true2);
|
||||
else
|
||||
m_oWriter.WriteString(g_bstr_boolean_false2);
|
||||
}
|
||||
// write attribute
|
||||
AVSINLINE void WriteAttributeCSS(const CString& strAttributeName, const CString& val)
|
||||
{
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.AddSize(15);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(':'));
|
||||
m_oWriter.WriteString(val);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(';'));
|
||||
}
|
||||
AVSINLINE void WriteAttributeCSS_int(const CString& strAttributeName, const int& val)
|
||||
{
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.AddSize(15);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(':'));
|
||||
m_oWriter.AddIntNoCheck(val);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(';'));
|
||||
}
|
||||
AVSINLINE void WriteAttributeCSS_double1(const CString& strAttributeName, const double& val)
|
||||
{
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.AddSize(15);
|
||||
CString s = _T("");
|
||||
s.Format(_T("%.1lf"), val);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(':'));
|
||||
m_oWriter.WriteString(s);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(';'));
|
||||
}
|
||||
AVSINLINE void WriteAttributeCSS_int_pt(const CString& strAttributeName, const int& val)
|
||||
{
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.AddSize(15);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(':'));
|
||||
m_oWriter.AddIntNoCheck(val);
|
||||
m_oWriter.AddCharNoCheck(WCHAR('p'));
|
||||
m_oWriter.AddCharNoCheck(WCHAR('t'));
|
||||
m_oWriter.AddCharNoCheck(WCHAR(';'));
|
||||
}
|
||||
AVSINLINE void WriteAttributeCSS_double1_pt(const CString& strAttributeName, const double& val)
|
||||
{
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.AddSize(20);
|
||||
CString s = _T("");
|
||||
s.Format(_T("%.1lf"), val);
|
||||
m_oWriter.AddCharNoCheck(WCHAR(':'));
|
||||
m_oWriter.WriteString(s);
|
||||
m_oWriter.AddCharNoCheck(WCHAR('p'));
|
||||
m_oWriter.AddCharNoCheck(WCHAR('t'));
|
||||
m_oWriter.AddCharNoCheck(WCHAR(';'));
|
||||
}
|
||||
//
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const CString& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
m_oWriter.WriteString(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute2(const CString& strAttributeName, const CString& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
m_oWriter.WriteStringXML(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const double& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteDouble(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const int& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteINT(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const bool& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteBool(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const LONG& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteLONG(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strAttributeName, const DWORD& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteDWORD(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
AVSINLINE void WriteAttributeDWORD_hex(const CString& strAttributeName, const DWORD& val)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_node_space);
|
||||
m_oWriter.WriteString(strAttributeName);
|
||||
m_oWriter.WriteString(g_bstr_node_equal);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
WriteDWORD_hex(val);
|
||||
m_oWriter.WriteString(g_bstr_node_quote);
|
||||
}
|
||||
// document methods
|
||||
AVSINLINE void WriteNodeBegin(CString strNodeName, BOOL bAttributed = FALSE)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_nodeopen);
|
||||
m_oWriter.WriteString(strNodeName);
|
||||
|
||||
if (!bAttributed)
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
}
|
||||
AVSINLINE void WriteNodeEnd(CString strNodeName, BOOL bEmptyNode = FALSE, BOOL bEndNode = TRUE)
|
||||
{
|
||||
if (bEmptyNode)
|
||||
{
|
||||
if (bEndNode)
|
||||
m_oWriter.WriteString(g_bstr_nodeclose_slash);
|
||||
else
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_nodeopen_slash);
|
||||
m_oWriter.WriteString(strNodeName);
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
}
|
||||
}
|
||||
// write node values
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const CString& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteString(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const bool& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
|
||||
if (val)
|
||||
WriteString(_T("1"));
|
||||
else
|
||||
WriteString(_T("0"));
|
||||
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const double& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteDouble(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const LONG& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteLONG(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const int& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteINT(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strNodeName, const DWORD& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteDWORD(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
AVSINLINE void WriteNodeValueDWORD_hex(const CString& strNodeName, const DWORD& val)
|
||||
{
|
||||
WriteNodeBegin(strNodeName);
|
||||
WriteDWORD_hex(val);
|
||||
WriteNodeEnd(strNodeName);
|
||||
}
|
||||
|
||||
BOOL SaveToFile(CString strFilePath, BOOL bEncodingToUTF8 = TRUE, BOOL bIsClearNoAttack = TRUE)
|
||||
{
|
||||
CString strData = m_oWriter.GetData();
|
||||
if (!bEncodingToUTF8)
|
||||
{
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strFilePath);
|
||||
oFile.WriteFile((void*)strData.GetBuffer(), strData.GetLength());
|
||||
oFile.CloseFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDirectory::SaveToFile(strFilePath, strData);
|
||||
|
||||
int nLength = strData.GetLength();
|
||||
|
||||
CStringA saStr;
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#ifdef UNICODE
|
||||
// Encoding Unicode to UTF-8
|
||||
WideCharToMultiByte(CP_UTF8, 0, strData.GetBuffer(), nLength + 1, saStr.GetBuffer(nLength*3 + 1), nLength*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
#else
|
||||
wchar_t* pWStr = new wchar_t[nLength + 1];
|
||||
if (!pWStr)
|
||||
return;
|
||||
|
||||
// set end string
|
||||
pWStr[nLength] = 0;
|
||||
|
||||
// Encoding ASCII to Unicode
|
||||
MultiByteToWideChar(CP_ACP, 0, strData, nLength, pWStr, nLength);
|
||||
|
||||
int nLengthW = (int)wcslen(pWStr);
|
||||
|
||||
// Encoding Unicode to UTF-8
|
||||
WideCharToMultiByte(CP_UTF8, 0, pWStr, nLengthW + 1, saStr.GetBuffer(nLengthW*3 + 1), nLengthW*3, NULL, NULL);
|
||||
saStr.ReleaseBuffer();
|
||||
|
||||
delete[] pWStr;
|
||||
#endif
|
||||
#else
|
||||
saStr = stringWstingToUtf8String(strData);
|
||||
#endif
|
||||
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strFilePath);
|
||||
CString strHead = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
oFile.WriteStringUTF8(strHead);
|
||||
oFile.WriteFile((void*)saStr.GetBuffer(), saStr.GetLength());
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
if (bIsClearNoAttack)
|
||||
{
|
||||
m_oWriter.ClearNoAttack();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public:
|
||||
// ATTRIBUTES --------------------------------------------------------------------------
|
||||
AVSINLINE void WriteAttribute(const CString& strName, const nullable_int& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strName, const nullable_double& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strName, const nullable_string& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteAttribute2(const CString& strName, const nullable_string& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute2(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteAttribute(const CString& strName, const nullable_bool& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute(strName, *value);
|
||||
}
|
||||
template <typename T>
|
||||
AVSINLINE void WriteAttribute(const CString& strName, const nullable_limit<T>& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteAttribute(strName, (*value).get());
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
// NODES -------------------------------------------------------------------------------
|
||||
AVSINLINE void WriteNodeValue(const CString& strName, const nullable_int& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteNodeValue(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strName, const nullable_double& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteNodeValue(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strName, const nullable_string& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteNodeValue(strName, *value);
|
||||
}
|
||||
AVSINLINE void WriteNodeValue(const CString& strName, const nullable_bool& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteNodeValue(strName, *value);
|
||||
}
|
||||
template <typename T>
|
||||
AVSINLINE void WriteNodeValue(const CString& strName, const nullable_limit<T>& value)
|
||||
{
|
||||
if (value.IsInit())
|
||||
WriteNodeValue(strName, (*value).get);
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
// DOCUMENT ----------------------------------------------------------------------------
|
||||
AVSINLINE void StartNode(const CString& name)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_nodeopen);
|
||||
m_oWriter.WriteString(name);
|
||||
}
|
||||
AVSINLINE void StartAttributes()
|
||||
{
|
||||
// none
|
||||
}
|
||||
AVSINLINE void EndAttributes()
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
}
|
||||
AVSINLINE void EndNode(const CString& name)
|
||||
{
|
||||
m_oWriter.WriteString(g_bstr_nodeopen_slash);
|
||||
m_oWriter.WriteString(name);
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
template<typename T>
|
||||
AVSINLINE void WriteArray(const CString& strName, const CAtlArray<T>& arr)
|
||||
{
|
||||
size_t nCount = arr.GetCount();
|
||||
if (0 != nCount)
|
||||
{
|
||||
StartNode(strName);
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
arr[i].toXmlWriter(this);
|
||||
EndNode(strName);
|
||||
}
|
||||
}
|
||||
#endif //#ifdef _WIN32
|
||||
template<typename T>
|
||||
AVSINLINE void WriteArray(const CString& strName, const std::vector<T>& arr)
|
||||
{
|
||||
size_t nCount = arr.size();
|
||||
if (0 != nCount)
|
||||
{
|
||||
StartNode(strName);
|
||||
m_oWriter.WriteString(g_bstr_nodeclose);
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
arr[i].toXmlWriter(this);
|
||||
EndNode(strName);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
template<typename T>
|
||||
AVSINLINE void WriteArray2(const CAtlArray<T>& arr)
|
||||
{
|
||||
size_t nCount = arr.GetCount();
|
||||
if (0 != nCount)
|
||||
{
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
arr[i].toXmlWriter(this);
|
||||
}
|
||||
}
|
||||
#endif //#ifdef _WIN32
|
||||
template<typename T>
|
||||
AVSINLINE void WriteArray2(const std::vector<T>& arr)
|
||||
{
|
||||
size_t nCount = arr.size();
|
||||
if (0 != nCount)
|
||||
{
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
arr[i].toXmlWriter(this);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
AVSINLINE void Write(const nullable<T>& val)
|
||||
{
|
||||
if (val.is_init())
|
||||
val->toXmlWriter(this);
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
void ReplaceString(CString str1, CString str2)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
CString sCur = m_oWriter.GetData();
|
||||
sCur.Replace(str1, str2);
|
||||
ClearNoAttack();
|
||||
WriteString(sCur);
|
||||
}
|
||||
};
|
||||
}
|
||||
699
ASCOfficePPTXFile/Editor/imagemanager.h
Normal file
699
ASCOfficePPTXFile/Editor/imagemanager.h
Normal file
@ -0,0 +1,699 @@
|
||||
#pragma once
|
||||
#include "math.h"
|
||||
#include "CalculatorCRC32.h"
|
||||
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "FontPicker.h"
|
||||
using namespace NSFontCutter;
|
||||
|
||||
#ifndef AVSINLINE
|
||||
#define AVSINLINE __forceinline
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_FILE_DOWNLOADER
|
||||
#include "../../Common/FileDownloader.h"
|
||||
#endif
|
||||
|
||||
#include "WMFToImageConverter.h"
|
||||
#include "../../Common/MediaFormatDefine.h"
|
||||
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
|
||||
#include "../../DesktopEditor/raster/BgraFrame.h"
|
||||
#include "../../DesktopEditor/graphics/Image.h"
|
||||
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
#include <list>
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
#ifndef max
|
||||
#define max(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
namespace NSShapeImageGen
|
||||
{
|
||||
const long c_nMaxImageSize = 2000;
|
||||
|
||||
static BOOL _CopyFile(CString strExists, CString strNew, LPVOID lpFunc, LPVOID lpData)
|
||||
{
|
||||
//::DeleteFile(strNew);
|
||||
//return ::CopyFileEx(strExists, strNew, lpFunc, lpData, FALSE, 0);
|
||||
return CDirectory::CopyFile (strExists, strNew, lpFunc, lpData);
|
||||
}
|
||||
|
||||
enum ImageType
|
||||
{
|
||||
itJPG = 0,
|
||||
itPNG = 1,
|
||||
itVIF = 2,
|
||||
itWMF = 3,
|
||||
itEMF = 4
|
||||
};
|
||||
|
||||
class CImageInfo
|
||||
{
|
||||
public:
|
||||
NSShapeImageGen::ImageType m_eType;
|
||||
LONG m_lID;
|
||||
bool m_bValid;
|
||||
|
||||
CImageInfo()
|
||||
{
|
||||
m_eType = itJPG;
|
||||
m_lID = -1;
|
||||
m_bValid = true;
|
||||
}
|
||||
CImageInfo(const CImageInfo& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CImageInfo& operator=(const CImageInfo& oSrc)
|
||||
{
|
||||
m_eType = oSrc.m_eType;
|
||||
m_lID = oSrc.m_lID;
|
||||
m_bValid = oSrc.m_bValid;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
AVSINLINE CString GetPath(const CString& strMedia)
|
||||
{
|
||||
CString strExt = _T("");
|
||||
strExt.Format(_T("image%d.%ls"), m_lID, (itJPG == m_eType) ? _T("jpg") : _T("png"));
|
||||
return strMedia + FILE_SEPARATOR_STR + strExt;
|
||||
}
|
||||
|
||||
AVSINLINE CString GetPath2()
|
||||
{
|
||||
CString _strExt = _T("png");
|
||||
switch (m_eType)
|
||||
{
|
||||
case itJPG:
|
||||
_strExt = _T("jpg");
|
||||
break;
|
||||
case itWMF:
|
||||
_strExt = _T("wmf");
|
||||
break;
|
||||
case itEMF:
|
||||
_strExt = _T("emf");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
CString strExt = _T("");
|
||||
strExt.Format(_T("image%d.%ls"), m_lID, _strExt);
|
||||
return strExt;
|
||||
}
|
||||
};
|
||||
|
||||
class CImageManager
|
||||
{
|
||||
public:
|
||||
std::map<CString, CImageInfo> m_mapImagesFile;
|
||||
std::map<DWORD, CImageInfo> m_mapImageData;
|
||||
|
||||
std::vector<void*> m_listDrawings;
|
||||
std::list<CImageInfo> m_listImages;
|
||||
|
||||
CString m_strDstMedia;
|
||||
|
||||
LONG m_lMaxSizeImage;
|
||||
LONG m_lNextIDImage;
|
||||
|
||||
CCalculatorCRC32 m_oCRC;
|
||||
|
||||
LONG m_lDstFormat;
|
||||
|
||||
#ifdef BUILD_CONFIG_FULL_VERSION
|
||||
NSWMFToImageConverter::CImageExt m_oExt;
|
||||
#endif
|
||||
|
||||
CFontManager* m_pFontManager;
|
||||
public:
|
||||
|
||||
CImageManager()
|
||||
{
|
||||
m_strDstMedia = _T("");
|
||||
m_lMaxSizeImage = c_nMaxImageSize;
|
||||
m_lNextIDImage = 0;
|
||||
m_lDstFormat = 0;
|
||||
m_pFontManager = NULL;
|
||||
}
|
||||
|
||||
AVSINLINE void NewDocument()
|
||||
{
|
||||
m_strDstMedia = _T("");
|
||||
m_lMaxSizeImage = 1200;
|
||||
m_lNextIDImage = 0;
|
||||
|
||||
m_mapImageData.clear();
|
||||
m_mapImagesFile.clear();
|
||||
m_listImages.clear();
|
||||
}
|
||||
|
||||
public:
|
||||
template <typename T>
|
||||
void Serialize(T* pWriter)
|
||||
{
|
||||
pWriter->WriteINT(m_lMaxSizeImage);
|
||||
pWriter->WriteINT(m_lNextIDImage);
|
||||
pWriter->WriteINT(m_lDstFormat);
|
||||
pWriter->WriteString(m_strDstMedia);
|
||||
|
||||
int lCount = (int)m_mapImagesFile.size();
|
||||
pWriter->WriteINT(lCount);
|
||||
|
||||
for (std::map<CString, CImageInfo>::iterator pPair = m_mapImagesFile.begin(); pPair != m_mapImagesFile.end(); ++pPair)
|
||||
{
|
||||
pWriter->WriteString(pPair->first);
|
||||
pWriter->WriteINT((int)(pPair->second.m_eType));
|
||||
pWriter->WriteINT((int)(pPair->second.m_lID));
|
||||
pWriter->WriteBYTE(pPair->second.m_bValid ? 1 : 0);
|
||||
}
|
||||
|
||||
lCount = (int)m_mapImageData.size();
|
||||
pWriter->WriteINT(lCount);
|
||||
|
||||
for (std::map<DWORD, CImageInfo>::iterator pPair = m_mapImageData.begin(); pPair != m_mapImageData.end(); ++pPair)
|
||||
{
|
||||
pWriter->WriteULONG(pPair->first);
|
||||
pWriter->WriteINT((int)pPair->second.m_eType);
|
||||
pWriter->WriteINT((int)pPair->second.m_lID);
|
||||
pWriter->WriteBYTE(pPair->second.m_bValid ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Deserialize(T* pReader)
|
||||
{
|
||||
m_lMaxSizeImage = pReader->GetLong();
|
||||
m_lNextIDImage = pReader->GetLong();
|
||||
m_lDstFormat = pReader->GetLong();
|
||||
m_strDstMedia = pReader->GetString2();
|
||||
|
||||
m_mapImageData.clear();
|
||||
m_mapImagesFile.clear();
|
||||
|
||||
LONG lCount = pReader->GetLong();
|
||||
for (LONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
CString sKey = pReader->GetString2();
|
||||
|
||||
CImageInfo oInfo;
|
||||
oInfo.m_eType = (NSShapeImageGen::ImageType)pReader->GetLong();
|
||||
oInfo.m_lID = pReader->GetLong();
|
||||
oInfo.m_bValid = pReader->GetBool();
|
||||
|
||||
m_mapImagesFile.insert(std::pair<CString, CImageInfo>(sKey, oInfo));
|
||||
}
|
||||
|
||||
lCount = pReader->GetLong();
|
||||
for (LONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
DWORD dwKey = (DWORD)pReader->GetULong();
|
||||
|
||||
CImageInfo oInfo;
|
||||
oInfo.m_eType = (NSShapeImageGen::ImageType)pReader->GetLong();
|
||||
oInfo.m_lID = pReader->GetLong();
|
||||
oInfo.m_bValid = pReader->GetBool();
|
||||
|
||||
m_mapImageData.insert(std::pair<DWORD, CImageInfo>(dwKey, oInfo));
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
CImageInfo WriteImage(CBgraFrame& punkImage, double& x, double& y, double& width, double& height)
|
||||
{
|
||||
CImageInfo info;
|
||||
//if (NULL == punkImage)
|
||||
// return info;
|
||||
|
||||
if (height < 0)
|
||||
{
|
||||
FlipY(punkImage);
|
||||
height = -height;
|
||||
y -= height;
|
||||
}
|
||||
|
||||
return GenerateImageID(punkImage, (std::max)(1.0, width), (std::max)(1.0, height));
|
||||
}
|
||||
CImageInfo WriteImage(const CString& strFile, double& x, double& y, double& width, double& height)
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
int n1 = strFile.Find(_T("www"));
|
||||
int n2 = strFile.Find(_T("http"));
|
||||
int n3 = strFile.Find(_T("ftp"));
|
||||
int n4 = strFile.Find(_T("https"));
|
||||
|
||||
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
|
||||
bIsDownload = true;
|
||||
|
||||
if (bIsDownload)
|
||||
{
|
||||
|
||||
CString strFile1 = strFile;
|
||||
strFile1.Replace(_T("\\"), _T("/"));
|
||||
strFile1.Replace(_T("http:/"), _T("http://"));
|
||||
strFile1.Replace(_T("https:/"), _T("https://"));
|
||||
strFile1.Replace(_T("ftp:/"), _T("ftp://"));
|
||||
|
||||
|
||||
CImageInfo oInfo;
|
||||
std::map<CString, CImageInfo>::iterator pPair = m_mapImagesFile.find(strFile1);
|
||||
|
||||
if (pPair != m_mapImagesFile.end())
|
||||
return pPair->second;
|
||||
|
||||
CString strDownload = _T("");
|
||||
|
||||
#ifndef DISABLE_FILE_DOWNLOADER
|
||||
|
||||
CFileDownloader oDownloader(strFile1, TRUE);
|
||||
oDownloader.Start( 1 );
|
||||
while ( oDownloader.IsRunned() )
|
||||
{
|
||||
::Sleep( 10 );
|
||||
}
|
||||
|
||||
if ( oDownloader.IsFileDownloaded() )
|
||||
strDownload = oDownloader.GetFilePath();
|
||||
|
||||
#endif
|
||||
|
||||
return GenerateImageID_2(strDownload, strFile1, (std::max)(1.0, width), (std::max)(1.0, height));
|
||||
|
||||
|
||||
}
|
||||
|
||||
CImageInfo info;
|
||||
CFile oFile;
|
||||
if (S_OK != oFile.OpenFile(strFile))
|
||||
return info;
|
||||
|
||||
oFile.CloseFile();
|
||||
|
||||
if (-1 == width && -1 == height)
|
||||
return GenerateImageID(strFile, width, height);
|
||||
return GenerateImageID(strFile, (std::max)(1.0, width), (std::max)(1.0, height));
|
||||
}
|
||||
void SetFontManager(CFontManager* pFontManager)
|
||||
{
|
||||
m_pFontManager = pFontManager;
|
||||
|
||||
#ifdef BUILD_CONFIG_FULL_VERSION
|
||||
m_oExt.SetFontManager(pFontManager);
|
||||
#endif
|
||||
}
|
||||
protected:
|
||||
inline void CopyFile(CString& strFileSrc, CString& strFileDst)
|
||||
{
|
||||
_CopyFile(strFileSrc, strFileDst, NULL, NULL);
|
||||
}
|
||||
|
||||
bool CheckImageSimpleCopy(const CString& strFileSrc, CImageInfo& oInfo)
|
||||
{
|
||||
CFile oFile;
|
||||
HRESULT hr = oFile.OpenFile(strFileSrc);
|
||||
if (hr != S_OK)
|
||||
return false;
|
||||
|
||||
if (20 > oFile.GetFileSize())
|
||||
return false;
|
||||
|
||||
ULONG64 max_size = 3 * 1024 * 1024; // 4 Mb
|
||||
if (max_size < oFile.GetFileSize())
|
||||
return false;
|
||||
|
||||
BYTE pBuffer[20];
|
||||
oFile.ReadFile(pBuffer, 20);
|
||||
|
||||
// jpg
|
||||
if ( (0xFF == pBuffer[0]) && (0xD8 == pBuffer[1]) && (0xFF == pBuffer[2]) )
|
||||
{
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("image%d.jpg"), oInfo.m_lID);
|
||||
|
||||
OOX::CPath pathSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem ;
|
||||
CDirectory::CopyFile(strFileSrc, pathSaveItem.GetPath(), NULL, NULL);
|
||||
|
||||
oInfo.m_eType = itJPG;
|
||||
return true;
|
||||
}
|
||||
|
||||
// png
|
||||
if ( (0x89 == pBuffer[0]) && (0x50 == pBuffer[1]) && (0x4E == pBuffer[2]) && (0x47 == pBuffer[3])
|
||||
&& (0x0D == pBuffer[4]) && (0x0A == pBuffer[5]) && (0x1A == pBuffer[6]) && (0x0A == pBuffer[7])
|
||||
&& (0x00 == pBuffer[8]) && (0x00 == pBuffer[9]) && (0x00 == pBuffer[10]) && (0x0D == pBuffer[11])
|
||||
&& (0x49 == pBuffer[12]) && (0x48 == pBuffer[13]) && (0x44 == pBuffer[14]) && (0x52 == pBuffer[15]))
|
||||
{
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("image%d.png"), oInfo.m_lID);
|
||||
|
||||
OOX::CPath pathSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem ;
|
||||
CDirectory::CopyFile(strFileSrc, pathSaveItem.GetPath(), NULL, NULL);
|
||||
|
||||
oInfo.m_eType = itPNG;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SaveImage(const CString& strFileSrc, CImageInfo& oInfo, LONG __width, LONG __height)
|
||||
{
|
||||
if (CheckImageSimpleCopy(strFileSrc, oInfo))
|
||||
return;
|
||||
|
||||
CBgraFrame oBgraFrame;
|
||||
if (oBgraFrame.OpenFile(std::wstring(strFileSrc.GetString())) == true)
|
||||
{
|
||||
SaveImage(oBgraFrame, oInfo, __width, __height);
|
||||
}
|
||||
else
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
OOX::CPath pathOriginal = strFileSrc;
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("image%d"), oInfo.m_lID);
|
||||
|
||||
strSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem + pathOriginal.GetExtention();
|
||||
|
||||
CDirectory::CopyFile(strFileSrc, strSaveItem, NULL, NULL);
|
||||
}
|
||||
}
|
||||
void SaveImage(CBgraFrame& oBgraFrame, CImageInfo& oInfo, LONG __width, LONG __height)
|
||||
{
|
||||
LONG lWidth = oBgraFrame.get_Width();
|
||||
LONG lHeight = oBgraFrame.get_Height();
|
||||
|
||||
oInfo.m_eType = GetImageType(oBgraFrame);
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
unsigned int nOutputFormat;
|
||||
if (itJPG == oInfo.m_eType)
|
||||
{
|
||||
strSaveItem.Format(_T("image%d.jpg"), oInfo.m_lID);
|
||||
strSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem ;
|
||||
nOutputFormat = _CXIMAGE_FORMAT_JPG;
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo.m_eType = itPNG;
|
||||
strSaveItem.Format(_T("image%d.png"), oInfo.m_lID);
|
||||
strSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem ;
|
||||
nOutputFormat = _CXIMAGE_FORMAT_PNG;
|
||||
}
|
||||
OOX::CPath pathSaveItem = strSaveItem;
|
||||
|
||||
LONG lMaxSize = (std::min)((std::max)(lWidth, lHeight), m_lMaxSizeImage);
|
||||
|
||||
if (!((lWidth <= lMaxSize) && (lHeight <= lMaxSize)))
|
||||
{
|
||||
LONG lW = 0;
|
||||
LONG lH = 0;
|
||||
double dAspect = (double)lWidth / lHeight;
|
||||
|
||||
if (lWidth >= lHeight)
|
||||
{
|
||||
lW = lMaxSize;
|
||||
lH = (LONG)((double)lW / dAspect);
|
||||
}
|
||||
else
|
||||
{
|
||||
lH = lMaxSize;
|
||||
lW = (LONG)(dAspect * lH);
|
||||
}
|
||||
|
||||
oBgraFrame.Resize(lW, lH);
|
||||
}
|
||||
oBgraFrame.SaveFile(std::wstring(pathSaveItem.GetPath()), nOutputFormat);
|
||||
}
|
||||
|
||||
CImageInfo GenerateImageID(CBgraFrame& punkData, double dWidth, double dHeight)
|
||||
{
|
||||
CImageInfo oInfo;
|
||||
|
||||
//if (NULL == punkData)
|
||||
// return oInfo;
|
||||
|
||||
LONG lWidth = (LONG)(dWidth * 96 / 25.4);
|
||||
LONG lHeight = (LONG)(dHeight * 96 / 25.4);
|
||||
|
||||
BYTE* pBuffer = punkData.get_Data();
|
||||
LONG lLen = 4 * punkData.get_Width() * punkData.get_Height();
|
||||
|
||||
DWORD dwSum = m_oCRC.Calc(pBuffer, lLen);
|
||||
|
||||
std::map<DWORD, CImageInfo>::iterator pPair = m_mapImageData.find(dwSum);
|
||||
if (m_mapImageData.end() == pPair)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
++m_lNextIDImage;
|
||||
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
SaveImage(punkData, oInfo, lWidth, lHeight);
|
||||
|
||||
m_mapImageData.insert(std::pair<DWORD,CImageInfo>(dwSum, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo = pPair->second;
|
||||
}
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
|
||||
CImageInfo GenerateImageID(const CString& strFileName, double dWidth, double dHeight)
|
||||
{
|
||||
CImageInfo oInfo;
|
||||
std::map<CString, CImageInfo>::iterator pPair = m_mapImagesFile.find(strFileName);
|
||||
|
||||
LONG lWidth = (LONG)(dWidth * 96 / 25.4);
|
||||
LONG lHeight = (LONG)(dHeight * 96 / 25.4);
|
||||
|
||||
if (m_mapImagesFile.end() == pPair)
|
||||
{
|
||||
#ifdef BUILD_CONFIG_FULL_VERSION
|
||||
LONG lImageType = m_oExt.GetImageType(strFileName);
|
||||
|
||||
if (1 == lImageType || 2 == lImageType)
|
||||
{
|
||||
++m_lNextIDImage;
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
oInfo.m_eType = (1 == lImageType) ? itWMF : itEMF;
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("image%d."), oInfo.m_lID);
|
||||
strSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem;
|
||||
|
||||
double dKoef = 100 * 96 / 25.4;
|
||||
bool bIsSuccess = m_oExt.Convert(strFileName, LONG(dWidth * dKoef), LONG(dHeight * dKoef), strSaveItem + _T("svg"));
|
||||
if (bIsSuccess)
|
||||
{
|
||||
if (itWMF == oInfo.m_eType) strSaveItem += _T("wmf");
|
||||
else strSaveItem += _T("emf");
|
||||
|
||||
OOX::CPath pathSaveItem = strSaveItem;
|
||||
|
||||
CDirectory::CopyFile(strFileName, pathSaveItem.GetPath(), NULL, NULL);
|
||||
|
||||
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(strFileName, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
return oInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> wmf/emf <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Bitmap <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
NSHtmlRenderer::CASCImage oImage;
|
||||
oImage.put_FontManager(m_pFontManager);
|
||||
oImage.LoadFromFile(std::wstring(strFileName.GetString()));
|
||||
Aggplus::CImage* pImage = oImage.get_BitmapImage();
|
||||
if(NULL != pImage)
|
||||
{
|
||||
CBgraFrame oBgraFrame;
|
||||
oBgraFrame.put_Width(pImage->GetWidth());
|
||||
oBgraFrame.put_Height(pImage->GetHeight());
|
||||
oBgraFrame.put_Stride(pImage->GetStride());
|
||||
oBgraFrame.put_Data(pImage->GetData());
|
||||
SaveImage(oBgraFrame, oInfo, lWidth, lHeight);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
oBgraFrame.put_Data(NULL);
|
||||
|
||||
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(strFileName, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
return oInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
--m_lNextIDImage;
|
||||
//oInfo.m_eType = itJPG;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
++m_lNextIDImage;
|
||||
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
SaveImage(strFileName, oInfo, lWidth, lHeight);
|
||||
|
||||
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(strFileName, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
oInfo = pPair->second;
|
||||
}
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
|
||||
CImageInfo GenerateImageID_2(CString& strFileName, CString& strUrl, double dWidth, double dHeight)
|
||||
{
|
||||
CImageInfo oInfo;
|
||||
LONG lWidth = (LONG)(dWidth * 96 / 25.4);
|
||||
LONG lHeight = (LONG)(dHeight * 96 / 25.4);
|
||||
|
||||
#ifdef BUILD_CONFIG_FULL_VERSION
|
||||
LONG lImageType = m_oExt.GetImageType(strFileName);
|
||||
|
||||
if (1 == lImageType || 2 == lImageType)
|
||||
{
|
||||
++m_lNextIDImage;
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
oInfo.m_eType = (1 == lImageType) ? itWMF : itEMF;
|
||||
|
||||
CString strSaveItem = _T("");
|
||||
strSaveItem.Format(_T("image%d."), oInfo.m_lID);
|
||||
|
||||
strSaveItem = m_strDstMedia + FILE_SEPARATOR_STR + strSaveItem;
|
||||
|
||||
double dKoef = 100 * 96 / 25.4;
|
||||
bool bIsSuccess = m_oExt.Convert(strFileName, LONG(dWidth * dKoef), LONG(dHeight * dKoef), strSaveItem + _T("svg"));
|
||||
if (bIsSuccess)
|
||||
{
|
||||
if (itWMF == oInfo.m_eType) strSaveItem += _T("wmf");
|
||||
else strSaveItem += _T("emf");
|
||||
|
||||
OOX::CPath pathSaveItem = strSaveItem;
|
||||
CDirectory::CopyFile(strFileName, pathSaveItem.GetPath(), NULL, NULL);
|
||||
|
||||
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(strFileName, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
return oInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
--m_lNextIDImage;
|
||||
oInfo.m_eType = itJPG;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
++m_lNextIDImage;
|
||||
|
||||
oInfo.m_lID = m_lNextIDImage;
|
||||
SaveImage(strFileName, oInfo, lWidth, lHeight);
|
||||
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(strUrl, oInfo));
|
||||
m_listImages.push_back(oInfo);
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
|
||||
ImageType GetImageType(CBgraFrame& pFrame)
|
||||
{
|
||||
if (2 == m_lDstFormat)
|
||||
return itJPG;
|
||||
|
||||
LONG lWidth = pFrame.get_Width();
|
||||
LONG lHeight = pFrame.get_Height();
|
||||
BYTE* pBuffer = pFrame.get_Data();
|
||||
|
||||
BYTE* pBufferMem = pBuffer + 3;
|
||||
LONG lCountPix = lWidth * lHeight;
|
||||
|
||||
for (LONG i = 0; i < lCountPix; ++i, pBufferMem += 4)
|
||||
{
|
||||
if (255 != *pBufferMem)
|
||||
return itPNG;
|
||||
}
|
||||
return itJPG;
|
||||
}
|
||||
void FlipY(CBgraFrame& punkImage)
|
||||
{
|
||||
//if (NULL == punkImage)
|
||||
// return;
|
||||
|
||||
BYTE* pBuffer = punkImage.get_Data();
|
||||
LONG lWidth = punkImage.get_Width();
|
||||
LONG lHeight = punkImage.get_Height();
|
||||
LONG lStride = punkImage.get_Stride();
|
||||
|
||||
if (lStride < 0)
|
||||
lStride = -lStride;
|
||||
|
||||
if ((lWidth * 4) != lStride)
|
||||
return;
|
||||
|
||||
BYTE* pBufferMem = new BYTE[lStride];
|
||||
|
||||
BYTE* pBufferEnd = pBuffer + lStride * (lHeight - 1);
|
||||
|
||||
LONG lCountV = lHeight / 2;
|
||||
|
||||
for (LONG lIndexV = 0; lIndexV < lCountV; ++lIndexV)
|
||||
{
|
||||
memcpy(pBufferMem, pBuffer, lStride);
|
||||
memcpy(pBuffer, pBufferEnd, lStride);
|
||||
memcpy(pBufferEnd, pBufferMem, lStride);
|
||||
|
||||
pBuffer += lStride;
|
||||
pBufferEnd -= lStride;
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(pBufferMem);
|
||||
}
|
||||
|
||||
void FlipX(CBgraFrame& punkImage)
|
||||
{
|
||||
//if (NULL == punkImage)
|
||||
// return;
|
||||
|
||||
BYTE* pBuffer = punkImage.
|
||||
get_Data();
|
||||
LONG lWidth = punkImage.get_Width();
|
||||
LONG lHeight = punkImage.get_Height();
|
||||
LONG lStride = punkImage.get_Stride();
|
||||
|
||||
if (lStride < 0)
|
||||
lStride = -lStride;
|
||||
|
||||
if ((lWidth * 4) != lStride)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD* pBufferDWORD = (DWORD*)pBuffer;
|
||||
|
||||
LONG lW2 = lWidth / 2;
|
||||
for (LONG lIndexV = 0; lIndexV < lHeight; ++lIndexV)
|
||||
{
|
||||
DWORD* pMem1 = pBufferDWORD;
|
||||
DWORD* pMem2 = pBufferDWORD + lWidth - 1;
|
||||
|
||||
LONG lI = 0;
|
||||
while (lI < lW2)
|
||||
{
|
||||
DWORD dwMem = *pMem1;
|
||||
*pMem1++ = *pMem2;
|
||||
*pMem2-- = dwMem;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
29
ASCOfficePPTXFile/File.cpp
Normal file
29
ASCOfficePPTXFile/File.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
//#include "stdafx.h"
|
||||
|
||||
#include "File.h"
|
||||
|
||||
namespace FileSystem {
|
||||
bool File::Exists(LPCTSTR path) {
|
||||
WIN32_FIND_DATA findData;
|
||||
ZeroMemory(&findData, sizeof(findData));
|
||||
|
||||
HANDLE handle = ::FindFirstFile(path, &findData);
|
||||
|
||||
bool fileExists = true;
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
fileExists = false;
|
||||
FindClose(handle);
|
||||
|
||||
return fileExists;
|
||||
}
|
||||
bool File::Exists(const String& path) {
|
||||
return Exists(path.c_str());
|
||||
}
|
||||
|
||||
void File::Create(LPCTSTR path) {
|
||||
CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
}
|
||||
void File::Create(const String& path) {
|
||||
Create(path.c_str());
|
||||
}
|
||||
}
|
||||
15
ASCOfficePPTXFile/File.h
Normal file
15
ASCOfficePPTXFile/File.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Settings.h"
|
||||
#include <windows.h>
|
||||
|
||||
namespace FileSystem {
|
||||
class File {
|
||||
public:
|
||||
static bool Exists(LPCTSTR path);
|
||||
static bool Exists(const String& path);
|
||||
|
||||
static void Create(LPCTSTR path);
|
||||
static void Create(const String& path);
|
||||
};
|
||||
}
|
||||
297
ASCOfficePPTXFile/PPTXFormat/App.h
Normal file
297
ASCOfficePPTXFile/PPTXFormat/App.h
Normal file
@ -0,0 +1,297 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_APP_FILE_INCLUDE_H_
|
||||
#define PPTX_APP_FILE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "Logic/PartTitle.h"
|
||||
#include "Logic/HeadingVariant.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
using namespace NSBinPptxRW;
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class App : public WrapperFile
|
||||
{
|
||||
public:
|
||||
App()
|
||||
{
|
||||
}
|
||||
App(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~App()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
HeadingPairs.clear();
|
||||
TitlesOfParts.clear();
|
||||
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
oNode.ReadNodeValueBase(L"Template", Template);
|
||||
oNode.ReadNodeValueBase(L"TotalTime", TotalTime);
|
||||
oNode.ReadNodeValueBase(L"Words", Words);
|
||||
oNode.ReadNodeValueBase(L"Application", Application);
|
||||
oNode.ReadNodeValueBase(L"PresentationFormat", PresentationFormat);
|
||||
oNode.ReadNodeValueBase(L"Paragraphs", Paragraphs);
|
||||
oNode.ReadNodeValueBase(L"Slides", Slides);
|
||||
oNode.ReadNodeValueBase(L"Notes", Notes);
|
||||
oNode.ReadNodeValueBase(L"HiddenSlides", HiddenSlides);
|
||||
oNode.ReadNodeValueBase(L"MMClips", MMClips);
|
||||
oNode.ReadNodeValueBase(L"ScaleCrop", ScaleCrop);
|
||||
|
||||
XmlUtils::CXmlNode oHP = oNode.ReadNode(_T("HeadingPairs"));
|
||||
XmlUtils::CXmlNode oNodeVector1;
|
||||
if (oHP.GetNode(_T("vt:vector"), oNodeVector1))
|
||||
{
|
||||
oNodeVector1.ReadAttributeBase(_T("size"), m_Headings);
|
||||
oNodeVector1.LoadArray(_T("vt:variant"), HeadingPairs);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oTP = oNode.ReadNode(_T("TitlesOfParts"));
|
||||
XmlUtils::CXmlNode oNodeVector2;
|
||||
if (oTP.GetNode(_T("vt:vector"), oNodeVector2))
|
||||
{
|
||||
oNodeVector2.ReadAttributeBase(_T("size"), m_VectorSize);
|
||||
oNodeVector2.LoadArray(_T("vt:variant"), TitlesOfParts);
|
||||
}
|
||||
|
||||
oNode.ReadNodeValueBase(L"Company", Company);
|
||||
oNode.ReadNodeValueBase(L"LinksUpToDate", LinksUpToDate);
|
||||
oNode.ReadNodeValueBase(L"SharedDoc", SharedDoc);
|
||||
oNode.ReadNodeValueBase(L"HyperlinksChanged", HyperlinksChanged);
|
||||
oNode.ReadNodeValueBase(L"AppVersion", AppVersion);
|
||||
|
||||
//Characters = document.Root.element("Characters").text();
|
||||
//CharactersWithSpaces = document.Root.element("CharactersWithSpaces").text();
|
||||
//DigSig (Digital Signature)
|
||||
//DocSecurity = document.Root.element("DocSecurity").text();
|
||||
//HLinks
|
||||
//HyperlinkBase = document.Root.element("HyperlinkBase").text();
|
||||
//Lines = document.Root.element("Lines").text();
|
||||
//Manager = document.Root.element("Manager").text();
|
||||
//Pages = document.Root.element("Pages").text();
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns"), PPTX::g_Namespaces.xmlns.m_strLink);
|
||||
oAttr.Write(_T("xmlns:vt"), PPTX::g_Namespaces.vt.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write2(_T("Template"), Template);
|
||||
oValue.Write2(_T("TotalTime"), TotalTime);
|
||||
oValue.Write2(_T("Words"), Words);
|
||||
oValue.Write2(_T("Application"), Application);
|
||||
oValue.Write2(_T("PresentationFormat"), PresentationFormat);
|
||||
oValue.Write2(_T("Paragraphs"), Paragraphs);
|
||||
oValue.Write2(_T("Slides"), Slides);
|
||||
oValue.Write2(_T("Notes"), Notes);
|
||||
oValue.Write2(_T("HiddenSlides"), HiddenSlides);
|
||||
oValue.Write2(_T("MMClips"), MMClips);
|
||||
oValue.Write2(_T("ScaleCrop"), ScaleCrop);
|
||||
|
||||
XmlUtils::CAttribute oAttr1;
|
||||
oAttr1.Write(_T("size"), m_Headings);
|
||||
oAttr1.Write(_T("baseType"), _T("variant"));
|
||||
|
||||
XmlUtils::CNodeValue oValue1;
|
||||
oValue1.WriteArray(HeadingPairs);
|
||||
|
||||
oValue.Write2(_T("HeadingPairs"), XmlUtils::CreateNode(_T("vt:vector"), oAttr1, oValue1));
|
||||
|
||||
XmlUtils::CAttribute oAttr2;
|
||||
oAttr2.Write(_T("size"), m_Headings);
|
||||
oAttr2.Write(_T("baseType"), _T("lpstr"));
|
||||
|
||||
XmlUtils::CNodeValue oValue2;
|
||||
oValue2.WriteArray(HeadingPairs);
|
||||
|
||||
oValue.Write2(_T("TitlesOfParts"), XmlUtils::CreateNode(_T("vt:vector"), oAttr2, oValue2));
|
||||
|
||||
oValue.Write2(_T("Company"), Company);
|
||||
oValue.Write2(_T("LinksUpToDate"), LinksUpToDate);
|
||||
oValue.Write2(_T("SharedDoc"), SharedDoc);
|
||||
oValue.Write2(_T("HyperlinksChanged"), HyperlinksChanged);
|
||||
oValue.Write2(_T("AppVersion"), AppVersion);
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("Properties"), oAttr, oValue));
|
||||
|
||||
//if(DocSecurity.is_init())
|
||||
// root.push_back(XML::XElement("DocSecurity", XML::XText(DocSecurity)));
|
||||
//if(Manager.is_init())
|
||||
// root.push_back(XML::XElement("Manager", XML::XText(Manager)));
|
||||
//if(HyperlinkBase.is_init())
|
||||
// root.push_back(XML::XElement("HyperlinkBase", XML::XText(HyperlinkBase)));
|
||||
//XML::XElement("Characters", XML::XText(Characters)) +
|
||||
//XML::XElement("Lines", XML::XText(Lines)) +
|
||||
//XML::XElement("CharactersWithSpaces", XML::XText(CharactersWithSpaces))
|
||||
//DigSig (Digital Signature)
|
||||
//HLinks
|
||||
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
|
||||
m_WrittenFileName.m_strFilename = filename.GetFilename();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::App;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(NSMainTables::App);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString2(0, Template);
|
||||
pWriter->WriteString2(1, Application);
|
||||
pWriter->WriteString2(2, PresentationFormat);
|
||||
pWriter->WriteString2(3, Company);
|
||||
pWriter->WriteString2(4, AppVersion);
|
||||
|
||||
pWriter->WriteInt2(5, TotalTime);
|
||||
pWriter->WriteInt2(6, Words);
|
||||
pWriter->WriteInt2(7, Paragraphs);
|
||||
pWriter->WriteInt2(8, Slides);
|
||||
pWriter->WriteInt2(9, Notes);
|
||||
pWriter->WriteInt2(10, HiddenSlides);
|
||||
pWriter->WriteInt2(11, MMClips);
|
||||
|
||||
pWriter->WriteBool2(12, ScaleCrop);
|
||||
pWriter->WriteBool2(13, LinksUpToDate);
|
||||
pWriter->WriteBool2(14, SharedDoc);
|
||||
pWriter->WriteBool2(15, HyperlinksChanged);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("Properties"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("xmlns"), PPTX::g_Namespaces.xmlns.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:vt"), PPTX::g_Namespaces.vt.m_strLink);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteNodeValue(_T("Template"), Template);
|
||||
pWriter->WriteNodeValue(_T("TotalTime"), TotalTime);
|
||||
pWriter->WriteNodeValue(_T("Words"), Words);
|
||||
pWriter->WriteNodeValue(_T("Application"), Application);
|
||||
pWriter->WriteNodeValue(_T("PresentationFormat"), PresentationFormat);
|
||||
pWriter->WriteNodeValue(_T("Paragraphs"), Paragraphs);
|
||||
pWriter->WriteNodeValue(_T("Slides"), Slides);
|
||||
pWriter->WriteNodeValue(_T("Notes"), Notes);
|
||||
pWriter->WriteNodeValue(_T("HiddenSlides"), HiddenSlides);
|
||||
pWriter->WriteNodeValue(_T("MMClips"), MMClips);
|
||||
pWriter->WriteNodeValue(_T("ScaleCrop"), ScaleCrop);
|
||||
|
||||
pWriter->StartNode(_T("HeadingPairs"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("vt:vector"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("size"), (int)HeadingPairs.size());
|
||||
pWriter->WriteAttribute(_T("baseType"), (CString)_T("variant"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(HeadingPairs);
|
||||
|
||||
pWriter->EndNode(_T("vt:vector"));
|
||||
pWriter->EndNode(_T("HeadingPairs"));
|
||||
|
||||
pWriter->StartNode(_T("TitlesOfParts"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("vt:vector"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("size"), (int)TitlesOfParts.size());
|
||||
pWriter->WriteAttribute(_T("baseType"), (CString)_T("lpstr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(TitlesOfParts);
|
||||
|
||||
pWriter->EndNode(_T("vt:vector"));
|
||||
pWriter->EndNode(_T("TitlesOfParts"));
|
||||
|
||||
pWriter->WriteNodeValue(_T("Company"), Company);
|
||||
pWriter->WriteNodeValue(_T("LinksUpToDate"), LinksUpToDate);
|
||||
pWriter->WriteNodeValue(_T("SharedDoc"), SharedDoc);
|
||||
pWriter->WriteNodeValue(_T("HyperlinksChanged"), HyperlinksChanged);
|
||||
pWriter->WriteNodeValue(_T("AppVersion"), AppVersion);
|
||||
|
||||
pWriter->EndNode(_T("Properties"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_string Template; // (Name of Document Template)
|
||||
nullable_int TotalTime; // (Total Edit Time Metadata Element)
|
||||
nullable_int Words; // (Word Count)
|
||||
nullable_string Application; // (Application Name)
|
||||
nullable_string PresentationFormat; // (Intended Format of Presentation)
|
||||
nullable_int Paragraphs; // (Total Number of Paragraphs)
|
||||
nullable_int Slides; // (Slides Metadata Element)
|
||||
nullable_int Notes; // (Number of Slides Containing Notes)
|
||||
nullable_int HiddenSlides; // (Number of Hidden Slides)
|
||||
nullable_int MMClips; // (Total Number of Multimedia Clips)
|
||||
nullable_bool ScaleCrop; // (Thumbnail Display Mode)
|
||||
std::vector<Logic::HeadingVariant> HeadingPairs; // (Heading Pairs)
|
||||
std::vector<Logic::PartTitle> TitlesOfParts; // (Part Titles)
|
||||
nullable_string Company; // (Name of Company)
|
||||
nullable_bool LinksUpToDate; // (Links Up-to-Date)
|
||||
nullable_bool SharedDoc; // (Shared Document)
|
||||
nullable_bool HyperlinksChanged; // (Hyperlinks Changed)
|
||||
nullable_string AppVersion; // (Application Version)
|
||||
|
||||
//nullable_property<int, setter::only_positive<int> > Characters; // (Total Number of Characters)
|
||||
//nullable_property<int, setter::only_positive<int> > CharactersWithSpaces; // (Number of Characters (With Spaces))
|
||||
//DigSig (Digital Signature)
|
||||
//nullable_property<int, setter::only_positive<int> > DocSecurity; // (Document Security)
|
||||
//std::list<std::string> - ??? HLinks; // (Hyperlink List)
|
||||
//nullable_property<std::string> HyperlinkBase; // (Relative Hyperlink Base)
|
||||
//nullable_property<int, setter::only_positive<int> > Lines; // (Number of Lines)
|
||||
//nullable_property<std::string> Manager; // (Name of Manager)
|
||||
//nullable_property<int, setter::only_positive<int> > Pages; // (Total Number of Pages)
|
||||
private:
|
||||
nullable_int m_VectorSize;
|
||||
nullable_int m_Headings;
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
TotalTime.normalize_positive();
|
||||
Words.normalize_positive();
|
||||
Paragraphs.normalize_positive();
|
||||
Slides.normalize_positive();
|
||||
Notes.normalize_positive();
|
||||
HiddenSlides.normalize_positive();
|
||||
MMClips.normalize_positive();
|
||||
m_VectorSize.normalize_positive();
|
||||
m_Headings.normalize_positive();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_APP_FILE_INCLUDE_H_
|
||||
224
ASCOfficePPTXFile/PPTXFormat/CommentAuthors.h
Normal file
224
ASCOfficePPTXFile/PPTXFormat/CommentAuthors.h
Normal file
@ -0,0 +1,224 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_COMMENTS_COMMENTSAUTHORS_H_
|
||||
#define PPTX_COMMENTS_COMMENTSAUTHORS_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
class CommentAuthor : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(CommentAuthor)
|
||||
private:
|
||||
nullable_int id;
|
||||
nullable_int last_idx;
|
||||
nullable_int clr_idx;
|
||||
|
||||
nullable_string name;
|
||||
nullable_string initials;
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"id", id);
|
||||
node.ReadAttributeBase(L"lastIdx", last_idx);
|
||||
node.ReadAttributeBase(L"clrIdx", clr_idx);
|
||||
node.ReadAttributeBase(L"name", name);
|
||||
node.ReadAttributeBase(L"initials", initials);
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmAuthor"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("id"), id);
|
||||
pWriter->WriteAttribute2(_T("name"), name);
|
||||
pWriter->WriteAttribute(_T("initials"), initials);
|
||||
pWriter->WriteAttribute(_T("lastIdx"), last_idx);
|
||||
pWriter->WriteAttribute(_T("clrIdx"), clr_idx);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:cmAuthor"));
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteInt2(0, id);
|
||||
pWriter->WriteInt2(1, last_idx);
|
||||
pWriter->WriteInt2(2, clr_idx);
|
||||
pWriter->WriteString2(3, name);
|
||||
pWriter->WriteString2(4, initials);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
id = pReader->GetLong();
|
||||
break;
|
||||
case 1:
|
||||
last_idx = pReader->GetLong();
|
||||
break;
|
||||
case 2:
|
||||
clr_idx = pReader->GetLong();
|
||||
break;
|
||||
case 3:
|
||||
name = pReader->GetString2();
|
||||
break;
|
||||
case 4:
|
||||
initials = pReader->GetString2();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class Authors : public WrapperFile
|
||||
{
|
||||
private:
|
||||
std::vector<PPTX::Logic::CommentAuthor> m_arAuthors;
|
||||
|
||||
public:
|
||||
Authors()
|
||||
{
|
||||
}
|
||||
Authors(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Authors()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
oNode.GetNodes(_T("p:cmAuthor"), oNodes);
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oCm;
|
||||
oNodes.GetAt(i, oCm);
|
||||
|
||||
PPTX::Logic::CommentAuthor comm;
|
||||
|
||||
m_arAuthors.push_back(comm);
|
||||
m_arAuthors.back().fromXML(oCm);
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::CommentAuthors;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecordArray(0, 0, m_arAuthors);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmAuthorLst"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("xmlns:a"), PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:r"), PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:p"), PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(m_arAuthors);
|
||||
|
||||
pWriter->EndNode(_T("p:cmAuthorLst"));
|
||||
}
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG end = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
while (pReader->GetPos() < end)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pReader->Skip(4); // len
|
||||
ULONG lCount = pReader->GetULong();
|
||||
|
||||
for (ULONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
pReader->Skip(1);
|
||||
|
||||
PPTX::Logic::CommentAuthor comm;
|
||||
|
||||
m_arAuthors.push_back(comm);
|
||||
m_arAuthors.back().fromPPTY(pReader);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(end);
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_COMMENTS_COMMENTSAUTHORS_H_
|
||||
374
ASCOfficePPTXFile/PPTXFormat/Comments.h
Normal file
374
ASCOfficePPTXFile/PPTXFormat/Comments.h
Normal file
@ -0,0 +1,374 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_COMMENTS_COMMENTS_H_
|
||||
#define PPTX_COMMENTS_COMMENTS_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
class Comment : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Comment)
|
||||
private:
|
||||
nullable_int authorId;
|
||||
nullable_int idx;
|
||||
nullable_string dt;
|
||||
|
||||
nullable_int pos_x;
|
||||
nullable_int pos_y;
|
||||
|
||||
nullable_string text;
|
||||
|
||||
nullable_int parentAuthorId;
|
||||
nullable_int parentCommentId;
|
||||
|
||||
nullable_string additional_data; // teamlab editor information!!!
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"authorId", authorId);
|
||||
node.ReadAttributeBase(L"dt", dt);
|
||||
node.ReadAttributeBase(L"idx", idx);
|
||||
|
||||
XmlUtils::CXmlNode oNodePos = node.ReadNode(_T("p:pos"));
|
||||
if (oNodePos.IsValid())
|
||||
{
|
||||
oNodePos.ReadAttributeBase(L"x", pos_x);
|
||||
oNodePos.ReadAttributeBase(L"y", pos_y);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeText = node.ReadNode(_T("p:text"));
|
||||
if (oNodeText.IsValid())
|
||||
text = oNodeText.GetTextExt();
|
||||
|
||||
XmlUtils::CXmlNode oNodeExtLst = node.ReadNode(_T("p:extLst"));
|
||||
|
||||
bool bIsFound1 = false;
|
||||
bool bIsFound2 = false;
|
||||
if (oNodeExtLst.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNodes oNodesExt;
|
||||
if (oNodeExtLst.GetNodes(_T("p:ext"), oNodesExt))
|
||||
{
|
||||
int nCountExts = oNodesExt.GetCount();
|
||||
for (int nIndex = 0; nIndex < nCountExts; ++nIndex)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeExt;
|
||||
oNodesExt.GetAt(nIndex, oNodeExt);
|
||||
|
||||
// parent
|
||||
if (!bIsFound1)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeTI = oNodeExt.ReadNode(_T("p15:threadingInfo"));
|
||||
if (oNodeTI.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeParent = oNodeTI.ReadNode(_T("p15:parentCm"));
|
||||
|
||||
oNodeParent.ReadAttributeBase(L"authorId", parentAuthorId);
|
||||
oNodeParent.ReadAttributeBase(L"idx", parentCommentId);
|
||||
|
||||
bIsFound1 = true;
|
||||
}
|
||||
}
|
||||
if (!bIsFound2)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeAU = oNodeExt.ReadNode(_T("p15:presenceInfo"));
|
||||
if (oNodeAU.IsValid())
|
||||
{
|
||||
CString strData = oNodeAU.GetAttribute(_T("userId"));
|
||||
|
||||
strData.Replace(_T("&"), _T("&"));
|
||||
strData.Replace(_T("'"), _T("'"));
|
||||
strData.Replace(_T("<"), _T("<"));
|
||||
strData.Replace(_T(">"), _T(">"));
|
||||
strData.Replace(_T("""), _T("\""));
|
||||
|
||||
if (_T("") != strData)
|
||||
additional_data = strData;
|
||||
|
||||
bIsFound2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeExt = oNodeExtLst.ReadNode(_T("p:ext"));
|
||||
if (oNodeExt.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeTI = oNodeExt.ReadNode(_T("p15:threadingInfo"));
|
||||
if (oNodeTI.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeParent = oNodeTI.ReadNode(_T("p15:parentCm"));
|
||||
|
||||
oNodeParent.ReadAttributeBase(L"authorId", parentAuthorId);
|
||||
oNodeParent.ReadAttributeBase(L"idx", parentCommentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cm"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("authorId"), authorId);
|
||||
pWriter->WriteAttribute2(_T("dt"), dt);
|
||||
pWriter->WriteAttribute(_T("idx"), idx);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
if (pos_x.is_init() && pos_y.is_init())
|
||||
{
|
||||
CString sPos = _T("");
|
||||
sPos.Format(_T("<p:pos x=\"%d\" y=\"%d\"/>"), *pos_x, *pos_y);
|
||||
pWriter->WriteString(sPos);
|
||||
}
|
||||
if (text.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:text>"));
|
||||
pWriter->WriteStringXML(*text);
|
||||
pWriter->WriteString(_T("</p:text>"));
|
||||
}
|
||||
|
||||
bool bIsExtLst = false;
|
||||
if ((parentAuthorId.is_init() && parentCommentId.is_init()) || additional_data.is_init())
|
||||
bIsExtLst = true;
|
||||
|
||||
if (bIsExtLst)
|
||||
pWriter->WriteString(_T("<p:extLst>"));
|
||||
|
||||
if (parentAuthorId.is_init() && parentCommentId.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:ext uri=\"{C676402C-5697-4E1C-873F-D02D1690AC5C}\">\
|
||||
<p15:threadingInfo xmlns:p15=\"http://schemas.microsoft.com/office/powerpoint/2012/main\" timeZoneBias=\"-240\">"));
|
||||
|
||||
CString sPos = _T("");
|
||||
sPos.Format(_T("<p15:parentCm authorId=\"%d\" idx=\"%d\"/>"), *parentAuthorId, *parentCommentId);
|
||||
pWriter->WriteString(sPos);
|
||||
|
||||
pWriter->WriteString(_T("</p15:threadingInfo></p:ext>"));
|
||||
}
|
||||
|
||||
if (additional_data.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:ext uri=\"{19B8F6BF-5375-455C-9EA6-DF929625EA0E}\">\
|
||||
<p15:presenceInfo xmlns:p15=\"http://schemas.microsoft.com/office/powerpoint/2012/main\" userId=\""));
|
||||
|
||||
CString strData = additional_data.get();
|
||||
|
||||
strData.Replace ( _T("&"), _T("&") );
|
||||
strData.Replace ( _T("'"), _T("'") );
|
||||
strData.Replace ( _T("<"), _T("<") );
|
||||
strData.Replace ( _T(">"), _T(">") );
|
||||
strData.Replace ( _T("\""), _T(""") );
|
||||
|
||||
pWriter->WriteString(strData);
|
||||
|
||||
pWriter->WriteString(_T("\" providerId=\"AD\"/></p:ext>"));
|
||||
}
|
||||
|
||||
if (bIsExtLst)
|
||||
pWriter->WriteString(_T("</p:extLst>"));
|
||||
|
||||
pWriter->EndNode(_T("p:cm"));
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteInt2(0, authorId);
|
||||
pWriter->WriteString2(1, dt);
|
||||
pWriter->WriteInt2(2, idx);
|
||||
|
||||
pWriter->WriteInt2(3, pos_x);
|
||||
pWriter->WriteInt2(4, pos_y);
|
||||
|
||||
pWriter->WriteString2(5, text);
|
||||
|
||||
pWriter->WriteInt2(6, parentAuthorId);
|
||||
pWriter->WriteInt2(7, parentCommentId);
|
||||
|
||||
pWriter->WriteString2(8, additional_data);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
authorId = pReader->GetLong();
|
||||
break;
|
||||
case 1:
|
||||
dt = pReader->GetString2();
|
||||
break;
|
||||
case 2:
|
||||
idx = pReader->GetLong();
|
||||
break;
|
||||
case 3:
|
||||
pos_x = pReader->GetLong();
|
||||
break;
|
||||
case 4:
|
||||
pos_y = pReader->GetLong();
|
||||
break;
|
||||
case 5:
|
||||
text = pReader->GetString2();
|
||||
break;
|
||||
case 6:
|
||||
parentAuthorId = pReader->GetLong();
|
||||
break;
|
||||
case 7:
|
||||
parentCommentId = pReader->GetLong();
|
||||
break;
|
||||
case 8:
|
||||
additional_data = pReader->GetString2();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class Comments : public WrapperFile
|
||||
{
|
||||
private:
|
||||
std::vector<PPTX::Logic::Comment> m_arComments;
|
||||
|
||||
public:
|
||||
Comments()
|
||||
{
|
||||
}
|
||||
Comments(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Comments()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
oNode.GetNodes(_T("p:cm"), oNodes);
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oCm;
|
||||
oNodes.GetAt(i, oCm);
|
||||
|
||||
PPTX::Logic::Comment elm;
|
||||
m_arComments.push_back(elm);
|
||||
m_arComments.back().fromXML(oCm);
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::SlideComments;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecordArray(0, 0, m_arComments);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmLst"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("xmlns:a"), PPTX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:r"), PPTX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:p"), PPTX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(m_arComments);
|
||||
|
||||
pWriter->EndNode(_T("p:cmLst"));
|
||||
}
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG end = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
while (pReader->GetPos() < end)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pReader->Skip(4); // len
|
||||
ULONG lCount = pReader->GetULong();
|
||||
|
||||
for (ULONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
pReader->Skip(1);
|
||||
|
||||
PPTX::Logic::Comment elm;
|
||||
m_arComments.push_back(elm);
|
||||
m_arComments.back().fromPPTY(pReader);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(end);
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_COMMENTS_COMMENTS_H_
|
||||
193
ASCOfficePPTXFile/PPTXFormat/Core.h
Normal file
193
ASCOfficePPTXFile/PPTXFormat/Core.h
Normal file
@ -0,0 +1,193 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_CORE_FILE_INCLUDE_H_
|
||||
#define PPTX_CORE_FILE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "DocxFormat/WritingElement.h"
|
||||
//#include "DocxFormat/DateTime.h"
|
||||
#include "Limit/ContentStatus.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
using namespace NSBinPptxRW;
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Core : public WrapperFile
|
||||
{
|
||||
public:
|
||||
Core()
|
||||
{
|
||||
}
|
||||
Core(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Core()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
oNode.ReadNodeValueBase(_T("dc:title"), title);
|
||||
oNode.ReadNodeValueBase(_T("dc:creator"), creator);
|
||||
oNode.ReadNodeValueBase(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
oNode.ReadNodeValueBase(_T("cp:revision"), revision);
|
||||
oNode.ReadNodeValueBase(_T("dcterms:modified"), modified);
|
||||
oNode.ReadNodeValueBase(_T("dcterms:created"), created);
|
||||
|
||||
// created = PPTX::DateTime::Parse(document.Root.element("created").text().ToString());
|
||||
// modified = PPTX::DateTime::Parse(document.Root.element("modified").text().ToString());
|
||||
/*
|
||||
category = document.Root.element("category").text();
|
||||
contentStatus = document.Root.element("contentStatus").text();
|
||||
description = document.Root.element("description").text();
|
||||
//identifier - ???
|
||||
// keywords = document.Root.element("keywords").text();
|
||||
language = document.Root.element("language").text();
|
||||
// lastPrinted = PPTX::DateTime::Parse(document.Root.element("lastPrinted").text().ToString());
|
||||
subject = document.Root.element("subject").text();
|
||||
version = document.Root.element("version").text();
|
||||
*/
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns:dc"), PPTX::g_Namespaces.dc.m_strLink);
|
||||
//oAttr.Write(_T("xmlns:cp"), PPTX::g_Namespaces.cp.m_strLink);
|
||||
oAttr.Write(_T("xmlns:dcterms"), PPTX::g_Namespaces.dcterms.m_strLink);
|
||||
oAttr.Write(_T("xmlns:xsi"), PPTX::g_Namespaces.xsi.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write2(_T("dc:title"), title);
|
||||
oValue.Write2(_T("dc:creator"), creator);
|
||||
oValue.Write2(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
oValue.Write2(_T("cp:revision"), revision);
|
||||
|
||||
if (created.IsInit())
|
||||
{
|
||||
oValue.m_strValue += _T("<dcterms:created xsi:type=\"dcterms:W3CDTF\">");
|
||||
oValue.m_strValue += *created;
|
||||
oValue.m_strValue += _T("</dcterms:created>");
|
||||
}
|
||||
|
||||
oValue.m_strValue += _T("<dcterms:modified xsi:type=\"dcterms:W3CDTF\">");
|
||||
if (modified.IsInit())
|
||||
oValue.m_strValue += *modified;
|
||||
oValue.m_strValue += _T("</dcterms:modified>");
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("cp:coreProperties"), oAttr, oValue));
|
||||
|
||||
/*
|
||||
if(category.is_init())
|
||||
root.push_back(XML::XElement("category", XML::XText(category)));
|
||||
if(contentStatus.is_init())
|
||||
root.push_back(XML::XElement("contentStatus", XML::XText(contentStatus)));
|
||||
if(description.is_init())
|
||||
root.push_back(XML::XElement(ns.dc + "description", XML::XText(description)));
|
||||
//identifier - ??? dc
|
||||
//XML::XElement(ns.cp + "keywords", XML::XText(keywords)) +
|
||||
if(language.is_init())
|
||||
root.push_back(XML::XElement(ns.dc + "language", XML::XText(language)));
|
||||
// if(lastModifiedBy.is_init())
|
||||
// root.push_back(XML::XElement(ns.cp + "lastModifiedBy", XML::XText(lastModifiedBy)));
|
||||
//XML::XElement("lastPrinted",
|
||||
// XML::XAttribute(,)+
|
||||
// XML::XText(lastPrinted)
|
||||
//) + //??? namespace ???
|
||||
// if(revision.is_init())
|
||||
// root.push_back(XML::XElement(ns.cp + "revision", XML::XText(revision)));
|
||||
if(subject.is_init())
|
||||
root.push_back(XML::XElement(ns.dc + "subject", XML::XText(subject)));
|
||||
// if(title.is_init())
|
||||
// root.push_back(XML::XElement(ns.dc + "title", XML::XText(title)));
|
||||
if(version.is_init())
|
||||
root.push_back(XML::XElement("version", XML::XText(version)));
|
||||
*/
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
m_WrittenFileName = filename.GetFilename();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::Core;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(NSMainTables::Core);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString2(0, title);
|
||||
pWriter->WriteString2(1, creator);
|
||||
pWriter->WriteString2(2, lastModifiedBy);
|
||||
pWriter->WriteString2(3, revision);
|
||||
pWriter->WriteString2(4, created);
|
||||
pWriter->WriteString2(5, modified);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("cp:coreProperties"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("xmlns:cp"), PPTX::g_Namespaces.cp.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:dc"), PPTX::g_Namespaces.dc.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:dcterms"), PPTX::g_Namespaces.dcterms.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:xsi"), PPTX::g_Namespaces.xsi.m_strLink);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteNodeValue(_T("dc:title"), title);
|
||||
pWriter->WriteNodeValue(_T("dc:creator"), creator);
|
||||
pWriter->WriteNodeValue(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
pWriter->WriteNodeValue(_T("cp:revision"), revision);
|
||||
|
||||
pWriter->WriteNodeValue(_T("dcterms:created xsi:type=\"dcterms:W3CDTF\""), created);
|
||||
pWriter->WriteNodeValue(_T("dcterms:modified xsi:type=\"dcterms:W3CDTF\""), modified);
|
||||
|
||||
pWriter->EndNode(_T("cp:coreProperties"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_string title;
|
||||
nullable_string creator;
|
||||
nullable_string lastModifiedBy;
|
||||
nullable_string revision;
|
||||
// nullable_property<PPTX::DateTime> created;
|
||||
nullable_string created;
|
||||
// nullable_property<PPTX::DateTime> modified;
|
||||
nullable_string modified;
|
||||
/*
|
||||
nullable_property<std::string> category;
|
||||
nullable_property<std::string, Limit::ContentStatus> contentStatus;
|
||||
nullable_property<std::string> description;
|
||||
//identifier - ???
|
||||
// nullable_property<std::string> keywords;
|
||||
nullable_property<std::string> language;
|
||||
nullable_property<PPTX::DateTime> lastPrinted;
|
||||
nullable_property<std::string> subject;
|
||||
nullable_property<std::string> version;
|
||||
*/
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_CORE_FILE_INCLUDE_H_
|
||||
@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "ExtensionTable.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class Default : public WritingElement
|
||||
{
|
||||
public:
|
||||
Default()
|
||||
{
|
||||
m_extension = _T("");
|
||||
}
|
||||
Default(const CString& extension) : m_extension(extension)
|
||||
{
|
||||
}
|
||||
virtual ~Default()
|
||||
{
|
||||
}
|
||||
explicit Default(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const Default& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_extension = node.GetAttribute(_T("Extension"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
static const ExtensionTable table;
|
||||
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("Extension"), m_extension);
|
||||
oAttr.Write(_T("ContentType"), table[m_extension]);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Default"), oAttr);
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Default;
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const CString& rhs) const
|
||||
{
|
||||
return m_extension == rhs;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_extension;
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "Default.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class DefaultTable : public WritingVector<Default>
|
||||
{
|
||||
public:
|
||||
DefaultTable()
|
||||
{
|
||||
m_items.push_back(Default(_T("rels")));
|
||||
m_items.push_back(Default(_T("xml")));
|
||||
}
|
||||
virtual ~DefaultTable()
|
||||
{
|
||||
}
|
||||
explicit DefaultTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const DefaultTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.LoadArray(_T("Default"), m_items);
|
||||
}
|
||||
|
||||
public:
|
||||
void add(const OOX::CPath& path)
|
||||
{
|
||||
CString ext = path.GetExtention();
|
||||
const CString extension = ext.Mid(1);
|
||||
|
||||
size_t nCount = m_items.size();
|
||||
size_t nIndex = 0;
|
||||
|
||||
while (nIndex < nCount)
|
||||
{
|
||||
if (m_items[nIndex] == extension)
|
||||
break;
|
||||
++nIndex;
|
||||
}
|
||||
|
||||
if (nIndex == nCount)
|
||||
m_items.push_back(Default(extension));
|
||||
}
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_CONTENT)TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include <map>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class ExtensionTable
|
||||
{
|
||||
public:
|
||||
ExtensionTable()
|
||||
{
|
||||
m_table.insert( std::pair<CString,CString>( _T("gif"), _T("image/gif")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("png"), _T("image/png")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("tif"), _T("image/tiff")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("tiff"), _T("image/tiff")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("jpeg"), _T("image/jpeg")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("jpg"), _T("image/jpeg")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("jpe"), _T("image/jpeg")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("jfif"), _T("image/jpeg")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("rels"), _T("application/vnd.openxmlformats-package.relationships+xml")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("bin"), _T("application/vnd.openxmlformats-officedocument.oleObject")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("xml"), _T("application/xml")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("emf"), _T("image/x-emf")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("emz"), _T("image/x-emz")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("wmf"), _T("image/x-wmf")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("svm"), _T("image/svm")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("wav"), _T("audio/wav")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("xls"), _T("application/vnd.ms-excel")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("xlsm"), _T("application/vnd.ms-excel.sheet.macroEnabled.12")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("xlsb"), _T("application/vnd.ms-excel.sheet.binary.macroEnabled.12")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("xlsx"), _T("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("ppt"), _T("application/vnd.ms-powerpoint")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("pptm"), _T("application/vnd.ms-powerpoint.presentation.macroEnabled.12")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("pptx"), _T("application/vnd.openxmlformats-officedocument.presentationml.presentation")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("sldm"), _T("application/vnd.ms-powerpoint.slide.macroEnabled.12")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("sldx"), _T("application/vnd.openxmlformats-officedocument.presentationml.slide")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("doc"), _T("application/msword")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("docm"), _T("aapplication/vnd.ms-word.document.macroEnabled.12")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("docx"), _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document")));
|
||||
m_table.insert( std::pair<CString,CString>( _T("vml"), _T("application/vnd.openxmlformats-officedocument.vmlDrawing")));
|
||||
}
|
||||
const CString operator[] (const CString& extension) const
|
||||
{
|
||||
std::map<CString, CString>::const_iterator it = m_table.find(extension);
|
||||
if (it == m_table.end())
|
||||
return _T("");
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<CString, CString> m_table;
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
73
ASCOfficePPTXFile/PPTXFormat/DocxFormat/ContentTypes/File.h
Normal file
73
ASCOfficePPTXFile/PPTXFormat/DocxFormat/ContentTypes/File.h
Normal file
@ -0,0 +1,73 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
|
||||
#include "OverrideTable.h"
|
||||
#include "DefaultTable.h"
|
||||
#include "./../FileType.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
static const OOX::CPath s_filename (_T("[Content_Types].xml"));
|
||||
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File()
|
||||
{
|
||||
}
|
||||
File(const OOX::CPath& path)
|
||||
{
|
||||
read(path);
|
||||
}
|
||||
virtual ~File()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& path)
|
||||
{
|
||||
OOX::CPath oPath = path / s_filename;
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile(oPath.m_strFilename))
|
||||
{
|
||||
Default = oNode;
|
||||
Override = oNode;
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& path) const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns"), _T("http://schemas.openxmlformats.org/package/2006/content-types"));
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(Default);
|
||||
oValue.Write(Override);
|
||||
|
||||
OOX::CPath savepath = path / s_filename;
|
||||
|
||||
XmlUtils::SaveToFile(savepath.m_strFilename, XmlUtils::CreateNode(_T("Types"), oAttr, oValue));
|
||||
}
|
||||
virtual const bool isValid() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const CString& type, const OOX::CPath& directory, const OOX::CPath& filename)
|
||||
{
|
||||
Override.add(type, directory / filename.m_strFilename);
|
||||
Default.add(directory / filename.m_strFilename);
|
||||
}
|
||||
|
||||
public:
|
||||
OverrideTable Override;
|
||||
DefaultTable Default;
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // DOCX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class Override : public WritingElement
|
||||
{
|
||||
public:
|
||||
Override()
|
||||
{
|
||||
}
|
||||
Override(const CString& type, const OOX::CPath& path) : m_type(type), m_part(path)
|
||||
{
|
||||
}
|
||||
virtual ~Override()
|
||||
{
|
||||
}
|
||||
explicit Override(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const Override& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_part = node.GetAttribute(_T("PartName"));
|
||||
m_type = node.GetAttribute(_T("ContentType"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("PartName"), _T("/") + m_part.m_strFilename);
|
||||
oAttr.Write(_T("ContentType"), m_type);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Override"), oAttr);
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Override;
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE const CString type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
AVSINLINE const OOX::CPath filename() const
|
||||
{
|
||||
return m_part;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_type;
|
||||
OOX::CPath m_part;
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#ifndef OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "Override.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class OverrideTable : public WritingVector<Override>
|
||||
{
|
||||
public:
|
||||
OverrideTable()
|
||||
{
|
||||
}
|
||||
virtual ~OverrideTable()
|
||||
{
|
||||
}
|
||||
explicit OverrideTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const OverrideTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.LoadArray(_T("Override"), m_items);
|
||||
}
|
||||
|
||||
public:
|
||||
void add(const CString& type, const OOX::CPath& path)
|
||||
{
|
||||
m_items.push_back(Override(type, path));
|
||||
}
|
||||
};
|
||||
} // namespace ContentTypes
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
51
ASCOfficePPTXFile/PPTXFormat/DocxFormat/DateTime.h
Normal file
51
ASCOfficePPTXFile/PPTXFormat/DocxFormat/DateTime.h
Normal file
@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
#ifndef OOX_DATE_TIME_INCLUDE_H_
|
||||
#define OOX_DATE_TIME_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Utility/Utility.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class DateTime
|
||||
{
|
||||
public:
|
||||
DateTime()
|
||||
{
|
||||
}
|
||||
explicit DateTime(const CString& value) : m_datetime(value, s_pattern)
|
||||
{
|
||||
}
|
||||
explicit DateTime(const ::DateTime& dt) : m_datetime(dt)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
CString ToString() const
|
||||
{
|
||||
return m_datetime.ToString(s_pattern);
|
||||
}
|
||||
static DateTime Parse(const CString& value)
|
||||
{
|
||||
return DateTime(value);
|
||||
}
|
||||
|
||||
public:
|
||||
::DateTime& datetime()
|
||||
{
|
||||
return m_datetime;
|
||||
}
|
||||
const ::DateTime& datetime() const
|
||||
{
|
||||
return m_datetime;
|
||||
}
|
||||
|
||||
private:
|
||||
static const CString s_pattern;
|
||||
::DateTime m_datetime;
|
||||
};
|
||||
|
||||
const CString DateTime::s_pattern = _T("%YYYY-%MM-%DDT%hh:%mm:%ssZ");
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_DATE_TIME_INCLUDE_H_
|
||||
@ -0,0 +1,526 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LegacyDiagramText_INCLUDE_H_
|
||||
#define PPTX_LegacyDiagramText_INCLUDE_H_
|
||||
|
||||
#include "../File.h"
|
||||
#include "../../../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
#include "../../Logic/TextParagraphPr.h"
|
||||
#include "../../Logic/Colors/SrgbClr.h"
|
||||
#include <string>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class LegacyDiagramText : public File
|
||||
//[MS-PPT] Section 2.9.1; DocumentTextInfoContainer
|
||||
{
|
||||
public:
|
||||
LegacyDiagramText()
|
||||
{
|
||||
m_Data = 0;
|
||||
m_DataSize = 0;
|
||||
}
|
||||
LegacyDiagramText(const OOX::CPath& filename)
|
||||
{
|
||||
m_Data = 0;
|
||||
m_DataSize = 0;
|
||||
|
||||
read(filename);
|
||||
}
|
||||
virtual ~LegacyDiagramText()
|
||||
{
|
||||
if (m_Data)delete []m_Data;
|
||||
m_Data = NULL;
|
||||
m_DataSize =0;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename)
|
||||
{
|
||||
if (m_Data)delete []m_Data;
|
||||
m_Data = NULL;
|
||||
m_DataSize =0;
|
||||
|
||||
CFile file;
|
||||
if (file.OpenFile(filename.GetPath()) == S_OK)
|
||||
{
|
||||
m_DataSize = file.GetFileSize();
|
||||
m_Data = new BYTE[m_DataSize];
|
||||
|
||||
if (m_Data)
|
||||
{
|
||||
file.ReadFile(m_Data, m_DataSize);
|
||||
}
|
||||
|
||||
file.CloseFile();
|
||||
}
|
||||
|
||||
Parse();
|
||||
// todooo .. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <a:p>...</a:p><a:p>...</a:p>...<a:p>...</a:p>
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> doc_LoadShape (ASCOfficeDrawingConvert.cpp)
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
}
|
||||
|
||||
LegacyDiagramText& operator=(const LegacyDiagramText& oSrc)
|
||||
{
|
||||
m_Text = oSrc.m_Text;
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::LegacyDiagramText;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
|
||||
CString m_Text;
|
||||
|
||||
std::vector<PPTX::Logic::RunProperties> m_arrRPr;
|
||||
std::vector<PPTX::Logic::TextParagraphPr> m_arrPPr;
|
||||
private:
|
||||
BYTE* m_Data;
|
||||
int m_DataSize;
|
||||
|
||||
struct SRecordHeader
|
||||
{
|
||||
_UINT16 RecVer_Inst;
|
||||
_UINT16 RecType;
|
||||
_UINT32 RecLen;
|
||||
};
|
||||
|
||||
void Parse()
|
||||
{
|
||||
_UINT32 typeText =0;
|
||||
int pos = 8; //skip first main header
|
||||
while (pos < m_DataSize - 8)
|
||||
{
|
||||
SRecordHeader rec = *(SRecordHeader*)(m_Data + pos);
|
||||
pos += 8;
|
||||
switch (rec.RecType)
|
||||
{
|
||||
case 0x0F9F: //TextHeaderAtom
|
||||
{
|
||||
typeText = *(_UINT32*)(m_Data + pos);
|
||||
|
||||
//Tx_TYPE_TITLE 0x00000000 Title placeholder shape text.
|
||||
//Tx_TYPE_BODY 0x00000001 Body placeholder shape text.
|
||||
//Tx_TYPE_NOTES 0x00000002 Notes placeholder shape text.
|
||||
//Tx_TYPE_OTHER 0x00000004 Any other text.
|
||||
//Tx_TYPE_CENTERBODY 0x00000005 Center body placeholder shape text.
|
||||
//Tx_TYPE_CENTERTITLE 0x00000006 Center title placeholder shape text.
|
||||
//Tx_TYPE_HALFBODY 0x00000007 Half-sized body placeholder shape text.
|
||||
//Tx_TYPE_QUARTERBODY 0x00000008 Quarter-sized body placeholder shape text.
|
||||
}break;
|
||||
case 0x0FA0: //TextCharsAtom
|
||||
{
|
||||
int lSize = rec.RecLen /2;
|
||||
if (sizeof(wchar_t) == 4)
|
||||
{
|
||||
wchar_t * sBuffer = new wchar_t[lSize + 1];
|
||||
memset(sBuffer, 0, (lSize + 1)* sizeof(wchar_t));
|
||||
|
||||
UTF16* pStrUtf16 = (UTF16 *) (m_Data+pos);
|
||||
UTF32 *pStrUtf32 = (UTF32 *) sBuffer;
|
||||
|
||||
// this values will be modificated
|
||||
const UTF16 *pStrUtf16_Conv = pStrUtf16;
|
||||
UTF32 *pStrUtf32_Conv = pStrUtf32;
|
||||
|
||||
ConversionResult eUnicodeConversionResult =
|
||||
ConvertUTF16toUTF32 (&pStrUtf16_Conv
|
||||
, &pStrUtf16[lSize]
|
||||
, &pStrUtf32_Conv
|
||||
, &pStrUtf32 [lSize]
|
||||
, strictConversion);
|
||||
|
||||
if (conversionOK == eUnicodeConversionResult)
|
||||
{
|
||||
m_Text = CString((WCHAR*)sBuffer, lSize);
|
||||
|
||||
}
|
||||
delete []sBuffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Text = CString((wchar_t*)(m_Data+pos), lSize);
|
||||
}
|
||||
}break;
|
||||
case 0x0FA8: //TextBytesAtom
|
||||
{
|
||||
std::string strAnsi = std::string((char*)m_Data+pos, rec.RecLen);
|
||||
std::wstring strUnicode(strAnsi.begin(), strAnsi.end());
|
||||
m_Text = std_string2string(strUnicode);
|
||||
}break;
|
||||
case 0x0FA1: //StyleTextPropAtom
|
||||
{
|
||||
//rgTextPFRun (variable)
|
||||
//rgTextCFRun (variable)
|
||||
|
||||
ParseTextProps(m_Data + pos, rec.RecLen, m_Text.GetLength());
|
||||
}break;
|
||||
case 0x0FAA: //TextSpecialInfoAtom
|
||||
{
|
||||
//TextSIRun
|
||||
_UINT32 size = *(_UINT32*)(m_Data + pos);
|
||||
if (size > 0)
|
||||
{
|
||||
//TextSIExceptions ... variable
|
||||
//lang, bidi, spelling
|
||||
}
|
||||
}break;
|
||||
}
|
||||
pos += rec.RecLen;
|
||||
|
||||
}
|
||||
}
|
||||
void ParseTextProps(BYTE* Data, int size, int count_text)
|
||||
{
|
||||
int pos = 0;
|
||||
int count_all = 0;
|
||||
|
||||
while (count_all < count_text + 1)
|
||||
{
|
||||
PPTX::Logic::TextParagraphPr elm;
|
||||
m_arrPPr.push_back(elm);
|
||||
|
||||
int count = 0;
|
||||
|
||||
pos += ParseParaProps(m_arrPPr.back(), Data + pos, size - pos, count);
|
||||
count_all += count;
|
||||
}
|
||||
|
||||
count_all = 0;
|
||||
while (count_all < count_text + 1)
|
||||
{
|
||||
PPTX::Logic::RunProperties elm;
|
||||
m_arrRPr.push_back(elm);
|
||||
|
||||
int count = 0;
|
||||
pos += ParseRunProps(m_arrRPr.back(), Data + pos, size - pos, count);
|
||||
count_all += count;
|
||||
}
|
||||
}
|
||||
|
||||
int ParseParaProps(PPTX::Logic::TextParagraphPr& props, BYTE* Data, int size, int & count)
|
||||
{
|
||||
int pos=0;
|
||||
count = *(_UINT32*)(Data + pos); pos += 4;
|
||||
|
||||
int m_lLevel = *(_UINT16*)(Data + pos); pos += 2;
|
||||
|
||||
if (m_lLevel > 0x0004)
|
||||
m_lLevel = 0x0004;
|
||||
|
||||
|
||||
DWORD dwFlags = *(_UINT32*)(Data + pos); pos += 4;
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
BYTE flag4 = (BYTE)(dwFlags >> 24);
|
||||
|
||||
bool hasBullet_ = (0x01 == (0x01 & flag1));
|
||||
bool bulletHasFont_ = (0x02 == (0x02 & flag1));
|
||||
bool bulletHasColor_ = (0x04 == (0x04 & flag1));
|
||||
bool bulletHasSize_ = (0x08 == (0x08 & flag1));
|
||||
|
||||
bool bulletFontRef_ = (0x10 == (0x10 & flag1));
|
||||
bool bulletColor_ = (0x20 == (0x20 & flag1));
|
||||
bool bulletSize_ = (0x40 == (0x40 & flag1));
|
||||
bool bulletChar_ = (0x80 == (0x80 & flag1));
|
||||
|
||||
bool leftMargin_ = (0x01 == (0x01 & flag2));
|
||||
// reserved
|
||||
bool indent_ = (0x04 == (0x04 & flag2));
|
||||
bool textAlignment_ = (0x08 == (0x08 & flag2));
|
||||
bool lineSpacing_ = (0x10 == (0x10 & flag2));
|
||||
bool spaceBefore_ = (0x20 == (0x20 & flag2));
|
||||
bool spaceAfter_ = (0x40 == (0x40 & flag2));
|
||||
bool defaultTabSize_ = (0x80 == (0x80 & flag2));
|
||||
|
||||
bool fontAlign_ = (0x01 == (0x01 & flag3));
|
||||
bool charWrap_ = (0x02 == (0x02 & flag3));
|
||||
bool wordWrap_ = (0x04 == (0x04 & flag3));
|
||||
bool overflow_ = (0x08 == (0x08 & flag3));
|
||||
bool tabStops_ = (0x10 == (0x10 & flag3));
|
||||
bool textDirection_ = (0x20 == (0x20 & flag3));
|
||||
//reserved
|
||||
bool bulletBlip_ = (0x80 == (0x80 & flag3));
|
||||
|
||||
bool bulletScheme_ = (0x01 == (0x01 & flag4));
|
||||
bool bulletHasScheme_ = (0x02 == (0x02 & flag4));
|
||||
|
||||
BOOL Bulleted = FALSE;
|
||||
if (hasBullet_ || bulletHasFont_ || bulletHasColor_ || bulletHasSize_)
|
||||
{
|
||||
WORD bulletFlag = *(_UINT16*)(Data + pos); pos += 2;
|
||||
if (bulletFlag & 0x0F)
|
||||
Bulleted = (BOOL)(0x01 == (bulletFlag & 0x01));
|
||||
else
|
||||
Bulleted = (BOOL)FALSE;
|
||||
}
|
||||
//todooo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> align
|
||||
if (bulletChar_)
|
||||
{
|
||||
Logic::BuChar *buChar = new Logic::BuChar();
|
||||
buChar->Char = (WCHAR)(*(_UINT16*)(Data + pos)); pos += 2;
|
||||
props.ParagraphBullet.m_Bullet = buChar;
|
||||
}
|
||||
if (bulletFontRef_)
|
||||
{
|
||||
_UINT16 buTypeface = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
if (bulletSize_)
|
||||
{
|
||||
Logic::BuSzPts * sz = new Logic::BuSzPts();
|
||||
sz->val = *(_UINT16*)(Data + pos); pos += 2;
|
||||
props.buSize.m_Size = sz;
|
||||
}
|
||||
if (bulletColor_)
|
||||
{
|
||||
Logic::BuClr *bu_color = new Logic::BuClr();
|
||||
|
||||
BYTE R = *(Data + pos); pos += 1;
|
||||
BYTE G = *(Data + pos); pos += 1;
|
||||
BYTE B = *(Data + pos); pos += 1;
|
||||
BYTE Index = *(Data + pos); pos += 1;
|
||||
//buColor
|
||||
|
||||
if (Index < 10)
|
||||
{
|
||||
//NSPresentationEditor::CorrectColorPPT(Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Logic::SrgbClr *color = new Logic::SrgbClr();
|
||||
|
||||
color->SetRGB(R, G, B);
|
||||
bu_color->Color.Color = color;
|
||||
}
|
||||
props.buColor.m_Color = bu_color;
|
||||
}
|
||||
if (textAlignment_)
|
||||
{
|
||||
int ppt_align = *(_UINT16*)(Data + pos); pos += 2;
|
||||
int pptx_align = 0;
|
||||
switch(ppt_align)
|
||||
{
|
||||
case 0: pptx_align = 4; break;//l
|
||||
case 1: pptx_align = 0; break;//ctr
|
||||
case 2: pptx_align = 5; break;//r
|
||||
case 3: pptx_align = 2; break;//just
|
||||
case 4: pptx_align = 1; break;//dist
|
||||
case 5: pptx_align = 6; break;//thaiDist
|
||||
case 6: pptx_align = 3; break;//justLow
|
||||
}
|
||||
props.algn = pptx_align;
|
||||
}
|
||||
if (lineSpacing_)
|
||||
{
|
||||
PPTX::Logic::TextSpacing s;
|
||||
s.spcPts = *(_INT16*)(Data + pos); pos += 2;
|
||||
props.lnSpc = s;
|
||||
}
|
||||
|
||||
if (spaceBefore_)
|
||||
{
|
||||
PPTX::Logic::TextSpacing s;
|
||||
s.spcPts = *(_INT16*)(Data + pos); pos += 2;
|
||||
props.spcBef= s;
|
||||
}
|
||||
|
||||
if (spaceAfter_)
|
||||
{
|
||||
PPTX::Logic::TextSpacing s;
|
||||
s.spcPts = *(_INT16*)(Data + pos); pos += 2;
|
||||
props.spcAft = s;
|
||||
}
|
||||
|
||||
if (leftMargin_)
|
||||
{
|
||||
props.marL = *(_INT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (indent_)
|
||||
{
|
||||
props.indent = *(_INT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (defaultTabSize_)
|
||||
{
|
||||
props.defTabSz = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (tabStops_)
|
||||
{
|
||||
WORD tabStopsCount = *(_UINT16*)(Data + pos); pos += 2;
|
||||
props.tabLst.clear();
|
||||
|
||||
if (tabStopsCount > 10)
|
||||
tabStopsCount = 10;
|
||||
|
||||
for (int i = 0; i < (int)tabStopsCount; ++i)
|
||||
{
|
||||
PPTX::Logic::Tab tab;
|
||||
tab.pos = *(_UINT32*)(Data + pos); pos += 4;
|
||||
props.tabLst.push_back(tab);
|
||||
}
|
||||
|
||||
if (0 < props.tabLst.size())
|
||||
props.defTabSz = props.tabLst[0].pos;
|
||||
}
|
||||
|
||||
if (fontAlign_)
|
||||
{
|
||||
props.fontAlgn = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (charWrap_ || wordWrap_ || overflow_)
|
||||
{
|
||||
int wrapFlags = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (textDirection_)
|
||||
{
|
||||
int textDirection = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
int ParseRunProps(PPTX::Logic::RunProperties& props, BYTE* Data, int size, int & count)
|
||||
{
|
||||
int pos = 0;
|
||||
count = *(_UINT32*)(Data + pos); pos += 4;
|
||||
|
||||
DWORD dwFlags = *(_UINT32*)(Data + pos); pos += 4;
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
BYTE flag4 = (BYTE)(dwFlags >> 24);
|
||||
|
||||
bool hasBold = (0x01 == (0x01 & flag1));
|
||||
bool hasItalic = (0x02 == (0x02 & flag1));
|
||||
bool hasUnderline = (0x04 == (0x04 & flag1));
|
||||
// unused
|
||||
bool hasShadow = (0x10 == (0x10 & flag1));
|
||||
bool hasFehint = (0x20 == (0x20 & flag1));
|
||||
// unused
|
||||
bool hasKimi = (0x80 == (0x80 & flag1));
|
||||
|
||||
// unused
|
||||
bool hasEmboss = (0x02 == (0x02 & flag2));
|
||||
// unused
|
||||
BYTE hasStyle = ((0x3C & flag2) >> 2);
|
||||
// unused
|
||||
|
||||
bool typeface_ = (0x01 == (0x01 & flag3));
|
||||
bool size_ = (0x02 == (0x02 & flag3));
|
||||
bool color_ = (0x04 == (0x04 & flag3));
|
||||
bool BaseLineOffset_ = (0x08 == (0x08 & flag3));
|
||||
bool EAFontRef_ = (0x20 == (0x20 & flag3));
|
||||
bool AnsiFontRef_ = (0x40 == (0x40 & flag3));
|
||||
bool SymbolFontRef_ = (0x80 == (0x80 & flag3));
|
||||
|
||||
bool hasNewEATypeface = (0x01 == (0x01 & flag4));
|
||||
bool hasCsTypeface = (0x02 == (0x02 & flag4));
|
||||
bool hasPp11ext = (0x04 == (0x04 & flag4));
|
||||
|
||||
bool bIsFontStylePresent = (hasBold || hasItalic || hasUnderline || hasShadow ||
|
||||
hasFehint || hasKimi || hasEmboss || hasStyle != 0);
|
||||
|
||||
//todooo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> sz, color
|
||||
if (bIsFontStylePresent)
|
||||
{
|
||||
WORD fontStyle = *(_UINT16*)(Data + pos); pos += 2;
|
||||
|
||||
if (0x01 == (0x01 & fontStyle))
|
||||
props.b = (BOOL)TRUE;
|
||||
if (0x02 == (0x02 & fontStyle))
|
||||
props.i = (BOOL)TRUE;
|
||||
if (0x04 == (0x04 & fontStyle))
|
||||
props.u = Limit::TextUnderline();
|
||||
if (0x10 == (0x10 & fontStyle))
|
||||
props.u = Limit::TextUnderline();
|
||||
}
|
||||
|
||||
_UINT32 Typeface;
|
||||
_UINT16 EAFontRef, AnsiFontRef, SymbolFontRef;
|
||||
|
||||
if (typeface_)
|
||||
{
|
||||
Typeface = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (EAFontRef_)
|
||||
{
|
||||
EAFontRef = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (AnsiFontRef_)
|
||||
{
|
||||
AnsiFontRef = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
|
||||
if (SymbolFontRef_)
|
||||
{
|
||||
SymbolFontRef = *(_UINT16*)(Data + pos); pos += 2;
|
||||
}
|
||||
if (size_)
|
||||
{
|
||||
props.sz = *(_UINT16*)(Data + pos) * 100 ; pos += 2;
|
||||
}
|
||||
|
||||
if (color_)
|
||||
{
|
||||
Logic::SolidFill *fill = new Logic::SolidFill();
|
||||
|
||||
BYTE R = *(Data + pos); pos += 1;
|
||||
BYTE G = *(Data + pos); pos += 1;
|
||||
BYTE B = *(Data + pos); pos += 1;
|
||||
BYTE Index = *(Data + pos); pos += 1;
|
||||
|
||||
if (Index < 10)
|
||||
{
|
||||
//NSPresentationEditor::CorrectColorPPT(Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logic::SrgbClr *color = new Logic::SrgbClr();
|
||||
|
||||
color->SetRGB(R, G, B);
|
||||
fill->Color.Color = color;
|
||||
}
|
||||
|
||||
props.Fill.Fill = fill;
|
||||
props.Fill.m_type = Logic::UniFill::solidFill;
|
||||
}
|
||||
|
||||
if (BaseLineOffset_)
|
||||
{
|
||||
int BaseLineOffset = (double)(*(_UINT16*)(Data + pos)); pos += 2;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>????
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LegacyDiagramText_INCLUDE_H_
|
||||
280
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Drawing/VmlDrawing.h
Normal file
280
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Drawing/VmlDrawing.h
Normal file
@ -0,0 +1,280 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_VMLDRAWING_INCLUDE_H_
|
||||
#define PPTX_VMLDRAWING_INCLUDE_H_
|
||||
|
||||
#include "../../WrapperFile.h"
|
||||
#include "../../FileContainer.h"
|
||||
|
||||
#include "../RId.h"
|
||||
#include "../../../../Common/DocxFormat/Source/DocxFormat/Logic/Vml.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class VmlDrawing : public WrapperFile, public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
VmlDrawing()
|
||||
{
|
||||
}
|
||||
VmlDrawing(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read( filename, map);
|
||||
|
||||
m_sFilename = filename.GetPath();
|
||||
}
|
||||
virtual ~VmlDrawing()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
//FileContainer::read(filename, map);
|
||||
|
||||
//так как это не совсем xml - поправим
|
||||
|
||||
CFile file;
|
||||
if (file.OpenFile(filename.GetPath()) != S_OK) return;
|
||||
int DataSize = file.GetFileSize();
|
||||
BYTE* Data = new BYTE[DataSize];
|
||||
|
||||
std::wstring fileContent;
|
||||
if (Data)
|
||||
{
|
||||
file.ReadFile(Data,DataSize);
|
||||
fileContent = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8(Data,DataSize);
|
||||
|
||||
delete []Data;
|
||||
}
|
||||
file.CloseFile();
|
||||
|
||||
if (fileContent.length() > 0)
|
||||
{
|
||||
// элементы вида <br> без </br>
|
||||
// test_vml4.xlsx
|
||||
replace_all(fileContent, _T("<br>"), _T(""));
|
||||
|
||||
|
||||
// элементы вида <![if ...]>, <![endif]>
|
||||
// Zigmunds.pptx
|
||||
while(true)
|
||||
{
|
||||
int res1 = fileContent.find(_T("<!["));
|
||||
if (res1 < 0) break;
|
||||
|
||||
int res2 = fileContent.find(_T(">"), res1);
|
||||
|
||||
if (res1 >=0 && res2>=0)
|
||||
{
|
||||
fileContent = fileContent.erase(res1 ,res2 - res1 + 1);
|
||||
}
|
||||
}
|
||||
read(fileContent);
|
||||
}
|
||||
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = false;
|
||||
|
||||
//m_WrittenFileName = filename.GetFilename();
|
||||
//FileContainer::write(filename, directory, content);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::VmlDrawing;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
CString m_sFilename;
|
||||
std::map<CString,CString> m_mapShapesXml; //связь id (_x0000_s1025) с xml для OfficeDrawing
|
||||
|
||||
private:
|
||||
|
||||
void replace_all(std::wstring& subject, const std::wstring search, const std::wstring replace)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while ((pos = subject.find(search, pos)) != std::string::npos) {
|
||||
subject.replace(pos, search.length(), replace);
|
||||
pos += replace.length();
|
||||
}
|
||||
}
|
||||
void read(std::wstring & fileContent)
|
||||
{
|
||||
XmlUtils::CXmlLiteReader oReader;
|
||||
|
||||
if ( !oReader.FromString( fileContent))
|
||||
return;
|
||||
|
||||
if ( !oReader.ReadNextNode() )
|
||||
return;
|
||||
|
||||
CString sName1 = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
if ( _T("xml") == sName1 )
|
||||
{
|
||||
//ReadAttributes( oReader );
|
||||
|
||||
CString elementContent;
|
||||
bool bReadyElement = false;//собираем все до нахождения собственно элемента
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
{
|
||||
int nStylesDepth = oReader.GetDepth();
|
||||
while ( oReader.ReadNextSiblingNode( nStylesDepth ) )//
|
||||
{
|
||||
CString NodeContent = oReader.GetOuterXml();
|
||||
|
||||
CString strXml = _T("<xml xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
|
||||
xmlns:p=\"urn:schemas-microsoft-com:office:powerpoint\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:oa=\"urn:schemas-microsoft-com:office:activation\">");
|
||||
strXml.Append(NodeContent);
|
||||
strXml.Append(_T("</xml>"));
|
||||
|
||||
XmlUtils::CXmlLiteReader oSubReader;//нам нужны xml //и сами объекты
|
||||
|
||||
if (oSubReader.FromString(strXml) == false) continue;
|
||||
oSubReader.ReadNextNode();
|
||||
|
||||
OOX::WritingElement *pItem = NULL;
|
||||
|
||||
int nStylesDepth1 = oSubReader.GetDepth();
|
||||
while ( oSubReader.ReadNextSiblingNode( nStylesDepth1 ) )//
|
||||
{
|
||||
CWCharWrapper sName = oSubReader.GetName();
|
||||
switch (sName[0])// вынесены только объекты ..
|
||||
{
|
||||
case 'v':
|
||||
{
|
||||
wchar_t wChar2 = sName[2]; // v:_
|
||||
switch ( wChar2 )
|
||||
{
|
||||
case 'a':
|
||||
if ( _T("v:arc") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CArc(oSubReader);
|
||||
bReadyElement = true;
|
||||
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
if ( _T("v:curve") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CCurve(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'g':
|
||||
if ( _T("v:group") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CGroup(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
if ( _T("v:image") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CImage( oSubReader );
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
if ( _T("v:line") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CLine(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
if ( _T("v:oval") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::COval(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
if ( _T("v:polyline") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CPolyLine(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
if ( _T("v:rect") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CRect(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
else if ( _T("v:roundrect") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CRoundRect(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if ( _T("v:shape") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CShape(oSubReader);
|
||||
bReadyElement = true;
|
||||
}
|
||||
else if ( _T("v:shapetype") == sName )
|
||||
{
|
||||
pItem = new OOX::Vml::CShapeType(oSubReader);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
elementContent += NodeContent;
|
||||
if ( pItem )
|
||||
{
|
||||
//m_arrItems.push_back( pItem );
|
||||
|
||||
OOX::Vml::CVmlCommonElements* common = dynamic_cast<OOX::Vml::CVmlCommonElements*>(pItem);
|
||||
CString sSpid;
|
||||
|
||||
if (common)
|
||||
{
|
||||
if (common->m_sSpId.IsInit()) sSpid = *common->m_sSpId;
|
||||
else if (common->m_sId.IsInit())sSpid = *common->m_sId;
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::Vml::CGroup *group = dynamic_cast<OOX::Vml::CGroup*>(pItem);
|
||||
if (group)
|
||||
{
|
||||
if (group->m_sSpId.IsInit()) sSpid = *group->m_sSpId;
|
||||
else if (group->m_sId.IsInit()) sSpid = *group->m_sId;
|
||||
}
|
||||
}
|
||||
if (bReadyElement)
|
||||
{
|
||||
if (sSpid.GetLength() > 0)
|
||||
{
|
||||
//m_mapShapes.insert(std::pair<CString,int>(sSpid, m_arrItems.size()-1));
|
||||
|
||||
m_mapShapesXml.insert(std::pair<CString,CString>(sSpid,elementContent));
|
||||
}
|
||||
elementContent = _T("");
|
||||
bReadyElement = false;
|
||||
}
|
||||
delete pItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_VmlDrawingS_VmlDrawing_INCLUDE_H_
|
||||
45
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/External.h
vendored
Normal file
45
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/External.h
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#ifndef OOX_EXTERNAL_INCLUDE_H_
|
||||
#define OOX_EXTERNAL_INCLUDE_H_
|
||||
|
||||
#include "../File.h"
|
||||
#include "../FileTypes.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class External : public File
|
||||
{
|
||||
public:
|
||||
External()
|
||||
{
|
||||
}
|
||||
External(const OOX::CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~External()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& uri)
|
||||
{
|
||||
m_uri = uri;
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE OOX::CPath Uri() const
|
||||
{
|
||||
return m_uri;
|
||||
}
|
||||
|
||||
protected:
|
||||
OOX::CPath m_uri;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_EXTERNAL_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalAudio.h
vendored
Normal file
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalAudio.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
#define OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class ExternalAudio : public External
|
||||
{
|
||||
public:
|
||||
ExternalAudio()
|
||||
{
|
||||
}
|
||||
ExternalAudio(const OOX::CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalAudio()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalAudio;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalImage.h
vendored
Normal file
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalImage.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
#define OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class ExternalImage : public External
|
||||
{
|
||||
public:
|
||||
ExternalImage()
|
||||
{
|
||||
}
|
||||
ExternalImage(const OOX::CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalImage()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalImage;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalVideo.h
vendored
Normal file
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalVideo.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
#define OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class ExternalVideo : public External
|
||||
{
|
||||
public:
|
||||
ExternalVideo()
|
||||
{
|
||||
}
|
||||
ExternalVideo(const OOX::CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalVideo()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalVideo;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/HyperLink.h
vendored
Normal file
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/HyperLink.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef OOX_HYPERLINK_INCLUDE_H_
|
||||
#define OOX_HYPERLINK_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class HyperLink : public External
|
||||
{
|
||||
public:
|
||||
HyperLink()
|
||||
{
|
||||
}
|
||||
HyperLink(const OOX::CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~HyperLink()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::HyperLink;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_HYPERLINK_INCLUDE_H_
|
||||
30
ASCOfficePPTXFile/PPTXFormat/DocxFormat/File.h
Normal file
30
ASCOfficePPTXFile/PPTXFormat/DocxFormat/File.h
Normal file
@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#ifndef OOX_FILE_INCLUDE_H_
|
||||
#define OOX_FILE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/XML/XmlSimple.h"
|
||||
#include "../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
#include "FileType.h"
|
||||
#include "ContentTypes/File.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File(){}
|
||||
virtual ~File(){}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename) = 0;
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const = 0;
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const = 0;
|
||||
virtual const OOX::CPath DefaultDirectory() const = 0;
|
||||
virtual const OOX::CPath DefaultFileName() const = 0;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_FILE_INCLUDE_H_
|
||||
75
ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileType.h
Normal file
75
ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileType.h
Normal file
@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
#ifndef OOX_FILE_TYPE_INCLUDE_H_
|
||||
#define OOX_FILE_TYPE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class FileType
|
||||
{
|
||||
public:
|
||||
FileType(const OOX::CPath& defaultDirectory, const OOX::CPath& defaultFileName,
|
||||
const CString& overrideType,
|
||||
const CString& relationType) : m_defaultDirectory(defaultDirectory),
|
||||
m_defaultFileName(defaultFileName),
|
||||
m_overrideType(overrideType),
|
||||
m_relationType(relationType)
|
||||
{
|
||||
}
|
||||
|
||||
FileType(const WCHAR* defaultDirectory, const WCHAR* defaultFileName,
|
||||
const CString& overrideType,
|
||||
const CString& relationType) : m_defaultDirectory(defaultDirectory, false),
|
||||
m_defaultFileName(defaultFileName, false),
|
||||
m_overrideType(overrideType),
|
||||
m_relationType(relationType)
|
||||
{
|
||||
}
|
||||
|
||||
~FileType()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const FileType& rhs) const
|
||||
{
|
||||
return (m_relationType == rhs.m_relationType);
|
||||
}
|
||||
|
||||
public:
|
||||
inline const CString OverrideType() const
|
||||
{
|
||||
return m_overrideType;
|
||||
}
|
||||
inline const CString RelationType() const
|
||||
{
|
||||
return m_relationType;
|
||||
}
|
||||
inline const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return m_defaultDirectory;
|
||||
}
|
||||
inline const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return m_defaultFileName;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_overrideType;
|
||||
CString m_relationType;
|
||||
OOX::CPath m_defaultDirectory;
|
||||
OOX::CPath m_defaultFileName;
|
||||
};
|
||||
|
||||
static const bool operator ==(const CString& type, const FileType& file)
|
||||
{
|
||||
return (type == file.RelationType());
|
||||
}
|
||||
static const bool operator ==(const FileType& file, const CString& type)
|
||||
{
|
||||
return (file.RelationType() == type);
|
||||
}
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_FILE_TYPE_INCLUDE_H_
|
||||
257
ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileTypes.h
Normal file
257
ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileTypes.h
Normal file
@ -0,0 +1,257 @@
|
||||
#pragma once
|
||||
#ifndef OOX_FILE_TYPES_INCLUDE_H_
|
||||
#define OOX_FILE_TYPES_INCLUDE_H_
|
||||
|
||||
#include "FileType.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace FileTypes
|
||||
{
|
||||
const FileType App(L"docProps", L"app.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.extended-properties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"));
|
||||
|
||||
const FileType Core(L"docProps", L"core.xml",
|
||||
_T("application/vnd.openxmlformats-package.core-properties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"));
|
||||
|
||||
const FileType Document(L"word", L"document.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
|
||||
const FileType Theme(L"theme", L"theme.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.theme+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"));
|
||||
|
||||
const FileType Setting(L"", L"settings.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"));
|
||||
|
||||
const FileType FontTable(L"", L"fontTable.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"));
|
||||
|
||||
const FileType Style(L"", L"styles.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"));
|
||||
|
||||
const FileType Item(L"customXml", L"item.xml",
|
||||
_T("WARNING not implement"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"));
|
||||
|
||||
const FileType FootNote(L"", L"footnotes.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"));
|
||||
|
||||
const FileType EndNote(L"", L"endnotes.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"));
|
||||
|
||||
const FileType WebSetting(L"", L"webSettings.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"));
|
||||
|
||||
const FileType Header(L"", L"header.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"));
|
||||
|
||||
const FileType Footer(L"", L"footer.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"));
|
||||
|
||||
const FileType Numbering(L"", L"numbering.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"));
|
||||
|
||||
const FileType CustomXml(L"customXml", L"itemProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.customXmlProperties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps"));
|
||||
|
||||
const FileType HyperLink(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"));
|
||||
|
||||
const FileType ExternalImage(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"));
|
||||
|
||||
const FileType ExternalAudio(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"));
|
||||
|
||||
const FileType ExternalVideo(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"));
|
||||
|
||||
const FileType Image(L"media", L"image",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"));
|
||||
|
||||
const FileType Audio(L"media", L"audio",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"));
|
||||
|
||||
const FileType Video(L"media", L"video",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"));
|
||||
|
||||
const FileType Data(L"diagrams", L"data.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"));
|
||||
|
||||
const FileType DrawingDiag(L"diagrams", L"drawing.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramDrawing+xml"),
|
||||
_T("http://schemas.microsoft.com/office/2007/relationships/diagramDrawing"));
|
||||
|
||||
const FileType Layout(L"diagrams", L"layout.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"));
|
||||
|
||||
const FileType Colors(L"diagrams", L"colors.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"));
|
||||
|
||||
const FileType QuickStyle(L"diagrams", L"quickStyle.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle"));
|
||||
|
||||
const FileType Chart(L"charts", L"chart.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.chart+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficeExcelWorksheet(L"embeddings", L"Microsoft_Office_Excel_Worksheet.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcel_97_2003_Worksheet(L"embeddings", L"Microsoft_Office_Excel_97-2003_Worksheet.xls",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelBinaryWorksheet(L"embeddings", L"Microsoft_Office_Excel_Binary_Worksheet.xlsb",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelMacro_EnabledWorksheet(L"embeddings", L"Microsoft_Office_Excel_Macro-Enabled_Worksheet.xlsm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelChart(L"embeddings", L"Microsoft_Office_Excel_Chart.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficeWordDocument(L"embeddings", L"Microsoft_Office_Word_Document.docx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeWord_97_2003_Document(L"embeddings", L"Microsoft_Office_Word_97_-_2003_Document.doc",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficeWordMacro_EnabledDocument(L"embeddings", L"Microsoft_Office_Word_Macro-Enabled_Document.docm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficePowerPointPresentation(L"embeddings", L"Microsoft_Office_PowerPoint_Presentation.pptx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPoint_97_2003_Presentation(L"embeddings", L"Microsoft_Office_PowerPoint_97-2003_Presentation.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPointMacro_EnabledPresentation(L"embeddings", L"Microsoft_Office_PowerPoint_Macro-Enabled_Presentation.pptm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficePowerPointSlide(L"embeddings", L"Microsoft_Office_PowerPoint_Slide.sldx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPointMacro_EnabledSlide(L"embeddings", L"Microsoft_Office_PowerPoint_Macro-Enabled_Slide.sldm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType OleObject(L"embeddings", L"oleObject.bin",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType Glossary(L"glossary", L"document.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument"));
|
||||
|
||||
const FileType Slide(L"ppt/slides", L"slide.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slide+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"));
|
||||
|
||||
const FileType SlideLayout(L"ppt/slideLayouts", L"slideLayout.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"));
|
||||
|
||||
const FileType SlideComments(L"ppt/comments", L"comment.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.comment+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"));
|
||||
|
||||
const FileType CommentAuthors(L"ppt", L"commentAuthors.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.commentAuthors.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"));
|
||||
|
||||
const FileType SlideMaster(L"ppt/slideMasters", L"slideMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"));
|
||||
|
||||
const FileType NotesSlide(L"ppt/notesSlides", L"notesSlide.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"));
|
||||
|
||||
const FileType NotesMaster(L"ppt/notesMasters", L"notesMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"));
|
||||
|
||||
const FileType HandoutMaster(L"ppt/handoutMasters", L"handoutMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster"));
|
||||
|
||||
const FileType Presentation(L"ppt", L"presentation.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
|
||||
const FileType PresProps(L"ppt", L"presProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"));
|
||||
|
||||
const FileType TableStyles(L"ppt", L"tableStyles.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"));
|
||||
|
||||
const FileType ViewProps(L"ppt", L"viewProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"));
|
||||
|
||||
const FileType ThemePPTX(L"ppt/theme", L"theme.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.theme+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"));
|
||||
|
||||
const FileType VmlDrawing(L"ppt/drawings", L"vmlDrawing.vml",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"));
|
||||
|
||||
const FileType LegacyDiagramText(L"ppt/drawings", L"legacyDiagramText.bin",
|
||||
_T(""),
|
||||
_T("http://schemas.microsoft.com/office/2006/relationships/legacyDiagramText"));
|
||||
|
||||
const FileType Media(L"ppt/media", L"", _T(""), _T("http://schemas.microsoft.com/office/2007/relationships/media"));
|
||||
|
||||
|
||||
const FileType Unknow(L"", L"", _T(""), _T(""));
|
||||
|
||||
} // namespace FileTypes
|
||||
} // namespace OOX
|
||||
|
||||
#endif // OOX_FILE_TYPES_INCLUDE_H_
|
||||
22
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileBuilder.h
Normal file
22
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileBuilder.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#ifndef OOX_FILE_BUILDER_INCLUDE_H_
|
||||
#define OOX_FILE_BUILDER_INCLUDE_H_
|
||||
|
||||
#include "ContentTypes/File.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class IFileBuilder
|
||||
{
|
||||
public:
|
||||
IFileBuilder() {}
|
||||
virtual ~IFileBuilder() {}
|
||||
|
||||
public:
|
||||
virtual void Commit(const OOX::CPath& path) = 0;
|
||||
virtual void Finalize(const OOX::CPath& path, const OOX::CPath& directory, ContentTypes::File& content) = 0;
|
||||
};
|
||||
} // namespace OOX
|
||||
|
||||
#endif // OOX_FILE_BUILDER_INCLUDE_H_
|
||||
334
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.cpp
Normal file
334
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.cpp
Normal file
@ -0,0 +1,334 @@
|
||||
//#include "./stdafx.h"
|
||||
|
||||
#include "IFileContainer.h"
|
||||
#include "Rels/File.h"
|
||||
|
||||
#ifndef NODOCX
|
||||
//#include "FileFactory.h"
|
||||
#endif
|
||||
|
||||
#include "ContentTypes/File.h"
|
||||
#include "FileType.h"
|
||||
#include "External/External.h"
|
||||
#include "External/HyperLink.h"
|
||||
#include "Drawing/LegacyDiagramText.h"
|
||||
#include "Media/Image.h"
|
||||
#include "Media/OleObject.h"
|
||||
#include "FileTypes.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
UnknowTypeFile IFileContainer::unknow;
|
||||
|
||||
void IFileContainer::read(const OOX::CPath& filename)
|
||||
{
|
||||
PPTX::Rels::File rels(filename);
|
||||
read(rels, filename.GetDirectory());
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::read(const Rels::File& rels, const OOX::CPath& path)
|
||||
{
|
||||
#ifndef NODOCX
|
||||
/*BOOST_FOREACH(const PPTX::Rels::RelationShip& relation, *rels.Relations)
|
||||
{
|
||||
add(relation.rId(), PPTX::CreateFile(path, relation));
|
||||
}*/
|
||||
|
||||
size_t nCount = rels.Relations.m_items.size();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
add(rels.Relations.m_items[i].rId(), PPTX::CreateFile(path, rels.Relations.m_items[i]));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
PPTX::Rels::File rels;
|
||||
OOX::CPath current = filename.GetDirectory();
|
||||
write(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::write(Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
std::map<CString, size_t> namepair;
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = it->second;
|
||||
smart_ptr<PPTX::External> pExt = pFile.smart_dynamic_cast<PPTX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
std::map<CString, size_t>::const_iterator pNamePair = namepair.find( name.m_strFilename );
|
||||
if ( pNamePair == namepair.end())
|
||||
namepair [name.m_strFilename] = 1;
|
||||
else
|
||||
name = name + pNamePair->first;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(curdir / defdir);
|
||||
pFile->write(curdir / defdir / name, directory / defdir, content);
|
||||
rels.registration(it->first, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
//const HyperLink hyperlink = static_cast<const HyperLink&>(*pair.second);
|
||||
//rels.registration(pair.first, hyperlink);
|
||||
rels.registration(it->first, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Commit(const OOX::CPath& path)
|
||||
{
|
||||
std::map<CString, size_t> namepair;
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = it->second;
|
||||
smart_ptr<PPTX::External> pExt = pFile.smart_dynamic_cast<PPTX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
std::map<CString, size_t>::const_iterator pNamePair = namepair.find( name.m_strFilename );
|
||||
if ( pNamePair == namepair.end())
|
||||
namepair [name.m_strFilename] = 1;
|
||||
else
|
||||
name = name + pNamePair->first;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(path / defdir);
|
||||
|
||||
smart_ptr<PPTX::IFileBuilder> fileBuilder = it->second.smart_dynamic_cast<PPTX::IFileBuilder>();
|
||||
if (fileBuilder.is_init())
|
||||
fileBuilder->Commit(path / defdir / name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Finalize(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content)
|
||||
{
|
||||
PPTX::Rels::File rels;
|
||||
OOX::CPath current = filename.GetDirectory();
|
||||
Finalize(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Finalize(Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, ContentTypes::File& content)
|
||||
{
|
||||
std::map<CString, size_t> namepair;
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = it->second;
|
||||
smart_ptr<PPTX::External> pExt = pFile.smart_dynamic_cast<PPTX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
std::map<CString, size_t>::const_iterator pNamePair = namepair.find( name.m_strFilename );
|
||||
if ( pNamePair == namepair.end())
|
||||
namepair [name.m_strFilename] = 1;
|
||||
else
|
||||
name = name + pNamePair->first;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(curdir / defdir);
|
||||
|
||||
smart_ptr<PPTX::IFileBuilder> fileBuilder = pFile.smart_dynamic_cast<PPTX::IFileBuilder>();
|
||||
|
||||
if ( fileBuilder.is_init() )
|
||||
{
|
||||
fileBuilder->Finalize(curdir / defdir / name, directory / defdir, content);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFile->write(curdir / defdir / name, directory / defdir, content);
|
||||
}
|
||||
|
||||
rels.registration(it->first, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
rels.registration(it->first, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::extractPictures(const OOX::CPath& path) const
|
||||
{
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = it->second;
|
||||
|
||||
smart_ptr<Image> pImage = pFile.smart_dynamic_cast<Image>();
|
||||
if ( pImage.is_init() )
|
||||
{
|
||||
pImage->copy_to( path );
|
||||
continue;
|
||||
}
|
||||
|
||||
smart_ptr<IFileContainer> pExt = pFile.smart_dynamic_cast<IFileContainer>();
|
||||
if ( pExt.is_init() )
|
||||
{
|
||||
pExt->extractPictures( path );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<Image> IFileContainer::image(const RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.find(rId.get());
|
||||
if (pPair == m_container.end ())
|
||||
return smart_ptr<Image>();
|
||||
return pPair->second.smart_dynamic_cast<Image>();
|
||||
}
|
||||
|
||||
smart_ptr<HyperLink> IFileContainer::hyperlink(const RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.find(rId.get());
|
||||
if (pPair == m_container.end ())
|
||||
return smart_ptr<HyperLink>();
|
||||
return pPair->second.smart_dynamic_cast<HyperLink>();
|
||||
}
|
||||
|
||||
smart_ptr<OleObject> IFileContainer::oleObject(const RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.find(rId.get());
|
||||
if (pPair == m_container.end ())
|
||||
return smart_ptr<OleObject>();
|
||||
return pPair->second.smart_dynamic_cast<OleObject>();
|
||||
}
|
||||
smart_ptr<LegacyDiagramText> IFileContainer::legacyDiagramText(const RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.find(rId.get());
|
||||
if (pPair == m_container.end ())
|
||||
return smart_ptr<LegacyDiagramText>();
|
||||
return pPair->second.smart_dynamic_cast<LegacyDiagramText>();
|
||||
}
|
||||
const bool IFileContainer::exist(const FileType& type) const
|
||||
{
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
if (type == it->second->type())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
const bool IFileContainer::exist(const RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.find(rId.get());
|
||||
return (it != m_container.end());
|
||||
}
|
||||
|
||||
|
||||
const bool IFileContainer::isExternal(const PPTX::RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.find(rId.get());
|
||||
|
||||
if (it != m_container.end())
|
||||
{
|
||||
CString type = it->second->type().RelationType();
|
||||
CString name = it->second->type().DefaultFileName().m_strFilename;
|
||||
|
||||
return (((type == PPTX::FileTypes::ExternalAudio.RelationType()) || (type == PPTX::FileTypes::ExternalImage.RelationType())
|
||||
|| (type == PPTX::FileTypes::ExternalVideo.RelationType())) && (name == _T("")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<PPTX::File> IFileContainer::get(const FileType& type)
|
||||
{
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
if (type == it->second->type())
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return smart_ptr<PPTX::File>(new UnknowTypeFile( unknow ));
|
||||
}
|
||||
|
||||
|
||||
const RId IFileContainer::add(const smart_ptr<PPTX::File>& file)
|
||||
{
|
||||
const RId rId = maxRId().next();
|
||||
add(rId, file);
|
||||
return rId;
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::add(const PPTX::RId rId, const smart_ptr<PPTX::File>& file)
|
||||
{
|
||||
//m_lMaxRid = max(m_lMaxRid, rId.get());
|
||||
m_container [rId.get()] = file;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<PPTX::File> IFileContainer::find(const FileType& type) const
|
||||
{
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.begin(); it != m_container.end(); ++it)
|
||||
{
|
||||
if (type == it->second->type())
|
||||
return it->second;
|
||||
|
||||
}
|
||||
|
||||
return smart_ptr<PPTX::File>((PPTX::File*)new UnknowTypeFile());
|
||||
}
|
||||
|
||||
smart_ptr<PPTX::File> IFileContainer::find(const PPTX::RId& rId) const
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.find(rId.get());
|
||||
|
||||
if (it != m_container.end())
|
||||
return it->second;
|
||||
|
||||
smart_ptr<PPTX::File> pointer;
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<PPTX::File> IFileContainer::operator [](const PPTX::RId rId)
|
||||
{
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator it = m_container.find(rId.get());
|
||||
|
||||
if (it != m_container.end())
|
||||
return it->second;
|
||||
|
||||
smart_ptr<PPTX::File> pointer;
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<PPTX::File> IFileContainer::operator [](const FileType& type)
|
||||
{
|
||||
return find(type);
|
||||
}
|
||||
|
||||
const RId IFileContainer::maxRId()
|
||||
{
|
||||
++m_lMaxRid;
|
||||
return RId(m_lMaxRid);
|
||||
}
|
||||
|
||||
} // namespace PPTX
|
||||
98
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.h
Normal file
98
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.h
Normal file
@ -0,0 +1,98 @@
|
||||
#pragma once
|
||||
#ifndef OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
#define OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
|
||||
#include "RId.h"
|
||||
#include "UnknowTypeFile.h"
|
||||
#include "IFileBuilder.h"
|
||||
|
||||
namespace PPTX {class File;}
|
||||
namespace PPTX {class FileType;}
|
||||
namespace PPTX {namespace Rels {class File;}}
|
||||
namespace PPTX {namespace ContentTypes {class File;}}
|
||||
namespace PPTX {class Image;}
|
||||
namespace PPTX {class HyperLink;}
|
||||
namespace PPTX {class OleObject;}
|
||||
namespace PPTX {class LegacyDiagramText;}
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class IFileContainer
|
||||
{
|
||||
public:
|
||||
IFileContainer()
|
||||
{
|
||||
m_lMaxRid = 0;
|
||||
}
|
||||
virtual ~IFileContainer()
|
||||
{
|
||||
}
|
||||
protected:
|
||||
std::map<CString, smart_ptr<PPTX::File>> m_container;
|
||||
size_t m_lMaxRid;
|
||||
|
||||
protected:
|
||||
void read(const OOX::CPath& filename);
|
||||
void read(const Rels::File& rels, const OOX::CPath& path);
|
||||
void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
|
||||
void write(Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, ContentTypes::File& content) const;
|
||||
|
||||
protected:
|
||||
void Commit(const OOX::CPath& path);
|
||||
void Finalize(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content);
|
||||
void Finalize(Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, ContentTypes::File& content);
|
||||
|
||||
public:
|
||||
void extractPictures(const OOX::CPath& path) const;
|
||||
|
||||
public:
|
||||
virtual smart_ptr<Image> image (const RId& rId) const;
|
||||
virtual smart_ptr<HyperLink> hyperlink (const RId& rId) const;
|
||||
virtual smart_ptr<OleObject> oleObject (const RId& rId) const;
|
||||
virtual smart_ptr<LegacyDiagramText>legacyDiagramText (const RId& rId) const;
|
||||
public:
|
||||
template<typename T> const bool exist() const;
|
||||
const bool exist(const FileType& type) const;
|
||||
const bool exist(const PPTX::RId& rId) const;
|
||||
const bool isExternal(const PPTX::RId& rId) const;
|
||||
|
||||
smart_ptr<PPTX::File> get(const FileType& type);
|
||||
const RId add(const smart_ptr<PPTX::File>& file);
|
||||
void add(const PPTX::RId rId, const smart_ptr<PPTX::File>& file);
|
||||
|
||||
smart_ptr<PPTX::File> find(const FileType& type) const;
|
||||
|
||||
smart_ptr<PPTX::File> find(const PPTX::RId& type) const;
|
||||
|
||||
smart_ptr<PPTX::File> operator [](const PPTX::RId rId);
|
||||
|
||||
smart_ptr<PPTX::File> operator [](const FileType& type);
|
||||
|
||||
template<typename T> T& find();
|
||||
|
||||
protected:
|
||||
static UnknowTypeFile unknow;
|
||||
|
||||
private:
|
||||
const RId maxRId();
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
const bool IFileContainer::exist() const
|
||||
{
|
||||
T file;
|
||||
return exist(file.type());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T& IFileContainer::find()
|
||||
{
|
||||
T file;
|
||||
return dynamic_cast<T&>(find(file.type()));
|
||||
}
|
||||
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
39
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Audio.h
Normal file
39
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Audio.h
Normal file
@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#ifndef OOX_AUDIO_INCLUDE_H_
|
||||
#define OOX_AUDIO_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Audio : public Media
|
||||
{
|
||||
public:
|
||||
Audio()
|
||||
{
|
||||
}
|
||||
Audio(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Audio()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Audio;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_AUDIO_INCLUDE_H_
|
||||
68
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Image.h
Normal file
68
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Image.h
Normal file
@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
#ifndef OOX_IMAGE_INCLUDE_H_
|
||||
#define OOX_IMAGE_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Image : public Media
|
||||
{
|
||||
public:
|
||||
Image()
|
||||
{
|
||||
}
|
||||
Image(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Image()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
CString newFilename = filename.GetFilename();
|
||||
OOX::CPath newFilePath = filename.GetDirectory();
|
||||
|
||||
newFilename.Replace((TCHAR)' ', (TCHAR)'_');
|
||||
if (OOX::CSystemUtility::IsFileExist(m_filename) && !OOX::CSystemUtility::IsFileExist(newFilePath/newFilename))
|
||||
{
|
||||
//if (m_filename.GetExtention(true) == _T(".svm"))
|
||||
//{
|
||||
// ConvertSvmToImage(m_filename, replace_extension(newFilePath/newFilename, L"png"));
|
||||
//}
|
||||
//else if (m_filename.extension() != L"")
|
||||
//{
|
||||
// boost::filesystem::copy_file(m_filename, newFilePath/newFilename);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newFilename += L".wmf";
|
||||
// boost::filesystem::copy_file(m_filename, newFilePath/newFilename);
|
||||
//}
|
||||
}
|
||||
//if (m_filename.extension() == L".svm")
|
||||
// content.Default->add(replace_extension(newFilePath/newFilename, L"png"));
|
||||
//else
|
||||
// content.Default->add(newFilePath/newFilename);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Image;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_IMAGE_INCLUDE_H_
|
||||
72
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Media.h
Normal file
72
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Media.h
Normal file
@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
#ifndef OOX_MEDIA_INCLUDE_H_
|
||||
#define OOX_MEDIA_INCLUDE_H_
|
||||
|
||||
#include "../File.h"
|
||||
#include "../FileTypes.h"
|
||||
|
||||
#ifdef AVS_OFFICE_SVM_FILE
|
||||
#include "OfficeSvmFile.h"
|
||||
#include "SvmConverter.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Media : public File
|
||||
{
|
||||
public:
|
||||
Media()
|
||||
{
|
||||
}
|
||||
Media(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Media()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename)
|
||||
{
|
||||
m_filename = filename;
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
//std::wstring newFilename = filename.filename();
|
||||
//boost::filesystem::wpath newFilePath = filename.parent_path();
|
||||
//boost::replace_all(newFilename, L" ", L"_");
|
||||
//if (boost::filesystem::exists(m_filename) && !boost::filesystem::exists(newFilePath/newFilename))
|
||||
//{
|
||||
// if (m_filename.extension() == L".svm")
|
||||
// ConvertSvmToImage(m_filename, replace_extension(newFilePath/newFilename, L"png"));
|
||||
// else
|
||||
// boost::filesystem::copy_file(m_filename, newFilePath/newFilename);
|
||||
//}
|
||||
//if (m_filename.extension() == L".svm")
|
||||
// content.Default->add(replace_extension(newFilePath/newFilename, L"png"));
|
||||
//else
|
||||
// content.Default->add(m_filename);
|
||||
}
|
||||
|
||||
public:
|
||||
const OOX::CPath filename() const
|
||||
{
|
||||
return m_filename;
|
||||
}
|
||||
void copy_to(const OOX::CPath& path) const
|
||||
{
|
||||
//std::wstring newFilename = m_filename.filename();
|
||||
//boost::replace_all(newFilename, L" ", L"_");
|
||||
|
||||
//if (boost::filesystem::exists(m_filename) && !boost::filesystem::exists(path/m_filename.filename()))
|
||||
// boost::filesystem::copy_file(m_filename, path/newFilename);
|
||||
}
|
||||
|
||||
protected:
|
||||
OOX::CPath m_filename;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_MEDIA_INCLUDE_H_
|
||||
53
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/OleObject.h
Normal file
53
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/OleObject.h
Normal file
@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
#ifndef OOX_OLE_OBJECT_INCLUDE_H_
|
||||
#define OOX_OLE_OBJECT_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class OleObject : public Media
|
||||
{
|
||||
public:
|
||||
OleObject()
|
||||
{
|
||||
}
|
||||
OleObject(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~OleObject()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
//std::wstring newFilename = filename.filename();
|
||||
//boost::filesystem::wpath newFilePath = filename.parent_path();
|
||||
//boost::replace_all(newFilename, L" ", L"_");
|
||||
//if (m_filename.extension() != L".bin")
|
||||
// newFilename += L".bin" ;
|
||||
//
|
||||
//boost::filesystem::copy_file(m_filename, newFilePath/newFilename);
|
||||
//content.Default->add(newFilePath/newFilename);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::OleObject;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
} // namespace OOX
|
||||
|
||||
#endif // OOX_OLE_OBJECT_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Video.h
Normal file
40
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Video.h
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef OOX_VIDEO_INCLUDE_H_
|
||||
#define OOX_VIDEO_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Video : public Media
|
||||
{
|
||||
public:
|
||||
Video()
|
||||
{
|
||||
}
|
||||
Video(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Video()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Video;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_VIDEO_INCLUDE_H_
|
||||
19
ASCOfficePPTXFile/PPTXFormat/DocxFormat/NamespaceOwn.h
Normal file
19
ASCOfficePPTXFile/PPTXFormat/DocxFormat/NamespaceOwn.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#ifndef OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
#define OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
|
||||
#include "Namespaces.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class NamespaceOwn
|
||||
{
|
||||
protected:
|
||||
//static const Namespaces ns;
|
||||
};
|
||||
|
||||
//const Namespaces NamespaceOwn::ns;
|
||||
static Namespaces g_Namespaces;
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
107
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Namespaces.h
Normal file
107
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Namespaces.h
Normal file
@ -0,0 +1,107 @@
|
||||
#pragma once
|
||||
#ifndef OOX_NAMESPACES_INCLUDE_H_
|
||||
#define OOX_NAMESPACES_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include <atlstr.h>
|
||||
#else
|
||||
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
|
||||
#endif
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Namespace
|
||||
{
|
||||
public:
|
||||
CString m_strName;
|
||||
CString m_strLink;
|
||||
|
||||
public:
|
||||
Namespace(LPCSTR sName, LPCSTR sLink) : m_strName(sName), m_strLink(sLink)
|
||||
{
|
||||
}
|
||||
Namespace(LPCWSTR sName, LPCWSTR sLink) : m_strName(sName), m_strLink(sLink)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Namespaces
|
||||
{
|
||||
public:
|
||||
Namespaces() : a("a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
|
||||
b("b", "http://schemas.openxmlformats.org/officeDocument/2006/bibliography"),
|
||||
cdr("cdr", "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"),
|
||||
cp("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties"),
|
||||
dc("dc", "http://purl.org/dc/elements/1.1/"),
|
||||
dchrt("dchrt", "http://schemas.openxmlformats.org/drawingml/2006/chart"),
|
||||
dcmitype("dcmitype", "http://purl.org/dc/dcmitype/"),
|
||||
dcterms("dcterms", "http://purl.org/dc/terms/"),
|
||||
ddgrm("ddgrm", "http://schemas.openxmlformats.org/drawingml/2006/diagram"),
|
||||
dgm("dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram"),
|
||||
dlckcnv("dlckcnv", "http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"),
|
||||
dpct("dpct", "http://schemas.openxmlformats.org/drawingml/2006/picture"),
|
||||
ds("ds", "http://schemas.openxmlformats.org/officeDocument/2006/customXml"),
|
||||
m("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"),
|
||||
o("o", "urn:schemas-microsoft-com:office:office"),
|
||||
p("p", "http://schemas.openxmlformats.org/presentationml/2006/main"),
|
||||
pic("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"),
|
||||
pvml("pvml", "urn:schemas-microsoft-com:office:powerpoint"),
|
||||
r("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
|
||||
s("s", "http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"),
|
||||
sl("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"),
|
||||
v("v", "urn:schemas-microsoft-com:vml"),
|
||||
ve("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006"),
|
||||
vp("vp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
|
||||
vt("vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"),
|
||||
w("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"),
|
||||
w10("w10", "urn:schemas-microsoft-com:office:word"),
|
||||
wne("wne", "http://schemas.microsoft.com/office/word/2006/wordml"),
|
||||
wp("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
|
||||
x("x", "urn:schemas-microsoft-com:office:excel"),
|
||||
xdr("xdr", "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"),
|
||||
xmlns("xmlns", "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"),
|
||||
xsd("xsd", "http://www.w3.org/2001/XMLSchema"),
|
||||
xsi("xsi", "http://www.w3.org/2001/XMLSchema-instance")
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
const Namespace a;
|
||||
const Namespace b;
|
||||
const Namespace cdr;
|
||||
const Namespace cp;
|
||||
const Namespace dc;
|
||||
const Namespace dchrt;
|
||||
const Namespace dcmitype;
|
||||
const Namespace dcterms;
|
||||
const Namespace ddgrm;
|
||||
const Namespace dgm;
|
||||
const Namespace dlckcnv;
|
||||
const Namespace dpct;
|
||||
const Namespace ds;
|
||||
const Namespace m;
|
||||
const Namespace o;
|
||||
const Namespace p;
|
||||
const Namespace pic;
|
||||
const Namespace pvml;
|
||||
const Namespace r;
|
||||
const Namespace s;
|
||||
const Namespace sl;
|
||||
const Namespace v;
|
||||
const Namespace ve;
|
||||
const Namespace vp;
|
||||
const Namespace vt;
|
||||
const Namespace w;
|
||||
const Namespace w10;
|
||||
const Namespace wne;
|
||||
const Namespace wp;
|
||||
const Namespace x;
|
||||
const Namespace xdr;
|
||||
const Namespace xmlns;
|
||||
const Namespace xsd;
|
||||
const Namespace xsi;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_NAMESPACES_INCLUDE_H_
|
||||
105
ASCOfficePPTXFile/PPTXFormat/DocxFormat/RId.h
Normal file
105
ASCOfficePPTXFile/PPTXFormat/DocxFormat/RId.h
Normal file
@ -0,0 +1,105 @@
|
||||
#pragma once
|
||||
#ifndef OOX_RID_INCLUDE_H_
|
||||
#define OOX_RID_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../../Common/DocxFormat/Source/XML/xmlutils.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class RId
|
||||
{
|
||||
public:
|
||||
RId() : m_id(_T("rId0"))
|
||||
{
|
||||
}
|
||||
RId(const size_t id)
|
||||
{
|
||||
m_id = _T("rId") + XmlUtils::UIntToString(id);
|
||||
}
|
||||
RId(const CString& rid)
|
||||
{
|
||||
m_id = rid;
|
||||
}
|
||||
RId(const RId& oSrc)
|
||||
{
|
||||
m_id = oSrc.m_id;
|
||||
}
|
||||
|
||||
public:
|
||||
const RId& operator= (const size_t id)
|
||||
{
|
||||
m_id = _T("rId") + XmlUtils::UIntToString(id);
|
||||
return *this;
|
||||
}
|
||||
const RId& operator= (const CString& rid)
|
||||
{
|
||||
m_id = rid;
|
||||
return *this;
|
||||
}
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
const RId& operator= (const BSTR& rid)
|
||||
{
|
||||
m_id = (CString)rid;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
const RId& operator= (const RId& oSrc)
|
||||
{
|
||||
m_id = oSrc.m_id;
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const RId& lhs) const
|
||||
{
|
||||
return m_id == lhs.m_id;
|
||||
}
|
||||
const bool operator !=(const RId& lhs) const
|
||||
{
|
||||
return m_id != lhs.m_id;
|
||||
}
|
||||
const bool operator < (const RId& lhs) const
|
||||
{
|
||||
return m_id < lhs.m_id;
|
||||
}
|
||||
const bool operator <=(const RId& lhs) const
|
||||
{
|
||||
return m_id <= lhs.m_id;
|
||||
}
|
||||
const bool operator >(const RId& lhs) const
|
||||
{
|
||||
return m_id > lhs.m_id;
|
||||
}
|
||||
const bool operator >=(const RId& lhs) const
|
||||
{
|
||||
return m_id >= lhs.m_id;
|
||||
}
|
||||
|
||||
AVSINLINE CString get() const { return m_id; }
|
||||
|
||||
public:
|
||||
const RId next() const
|
||||
{
|
||||
return RId(m_id + _T("1"));
|
||||
}
|
||||
|
||||
public:
|
||||
const CString ToString() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void toPPTY(BYTE type, T pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(type);
|
||||
pWriter->WriteStringW(m_id);
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_id;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_RID_INCLUDE_H_
|
||||
129
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/File.h
Normal file
129
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/File.h
Normal file
@ -0,0 +1,129 @@
|
||||
#pragma once
|
||||
#ifndef OOX_RELS_FILE_INCLUDE_H_
|
||||
#define OOX_RELS_FILE_INCLUDE_H_
|
||||
|
||||
#include "RelationTable.h"
|
||||
#include "./../FileType.h"
|
||||
#include "./../FileTypes.h"
|
||||
#include "./../RId.h"
|
||||
#include "./../External/External.h"
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/Base/SmartPtr.h"
|
||||
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File()
|
||||
{
|
||||
}
|
||||
File(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
~File()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
void read(const OOX::CPath& filename)
|
||||
{
|
||||
OOX::CPath strFile = createFileName(filename);
|
||||
|
||||
if (OOX::CSystemUtility::IsFileExist(strFile))
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile2(strFile.GetPath()))
|
||||
Relations = oNode;
|
||||
}
|
||||
}
|
||||
void read2(const OOX::CPath& filename)
|
||||
{
|
||||
OOX::CPath strFile = filename;
|
||||
|
||||
if (OOX::CSystemUtility::IsFileExist(strFile))
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile2(strFile.GetPath()))
|
||||
Relations = oNode;
|
||||
}
|
||||
}
|
||||
void write(const OOX::CPath& filename) const
|
||||
{
|
||||
if (0 < Relations.m_items.size())
|
||||
{
|
||||
OOX::CPath file = createFileName(filename);
|
||||
OOX::CSystemUtility::CreateDirectories(file.GetDirectory());
|
||||
|
||||
XmlUtils::CXmlWriter oWriter;
|
||||
oWriter.WriteNodeBegin(_T("Relationship"), TRUE);
|
||||
oWriter.WriteAttribute(_T("xmlns"), _T("http://schemas.openxmlformats.org/package/2006/relationships"));
|
||||
oWriter.WriteNodeEnd(_T("Relationship"), FALSE, TRUE);
|
||||
|
||||
oWriter.WriteString(Relations.toXML());
|
||||
|
||||
oWriter.WriteNodeEnd(_T("Relationship"));
|
||||
|
||||
CDirectory::SaveToFile(file.GetPath(), oWriter.GetXmlString());
|
||||
}
|
||||
}
|
||||
const bool isValid() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const RId& rId, const FileType& type, const OOX::CPath& filename)
|
||||
{
|
||||
if(!(type == FileTypes::Unknow))
|
||||
{
|
||||
CString strFileName = filename.m_strFilename;
|
||||
CString strDir = filename.GetDirectory() + _T("");
|
||||
if (_T("") == filename.GetExtention())
|
||||
{
|
||||
if (type.RelationType() == _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"))
|
||||
{
|
||||
strFileName += _T(".bin");
|
||||
Relations.registration(rId, type.RelationType(), strDir + strFileName);
|
||||
}
|
||||
else if (type.RelationType() == _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"))
|
||||
{
|
||||
strFileName += _T(".wmf");
|
||||
Relations.registration(rId, type.RelationType(), strDir + strFileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Relations.registration(rId, type.RelationType(), replace_extension(filename, L"svm", L"png"));
|
||||
}
|
||||
}
|
||||
}
|
||||
void registration(const RId& rId, const smart_ptr<External> external)
|
||||
{
|
||||
Relations.registration(rId, external);
|
||||
}
|
||||
|
||||
private:
|
||||
const OOX::CPath createFileName(const OOX::CPath& filename) const
|
||||
{
|
||||
CString strTemp = filename.GetDirectory() + FILE_SEPARATOR_STR + _T("_rels") + FILE_SEPARATOR_STR;
|
||||
|
||||
if (filename.GetFilename() == _T("")) strTemp += _T(".rels");
|
||||
else strTemp += (filename.GetFilename() + _T(".rels"));
|
||||
|
||||
OOX::CPath pathTemp = strTemp;
|
||||
return pathTemp.GetPath();
|
||||
}
|
||||
|
||||
public:
|
||||
RelationTable Relations;
|
||||
};
|
||||
} // namespace Rels
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_RELS_FILE_INCLUDE_H_
|
||||
96
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/RelationShip.h
Normal file
96
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/RelationShip.h
Normal file
@ -0,0 +1,96 @@
|
||||
#pragma once
|
||||
#ifndef OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
#define OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "./../RId.h"
|
||||
#include "./../External/External.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class RelationShip : public WritingElement
|
||||
{
|
||||
public:
|
||||
RelationShip(const PPTX::RId& rId, const CString& type, const OOX::CPath& filename) : m_rId(rId), m_target(filename), m_type(type)
|
||||
{
|
||||
m_target.m_strFilename.Replace(_T(" "), _T("_"));
|
||||
}
|
||||
RelationShip(const PPTX::RId& rId, const smart_ptr<External> external): m_rId(rId), m_target(external->Uri()),
|
||||
m_type(external->type().RelationType())
|
||||
{
|
||||
m_mode = new CString(_T("External"));
|
||||
}
|
||||
virtual ~RelationShip()
|
||||
{
|
||||
}
|
||||
explicit RelationShip(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const RelationShip& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_rId = node.GetAttribute(_T("Id"));
|
||||
m_target = node.GetAttribute(_T("Target"));
|
||||
m_type = node.GetAttribute(_T("Type"));
|
||||
m_mode = node.GetAttribute(_T("TargetMode"), _T("Internal"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("Id"), m_rId.ToString());
|
||||
oAttr.Write(_T("Type"), m_type);
|
||||
oAttr.Write(_T("Target"), m_target.m_strFilename);
|
||||
oAttr.Write(_T("TargetMode"), m_mode);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Relationship"), oAttr);
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator <(const RelationShip& rhs) const
|
||||
{
|
||||
return m_rId < rhs.m_rId;
|
||||
}
|
||||
|
||||
public:
|
||||
const CString type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
const OOX::CPath filename() const
|
||||
{
|
||||
return m_target;
|
||||
}
|
||||
const OOX::CPath target() const
|
||||
{
|
||||
return m_target;
|
||||
}
|
||||
const bool isExternal()const
|
||||
{
|
||||
if (!m_mode.IsInit())
|
||||
return false;
|
||||
return (*m_mode == _T("External"));
|
||||
}
|
||||
const RId rId() const
|
||||
{
|
||||
return m_rId;
|
||||
}
|
||||
|
||||
private:
|
||||
RId m_rId;
|
||||
OOX::CPath m_target;
|
||||
CString m_type;
|
||||
nullable_string m_mode;
|
||||
};
|
||||
} // namespace Rels
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
47
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/RelationTable.h
Normal file
47
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/RelationTable.h
Normal file
@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
#ifndef OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
#define OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "RelationShip.h"
|
||||
#include "./../RId.h"
|
||||
|
||||
namespace PPTX {class External;}
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class RelationTable : public WritingVector<RelationShip>
|
||||
{
|
||||
public:
|
||||
RelationTable()
|
||||
{
|
||||
}
|
||||
virtual ~RelationTable()
|
||||
{
|
||||
}
|
||||
explicit RelationTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const RelationTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const RId& rId, const CString& type, const OOX::CPath& filename)
|
||||
{
|
||||
m_items.push_back(RelationShip(rId, type, filename));
|
||||
}
|
||||
void registration(const RId& rId, const smart_ptr<PPTX::External> external)
|
||||
{
|
||||
m_items.push_back(RelationShip(rId, external));
|
||||
}
|
||||
};
|
||||
} // namespace Rels
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
45
ASCOfficePPTXFile/PPTXFormat/DocxFormat/UnknowTypeFile.h
Normal file
45
ASCOfficePPTXFile/PPTXFormat/DocxFormat/UnknowTypeFile.h
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#ifndef OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
#define OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
|
||||
#include "File.h"
|
||||
#include "FileTypes.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class UnknowTypeFile : public File
|
||||
{
|
||||
public:
|
||||
UnknowTypeFile()
|
||||
{
|
||||
}
|
||||
virtual ~UnknowTypeFile()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename)
|
||||
{
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Unknow;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
} // namespace OOX
|
||||
|
||||
#endif // OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
186
ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingElement.h
Normal file
186
ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingElement.h
Normal file
@ -0,0 +1,186 @@
|
||||
#pragma once
|
||||
|
||||
#include "NamespaceOwn.h"
|
||||
#include "../../../Common/DocxFormat/Source/XML/xmlutils.h"
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include "atlstr.h"
|
||||
#endif
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
#define WritingElement_AdditionConstructors(Class) \
|
||||
Class(XmlUtils::CXmlNode& oNode)\
|
||||
{\
|
||||
fromXML( oNode );\
|
||||
}\
|
||||
const Class& operator =(const XmlUtils::CXmlNode &oNode)\
|
||||
{\
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );\
|
||||
return *this;\
|
||||
}
|
||||
|
||||
#define WritingElement_ReadNode( oRootNode, oChildNode, sNodeName, oValue ) \
|
||||
if ( oRootNode.GetNode( sNodeName, oChildNode ) )\
|
||||
oValue = oChildNode;
|
||||
|
||||
#define WritingElement_WriteNode_1( sStartNodeString, oValue ) \
|
||||
if ( oValue.IsInit() )\
|
||||
{\
|
||||
sResult += sStartNodeString;\
|
||||
sResult += oValue->ToString();\
|
||||
sResult += _T("/>");\
|
||||
}
|
||||
|
||||
#define WritingElement_WriteNode_2( oValue ) \
|
||||
if ( oValue.IsInit() )\
|
||||
sResult += oValue->toXML();
|
||||
|
||||
enum EElementType
|
||||
{
|
||||
et_Unknown,
|
||||
|
||||
et_Default, // <Default>
|
||||
et_Override, // <Override>
|
||||
|
||||
et_a_graphic, // <a:graphic>
|
||||
|
||||
et_ds_schemaRef, // <ds:shemeRef>
|
||||
et_ds_schemaRefs, // <ds:schemaRefs>
|
||||
|
||||
et_p_pic, // <p:pic>
|
||||
|
||||
et_w_abstractNum, // <w:abstractNum>
|
||||
et_w_annotationRef, // <w:annotationRef>
|
||||
et_w_background, // <w:background>
|
||||
et_w_bdo, // <w:bdo>
|
||||
et_w_bookmarkEnd, // <w:bookmarkEnd>
|
||||
et_w_bookmarkStart, // <w:bookmarkStart>
|
||||
et_w_br, // <w:br>
|
||||
et_w_checkBox, // <w:checkBox>
|
||||
et_w_cols, // <w:cols>
|
||||
et_w_comboBox, // <w:comboBox>
|
||||
et_w_commentRangeEnd, // <w:commentRangeEnd>
|
||||
et_w_commentRangeStart, // <w:commentRangeStart>
|
||||
et_w_commentReference, // <w:commentReference>
|
||||
et_w_contentPart, // <w:contentPart>
|
||||
et_w_continuationSeparator, // <w:continuationSeparator>
|
||||
et_w_customXmlDelRangeEnd, // <w:customXmlDelRangeEnd>
|
||||
et_w_customXmlDelRangeStart, // <w:customXmlDelRangeStart>
|
||||
et_w_customXmlInsRangeEnd, // <w:customXmlInsRangeEnd>
|
||||
et_w_customXmlInsRangeStart, // <w:customXmlInsRangeStart>
|
||||
et_w_customXmlMoveFromRangeEnd, // <w:customXmlMoveFromRangeEnd>
|
||||
et_w_customXmlMoveFromRangeStart, // <w:customXmlMoveFromRangeStart>
|
||||
et_w_customXmlMoveToRangeEnd, // <w:customXmlMoveToRangeEnd>
|
||||
et_w_customXmlMoveToRangeStart, // <w:customXmlMoveToRangeStart>
|
||||
et_w_cr, // <w:cr>
|
||||
et_w_date, // <w:date>
|
||||
et_w_dayLong, // <w:dayLong>
|
||||
et_w_dayShort, // <w:dayShort>
|
||||
et_w_ddList, // <w:ddList>
|
||||
et_w_delInstrText, // <w:delInstrText>
|
||||
et_w_delText, // <w:delText>
|
||||
et_w_docDefaults, // <w:docDefaults>
|
||||
et_w_docPartList, // <w:docPartList>
|
||||
et_w_dropDownList, // <w:dropDownList>
|
||||
et_w_endnote, // <w:endnote>
|
||||
et_w_endnotePr, // <w:endnotePr>
|
||||
et_w_endnoteRef, // <w:endnoteRef>
|
||||
et_w_endnoteReference, // <w:endnoteReference>
|
||||
et_w_ffData, // <w:ffData>
|
||||
et_w_fldChar, // <w:fldChar>
|
||||
et_w_fldSimple, // <w:fldSimple>
|
||||
et_w_font, // <w:font>
|
||||
et_w_footnote, // <w:footnote>
|
||||
et_w_footnotePr, // <w:footnotePr>
|
||||
et_w_footnoteRef, // <w:footnoteRef>
|
||||
et_w_footnoteReference, // <w:footnoteReference>
|
||||
et_w_ftr, // <w:ftr>
|
||||
et_w_hdr, // <w:hdr>
|
||||
et_w_headers, // <w:headers>
|
||||
et_w_hyperlink, // <w:hyperlink>
|
||||
et_w_instrText, // <w:instrText>
|
||||
et_w_latentStyles, // <w:latentStyles>
|
||||
et_w_lastRenderedPageBreak, // <w:lastRenderedPageBreak>
|
||||
et_w_lvl, // <w:lvl>
|
||||
et_w_lvlOverride, // <w:lvlOverride>
|
||||
et_w_monthLong, // <w:monthLong>
|
||||
et_w_monthShort, // <w:monthShort>
|
||||
et_w_moveFromRangeEnd, // <w:moveFromRangeEnd>
|
||||
et_w_moveFromRangeStart, // <w:moveFromRangeStart>
|
||||
et_w_moveToRangeEnd, // <w:moveToRangeEnd>
|
||||
et_w_moveToRangeStart, // <w:moveToRangeStart>
|
||||
et_w_num, // <w:num>
|
||||
et_w_numPr, // <w:numPr>
|
||||
et_w_nonBreakHyphen, // <w:nonBreakHyphen>
|
||||
et_w_object, // <w:object>
|
||||
et_w_p, // <w:p>
|
||||
et_w_pBdr, // <w:pBdr>
|
||||
et_w_permEnd, // <w:permEnd>
|
||||
et_w_permStart, // <w:permStart>
|
||||
et_w_pgBorders, // <w:pgBorders>
|
||||
et_w_pgNum, // <w:pgNum>
|
||||
et_w_placeholder, // <w:placeholder>
|
||||
et_w_pPr, // <w:pPr>
|
||||
et_w_pPrChange, // <w:pPrChange>
|
||||
et_w_proofErr, // <w:proofErr>
|
||||
et_w_ptab, // <w:ptab>
|
||||
et_w_r, // <w:r>
|
||||
et_w_ruby, // <w:ruby>
|
||||
et_w_rPr, // <w:rPr>
|
||||
et_w_rPrChange, // <w:rPrChange>
|
||||
et_w_sdt, // <w:sdt>
|
||||
et_w_sdtContent, // <w:sdtContent>
|
||||
et_w_sdtEndPr, // <w:sdtEndPr>
|
||||
et_w_sdtPr, // <w:sdtPr>
|
||||
et_w_sectPr, // <w:sectPr>
|
||||
et_w_sectPrChange, // <w:sectPrChange>
|
||||
et_w_separator, // <w:separator>
|
||||
et_w_softHyphen, // <w:softHyphen>
|
||||
et_w_style, // <w:style>
|
||||
et_w_sym, // <w:sym>
|
||||
et_w_t, // <w:t>
|
||||
et_w_tab, // <w:tab>
|
||||
et_w_tabs, // <w:tabs>
|
||||
et_w_tbl, // <w:tbl>
|
||||
et_w_tblBorders, // <w:tblBorders>
|
||||
et_w_tblCellMar, // <w:tblCellMar>
|
||||
et_w_tblGrid, // <w:tblGrid>
|
||||
et_w_tblGridChange, // <w:tblGridChange>
|
||||
et_w_tblPr, // <w:tblPr>
|
||||
et_w_tblPrChange, // <w:tblPrChange>
|
||||
et_w_tblPrEx, // <w:tblPrEx>
|
||||
et_w_tblPrExChange, // <w:tblPrExChange>
|
||||
et_w_tblStylePr, // <w:tblStylePr>
|
||||
et_w_tc, // <w:tc>
|
||||
et_w_tcBorders, // <w:tcBorders>
|
||||
et_w_tcMar, // <w:tcMar>
|
||||
et_w_tcPr, // <w:tcPr>
|
||||
et_w_tcPrChange, // <w:tcPrChange>
|
||||
et_w_textInput, // <w:textInput>
|
||||
et_w_tr, // <w:tr>
|
||||
et_w_trPr, // <w:trPr>
|
||||
et_w_trPrChange, // <w:trPrChange>
|
||||
et_w_yearLong, // <w:yearLong>
|
||||
et_w_yearShort, // <w:yearShort>
|
||||
|
||||
et_wp_docPr, // <wp:docPr>
|
||||
et_wp_effectExtent, // <wp:effectExtent>
|
||||
et_wp_extent, // <wp:extent>
|
||||
et_wp_wrapPolygon, // <wp:wrapPolygon>
|
||||
};
|
||||
|
||||
class WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement(){}
|
||||
virtual ~WritingElement() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node) = 0;
|
||||
virtual CString toXML() const = 0;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return PPTX::et_Unknown;
|
||||
}
|
||||
};
|
||||
}
|
||||
66
ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingVector.h
Normal file
66
ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingVector.h
Normal file
@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
#ifndef OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
#define OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
|
||||
#include "WritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
template <typename T>
|
||||
class WritingVector : public WritingElement
|
||||
{
|
||||
public:
|
||||
std::vector<T> m_items;
|
||||
|
||||
public:
|
||||
WritingVector() : m_items() {}
|
||||
virtual ~WritingVector() {}
|
||||
explicit WritingVector(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
|
||||
WritingVector& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (node.GetNodes(_T("*"), oNodes))
|
||||
{
|
||||
int nCount = oNodes.GetCount();
|
||||
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode nodeTemp;
|
||||
oNodes.GetAt(i, nodeTemp);
|
||||
|
||||
m_items.push_back(T(nodeTemp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
CString strResult = _T("");
|
||||
size_t nCount = m_items.size();
|
||||
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
strResult += m_items[i].toXML();
|
||||
}
|
||||
|
||||
return strResult;
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Unknown;
|
||||
}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
198
ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
Normal file
198
ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
Normal file
@ -0,0 +1,198 @@
|
||||
//#include "./stdafx.h"
|
||||
|
||||
#include "FileContainer.h"
|
||||
#include "DocxFormat/Rels/File.h"
|
||||
#include "FileFactory.h"
|
||||
#include "DocxFormat/ContentTypes/File.h"
|
||||
#include "DocxFormat/FileType.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "DocxFormat/External/HyperLink.h"
|
||||
#include "WrapperFile.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
void FileContainer::read(const OOX::CPath& filename)
|
||||
{
|
||||
//not implement FileContainer.read
|
||||
}
|
||||
|
||||
void FileContainer::read(const PPTX::Rels::File& rels, const OOX::CPath& path)
|
||||
{
|
||||
//not implement FileContainer.read
|
||||
}
|
||||
|
||||
void FileContainer::read(const OOX::CPath& filename, FileMap& map, IPPTXEvent* Event)
|
||||
{
|
||||
PPTX::Rels::File rels(filename);
|
||||
OOX::CPath path = filename.GetDirectory();
|
||||
read(rels, path, map, Event);
|
||||
}
|
||||
|
||||
void FileContainer::read(const PPTX::Rels::File& rels, const OOX::CPath& path, FileMap& map, IPPTXEvent* Event)
|
||||
{
|
||||
bool bIsSlide = false;
|
||||
PPTX::File* pSrcFile = dynamic_cast<PPTX::File*>(this);
|
||||
if (NULL != pSrcFile)
|
||||
bIsSlide = (pSrcFile->type() == PPTX::FileTypes::Slide) ? true : false;
|
||||
|
||||
size_t nCount = rels.Relations.m_items.size();
|
||||
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const PPTX::Rels::RelationShip* pRelation = &(rels.Relations.m_items[i]);
|
||||
OOX::CPath normPath = path / pRelation->target();
|
||||
|
||||
std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.find(normPath);
|
||||
|
||||
if (bIsSlide && (pRelation->type() == PPTX::FileTypes::Slide))
|
||||
{
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
smart_ptr<PPTX::File> file = smart_ptr<PPTX::File>(new PPTX::HyperLink(pRelation->target()));
|
||||
|
||||
bool res = Event->Progress(0, percent + m_lPercent);
|
||||
|
||||
add(pRelation->rId(), file);
|
||||
|
||||
if (res || m_bCancelled)
|
||||
{
|
||||
m_bCancelled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pPair != map.m_map.end())
|
||||
{
|
||||
add(pRelation->rId(), pPair->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
smart_ptr<PPTX::File> file = PPTX::FileFactory::CreateFilePPTX(path, *pRelation, map);
|
||||
|
||||
map.add(normPath, file);
|
||||
add(pRelation->rId(), file);
|
||||
|
||||
smart_ptr<FileContainer> pContainer = file.smart_dynamic_cast<FileContainer>();
|
||||
bool res = Event->Progress(0, percent + m_lPercent);
|
||||
|
||||
if (pContainer.IsInit())
|
||||
{
|
||||
pContainer->m_lPercent = m_lPercent;
|
||||
Event->AddPercent(m_lPercent);
|
||||
|
||||
pContainer->read(normPath, map, Event);
|
||||
m_bCancelled = pContainer->m_bCancelled;
|
||||
}
|
||||
|
||||
if (res || m_bCancelled)
|
||||
{
|
||||
m_bCancelled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileContainer::write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content) const
|
||||
{
|
||||
PPTX::Rels::File rels;
|
||||
OOX::CPath current = filename.GetDirectory();
|
||||
write(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
void FileContainer::write(PPTX::Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, PPTX::ContentTypes::File& content) const
|
||||
{
|
||||
std::map<CString, size_t> mNamePair;
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.begin(); pPair != m_container.end(); ++pPair)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = pPair->second;
|
||||
smart_ptr<PPTX::External> pExt = pFile.smart_dynamic_cast<PPTX::External>();
|
||||
if ( !pExt.IsInit() )
|
||||
{
|
||||
smart_ptr<PPTX::WrapperFile> file = pFile.smart_dynamic_cast<PPTX::WrapperFile>();
|
||||
|
||||
if (file.IsInit())
|
||||
{
|
||||
if (file->GetWrittenStatus() == false)
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
//name = name + max_name_index(curdir, name.string());
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(directory / defdir);
|
||||
pFile->write(directory / defdir / name, directory, content);
|
||||
rels.registration(pPair->first, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = file->GetWrittenFileName();
|
||||
|
||||
rels.registration(pPair->first, pFile->type(), defdir / name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(directory / defdir);
|
||||
pFile->write(directory / defdir / name, directory, content);
|
||||
rels.registration(pPair->first, pFile->type(), defdir / name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rels.registration(pPair->first, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileContainer::WrittenSetFalse()
|
||||
{
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = m_container.begin(); pPair != m_container.end(); ++pPair)
|
||||
{
|
||||
smart_ptr<PPTX::File> pFile = pPair->second;
|
||||
|
||||
smart_ptr<PPTX::WrapperFile> pWrapFile = pFile.smart_dynamic_cast<PPTX::WrapperFile>();
|
||||
smart_ptr<PPTX::FileContainer> pWrapCont = pFile.smart_dynamic_cast<PPTX::FileContainer>();
|
||||
|
||||
if (pWrapFile.is_init() && !pWrapFile->GetWrittenStatus())
|
||||
{
|
||||
pWrapFile->WrittenSetFalse();
|
||||
|
||||
if (pWrapCont.is_init())
|
||||
{
|
||||
pWrapCont->WrittenSetFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCommonRels::_read(const PPTX::Rels::File& rels, const OOX::CPath& path)
|
||||
{
|
||||
size_t nCount = rels.Relations.m_items.size();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const PPTX::Rels::RelationShip* pRelation = &(rels.Relations.m_items[i]);
|
||||
|
||||
smart_ptr<PPTX::File> _file = PPTX::FileFactory::CreateFilePPTX_OnlyMedia(path, *pRelation);
|
||||
add(pRelation->rId(), _file);
|
||||
}
|
||||
}
|
||||
|
||||
void CCommonRels::_read(const OOX::CPath& filename)
|
||||
{
|
||||
PPTX::Rels::File rels(filename);
|
||||
OOX::CPath path = filename.GetDirectory();
|
||||
_read(rels, path);
|
||||
}
|
||||
} // namespace PPTX
|
||||
49
ASCOfficePPTXFile/PPTXFormat/FileContainer.h
Normal file
49
ASCOfficePPTXFile/PPTXFormat/FileContainer.h
Normal file
@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_IFILE_CONTAINER_INCLUDE_H_
|
||||
#define PPTX_IFILE_CONTAINER_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/IFileContainer.h"
|
||||
#include "FileMap.h"
|
||||
#include "PPTXEvent.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class FileContainer : public PPTX::IFileContainer
|
||||
{
|
||||
public:
|
||||
FileContainer()
|
||||
{
|
||||
m_lPercent = 0;
|
||||
m_bCancelled = false;
|
||||
}
|
||||
virtual ~FileContainer()
|
||||
{
|
||||
}
|
||||
protected:
|
||||
void read(const OOX::CPath& filename);
|
||||
void read(const PPTX::Rels::File& rels, const OOX::CPath& path);
|
||||
|
||||
void read(const OOX::CPath& filename, FileMap& map, IPPTXEvent* Event);
|
||||
void read(const PPTX::Rels::File& rels, const OOX::CPath& path, FileMap& map, IPPTXEvent* Event);
|
||||
void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content) const;
|
||||
void write(PPTX::Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, PPTX::ContentTypes::File& content) const;
|
||||
|
||||
void WrittenSetFalse();
|
||||
|
||||
long m_lPercent;
|
||||
bool m_bCancelled;
|
||||
};
|
||||
|
||||
class CCommonRels : public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
CCommonRels() : PPTX::FileContainer()
|
||||
{
|
||||
}
|
||||
|
||||
void _read(const OOX::CPath& filename);
|
||||
void _read(const PPTX::Rels::File& rels, const OOX::CPath& path);
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_IFILE_CONTAINER_INCLUDE_H_
|
||||
137
ASCOfficePPTXFile/PPTXFormat/FileFactory.cpp
Normal file
137
ASCOfficePPTXFile/PPTXFormat/FileFactory.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
//#include "./stdafx.h"
|
||||
|
||||
#include "FileFactory.h"
|
||||
#include "DocxFormat/File.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "DocxFormat/Rels/RelationShip.h"
|
||||
#include "App.h"
|
||||
#include "Core.h"
|
||||
#include "Theme.h"
|
||||
#include "HandoutMaster.h"
|
||||
#include "Presentation.h"
|
||||
#include "PresProps.h"
|
||||
#include "SlideLayout.h"
|
||||
#include "SlideMaster.h"
|
||||
#include "Slide.h"
|
||||
#include "CommentAuthors.h"
|
||||
#include "Comments.h"
|
||||
#include "TableStyles.h"
|
||||
#include "ViewProps.h"
|
||||
#include "NotesSlide.h"
|
||||
#include "NotesMaster.h"
|
||||
|
||||
#include "DocxFormat/Media/Image.h"
|
||||
#include "DocxFormat/Media/Audio.h"
|
||||
#include "DocxFormat/Media/Video.h"
|
||||
#include "DocxFormat/External/HyperLink.h"
|
||||
#include "DocxFormat/External/ExternalImage.h"
|
||||
#include "DocxFormat/External/ExternalAudio.h"
|
||||
#include "DocxFormat/External/ExternalVideo.h"
|
||||
#include "DocxFormat/Drawing/VmlDrawing.h"
|
||||
#include "DocxFormat/Drawing/LegacyDiagramText.h"
|
||||
#include "DocxFormat/UnknowTypeFile.h"
|
||||
|
||||
#include "FileMap.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
const smart_ptr<PPTX::File> FileFactory::CreateFilePPTX(const OOX::CPath& path, const PPTX::Rels::RelationShip& relation, FileMap& map)
|
||||
{
|
||||
OOX::CPath filename = path / relation.filename();
|
||||
|
||||
if (relation.type() == PPTX::FileTypes::App)
|
||||
return smart_ptr<PPTX::File>(new PPTX::App(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::Core)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Core(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::Presentation)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Presentation(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::Theme)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Theme(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::SlideMaster)
|
||||
return smart_ptr<PPTX::File>(new PPTX::SlideMaster(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::SlideLayout)
|
||||
return smart_ptr<PPTX::File>(new PPTX::SlideLayout(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::Slide)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Slide(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::HandoutMaster)
|
||||
return smart_ptr<PPTX::File>(new PPTX::HandoutMaster(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::NotesMaster)
|
||||
return smart_ptr<PPTX::File>(new PPTX::NotesMaster(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::NotesSlide)
|
||||
return smart_ptr<PPTX::File>(new PPTX::NotesSlide(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::PresProps)
|
||||
return smart_ptr<PPTX::File>(new PPTX::PresProps(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::ViewProps)
|
||||
return smart_ptr<PPTX::File>(new PPTX::ViewProps(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::TableStyles)
|
||||
return smart_ptr<PPTX::File>(new PPTX::TableStyles(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::LegacyDiagramText)
|
||||
return smart_ptr<PPTX::File>(new PPTX::LegacyDiagramText(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::VmlDrawing)
|
||||
return smart_ptr<PPTX::File>(new PPTX::VmlDrawing(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::HyperLink)
|
||||
return smart_ptr<PPTX::File>(new PPTX::HyperLink(relation.target()));
|
||||
else if ((relation.type() == PPTX::FileTypes::ExternalImage) && (relation.isExternal()))
|
||||
return smart_ptr<PPTX::File>(new PPTX::ExternalImage(relation.target()));
|
||||
else if ((relation.type() == PPTX::FileTypes::ExternalAudio) && (relation.isExternal()))
|
||||
return smart_ptr<PPTX::File>(new PPTX::ExternalAudio(relation.target()));
|
||||
else if ((relation.type() == PPTX::FileTypes::ExternalVideo) && (relation.isExternal()))
|
||||
return smart_ptr<PPTX::File>(new PPTX::ExternalVideo(relation.target()));
|
||||
else if (relation.type() == PPTX::FileTypes::Image)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Image(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::Audio)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Audio(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::Video)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Video(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::Media) // FOR NONE OPTIMIZED PPTX FILES
|
||||
return smart_ptr<PPTX::File>(new PPTX::HyperLink(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::Data) // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> filepath
|
||||
return smart_ptr<PPTX::File>(new PPTX::Image(filename));
|
||||
else if (relation.type() == PPTX::FileTypes::DrawingDiag)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> filepath
|
||||
else if (relation.type() == PPTX::FileTypes::Chart)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> filepath
|
||||
else if (relation.type() == PPTX::FileTypes::CommentAuthors)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Authors(filename, map));
|
||||
else if (relation.type() == PPTX::FileTypes::SlideComments)
|
||||
return smart_ptr<PPTX::File>(new PPTX::Comments(filename, map));
|
||||
|
||||
return smart_ptr<PPTX::File>(new PPTX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
const smart_ptr<PPTX::File> FileFactory::CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const PPTX::Rels::RelationShip& relation)
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
CString strFile = relation.filename().GetPath();
|
||||
int n1 = strFile.Find(_T("www"));
|
||||
int n2 = strFile.Find(_T("http"));
|
||||
int n3 = strFile.Find(_T("ftp"));
|
||||
int n4 = strFile.Find(_T("https://"));
|
||||
|
||||
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
|
||||
bIsDownload = true;
|
||||
|
||||
OOX::CPath filename = path / relation.filename();
|
||||
|
||||
if (bIsDownload)
|
||||
filename = relation.filename();
|
||||
|
||||
CString strT = relation.type();
|
||||
|
||||
if (strT == PPTX::FileTypes::Image ||
|
||||
strT == PPTX::FileTypes::Data ||
|
||||
strT == PPTX::FileTypes::DrawingDiag ||
|
||||
strT == PPTX::FileTypes::Chart)
|
||||
{
|
||||
return smart_ptr<PPTX::File>(new PPTX::Image(filename));
|
||||
}
|
||||
else if(strT == PPTX::FileTypes::HyperLink)
|
||||
return smart_ptr<PPTX::File>(new PPTX::HyperLink(relation.target()));
|
||||
|
||||
else if(strT == PPTX::FileTypes::LegacyDiagramText)
|
||||
return smart_ptr<PPTX::File>(new PPTX::LegacyDiagramText(filename));
|
||||
|
||||
return smart_ptr<PPTX::File>(new PPTX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
} // namespace PPTX
|
||||
20
ASCOfficePPTXFile/PPTXFormat/FileFactory.h
Normal file
20
ASCOfficePPTXFile/PPTXFormat/FileFactory.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
#define PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/File.h"
|
||||
|
||||
//namespace PPTX {class File;}
|
||||
namespace PPTX {namespace Rels {class RelationShip;}}
|
||||
namespace PPTX {class FileMap;}
|
||||
namespace PPTX
|
||||
{
|
||||
class FileFactory
|
||||
{
|
||||
public:
|
||||
static const smart_ptr<PPTX::File> CreateFilePPTX(const OOX::CPath& path, const PPTX::Rels::RelationShip& relation, FileMap& map);
|
||||
static const smart_ptr<PPTX::File> CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const PPTX::Rels::RelationShip& relation);
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
0
ASCOfficePPTXFile/PPTXFormat/FileMap.cpp
Normal file
0
ASCOfficePPTXFile/PPTXFormat/FileMap.cpp
Normal file
42
ASCOfficePPTXFile/PPTXFormat/FileMap.h
Normal file
42
ASCOfficePPTXFile/PPTXFormat/FileMap.h
Normal file
@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_FILEMAP_INCLUDE_H_
|
||||
#define PPTX_FILEMAP_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/File.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class FileMap
|
||||
{
|
||||
public:
|
||||
FileMap()
|
||||
{
|
||||
}
|
||||
|
||||
~FileMap()
|
||||
{
|
||||
}
|
||||
public:
|
||||
|
||||
std::map<CString, smart_ptr<PPTX::File>> m_map;
|
||||
|
||||
public:
|
||||
|
||||
AVSINLINE std::map<CString, smart_ptr<PPTX::File>>::const_iterator find(const OOX::CPath& path)
|
||||
{
|
||||
return m_map.find(path.m_strFilename);
|
||||
}
|
||||
|
||||
AVSINLINE void add(const OOX::CPath& key, const smart_ptr<PPTX::File>& value)
|
||||
{
|
||||
m_map[key.m_strFilename] = value;
|
||||
}
|
||||
|
||||
AVSINLINE bool empty() const {return m_map.empty();}
|
||||
AVSINLINE size_t size() const {return m_map.size();}
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_FILEMAP_INCLUDE_H_
|
||||
155
ASCOfficePPTXFile/PPTXFormat/Folder.cpp
Normal file
155
ASCOfficePPTXFile/PPTXFormat/Folder.cpp
Normal file
@ -0,0 +1,155 @@
|
||||
//#include "./stdafx.h"
|
||||
|
||||
#include "Folder.h"
|
||||
#include "DocxFormat/Rels/File.h"
|
||||
#include "FileMap.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "Presentation.h"
|
||||
#include "Theme.h"
|
||||
#include "SlideMaster.h"
|
||||
#include "SlideLayout.h"
|
||||
#include "Slide.h"
|
||||
#include "NotesMaster.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
Folder::Folder()
|
||||
{
|
||||
}
|
||||
|
||||
Folder::Folder(const OOX::CPath& path, IPPTXEvent* Event)
|
||||
{
|
||||
read(path, Event);
|
||||
}
|
||||
|
||||
void Folder::read(const OOX::CPath& path, IPPTXEvent* Event)
|
||||
{
|
||||
PPTX::Rels::File rels(path);
|
||||
PPTX::FileMap map;
|
||||
long files = CountFiles(path);
|
||||
if(files == 0)
|
||||
return;
|
||||
m_lPercent = floor(1000000. / files);
|
||||
FileContainer::read(rels, path, map, Event);
|
||||
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
if(m_bCancelled && percent < 1000000)
|
||||
return;
|
||||
|
||||
smart_ptr<PPTX::Presentation> _presentation = FileContainer::get(PPTX::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (_presentation.is_init())
|
||||
{
|
||||
_presentation->commentAuthors = _presentation->get(PPTX::FileTypes::CommentAuthors).smart_dynamic_cast<PPTX::Authors>();
|
||||
}
|
||||
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const PPTX::FileType& curType = pPair->second->type();
|
||||
|
||||
if (PPTX::FileTypes::ThemePPTX == curType)
|
||||
{
|
||||
smart_ptr<PPTX::Theme> pTheme = pPair->second.smart_dynamic_cast<PPTX::Theme>();
|
||||
if (pTheme.IsInit())
|
||||
pTheme->presentation = _presentation;
|
||||
}
|
||||
}
|
||||
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const PPTX::FileType& curType = pPair->second->type();
|
||||
|
||||
if (PPTX::FileTypes::SlideMaster == curType)
|
||||
{
|
||||
smart_ptr<PPTX::SlideMaster> pointer = pPair->second.smart_dynamic_cast<PPTX::SlideMaster>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const PPTX::FileType& curType = pPair->second->type();
|
||||
|
||||
if (PPTX::FileTypes::SlideLayout == curType)
|
||||
{
|
||||
smart_ptr<PPTX::SlideLayout> pointer = pPair->second.smart_dynamic_cast<PPTX::SlideLayout>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const PPTX::FileType& curType = pPair->second->type();
|
||||
|
||||
if (PPTX::FileTypes::Slide == curType)
|
||||
{
|
||||
smart_ptr<PPTX::Slide> pointer = pPair->second.smart_dynamic_cast<PPTX::Slide>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (std::map<CString, smart_ptr<PPTX::File>>::const_iterator pPair = map.m_map.begin(); pPair != map.m_map.end(); ++pPair)
|
||||
{
|
||||
const PPTX::FileType& curType = pPair->second->type();
|
||||
if (PPTX::FileTypes::NotesMaster == curType)
|
||||
{
|
||||
smart_ptr<PPTX::NotesMaster> pointer = pPair->second.smart_dynamic_cast<PPTX::NotesMaster>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
Event->Progress(0, 1000000);
|
||||
}
|
||||
|
||||
void Folder::write(const OOX::CPath& path)
|
||||
{
|
||||
OOX::CSystemUtility::CreateDirectories(path);
|
||||
|
||||
PPTX::Rels::File rels;
|
||||
PPTX::ContentTypes::File content;
|
||||
|
||||
OOX::CPath dir = path;
|
||||
FileContainer::write(rels, path, dir, content);
|
||||
|
||||
rels.write(path / FILE_SEPARATOR_STR);
|
||||
content.write(path);
|
||||
FileContainer::WrittenSetFalse();
|
||||
}
|
||||
|
||||
void Folder::createFromTemplate(const OOX::CPath& path)
|
||||
{
|
||||
//read(path);
|
||||
}
|
||||
|
||||
const bool Folder::isValid(const OOX::CPath& path) const
|
||||
{
|
||||
return true;//FileContainer::exist(PPTX::FileTypes::Presentation);
|
||||
}
|
||||
|
||||
void Folder::extractPictures(const OOX::CPath& path)
|
||||
{
|
||||
OOX::CSystemUtility::CreateDirectories(path);
|
||||
FileContainer::extractPictures(path);
|
||||
}
|
||||
|
||||
void Folder::extractPictures(const OOX::CPath& source, const OOX::CPath& path)
|
||||
{
|
||||
//read(source);
|
||||
extractPictures(path);
|
||||
}
|
||||
|
||||
long Folder::CountFiles(const OOX::CPath& path)
|
||||
{
|
||||
return OOX::CSystemUtility::GetFilesCount(path.GetDirectory(), true);
|
||||
}
|
||||
} // namespace PPTX
|
||||
32
ASCOfficePPTXFile/PPTXFormat/Folder.h
Normal file
32
ASCOfficePPTXFile/PPTXFormat/Folder.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_FOLDER_INCLUDE_H_
|
||||
#define PPTX_FOLDER_INCLUDE_H_
|
||||
|
||||
#include "FileContainer.h"
|
||||
#include "DocxFormat/RId.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Folder : public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
Folder();
|
||||
Folder(const OOX::CPath& path, IPPTXEvent* Event);
|
||||
|
||||
public:
|
||||
void read(const OOX::CPath& path, IPPTXEvent* Event);
|
||||
void write(const OOX::CPath& path);
|
||||
void createFromTemplate(const OOX::CPath& path);
|
||||
|
||||
public:
|
||||
const bool isValid(const OOX::CPath& path) const;
|
||||
|
||||
public:
|
||||
void extractPictures(const OOX::CPath& path);
|
||||
void extractPictures(const OOX::CPath& source, const OOX::CPath& path);
|
||||
private:
|
||||
long CountFiles(const OOX::CPath& path);
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif //PPTX_FOLDER_INCLUDE_H_
|
||||
88
ASCOfficePPTXFile/PPTXFormat/HandoutMaster.h
Normal file
88
ASCOfficePPTXFile/PPTXFormat/HandoutMaster.h
Normal file
@ -0,0 +1,88 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
#define PPTX_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
#include "Logic/ClrMap.h"
|
||||
#include "Logic/CSld.h"
|
||||
#include "Logic/Hf.h"
|
||||
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class HandoutMaster : public WrapperFile, public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
HandoutMaster()
|
||||
{
|
||||
}
|
||||
HandoutMaster(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~HandoutMaster()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
//FileContainer::read(filename, map);
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
cSld = oNode.ReadNode(_T("p:cSld"));
|
||||
cSld.SetParentFilePointer(this);
|
||||
|
||||
clrMap = oNode.ReadNode(_T("p:clrMap"));
|
||||
clrMap.SetParentFilePointer(this);
|
||||
|
||||
hf = oNode.ReadNode(_T("p:hf"));
|
||||
|
||||
if (hf.is_init())
|
||||
hf->SetParentFilePointer(this);
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, PPTX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns:a"), PPTX::g_Namespaces.a.m_strLink);
|
||||
oAttr.Write(_T("xmlns:r"), PPTX::g_Namespaces.r.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(cSld);
|
||||
oValue.Write(clrMap);
|
||||
oValue.WriteNullable(hf);
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("p:handoutMaster"), oAttr, oValue));
|
||||
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
m_WrittenFileName = filename.GetFilename();
|
||||
FileContainer::write(filename, directory, content);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const PPTX::FileType type() const
|
||||
{
|
||||
return PPTX::FileTypes::HandoutMaster;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
Logic::CSld cSld;
|
||||
Logic::ClrMap clrMap;
|
||||
nullable<Logic::HF> hf;
|
||||
};
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
39
ASCOfficePPTXFile/PPTXFormat/Limit/AlbumLayout.h
Normal file
39
ASCOfficePPTXFile/PPTXFormat/Limit/AlbumLayout.h
Normal file
@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class AlbumLayout : public BaseLimit
|
||||
{
|
||||
public:
|
||||
AlbumLayout()
|
||||
{
|
||||
m_strValue = _T("fitToSlide");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("1pic") == strValue) ||
|
||||
(_T("1picTitle") == strValue) ||
|
||||
(_T("2pic") == strValue) ||
|
||||
(_T("2picTitle") == strValue) ||
|
||||
(_T("4pic") == strValue) ||
|
||||
(_T("4picTitle") == strValue) ||
|
||||
(_T("fitToSlide") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
35
ASCOfficePPTXFile/PPTXFormat/Limit/AnimationDgmBuild.h
Normal file
35
ASCOfficePPTXFile/PPTXFormat/Limit/AnimationDgmBuild.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class AnimationDgmBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
AnimationDgmBuild()
|
||||
{
|
||||
m_strValue = _T("allAtOnce");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((strValue == _T("allAtOnce")) ||
|
||||
(strValue == _T("lvlAtOnce")) ||
|
||||
(strValue == _T("lvlOne")) ||
|
||||
(strValue == _T("one")))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
91
ASCOfficePPTXFile/PPTXFormat/Limit/BWMode.h
Normal file
91
ASCOfficePPTXFile/PPTXFormat/Limit/BWMode.h
Normal file
@ -0,0 +1,91 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_BWMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BWMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BWMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BWMode()
|
||||
{
|
||||
m_strValue = _T("auto");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("auto") == strValue) ||
|
||||
(_T("black") == strValue) ||
|
||||
(_T("blackGray") == strValue) ||
|
||||
(_T("blackWhite") == strValue) ||
|
||||
(_T("clr") == strValue) ||
|
||||
(_T("gray") == strValue) ||
|
||||
(_T("grayWhite") == strValue) ||
|
||||
(_T("hidden") == strValue) ||
|
||||
(_T("invGray") == strValue) ||
|
||||
(_T("ltGray") == strValue) ||
|
||||
(_T("white") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("auto") == m_strValue)
|
||||
return 0;
|
||||
if (_T("black") == m_strValue)
|
||||
return 1;
|
||||
if (_T("blackGray") == m_strValue)
|
||||
return 2;
|
||||
if (_T("blackWhite") == m_strValue)
|
||||
return 3;
|
||||
if (_T("clr") == m_strValue)
|
||||
return 4;
|
||||
if (_T("gray") == m_strValue)
|
||||
return 5;
|
||||
if (_T("grayWhite") == m_strValue)
|
||||
return 6;
|
||||
if (_T("hidden") == m_strValue)
|
||||
return 7;
|
||||
if (_T("invGray") == m_strValue)
|
||||
return 8;
|
||||
if (_T("ltGray") == m_strValue)
|
||||
return 9;
|
||||
if (_T("white") == m_strValue)
|
||||
return 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0: m_strValue = _T("auto"); break;
|
||||
case 1: m_strValue = _T("black"); break;
|
||||
case 2: m_strValue = _T("blackGray"); break;
|
||||
case 3: m_strValue = _T("blackWhite"); break;
|
||||
case 4: m_strValue = _T("clr"); break;
|
||||
case 5: m_strValue = _T("gray"); break;
|
||||
case 6: m_strValue = _T("grayWhite"); break;
|
||||
case 7: m_strValue = _T("hidden"); break;
|
||||
case 8: m_strValue = _T("invGray"); break;
|
||||
case 9: m_strValue = _T("ltGray"); break;
|
||||
case 10: m_strValue = _T("white"); break;
|
||||
default:
|
||||
m_strValue = _T("auto");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_BWMODE_INCLUDE_H_
|
||||
86
ASCOfficePPTXFile/PPTXFormat/Limit/BaseLimit.h
Normal file
86
ASCOfficePPTXFile/PPTXFormat/Limit/BaseLimit.h
Normal file
@ -0,0 +1,86 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_BASE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BASE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
|
||||
#if !defined(_WIN32) && !defined (_WIN64)
|
||||
#include "../../../DesktopEditor/common/Types.h"
|
||||
#define _USE_STRING_OPERATOR \
|
||||
virtual void operator=(const CString& value) \
|
||||
{ \
|
||||
set(value); \
|
||||
}
|
||||
|
||||
#else
|
||||
#define _USE_STRING_OPERATOR \
|
||||
virtual void operator=(const CString& value) \
|
||||
{ \
|
||||
set(value); \
|
||||
} \
|
||||
virtual void operator=(const BSTR& value) \
|
||||
{ \
|
||||
set((CString)value); \
|
||||
}
|
||||
#endif // #if !defined(_WIN32) && !defined (_WIN64)
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BaseLimit
|
||||
{
|
||||
public:
|
||||
BaseLimit(const CString& str = _T("")) : m_strValue(str)
|
||||
{
|
||||
}
|
||||
|
||||
BaseLimit(const BaseLimit& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
|
||||
BaseLimit& operator=(const BaseLimit& oSrc)
|
||||
{
|
||||
m_strValue = oSrc.m_strValue;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void operator=(const CString& str)
|
||||
{
|
||||
set(str);
|
||||
}
|
||||
AVSINLINE void _set(const CString& strValue)
|
||||
{
|
||||
set(strValue);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void set(const CString& strValue) = 0;
|
||||
|
||||
AVSINLINE CString& get()
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
AVSINLINE const CString& get() const
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
CString m_strValue;
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_BASE_INCLUDE_H_
|
||||
72
ASCOfficePPTXFile/PPTXFormat/Limit/BevelType.h
Normal file
72
ASCOfficePPTXFile/PPTXFormat/Limit/BevelType.h
Normal file
@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BevelType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BevelType()
|
||||
{
|
||||
m_strValue = _T("circle");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("angle") == strValue) ||
|
||||
(_T("artDeco") == strValue) ||
|
||||
(_T("circle") == strValue) ||
|
||||
(_T("convex") == strValue) ||
|
||||
(_T("coolSlant") == strValue) ||
|
||||
(_T("cross") == strValue) ||
|
||||
(_T("divot") == strValue) ||
|
||||
(_T("hardEdge") == strValue) ||
|
||||
(_T("relaxedInset") == strValue) ||
|
||||
(_T("riblet") == strValue) ||
|
||||
(_T("slope") == strValue) ||
|
||||
(_T("softRound") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("angle") == m_strValue)
|
||||
return 0;
|
||||
if (_T("artDeco") == m_strValue)
|
||||
return 1;
|
||||
if (_T("circle") == m_strValue)
|
||||
return 2;
|
||||
if (_T("convex") == m_strValue)
|
||||
return 3;
|
||||
if (_T("coolSlant") == m_strValue)
|
||||
return 4;
|
||||
if (_T("cross") == m_strValue)
|
||||
return 5;
|
||||
if (_T("divot") == m_strValue)
|
||||
return 6;
|
||||
if (_T("hardEdge") == m_strValue)
|
||||
return 7;
|
||||
if (_T("relaxedInset") == m_strValue)
|
||||
return 8;
|
||||
if (_T("riblet") == m_strValue)
|
||||
return 9;
|
||||
if (_T("slope") == m_strValue)
|
||||
return 10;
|
||||
if (_T("softRound") == m_strValue)
|
||||
return 11;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
52
ASCOfficePPTXFile/PPTXFormat/Limit/BlendMode.h
Normal file
52
ASCOfficePPTXFile/PPTXFormat/Limit/BlendMode.h
Normal file
@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BlendMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BlendMode()
|
||||
{
|
||||
m_strValue = _T("screen");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("darken") == strValue) ||
|
||||
(_T("lighten") == strValue) ||
|
||||
(_T("mult") == strValue) ||
|
||||
(_T("over") == strValue) ||
|
||||
(_T("screen") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("darken") == m_strValue)
|
||||
return 0;
|
||||
if (_T("lighten") == m_strValue)
|
||||
return 1;
|
||||
if (_T("mult") == m_strValue)
|
||||
return 2;
|
||||
if (_T("over") == m_strValue)
|
||||
return 3;
|
||||
if (_T("screen") == m_strValue)
|
||||
return 4;
|
||||
return 4;
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
51
ASCOfficePPTXFile/PPTXFormat/Limit/BlipCompression.h
Normal file
51
ASCOfficePPTXFile/PPTXFormat/Limit/BlipCompression.h
Normal file
@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BlipCompression : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BlipCompression()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("none") == strValue) ||
|
||||
(_T("email") == strValue) ||
|
||||
(_T("hqprint") == strValue) ||
|
||||
(_T("print") == strValue) ||
|
||||
(_T("screen") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("none") == m_strValue)
|
||||
return 0;
|
||||
if (_T("email") == m_strValue)
|
||||
return 1;
|
||||
if (_T("hqprint") == m_strValue)
|
||||
return 2;
|
||||
if (_T("print") == m_strValue)
|
||||
return 3;
|
||||
if (_T("screen") == m_strValue)
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
94
ASCOfficePPTXFile/PPTXFormat/Limit/CameraType.h
Normal file
94
ASCOfficePPTXFile/PPTXFormat/Limit/CameraType.h
Normal file
@ -0,0 +1,94 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CameraType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CameraType()
|
||||
{
|
||||
m_strValue = _T("legacyObliqueFront");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("isometricBottomDown") == strValue) ||
|
||||
(_T("isometricBottomUp") == strValue) ||
|
||||
(_T("isometricLeftDown") == strValue) ||
|
||||
(_T("isometricLeftUp") == strValue) ||
|
||||
(_T("isometricOffAxis1Left") == strValue) ||
|
||||
(_T("isometricOffAxis1Right") == strValue) ||
|
||||
(_T("isometricOffAxis1Top") == strValue) ||
|
||||
(_T("isometricOffAxis2Left") == strValue) ||
|
||||
(_T("isometricOffAxis2Right") == strValue) ||
|
||||
(_T("isometricOffAxis2Top") == strValue) ||
|
||||
(_T("isometricOffAxis3Bottom") == strValue) ||
|
||||
(_T("isometricOffAxis3Left") == strValue) ||
|
||||
(_T("isometricOffAxis3Right") == strValue) ||
|
||||
(_T("isometricOffAxis4Bottom") == strValue) ||
|
||||
(_T("isometricOffAxis4Left") == strValue) ||
|
||||
(_T("isometricOffAxis4Right") == strValue) ||
|
||||
(_T("isometricRightDown") == strValue) ||
|
||||
(_T("isometricRightUp") == strValue) ||
|
||||
(_T("isometricTopDown") == strValue) ||
|
||||
(_T("isometricTopUp") == strValue) ||
|
||||
(_T("legacyObliqueBottom") == strValue) ||
|
||||
(_T("legacyObliqueBottomLeft") == strValue) ||
|
||||
(_T("legacyObliqueBottomRight") == strValue) ||
|
||||
(_T("legacyObliqueFront") == strValue) ||
|
||||
(_T("legacyObliqueLeft") == strValue) ||
|
||||
(_T("legacyObliqueRight") == strValue) ||
|
||||
(_T("legacyObliqueTop") == strValue) ||
|
||||
(_T("legacyObliqueTopLeft") == strValue) ||
|
||||
(_T("legacyObliqueTopRight") == strValue) ||
|
||||
(_T("legacyPerspectiveBottom") == strValue) ||
|
||||
(_T("legacyPerspectiveBottomLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveBottomRight") == strValue) ||
|
||||
(_T("legacyPerspectiveFront") == strValue) ||
|
||||
(_T("legacyPerspectiveLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveRight") == strValue) ||
|
||||
(_T("legacyPerspectiveTop") == strValue) ||
|
||||
(_T("legacyPerspectiveTopLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveTopRight") == strValue) ||
|
||||
(_T("obliqueBottom") == strValue) ||
|
||||
(_T("obliqueBottomLeft") == strValue) ||
|
||||
(_T("obliqueBottomRight") == strValue) ||
|
||||
(_T("obliqueLeft") == strValue) ||
|
||||
(_T("obliqueRight") == strValue) ||
|
||||
(_T("obliqueTop") == strValue) ||
|
||||
(_T("obliqueTopLeft") == strValue) ||
|
||||
(_T("obliqueTopRight") == strValue) ||
|
||||
(_T("orthographicFront") == strValue) ||
|
||||
(_T("perspectiveAbove") == strValue) ||
|
||||
(_T("perspectiveAboveLeftFacing") == strValue) ||
|
||||
(_T("perspectiveAboveRightFacing") == strValue) ||
|
||||
(_T("perspectiveBelow") == strValue) ||
|
||||
(_T("perspectiveContrastingLeftFacing") == strValue) ||
|
||||
(_T("perspectiveContrastingRightFacing") == strValue) ||
|
||||
(_T("perspectiveFront") == strValue) ||
|
||||
(_T("perspectiveHeroicExtremeLeftFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicExtremeRightFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicLeftFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicRightFacing") == strValue) ||
|
||||
(_T("perspectiveLeft") == strValue) ||
|
||||
(_T("perspectiveRelaxed") == strValue) ||
|
||||
(_T("perspectiveRelaxedModerately") == strValue) ||
|
||||
(_T("perspectiveRight") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
38
ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuild.h
Normal file
38
ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuild.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ChartBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ChartBuild()
|
||||
{
|
||||
m_strValue = _T("allPts");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allPts") == strValue) ||
|
||||
(_T("category") == strValue) ||
|
||||
(_T("gridLegend") == strValue) ||
|
||||
(_T("ptInCategory") == strValue) ||
|
||||
(_T("ptInSeries") == strValue) ||
|
||||
(_T("series") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
38
ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuildType.h
Normal file
38
ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuildType.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef PPTX_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ChartBuildType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ChartBuildType()
|
||||
{
|
||||
m_strValue = _T("allAtOnce");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allAtOnce") == strValue) ||
|
||||
(_T("category") == strValue) ||
|
||||
(_T("categoryEl") == strValue) ||
|
||||
(_T("series") == strValue) ||
|
||||
(_T("seriesEl") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
146
ASCOfficePPTXFile/PPTXFormat/Limit/ColorSchemeIndex.h
Normal file
146
ASCOfficePPTXFile/PPTXFormat/Limit/ColorSchemeIndex.h
Normal file
@ -0,0 +1,146 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
#define PPTX_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ColorSchemeIndex : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ColorSchemeIndex()
|
||||
{
|
||||
m_strValue = _T("accent1");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("accent1") == strValue) ||
|
||||
(_T("accent2") == strValue) ||
|
||||
(_T("accent3") == strValue) ||
|
||||
(_T("accent4") == strValue) ||
|
||||
(_T("accent5") == strValue) ||
|
||||
(_T("accent6") == strValue) ||
|
||||
(_T("dk1") == strValue) ||
|
||||
(_T("dk2") == strValue) ||
|
||||
(_T("folHlink") == strValue) ||
|
||||
(_T("hlink") == strValue) ||
|
||||
(_T("lt1") == strValue) ||
|
||||
(_T("lt2") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// word clrmap
|
||||
if (_T("light1") == strValue)
|
||||
m_strValue = _T("lt1");
|
||||
else if (_T("light2") == strValue)
|
||||
m_strValue = _T("lt2");
|
||||
else if (_T("dark1") == strValue)
|
||||
m_strValue = _T("dk1");
|
||||
else if (_T("dark2") == strValue)
|
||||
m_strValue = _T("dk2");
|
||||
else if (_T("hyperlink") == strValue)
|
||||
m_strValue = _T("hlink");
|
||||
else if (_T("followedHyperlink") == strValue)
|
||||
m_strValue = _T("folHlink");
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("accent1") == m_strValue)
|
||||
return 0;
|
||||
if (_T("accent2") == m_strValue)
|
||||
return 1;
|
||||
if (_T("accent3") == m_strValue)
|
||||
return 2;
|
||||
if (_T("accent4") == m_strValue)
|
||||
return 3;
|
||||
if (_T("accent5") == m_strValue)
|
||||
return 4;
|
||||
if (_T("accent6") == m_strValue)
|
||||
return 5;
|
||||
if (_T("bg1") == m_strValue)
|
||||
return 6;
|
||||
if (_T("bg2") == m_strValue)
|
||||
return 7;
|
||||
if (_T("dk1") == m_strValue)
|
||||
return 8;
|
||||
if (_T("dk2") == m_strValue)
|
||||
return 9;
|
||||
if (_T("folHlink") == m_strValue)
|
||||
return 10;
|
||||
if (_T("hlink") == m_strValue)
|
||||
return 11;
|
||||
if (_T("lt1") == m_strValue)
|
||||
return 12;
|
||||
if (_T("lt2") == m_strValue)
|
||||
return 13;
|
||||
if (_T("phClr") == m_strValue)
|
||||
return 14;
|
||||
if (_T("tx1") == m_strValue)
|
||||
return 15;
|
||||
if (_T("tx2") == m_strValue)
|
||||
return 16;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetStringCode(const BYTE& val)
|
||||
{
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("accent1");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("accent2");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("accent3");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("accent4");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("accent5");
|
||||
break;
|
||||
case 5:
|
||||
m_strValue = _T("accent6");
|
||||
break;
|
||||
case 8:
|
||||
m_strValue = _T("dk1");
|
||||
break;
|
||||
case 9:
|
||||
m_strValue = _T("dk2");
|
||||
break;
|
||||
case 10:
|
||||
m_strValue = _T("folHlink");
|
||||
break;
|
||||
case 11:
|
||||
m_strValue = _T("hlink");
|
||||
break;
|
||||
case 12:
|
||||
m_strValue = _T("lt1");
|
||||
break;
|
||||
case 13:
|
||||
m_strValue = _T("lt2");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("accent1");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
74
ASCOfficePPTXFile/PPTXFormat/Limit/CompoundLine.h
Normal file
74
ASCOfficePPTXFile/PPTXFormat/Limit/CompoundLine.h
Normal file
@ -0,0 +1,74 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CompoundLine : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CompoundLine()
|
||||
{
|
||||
m_strValue = _T("sng");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("dbl") == strValue) ||
|
||||
(_T("sng") == strValue) ||
|
||||
(_T("thickThin") == strValue) ||
|
||||
(_T("thinThick") == strValue) ||
|
||||
(_T("tri") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("dbl") == m_strValue)
|
||||
return 0;
|
||||
if (_T("sng") == m_strValue)
|
||||
return 1;
|
||||
if (_T("thickThin") == m_strValue)
|
||||
return 2;
|
||||
if (_T("thinThick") == m_strValue)
|
||||
return 3;
|
||||
if (_T("tri") == m_strValue)
|
||||
return 4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("dbl");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("thickThin");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("thinThick");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("tri");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("sng");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
43
ASCOfficePPTXFile/PPTXFormat/Limit/Conformance.h
Normal file
43
ASCOfficePPTXFile/PPTXFormat/Limit/Conformance.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Conformance : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Conformance()
|
||||
{
|
||||
m_strValue = _T("transitional");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("strict") == strValue) ||
|
||||
(_T("transitional") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("strict") == m_strValue)
|
||||
return 0;
|
||||
if (_T("transitional") == m_strValue)
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
36
ASCOfficePPTXFile/PPTXFormat/Limit/ContentStatus.h
Normal file
36
ASCOfficePPTXFile/PPTXFormat/Limit/ContentStatus.h
Normal file
@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ContentStatus : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ContentStatus()
|
||||
{
|
||||
m_strValue = _T("Draft");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("Draft") == strValue) ||
|
||||
(_T("Reviewed") == strValue) ||
|
||||
(_T("Final") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
36
ASCOfficePPTXFile/PPTXFormat/Limit/CornerDirectionVal.h
Normal file
36
ASCOfficePPTXFile/PPTXFormat/Limit/CornerDirectionVal.h
Normal file
@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CornerDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CornerDirectionVal()
|
||||
{
|
||||
m_strValue = _T("lu");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("ld") == strValue) ||
|
||||
(_T("lu") == strValue) ||
|
||||
(_T("rd") == strValue) ||
|
||||
(_T("ru") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
34
ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuild.h
Normal file
34
ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuild.h
Normal file
@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class DgmBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
DgmBuild()
|
||||
{
|
||||
m_strValue = _T("sp");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("bg") == strValue) ||
|
||||
(_T("sp") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
49
ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuildType.h
Normal file
49
ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuildType.h
Normal file
@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class DgmBuildType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
DgmBuildType()
|
||||
{
|
||||
m_strValue = _T("whole");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allAtOnce") == strValue) ||
|
||||
(_T("breadthByLvl") == strValue) ||
|
||||
(_T("breadthByNode") == strValue) ||
|
||||
(_T("ccw") == strValue) ||
|
||||
(_T("ccwIn") == strValue) ||
|
||||
(_T("ccwOut") == strValue) ||
|
||||
(_T("cust") == strValue) ||
|
||||
(_T("cw") == strValue) ||
|
||||
(_T("cwIn") == strValue) ||
|
||||
(_T("cwOut") == strValue) ||
|
||||
(_T("depthByBranch") == strValue) ||
|
||||
(_T("depthByNode") == strValue) ||
|
||||
(_T("down") == strValue) ||
|
||||
(_T("inByRing") == strValue) ||
|
||||
(_T("outByRing") == strValue) ||
|
||||
(_T("up") == strValue) ||
|
||||
(_T("whole") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
43
ASCOfficePPTXFile/PPTXFormat/Limit/EffectContainerType.h
Normal file
43
ASCOfficePPTXFile/PPTXFormat/Limit/EffectContainerType.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class EffectContainerType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
EffectContainerType()
|
||||
{
|
||||
m_strValue = _T("sib");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("sib") == strValue) ||
|
||||
(_T("tree") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("sib") == m_strValue)
|
||||
return 0;
|
||||
if (_T("tree") == m_strValue)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
40
ASCOfficePPTXFile/PPTXFormat/Limit/EightDirectionVal.h
Normal file
40
ASCOfficePPTXFile/PPTXFormat/Limit/EightDirectionVal.h
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class EightDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
EightDirectionVal()
|
||||
{
|
||||
m_strValue = _T("l");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("ld") == strValue) ||
|
||||
(_T("lu") == strValue) ||
|
||||
(_T("rd") == strValue) ||
|
||||
(_T("ru") == strValue) ||
|
||||
(_T("d") == strValue) ||
|
||||
(_T("l") == strValue) ||
|
||||
(_T("r") == strValue) ||
|
||||
(_T("u") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
64
ASCOfficePPTXFile/PPTXFormat/Limit/FillPath.h
Normal file
64
ASCOfficePPTXFile/PPTXFormat/Limit/FillPath.h
Normal file
@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_FILLPATH_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FILLPATH_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class FillPath : public BaseLimit
|
||||
{
|
||||
public:
|
||||
FillPath()
|
||||
{
|
||||
m_strValue = _T("circle");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("circle") == strValue) ||
|
||||
(_T("rect") == strValue) ||
|
||||
(_T("shape") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("circle") == m_strValue)
|
||||
return 0;
|
||||
if (_T("rect") == m_strValue)
|
||||
return 1;
|
||||
if (_T("shape") == m_strValue)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("circle");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("rect");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("shape");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_FILLPATH_INCLUDE_H_
|
||||
70
ASCOfficePPTXFile/PPTXFormat/Limit/Flip.h
Normal file
70
ASCOfficePPTXFile/PPTXFormat/Limit/Flip.h
Normal file
@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
#ifndef PPTX_LIMIT_FLIP_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FLIP_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Flip : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Flip()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("none") == strValue) ||
|
||||
(_T("x") == strValue) ||
|
||||
(_T("xy") == strValue) ||
|
||||
(_T("y") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("none") == m_strValue)
|
||||
return 0;
|
||||
if (_T("x") == m_strValue)
|
||||
return 1;
|
||||
if (_T("y") == m_strValue)
|
||||
return 2;
|
||||
if (_T("xy") == m_strValue)
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("none");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("x");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("y");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("xy");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace Limit
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LIMIT_FLIP_INCLUDE_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user