From db11b75a2e4e314da4e1cc1dcae76e869c728027 Mon Sep 17 00:00:00 2001 From: ElenaSubbotina Date: Tue, 30 Jan 2018 19:37:10 +0300 Subject: [PATCH] x2t version 2.4.514 --- .../DocFormatLib/Linux/DocFormatLib.pro | 2 - ASCOfficeDocxFile2/BinWriter/BinWriters.cpp | 8 +- ASCOfficeDocxFile2/BinWriter/BinWriters.h | 37 +++--- .../Linux/ASCOfficeDocxFile2Lib.pro | 2 - ASCOfficeOdfFile/linux/OdfFileReaderLib.pro | 2 - ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro | 2 - .../PPTFormatLib/Linux/PPTFormatLib.pro | 2 - .../ASCOfficeDrawingConverter.cpp | 11 +- ASCOfficePPTXFile/ASCOfficeDrawingConverter.h | 4 +- .../Linux/PPTXFormatLib/PPTXFormatLib.pro | 2 - .../RtfFormatLib/Linux/RtfFormatLib.pro | 2 - .../TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro | 2 - .../DocxFormatLib/DocxFormatLib.pro | 4 - .../DocxFormatLib/docxformatlib_logic.cpp | 1 - .../DocxFormat/Projects/DocxFormat2005.vcproj | 16 +-- Common/DocxFormat/Source/Base/Nullable.h | 2 - Common/DocxFormat/Source/Common/Utils.cpp | 56 --------- Common/DocxFormat/Source/Common/Utils.h | 44 -------- .../DocxFormat/Source/DocxFormat/Comments.h | 8 -- .../Source/DocxFormat/Diagram/DiagramData.h | 4 +- .../DocxFormat/Source/DocxFormat/Document.h | 106 ------------------ Common/DocxFormat/Source/DocxFormat/Endnote.h | 3 - .../DocxFormat/Source/DocxFormat/Footnote.h | 3 - .../Source/DocxFormat/HeaderFooter.h | 94 ---------------- .../DocxFormat/Source/DocxFormat/Numbering.h | 54 --------- Common/DocxFormat/Source/DocxFormat/Rels.h | 29 ----- .../Source/DocxFormat/Settings/Settings.h | 11 -- .../Source/DocxFormat/Settings/WebSettings.h | 17 --- Common/DocxFormat/Source/DocxFormat/Styles.h | 37 ------ Common/base.pri | 2 +- X2tConverter/build/Qt/X2tConverter.pri | 2 - 31 files changed, 39 insertions(+), 530 deletions(-) delete mode 100644 Common/DocxFormat/Source/Common/Utils.cpp delete mode 100644 Common/DocxFormat/Source/Common/Utils.h diff --git a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro b/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro index 152fd73511..8ac180aaba 100644 --- a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro +++ b/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro @@ -21,8 +21,6 @@ include($$PWD/../../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE \ _UNICODE \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ _USE_LIBXML2_READER_ \ LIBXML_READER_ENABLED \ DONT_WRITE_EMBEDDED_FONTS \ diff --git a/ASCOfficeDocxFile2/BinWriter/BinWriters.cpp b/ASCOfficeDocxFile2/BinWriter/BinWriters.cpp index e05bf39f12..c0494f4be8 100644 --- a/ASCOfficeDocxFile2/BinWriter/BinWriters.cpp +++ b/ASCOfficeDocxFile2/BinWriter/BinWriters.cpp @@ -87,10 +87,14 @@ namespace BinDocxRW BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, m_mapIgnoreComments, NULL); - oBinaryDocumentTableWriter.prepareOfficeDrawingConverter(m_pOfficeDrawingConverter, oParamsDocumentWriter.m_pRels, pHdrFtr->m_arrShapeTypes); - + smart_ptr oldRels = m_pOfficeDrawingConverter->GetRels(); + m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels); + m_pOfficeDrawingConverter->ClearShapeTypes(); + nCurPos = m_oBcw.WriteItemStart(c_oSerHdrFtrTypes::HdrFtr_Content); oBinaryDocumentTableWriter.WriteDocumentContent(pHdrFtr->m_arrItems); m_oBcw.WriteItemEnd(nCurPos); + + m_pOfficeDrawingConverter->SetRels(oldRels); } } diff --git a/ASCOfficeDocxFile2/BinWriter/BinWriters.h b/ASCOfficeDocxFile2/BinWriter/BinWriters.h index 26f4147abf..984a7806e2 100644 --- a/ASCOfficeDocxFile2/BinWriter/BinWriters.h +++ b/ASCOfficeDocxFile2/BinWriter/BinWriters.h @@ -3023,18 +3023,6 @@ namespace BinDocxRW poDocument = NULL; m_bWriteSectPr = false; } - void prepareOfficeDrawingConverter(NSBinPptxRW::CDrawingConverter* pOfficeDrawingConverter, OOX::IFileContainer *rels, std::vector& aShapeTypes) - { - smart_ptr oldRels = pOfficeDrawingConverter->GetRels(); - pOfficeDrawingConverter->SetRels(rels); - - for(size_t i = 0, length = aShapeTypes.size(); i < length; ++i) - { - std::wstring& sShapeType = aShapeTypes[i]; - pOfficeDrawingConverter->AddShapeType(sShapeType); - } - pOfficeDrawingConverter->SetRels(oldRels); - } void WriteVbaProject(OOX::VbaProject& oVbaProject) { m_oBcw.m_oStream.StartRecord(0); @@ -7724,7 +7712,7 @@ namespace BinDocxRW m_oParamsWriter.m_pCurRels = oParamsDocumentWriter.m_pRels; int nStart = m_oBcw.WriteItemWithLengthStart(); - WriteNotes(oFootnotes.m_arrFootnote, oParamsDocumentWriter, oFootnotes.m_arrShapeTypes); + WriteNotes(oFootnotes.m_arrFootnote, oParamsDocumentWriter); m_oBcw.WriteItemWithLengthEnd(nStart); } void WriteEndnotes(OOX::CEndnotes& oEndnotes) @@ -7733,20 +7721,27 @@ namespace BinDocxRW m_oParamsWriter.m_pCurRels = oParamsDocumentWriter.m_pRels; int nStart = m_oBcw.WriteItemWithLengthStart(); - WriteNotes(oEndnotes.m_arrEndnote, oParamsDocumentWriter, oEndnotes.m_arrShapeTypes); + WriteNotes(oEndnotes.m_arrEndnote, oParamsDocumentWriter); m_oBcw.WriteItemWithLengthEnd(nStart); } - void WriteNotes(const std::vector& arrNotes, ParamsDocumentWriter& oParamsDocumentWriter, std::vector& arrShapeTypes) + void WriteNotes(const std::vector& arrNotes, ParamsDocumentWriter& oParamsDocumentWriter) { + BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, &m_oParamsWriter.m_mapIgnoreComments, NULL); + + smart_ptr oldRels = m_pOfficeDrawingConverter->GetRels(); + m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels); + m_pOfficeDrawingConverter->ClearShapeTypes(); + int nCurPos = 0; for(size_t i = 0 ; i < arrNotes.size(); ++i) { nCurPos = m_oBcw.WriteItemStart(c_oSerNotes::Note); - WriteNote(*arrNotes[i], oParamsDocumentWriter, arrShapeTypes); + WriteNote(*arrNotes[i], oBinaryDocumentTableWriter); m_oBcw.WriteItemEnd(nCurPos); } + m_pOfficeDrawingConverter->SetRels(oldRels); } - void WriteNote(const OOX::CFtnEdn& oFtnEdn, ParamsDocumentWriter& oParamsDocumentWriter, std::vector& arrShapeTypes) + void WriteNote(const OOX::CFtnEdn& oFtnEdn, BinaryDocumentTableWriter & oBinaryDocumentTableWriter) { int nCurPos = 0; if(oFtnEdn.m_oType.IsInit()) @@ -7761,10 +7756,6 @@ namespace BinDocxRW m_oBcw.m_oStream.WriteLONG(oFtnEdn.m_oId->GetValue()); m_oBcw.WriteItemEnd(nCurPos); } - - BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, &m_oParamsWriter.m_mapIgnoreComments, NULL); - - oBinaryDocumentTableWriter.prepareOfficeDrawingConverter(m_pOfficeDrawingConverter, oParamsDocumentWriter.m_pRels, arrShapeTypes); nCurPos = m_oBcw.WriteItemStart(c_oSerNotes::NoteContent); oBinaryDocumentTableWriter.WriteDocumentContent(oFtnEdn.m_arrItems); @@ -7924,8 +7915,10 @@ namespace BinDocxRW //DocumentTable всегда пишем последней, чтобы сначала заполнить все вспомогательные структуры, а при заполении документа, вызывать методы типа Style_Add... BinDocxRW::BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, &m_oParamsWriter.m_mapIgnoreComments, &oBinaryHeaderFooterTableWriter); - oBinaryDocumentTableWriter.prepareOfficeDrawingConverter(m_oParamsWriter.m_pOfficeDrawingConverter, oParamsDocumentWriter.m_pRels, oDocx.m_pDocument->m_arrShapeTypes); + m_oParamsWriter.m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels); + m_oParamsWriter.m_pOfficeDrawingConverter->ClearShapeTypes(); + oBinaryDocumentTableWriter.pSectPr = pFirstSectPr; oBinaryDocumentTableWriter.pBackground = oDocx.m_pDocument->m_oBackground.GetPointer(); oBinaryDocumentTableWriter.poDocument = oDocx.m_pDocument; diff --git a/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro b/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro index eb938a5bb4..00114269ad 100644 --- a/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro +++ b/ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro @@ -16,8 +16,6 @@ include($$PWD/../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE \ _UNICODE \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ USE_AVSOFFICESTUDIO_XMLUTILS \ SOLUTION_ASCOFFICEDOCXFILE2 \ #DISABLE_FILE_DOWNLOADER \ diff --git a/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro b/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro index 3217034685..43af6663ae 100644 --- a/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro +++ b/ASCOfficeOdfFile/linux/OdfFileReaderLib.pro @@ -22,8 +22,6 @@ include($$PWD/../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ LIBXML_READER_ENABLED \ DONT_WRITE_EMBEDDED_FONTS diff --git a/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro b/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro index 01c074e775..ad8befd013 100644 --- a/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro +++ b/ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro @@ -22,8 +22,6 @@ include($$PWD/../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ LIBXML_READER_ENABLED \ DONT_WRITE_EMBEDDED_FONTS diff --git a/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro b/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro index 1a61394e86..563a5e42cc 100644 --- a/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro +++ b/ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro @@ -23,8 +23,6 @@ DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ LIBXML_READER_ENABLED \ - USE_LITE_READER \ - _USE_XMLLITE_READER_ \ _PRESENTATION_WRITER_ \ _SVG_CONVERT_TO_IMAGE_ \ DONT_WRITE_EMBEDDED_FONTS diff --git a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp index e4d1e3a1e2..66260dd67a 100644 --- a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp +++ b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp @@ -937,6 +937,12 @@ void CDrawingConverter::SetEmbedDstPath(const std::wstring& sPath) NSDirectory::CreateDirectory(sPath); } + +void CDrawingConverter::ClearShapeTypes() +{ + m_mapShapeTypes.clear(); +} + HRESULT CDrawingConverter::AddShapeType(const std::wstring& bsXml) { std::wstring strXml = L"
0) { diff --git a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.h b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.h index cbed430364..e880a35dbd 100644 --- a/ASCOfficePPTXFile/ASCOfficeDrawingConverter.h +++ b/ASCOfficePPTXFile/ASCOfficeDrawingConverter.h @@ -225,7 +225,8 @@ namespace NSBinPptxRW void SetMediaDstPath (const std::wstring& sMediaPath); void SetEmbedDstPath (const std::wstring& sEmbedPath); - HRESULT AddShapeType (const std::wstring& sXml); + void ClearShapeTypes (); + HRESULT AddObject (const std::wstring& sXml, std::wstring** pMainProps); HRESULT SaveObject (long lStart, long lLength, const std::wstring& sMainProps, std::wstring & sXml); @@ -293,6 +294,7 @@ namespace NSBinPptxRW void Clear(); HRESULT SetCurrentRelsPath(); + HRESULT AddShapeType (const std::wstring& sXml); }; } #endif //OOX_IFILE_CONTAINER_INCLUDE_H_ diff --git a/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro b/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro index df6e7e1e59..569bfb0d08 100644 --- a/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro +++ b/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro @@ -26,8 +26,6 @@ include($$PWD/../../../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \ #DISABLE_FILE_DOWNLOADER \ CXIMAGE_DONT_DECLARE_TCHAR \ diff --git a/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro b/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro index 6eefca5ec0..68fef486bc 100644 --- a/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro +++ b/ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro @@ -21,8 +21,6 @@ include($$PWD/../../../Common/3dParty/boost/boost.pri) DEFINES += UNICODE _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ LIBXML_READER_ENABLED \ DONT_WRITE_EMBEDDED_FONTS \ AVS_USE_CONVERT_PPTX_TOCUSTOM_VML diff --git a/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro b/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro index 47025c6f27..f44f16b3cb 100644 --- a/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro +++ b/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro @@ -19,8 +19,6 @@ include(../../../Common/base.pri) DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ DONT_WRITE_EMBEDDED_FONTS \ LIBXML_READER_ENABLED diff --git a/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro b/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro index a9ec95c393..a1130c44f8 100644 --- a/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro +++ b/Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro @@ -18,8 +18,6 @@ include(../../../Common/base.pri) DEFINES += UNICODE _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ LIBXML_READER_ENABLED \ DONT_WRITE_EMBEDDED_FONTS @@ -72,7 +70,6 @@ SOURCES += \ ../Source/Common/Index.cpp \ ../Source/Common/NumFormat.cpp \ ../Source/Common/Position.cpp \ - ../Source/Common/Utils.cpp \ ../Source/Common/Wrap.cpp \ ../Source/Common/ZIndex.cpp \ ../Source/Common/SimpleTypes_Word.cpp \ @@ -108,7 +105,6 @@ HEADERS += docxformatlib.h \ ../Source/Common/SimpleTypes_Word.h \ ../Source/Common/Size.h \ ../Source/Common/Unit.h \ - ../Source/Common/Utils.h \ ../Source/Common/Wrap.h \ ../Source/Common/ZIndex.h \ ../Source/DocxFormat/Drawing/Drawing.h \ diff --git a/Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp b/Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp index 3c37091c50..b8f6a7a2f6 100644 --- a/Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp +++ b/Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp @@ -59,7 +59,6 @@ #include "../Source/Common/Index.cpp" #include "../Source/Common/NumFormat.cpp" #include "../Source/Common/Position.cpp" -#include "../Source/Common/Utils.cpp" #include "../Source/Common/Wrap.cpp" #include "../Source/Common/ZIndex.cpp" #include "../Source/Common/SimpleTypes_Word.cpp" diff --git a/Common/DocxFormat/Projects/DocxFormat2005.vcproj b/Common/DocxFormat/Projects/DocxFormat2005.vcproj index 8394b5751c..3edc3327e5 100644 --- a/Common/DocxFormat/Projects/DocxFormat2005.vcproj +++ b/Common/DocxFormat/Projects/DocxFormat2005.vcproj @@ -44,7 +44,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS" + PreprocessorDefinitions="_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -114,7 +114,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="" - PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" + PreprocessorDefinitions="_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -181,7 +181,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories=".\..\Source\XML\libxml2\XML\include;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;..\..\..\..\..\Redist;..\..\ASCOfficeOdtFile\Source\OfficeSvmFile" - PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" + PreprocessorDefinitions="_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" RuntimeLibrary="2" EnableFunctionLevelLinking="true" ProgramDataBaseFileName="$(IntDir)\DocxFormat.pdb" @@ -246,7 +246,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories=".\..\Source\XML\libxml2\XML\include;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;..\..\..\..\..\Redist;..\..\ASCOfficeOdtFile\Source\OfficeSvmFile" - PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" + PreprocessorDefinitions="_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" RuntimeLibrary="2" EnableFunctionLevelLinking="true" ProgramDataBaseFileName="$(IntDir)\DocxFormat.pdb" @@ -1381,14 +1381,6 @@ RelativePath="..\Source\Common\Unit.h" > - - - - diff --git a/Common/DocxFormat/Source/Base/Nullable.h b/Common/DocxFormat/Source/Base/Nullable.h index f6f85a6891..eb089d611c 100644 --- a/Common/DocxFormat/Source/Base/Nullable.h +++ b/Common/DocxFormat/Source/Base/Nullable.h @@ -145,7 +145,6 @@ namespace NSCommon this->m_pPointer = new Type(oNode); return *this; } - #ifdef _USE_XMLLITE_READER_ nullable& operator=(XmlUtils::CXmlLiteReader& oReader) { RELEASEOBJECT(this->m_pPointer); @@ -153,7 +152,6 @@ namespace NSCommon this->m_pPointer = new Type(oReader); return *this; } - #endif nullable& operator=(const wchar_t* cwsValue) { RELEASEOBJECT(this->m_pPointer); diff --git a/Common/DocxFormat/Source/Common/Utils.cpp b/Common/DocxFormat/Source/Common/Utils.cpp deleted file mode 100644 index ba8b373407..0000000000 --- a/Common/DocxFormat/Source/Common/Utils.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * (c) Copyright Ascensio System SIA 2010-2017 - * - * This program is a free software product. You can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License (AGPL) - * version 3 as published by the Free Software Foundation. In accordance with - * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect - * that Ascensio System SIA expressly excludes the warranty of non-infringement - * of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For - * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * - * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, - * EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions - * of the Program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product - * logo when distributing the program. Pursuant to Section 7(e) we decline to - * grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as - * well as technical writing content are licensed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International. See the License - * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - * - */ -#include "Utils.h" - -#include "../../../DesktopEditor/xml/include/xmlutils.h" - - -void Common::readAllShapeTypes(const OOX::CPath& oPath, std::vector& aShapetypes) -{ - XmlUtils::CXmlLiteReader oReader; - - if ( !oReader.FromFile( oPath.GetPath() ) ) - return; - - while ( false != oReader.ReadNextNode() ) - { - std::wstring sName = oReader.GetName(); - if(_T("v:shapetype") == sName) - { - std::wstring sXml = oReader.GetOuterXml(); - if(false == sXml.empty()) - aShapetypes.push_back(sXml); - } - } -} - - diff --git a/Common/DocxFormat/Source/Common/Utils.h b/Common/DocxFormat/Source/Common/Utils.h deleted file mode 100644 index 427e3576fd..0000000000 --- a/Common/DocxFormat/Source/Common/Utils.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (c) Copyright Ascensio System SIA 2010-2017 - * - * This program is a free software product. You can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License (AGPL) - * version 3 as published by the Free Software Foundation. In accordance with - * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect - * that Ascensio System SIA expressly excludes the warranty of non-infringement - * of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For - * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * - * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, - * EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions - * of the Program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product - * logo when distributing the program. Pursuant to Section 7(e) we decline to - * grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as - * well as technical writing content are licensed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International. See the License - * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - * - */ -#pragma once -#ifndef COMMON_UTILS_INCLUDE_H_ -#define COMMON_UTILS_INCLUDE_H_ - -#include "../SystemUtility/SystemUtility.h" -#include - -namespace Common -{ -void readAllShapeTypes(const OOX::CPath& oPath, std::vector& aShapetypes); -} // namespace Common - -#endif // COMMON_UTILS_INCLUDE_H_ diff --git a/Common/DocxFormat/Source/DocxFormat/Comments.h b/Common/DocxFormat/Source/DocxFormat/Comments.h index d386f753cb..e8134813fa 100644 --- a/Common/DocxFormat/Source/DocxFormat/Comments.h +++ b/Common/DocxFormat/Source/DocxFormat/Comments.h @@ -320,8 +320,6 @@ namespace OOX } virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -341,7 +339,6 @@ namespace OOX m_arrComments.push_back( new CComment(oReader) ); } } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const @@ -436,8 +433,6 @@ namespace OOX } virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -457,7 +452,6 @@ namespace OOX m_arrComments.push_back( new CCommentExt(oReader) ); } } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const @@ -598,7 +592,6 @@ namespace OOX } virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -618,7 +611,6 @@ namespace OOX m_arrPeoples.push_back( new CPerson(oReader) ); } } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const diff --git a/Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h b/Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h index a7703e8227..592b81db1f 100644 --- a/Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h +++ b/Common/DocxFormat/Source/DocxFormat/Diagram/DiagramData.h @@ -186,9 +186,8 @@ namespace OOX virtual void read(const CPath& oRootPath, const CPath& oFilePath) { IFileContainer::Read( oRootPath, oFilePath ); - #ifdef USE_LITE_READER - XmlUtils::CXmlLiteReader oReader; + XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) return; @@ -220,7 +219,6 @@ namespace OOX } } } - #endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const diff --git a/Common/DocxFormat/Source/DocxFormat/Document.h b/Common/DocxFormat/Source/DocxFormat/Document.h index cf5dc5e65f..64b5c83c47 100644 --- a/Common/DocxFormat/Source/DocxFormat/Document.h +++ b/Common/DocxFormat/Source/DocxFormat/Document.h @@ -37,7 +37,6 @@ #include "../Common/SimpleTypes_Word.h" #include "../Common/SimpleTypes_Shared.h" -#include "../Common/Utils.h" #include "WritingElement.h" #include "File.h" @@ -73,8 +72,6 @@ namespace OOX virtual ~CBackground() { } - - public: virtual void fromXML(XmlUtils::CXmlNode& oNode) { oNode.ReadAttributeBase( _T("w:color"), m_oColor ); @@ -326,9 +323,6 @@ namespace OOX m_bMacroEnabled = true; } -#ifdef USE_LITE_READER - Common::readAllShapeTypes(oPath, m_arrShapeTypes);//todooo перенести на уровень OOX::Documet чтоли - при чтении xml - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oPath.GetPath() ) ) @@ -360,104 +354,6 @@ namespace OOX } } } - -#else - - XmlUtils::CXmlNode oDocument; - oDocument.FromXmlFile2( oPath.GetPath() ); - if ( _T("w:document") == oDocument.GetName() ) - { - oDocument.ReadAttributeBase( _T("w:conformance"), m_oConformance ); - - XmlUtils::CXmlNode oBackground; - if ( oDocument.GetNode( _T("w:background"), oBackground ) ) - m_oBackground = oBackground; - - XmlUtils::CXmlNode oBody; - if ( oDocument.GetNode( _T("w:body"), oBody ) ) - { - XmlUtils::CXmlNodes oBodyChilds; - if ( oBody.GetNodes( _T("*"), oBodyChilds ) ) - { - XmlUtils::CXmlNode oItem; - for (unsigned int nIndex = 0; nIndex < oBodyChilds.GetCount(); nIndex++ ) - { - if ( oBodyChilds.GetAt( nIndex, oItem ) ) - { - std::wstring sName = oItem.GetName(); - WritingElement *pItem = NULL; - - /*if ( _T("w:altChunk") == sName ) - pItem = new Logic::CAltChunk( oItem ); - else*/ if ( _T("w:bookmarkEnd") == sName ) - pItem = new Logic::CBookmarkEnd( oItem ); - else if ( _T("w:bookmarkStart") == sName ) - pItem = new Logic::CBookmarkStart( oItem ); - else if ( _T("w:commentRangeEnd") == sName ) - pItem = new Logic::CCommentRangeEnd( oItem ); - else if ( _T("w:commentRangeStart") == sName ) - pItem = new Logic::CCommentRangeStart( oItem ); - //else if ( _T("w:customXml") == sName ) - // pItem = new Logic::CCustomXml( oItem ); - else if ( _T("w:customXmlDelRangeEnd") == sName ) - pItem = new Logic::CCustomXmlDelRangeEnd( oItem ); - else if ( _T("w:customXmlDelRangeStart") == sName ) - pItem = new Logic::CCustomXmlDelRangeStart( oItem ); - else if ( _T("w:customXmlInsRangeEnd") == sName ) - pItem = new Logic::CCustomXmlInsRangeEnd( oItem ); - else if ( _T("w:customXmlInsRangeStart") == sName ) - pItem = new Logic::CCustomXmlInsRangeStart( oItem ); - else if ( _T("w:customXmlMoveFromRangeEnd") == sName ) - pItem = new Logic::CCustomXmlMoveFromRangeEnd( oItem ); - else if ( _T("w:customXmlMoveFromRangeStart") == sName ) - pItem = new Logic::CCustomXmlMoveFromRangeStart( oItem ); - else if ( _T("w:customXmlMoveToRangeEnd") == sName ) - pItem = new Logic::CCustomXmlMoveToRangeEnd( oItem ); - else if ( _T("w:customXmlMoveToRangeStart") == sName ) - pItem = new Logic::CCustomXmlMoveToRangeStart( oItem ); - //else if ( _T("w:del") == sName ) - // pItem = new Logic::CDel( oItem ); - //else if ( _T("w:ins") == sName ) - // pItem = new Logic::CIns( oItem ); - //else if ( _T("w:moveFrom") == sName ) - // pItem = new Logic::CMoveFrom( oItem ); - else if ( _T("w:moveFromRangeEnd") == sName ) - pItem = new Logic::CMoveFromRangeEnd( oItem ); - else if ( _T("w:moveFromRangeStart") == sName ) - pItem = new Logic::CMoveFromRangeStart( oItem ); - //else if ( _T("w:moveTo") == sName ) - // pItem = new Logic::CMoveTo( oItem ); - else if ( _T("w:moveToRangeEnd") == sName ) - pItem = new Logic::CMoveToRangeEnd( oItem ); - else if ( _T("w:moveToRangeStart") == sName ) - pItem = new Logic::CMoveToRangeStart( oItem ); - else if ( _T("m:oMath") == sName ) - pItem = new Logic::COMath( oItem ); - else if ( _T("m:oMathPara") == sName ) - pItem = new Logic::COMathPara( oItem ); - else if ( _T("w:p") == sName ) - pItem = new Logic::CParagraph( oItem ); - else if ( _T("w:permEnd") == sName ) - pItem = new Logic::CPermEnd( oItem ); - else if ( _T("w:permStart") == sName ) - pItem = new Logic::CPermStart( oItem ); - else if ( _T("w:proofErr") == sName ) - pItem = new Logic::CProofErr( oItem ); - else if ( _T("w:sdt") == sName ) - pItem = new Logic::CSdt( oItem ); - else if ( _T("w:sectPr") == sName ) - m_oSectPr = oItem; - else if ( _T("w:tbl") == sName ) - pItem = new Logic::CTbl( oItem ); - - if ( pItem ) - m_arrItems.push_back( pItem ); - } - } - } - } - } -#endif } virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const { @@ -664,8 +560,6 @@ mc:Ignorable=\"w14 wp14\">"; nullable m_oBackground; std::vector m_arrItems; - std::vector m_arrShapeTypes; - }; } // namespace OOX diff --git a/Common/DocxFormat/Source/DocxFormat/Endnote.h b/Common/DocxFormat/Source/DocxFormat/Endnote.h index a0d9dc4946..24b171eb36 100644 --- a/Common/DocxFormat/Source/DocxFormat/Endnote.h +++ b/Common/DocxFormat/Source/DocxFormat/Endnote.h @@ -80,8 +80,6 @@ namespace OOX m_oReadPath = oFilePath; IFileContainer::Read( oRootPath, oFilePath ); - Common::readAllShapeTypes(oFilePath, m_arrShapeTypes); - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -158,7 +156,6 @@ namespace OOX CPath m_oReadPath; std::vector m_arrEndnote; - std::vector m_arrShapeTypes; }; } // namespace OOX #endif // OOX_ENDNOTE_INCLUDE_H_ diff --git a/Common/DocxFormat/Source/DocxFormat/Footnote.h b/Common/DocxFormat/Source/DocxFormat/Footnote.h index 594d8f8e05..b19fcfd81e 100644 --- a/Common/DocxFormat/Source/DocxFormat/Footnote.h +++ b/Common/DocxFormat/Source/DocxFormat/Footnote.h @@ -80,8 +80,6 @@ namespace OOX m_oReadPath = oFilePath; IFileContainer::Read( oRootPath, oFilePath ); - Common::readAllShapeTypes(oFilePath, m_arrShapeTypes); - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -158,7 +156,6 @@ namespace OOX CPath m_oReadPath; std::vector m_arrFootnote; - std::vector m_arrShapeTypes; }; } // namespace OOX diff --git a/Common/DocxFormat/Source/DocxFormat/HeaderFooter.h b/Common/DocxFormat/Source/DocxFormat/HeaderFooter.h index 19280b5142..7b4daed0d0 100644 --- a/Common/DocxFormat/Source/DocxFormat/HeaderFooter.h +++ b/Common/DocxFormat/Source/DocxFormat/HeaderFooter.h @@ -78,8 +78,6 @@ namespace OOX m_arrItems.clear(); } - - public: virtual void read(const CPath& oFilePath) { //don't use this. use read(const CPath& oRootPath, const CPath& oFilePath) @@ -90,8 +88,6 @@ namespace OOX { m_oReadPath = oFilePath; IFileContainer::Read( oRootPath, oFilePath ); -#ifdef USE_LITE_READER - Common::readAllShapeTypes(oFilePath, m_arrShapeTypes); XmlUtils::CXmlLiteReader oReader; @@ -183,95 +179,6 @@ namespace OOX m_arrItems.push_back( pItem ); } } -#else - XmlUtils::CXmlNode oMainNode; - oMainNode.FromXmlFile( oFilePath.GetPath(), true ); - - if ( _T("w:ftr") == oMainNode.GetName() ) - m_eType = et_w_ftr; - else if ( _T("w:hdr") == oMainNode.GetName() ) - m_eType = et_w_hdr; - else - return; - - XmlUtils::CXmlNodes oChilds; - if ( oMainNode.GetNodes( _T("*"), oChilds ) ) - { - XmlUtils::CXmlNode oItem; - for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ ) - { - if ( oChilds.GetAt( nIndex, oItem ) ) - { - std::wstring sName = oItem.GetName(); - WritingElement *pItem = NULL; - - /*if ( _T("w:altChunk") == sName ) - pItem = new Logic::AltChunk( oItem ); - else */if ( _T("w:bookmarkEnd") == sName ) - pItem = new Logic::CBookmarkEnd( oItem ); - else if ( _T("w:bookmarkStart") == sName ) - pItem = new Logic::CBookmarkStart( oItem ); - else if ( _T("w:commentRangeEnd") == sName ) - pItem = new Logic::CCommentRangeEnd( oItem ); - else if ( _T("w:commentRangeStart") == sName ) - pItem = new Logic::CCommentRangeStart( oItem ); - //else if ( _T("w:customXml") == sName ) - // pItem = new Logic::CCustomXml( oItem ); - else if ( _T("w:customXmlDelRangeEnd") == sName ) - pItem = new Logic::CCustomXmlDelRangeEnd( oItem ); - else if ( _T("w:customXmlDelRangeStart") == sName ) - pItem = new Logic::CCustomXmlDelRangeStart( oItem ); - else if ( _T("w:customXmlInsRangeEnd") == sName ) - pItem = new Logic::CCustomXmlInsRangeEnd( oItem ); - else if ( _T("w:customXmlInsRangeStart") == sName ) - pItem = new Logic::CCustomXmlInsRangeStart( oItem ); - else if ( _T("w:customXmlMoveFromRangeEnd") == sName ) - pItem = new Logic::CCustomXmlMoveFromRangeEnd( oItem ); - else if ( _T("w:customXmlMoveFromRangeStart") == sName ) - pItem = new Logic::CCustomXmlMoveFromRangeStart( oItem ); - else if ( _T("w:customXmlMoveToRangeEnd") == sName ) - pItem = new Logic::CCustomXmlMoveToRangeEnd( oItem ); - else if ( _T("w:customXmlMoveToRangeStart") == sName ) - pItem = new Logic::CCustomXmlMoveToRangeStart( oItem ); - //else if ( _T("w:del") == sName ) - // pItem = new Logic::CDel( oItem ); - //else if ( _T("w:ins") == sName ) - // pItem = new Logic::CIns( oItem ); - //else if ( _T("w:moveFrom") == sName ) - // pItem = new Logic::CMoveFrom( oItem ); - else if ( _T("w:moveFromRangeEnd") == sName ) - pItem = new Logic::CMoveFromRangeEnd( oItem ); - else if ( _T("w:moveFromRangeStart") == sName ) - pItem = new Logic::CMoveFromRangeStart( oItem ); - //else if ( _T("w:moveTo") == sName ) - // pItem = new Logic::CMoveTo( oItem ); - else if ( _T("w:moveToRangeEnd") == sName ) - pItem = new Logic::CMoveToRangeEnd( oItem ); - else if ( _T("w:moveToRangeStart") == sName ) - pItem = new Logic::CMoveToRangeStart( oItem ); - else if ( _T("m:oMath") == sName ) - pItem = new Logic::COMath( oItem ); - else if ( _T("m:oMathPara") == sName ) - pItem = new Logic::COMathPara( oItem ); - else if ( _T("w:p") == sName ) - pItem = new Logic::CParagraph( oItem ); - else if ( _T("w:permEnd") == sName ) - pItem = new Logic::CPermEnd( oItem ); - else if ( _T("w:permStart") == sName ) - pItem = new Logic::CPermStart( oItem ); - else if ( _T("w:proofErr") == sName ) - pItem = new Logic::CProofErr( oItem ); - else if ( _T("w:sdt") == sName ) - pItem = new Logic::CSdt( oItem ); - else if ( _T("w:tbl") == sName ) - pItem = new Logic::CTbl( oItem ); - - if ( pItem ) - m_arrItems.push_back( pItem ); - } - } - } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const { @@ -371,7 +278,6 @@ mc:Ignorable=\"w14 wp14\">"); OOX::EElementType m_eType; std::vector m_arrItems; - std::vector m_arrShapeTypes; }; } // namespace OOX diff --git a/Common/DocxFormat/Source/DocxFormat/Numbering.h b/Common/DocxFormat/Source/DocxFormat/Numbering.h index a1e885024b..d1c845ebc5 100644 --- a/Common/DocxFormat/Source/DocxFormat/Numbering.h +++ b/Common/DocxFormat/Source/DocxFormat/Numbering.h @@ -854,7 +854,6 @@ namespace OOX virtual void read(const CPath& oRootPath, const CPath& oFilePath) { IFileContainer::Read( oRootPath, oFilePath ); -#ifdef USE_LITE_READER XmlUtils::CXmlLiteReader oReader; @@ -890,59 +889,6 @@ namespace OOX } } } -#else - XmlUtils::CXmlNode oNumbering; - oNumbering.FromXmlFile( oFilePath.GetPath(), true ); - - if ( _T("w:numbering") == oNumbering.GetName() ) - { - XmlUtils::CXmlNodes oAbstractNumList; - oNumbering.GetNodes( _T("w:abstractNum"), oAbstractNumList ); - - for ( int nIndex = 0; nIndex < oAbstractNumList.GetCount(); nIndex++ ) - { - XmlUtils::CXmlNode oAbstractNumNode; - if ( oAbstractNumList.GetAt( nIndex, oAbstractNumNode ) ) - { - //OOX::Numbering::CAbstractNum oAbstractNum = oAbstractNumNode; - - m_arrAbstractNum.push_back( /*oAbstractNum*/ new OOX::Numbering::CAbstractNum (oAbstractNumNode) ); - } - } - - XmlUtils::CXmlNodes oNumList; - oNumbering.GetNodes( _T("w:num"), oNumList ); - - for ( int nIndex = 0; nIndex < oNumList.GetCount(); nIndex++ ) - { - XmlUtils::CXmlNode oNumNode; - if ( oNumList.GetAt( nIndex, oNumNode ) ) - { - //OOX::Numbering::CNum oNum = oNumNode; - m_arrNum.push_back( /*oNum*/ new OOX::Numbering::CNum (oNumNode) ); - } - } - - XmlUtils::CXmlNode oNumIdPicBulletNode; - if ( oNumbering.GetNode( _T("w:numIdMacAtCleanup"), oNumIdPicBulletNode ) ) - m_oNumIdMacAtCleanup = oNumIdPicBulletNode; - - // TO DO: ак будут сделаны классы CDrawing, нужно будет сделать чтение - // w:numPicBullet - XmlUtils::CXmlNodes oNumPicList; - oNumbering.GetNodes( _T("w:numPicBullet"), oNumPicList ); - - for ( int nIndex = 0; nIndex < oNumPicList.GetCount(); nIndex++ ) - { - XmlUtils::CXmlNode oNumNode; - if ( oNumPicList.GetAt( nIndex, oNumNode ) ) - { - //OOX::Numbering::CNumPicBullet oNum = oNumNode; - m_arrNumPicBullet.push_back( /*oNum*/ new OOX::Numbering::CNumPicBullet (oNumNode) ); - } - } - } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const diff --git a/Common/DocxFormat/Source/DocxFormat/Rels.h b/Common/DocxFormat/Source/DocxFormat/Rels.h index f4120ab316..b78b9f27dd 100644 --- a/Common/DocxFormat/Source/DocxFormat/Rels.h +++ b/Common/DocxFormat/Source/DocxFormat/Rels.h @@ -184,8 +184,6 @@ namespace OOX { CPath oRelsPath = CreateFileName( oFilePath ); -#ifdef USE_LITE_READER - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oRelsPath.GetPath() ) ) @@ -217,33 +215,6 @@ namespace OOX } } } -#else - - XmlUtils::CXmlNode oNode; - - if ( oNode.FromXmlFile( oRelsPath.GetPath() ) && _T("Relationships") == oNode.GetName() ) - { - XmlUtils::CXmlNodes oNodes; - if ( oNode.GetNodes( _T("Relationship"), oNodes ) ) - { - XmlUtils::CXmlNode oRelNode; - for ( int nIndex = 0; nIndex < oNodes.GetCount(); nIndex++ ) - { - if ( oNodes.GetAt( nIndex, oRelNode ) ) - { - Rels::CRelationShip *pRel = new Rels::CRelationShip (oRelNode); - if (pRel) - { - std::wstring rid = pRel->rId().get(); - - m_arRelations.push_back(pRel); - m_mapRelations.insert(std::make_pair( rid, pRel) ); - } - } - } - } - } -#endif } void Write(const CPath& oFilePath) const { diff --git a/Common/DocxFormat/Source/DocxFormat/Settings/Settings.h b/Common/DocxFormat/Source/DocxFormat/Settings/Settings.h index 2dcdde4c1a..2987293393 100644 --- a/Common/DocxFormat/Source/DocxFormat/Settings/Settings.h +++ b/Common/DocxFormat/Source/DocxFormat/Settings/Settings.h @@ -2847,7 +2847,6 @@ namespace OOX public: virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -3024,16 +3023,6 @@ namespace OOX } } } - -#else - XmlUtils::CXmlNode oWebSettings; - oWebSettings.FromXmlFile( oFilePath.GetPath(), true ); - - if ( _T("w:settings") == oWebSettings.GetName() ) - { - XmlUtils::CXmlNode oNode; - } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const { diff --git a/Common/DocxFormat/Source/DocxFormat/Settings/WebSettings.h b/Common/DocxFormat/Source/DocxFormat/Settings/WebSettings.h index c8fcd9d5f3..db500c912d 100644 --- a/Common/DocxFormat/Source/DocxFormat/Settings/WebSettings.h +++ b/Common/DocxFormat/Source/DocxFormat/Settings/WebSettings.h @@ -160,7 +160,6 @@ namespace OOX public: virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -182,22 +181,6 @@ namespace OOX m_oOptimizeForBrowser = oReader; } } - -#else - XmlUtils::CXmlNode oWebSettings; - oWebSettings.FromXmlFile( oFilePath.GetPath(), true ); - - if ( _T("w:webSettings") == oWebSettings.GetName() ) - { - XmlUtils::CXmlNode oNode; - - if ( oWebSettings.GetNode( _T("w:allowPNG"), oNode ) ) - m_oAllowPNG = oNode; - - if ( oWebSettings.GetNode( _T("w:optimizeForBrowser"), oNode ) ) - m_oOptimizeForBrowser = oNode; - } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const { diff --git a/Common/DocxFormat/Source/DocxFormat/Styles.h b/Common/DocxFormat/Source/DocxFormat/Styles.h index 9fb88ec607..d999644e7c 100644 --- a/Common/DocxFormat/Source/DocxFormat/Styles.h +++ b/Common/DocxFormat/Source/DocxFormat/Styles.h @@ -799,8 +799,6 @@ namespace OOX public: virtual void read(const CPath& oFilePath) { -#ifdef USE_LITE_READER - XmlUtils::CXmlLiteReader oReader; if ( !oReader.FromFile( oFilePath.GetPath() ) ) @@ -835,41 +833,6 @@ namespace OOX m_oLatentStyles = oReader; } } -#else - XmlUtils::CXmlNode oStyles; - oStyles.FromXmlFile( oFilePath.GetPath(), true ); - - if ( _T("w:styles") == oStyles.GetName() ) - { - XmlUtils::CXmlNode oChild; - - if ( oStyles.GetNode( _T("w:docDefaults"), oChild ) ) - m_oDocDefaults = oChild; - - if ( oStyles.GetNode( _T("w:latentStyles"), oChild ) ) - m_oLatentStyles = oChild; - - XmlUtils::CXmlNodes oStyleList; - oStyles.GetNodes( _T("w:style"), oStyleList ); - - for ( int nStlyeIndex = 0; nStlyeIndex < oStyleList.GetCount(); nStlyeIndex++ ) - { - XmlUtils::CXmlNode oStyleNode; - if ( oStyleList.GetAt( nStlyeIndex, oStyleNode ) ) - { - OOX::CStyle *oStyle = new OOX::CStyle (oStyleNode); - if (oStyle) - { - if (oStyle->m_oName.IsInit()) - { - m_arrStyleNamesMap[oStyle->m_oName->ToString()] = m_arrStyle.size(); - } - m_arrStyle.push_back( oStyle ); - } - } - } - } -#endif } virtual void write(const CPath& oFilePath, const CPath& oDirectory, CContentTypes& oContent) const { diff --git a/Common/base.pri b/Common/base.pri index 36a636d733..ea17be6071 100644 --- a/Common/base.pri +++ b/Common/base.pri @@ -1,4 +1,4 @@ -VERSION = 2.4.512.0 +VERSION = 2.4.514.0 DEFINES += INTVER=$$VERSION # CONFIGURATION diff --git a/X2tConverter/build/Qt/X2tConverter.pri b/X2tConverter/build/Qt/X2tConverter.pri index 0b1b265064..d7c78f14a3 100755 --- a/X2tConverter/build/Qt/X2tConverter.pri +++ b/X2tConverter/build/Qt/X2tConverter.pri @@ -41,8 +41,6 @@ core_linux_64 { DEFINES += UNICODE \ _UNICODE \ _USE_LIBXML2_READER_ \ - _USE_XMLLITE_READER_ \ - USE_LITE_READER \ #DISABLE_FILE_DOWNLOADER \ FILTER_FLATE_DECODE_ENABLED \ CXIMAGE_DONT_DECLARE_TCHAR \