diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.cpp index 7dff7e0620..c3d3a1b3f7 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.cpp @@ -104,8 +104,8 @@ namespace PPTX } SysFreeString((var.bstrVal)); - } #endif + } } } diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp index a3e35928ae..78b91b01a4 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp @@ -2,9 +2,9 @@ #include "GraphicFrame.h" #include "SpTree.h" -#include "..\Slide.h" -#include "..\SlideLayout.h" -#include "..\SlideMaster.h" +#include "../Slide.h" +#include "../SlideLayout.h" +#include "../SlideMaster.h" //#include "../../ASCOfficeDrawingConverter.h" @@ -388,7 +388,7 @@ namespace PPTX OOX::CPath GraphicFrame::GetPathBySpid()const { - OOX::CPath filename = _T(""); + OOX::CPath filename; if(parentFileIs()) filename = parentFileAs().GetPathBySpid(spid.get_value_or(_T(""))); else if(parentFileIs()) diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/GrpSpPr.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/GrpSpPr.cpp index ddcc4bf3f0..f42ca90365 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/GrpSpPr.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/GrpSpPr.cpp @@ -5,31 +5,8 @@ namespace PPTX namespace Logic { - GrpSpPr::GrpSpPr() - { - } - - GrpSpPr::~GrpSpPr() - { - } - - - GrpSpPr::GrpSpPr(XmlUtils::CXmlNode& node) - { - fromXML(node); - } - - - const GrpSpPr& GrpSpPr::operator =(XmlUtils::CXmlNode& node) - { - fromXML(node); - return *this; - } - - - } // namespace Logic -} // namespace PPTX \ No newline at end of file +} // namespace PPTX diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGraphicFramePr.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGraphicFramePr.cpp index 8f060aa717..d1dd714fcc 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGraphicFramePr.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGraphicFramePr.cpp @@ -5,32 +5,7 @@ namespace PPTX namespace Logic { - NvGraphicFramePr::NvGraphicFramePr() - { - } - - - NvGraphicFramePr::~NvGraphicFramePr() - { - } - - - NvGraphicFramePr::NvGraphicFramePr(XmlUtils::CXmlNode& node) - { - fromXML(node); - } - - - const NvGraphicFramePr& NvGraphicFramePr::operator =(XmlUtils::CXmlNode& node) - { - fromXML(node); - return *this; - } - - - - } // namespace Logic -} // namespace PPTX \ No newline at end of file +} // namespace PPTX diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.cpp index df0d7b8189..28ea20719c 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.cpp @@ -5,29 +5,6 @@ namespace PPTX namespace Logic { - NvGrpSpPr::NvGrpSpPr() - { - } - - - NvGrpSpPr::~NvGrpSpPr() - { - } - - - NvGrpSpPr::NvGrpSpPr(XmlUtils::CXmlNode& node) - { - fromXML(node); - } - - - const NvGrpSpPr& NvGrpSpPr::operator =(XmlUtils::CXmlNode& node) - { - fromXML(node); - return *this; - } - - void NvGrpSpPr::fromXML(XmlUtils::CXmlNode& node) { cNvPr = node.ReadNode(_T("p:cNvPr")); @@ -35,6 +12,29 @@ namespace PPTX nvPr = node.ReadNode(_T("p:nvPr")); FillParentPointersForChilds(); + /* + XmlUtils::CXmlNodes oNodes; + if (node.GetNodes(_T("*"), oNodes)) + { + int nCount = oNodes.GetCount(); + for (int i = 0; i < nCount; ++i) + { + XmlUtils::CXmlNode oNode; + oNodes.GetAt(i, oNode); + + CString strName = XmlUtils::GetNameNoNS(oNode.GetName()); + + if (_T("cNvPr") == strName) + cNvPr = oNode; + else if (_T("cNvGrpSpPr") == strName) + cNvGrpSpPr = oNode; + else if (_T("nvPr") == strName) + nvPr = oNode; + } + } + + FillParentPointersForChilds(); + from header (old)*/ } @@ -56,4 +56,4 @@ namespace PPTX } } // namespace Logic -} // namespace PPTX \ No newline at end of file +} // namespace PPTX diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.h b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.h index f092f427b8..82c95f588d 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.h +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/NvGrpSpPr.h @@ -29,40 +29,8 @@ namespace PPTX } 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 oNode; - oNodes.GetAt(i, oNode); - - CString strName = XmlUtils::GetNameNoNS(oNode.GetName()); - - if (_T("cNvPr") == strName) - cNvPr = oNode; - else if (_T("cNvGrpSpPr") == strName) - cNvGrpSpPr = oNode; - else if (_T("nvPr") == strName) - nvPr = oNode; - } - } - - FillParentPointersForChilds(); - } - - virtual CString toXML() const - { - XmlUtils::CNodeValue oValue; - oValue.Write(cNvPr); - oValue.Write(cNvGrpSpPr); - oValue.Write(nvPr); - - return XmlUtils::CreateNode(_T("p:nvGrpSpPr"), oValue); - } + virtual void fromXML(XmlUtils::CXmlNode& node); + virtual CString toXML() const; virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const { @@ -129,14 +97,9 @@ namespace PPTX CNvGrpSpPr cNvGrpSpPr; NvPr nvPr; protected: - virtual void FillParentPointersForChilds() - { - cNvPr.SetParentPointer(this); - cNvGrpSpPr.SetParentPointer(this); - nvPr.SetParentPointer(this); - } + virtual void FillParentPointersForChilds(); }; } // namespace Logic } // namespace PPTX -#endif // PPTX_LOGIC_SLIDE_NVGRPSPPR_INCLUDE_H_ \ No newline at end of file +#endif // PPTX_LOGIC_SLIDE_NVGRPSPPR_INCLUDE_H_ diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp index f3c7a0af77..1bef8c7b19 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp @@ -11,7 +11,7 @@ namespace PPTX { namespace Logic { - __forceinline WORD GetTextAnchorFromStr(const CString& str) + AVSINLINE WORD GetTextAnchorFromStr(const CString& str) { if (str == _T("t")) return 0; if (str == _T("ctr")) return 1; @@ -19,7 +19,7 @@ namespace PPTX return 0; } - __forceinline WORD GetTextAlignFromStr(const CString& str) + AVSINLINE WORD GetTextAlignFromStr(const CString& str) { if (str == _T("l")) return 0; if (str == _T("ctr")) return 1; @@ -31,7 +31,7 @@ namespace PPTX return 0; } - __forceinline WORD GetFontAlignFromStr(const CString& str) + AVSINLINE WORD GetFontAlignFromStr(const CString& str) { if (str == _T("auto")) return 0; if (str == _T("base")) return 0; @@ -41,7 +41,7 @@ namespace PPTX return 0; } - __forceinline int GetIntegerFromHex(const CString& string) + AVSINLINE int GetIntegerFromHex(const CString& string) { return XmlUtils::GetInteger(string); } @@ -613,4 +613,4 @@ namespace PPTX m_FontStyle->SetParentFilePointer(pFile); } } // namespace Logic -} // namespace PPTX \ No newline at end of file +} // namespace PPTX diff --git a/ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp b/ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp index 8805dd7962..4bcb4c67c0 100644 --- a/ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp +++ b/ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp @@ -1,9 +1,9 @@ //#include "stdafx.h" #include "./SmartArt.h" -#include "..\Slide.h" -#include "..\SlideLayout.h" -#include "..\SlideMaster.h" +#include "../Slide.h" +#include "../SlideLayout.h" +#include "../SlideMaster.h" #include "../../ASCOfficeDrawingConverter.h" #include "../../../ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.h" @@ -176,7 +176,7 @@ xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" strDstChart += _T("charts"); if (1 == m_lChartNumber) { - CDirectory::CreateDirectory(strDstChart); + FileSystem::Directory::CreateDirectory(strDstChart); } CString strChart = _T(""); strChart.Format(_T("chart%d.xml"), m_lChartNumber); diff --git a/ASCPresentationEditor/OfficeDrawing/Interactive.h b/ASCPresentationEditor/OfficeDrawing/Interactive.h index 66e7a6aaae..ba164f8e68 100644 --- a/ASCPresentationEditor/OfficeDrawing/Interactive.h +++ b/ASCPresentationEditor/OfficeDrawing/Interactive.h @@ -1,6 +1,10 @@ #pragma once #include "Attributes.h" +#ifndef WIN32 + #include "../../DesktopEditor/common/ASCVariant.h" +#endif + namespace NSPresentationEditor { class CTextRange @@ -32,7 +36,7 @@ namespace NSPresentationEditor { private: long m_lType; - VARIANT m_varParameter; + VARIANT m_varParameter; public: bool m_bPresent; @@ -64,4 +68,4 @@ namespace NSPresentationEditor *this = oSrc; } }; -} \ No newline at end of file +}