diff --git a/.gitignore b/.gitignore
index 3a2947f0a3..40eac94eb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,110 @@ X2tConverter/Common/DocxFormat/DocxFormatLib/Makefile
*.dat
*.txt
*.log
+
+*.ipch
+
+.vs/slnx.sqlite
+
+*.json
+
+*.db
+
+*.dll
+
+*.rc
+
+*.lib
+
+ASCOfficeDocFile/DocFormatLib/Linux/
+
+ASCOfficeDocxFile2/Linux/Makefile
+
+ASCOfficeOdfFile/linux/Makefile
+
+*.db-shm
+
+*.db-wal
+
+*.opendb
+
+ASCOfficeOdfFileW/linux/Makefile
+
+ASCOfficePPTFile/PPTFormatLib/Linux/Makefile
+
+ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile
+
+ASCOfficeRtfFile/RtfFormatLib/Linux/Makefile
+
+ASCOfficeTxtFile/TxtXmlFormatLib/Linux/Makefile
+
+ASCOfficeXlsFile2/source/linux/Makefile
+
+build-CEpubFile-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-DjVuFile-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-Fb2File-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-HtmlFile2-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-htmlrenderer-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-kernel-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-PdfReader-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-PdfWriter-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+build-UnicodeConverter-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+Common/3dParty/cryptopp/build-cryptopp-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+Common/3dParty/html/gumbo-parser/
+
+Common/3dParty/html/katana-parser/
+
+Common/DocxFormat/DocxFormatLib/Makefile
+
+Common/Makefile
+
+DesktopEditor/doctrenderer/Makefile
+
+DesktopEditor/graphics/build-graphics-Desktop_Qt_5_9_9_MSVC2015_32bit-Debug/Makefile
+
+EpubFile/Makefile
+
+HtmlFile2/Makefile
+
+XpsFile/Makefile
+
+
+*.sln
+
+*.vcxproj
+*.vcxproj
+ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj
+
+DesktopEditor/Qt_build/graphics/build-graphics-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+DesktopEditor/build-doctrenderer-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-XpsFile-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-UnicodeConverter-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug/Makefile
+
+build-UnicodeConverter-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-PdfWriter-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-PdfReader-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-kernel-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-htmlrenderer-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-HtmlFile2-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-CEpubFile-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
+
+build-Fb2File-Desktop_Qt_5_15_0_MSVC2019_32bit-Debug/Makefile
diff --git a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro b/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro
deleted file mode 100644
index 13be6800e4..0000000000
--- a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro
+++ /dev/null
@@ -1,268 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2014-12-16T18:28:23
-#
-#-------------------------------------------------
-
-QT -= core gui
-
-TARGET = DocFormatLib
-TEMPLATE = lib
-CONFIG += staticlib
-
-CORE_ROOT_DIR = $$PWD/../../..
-PWD_ROOT_DIR = $$PWD
-
-CONFIG += core_x2t
-include(../../../Common/base.pri)
-
-#BOOST
-include($$PWD/../../../Common/3dParty/boost/boost.pri)
-
-DEFINES += UNICODE \
- _UNICODE \
- DONT_WRITE_EMBEDDED_FONTS
-
-core_mac {
- #QMAKE_MAC_SDK = macosx10.11
-}
-
-SOURCES += \
- ../DocFormatLib.cpp \
- ../../../Common/3dParty/pole/pole.cpp \
- ../../DocDocxConverter/EncryptionHeader.cpp \
- ../../DocDocxConverter/DrawingPrimitives.cpp \
- ../../DocDocxConverter/Spa.cpp \
- ../../DocDocxConverter/OleObject.cpp
-
-core_release {
-SOURCES += \
- docformatlib_converter.cpp
-}
-
-core_debug {
-SOURCES += \
- ../../DocDocxConverter/AnnotationReferenceDescriptor.cpp \
- ../../DocDocxConverter/CharacterPropertiesMapping.cpp \
- ../../DocDocxConverter/Converter.cpp \
- ../../DocDocxConverter/DocumentMapping.cpp \
- ../../DocDocxConverter/DocumentProperties.cpp \
- ../../DocDocxConverter/FontFamilyName.cpp \
- ../../DocDocxConverter/FontTableMapping.cpp \
- ../../DocDocxConverter/FooterMapping.cpp \
- ../../DocDocxConverter/FormattedDiskPageCHPX.cpp \
- ../../DocDocxConverter/FormattedDiskPagePAPX.cpp \
- ../../DocDocxConverter/HeaderAndFooterTable.cpp \
- ../../DocDocxConverter/HeaderMapping.cpp \
- ../../DocDocxConverter/LanguageIdMapping.cpp \
- ../../DocDocxConverter/ListData.cpp \
- ../../DocDocxConverter/ListLevel.cpp \
- ../../DocDocxConverter/ListTable.cpp \
- ../../DocDocxConverter/MainDocumentMapping.cpp \
- ../../DocDocxConverter/NumberingMapping.cpp \
- ../../DocDocxConverter/OpenXmlPackage.cpp \
- ../../DocDocxConverter/ParagraphHeight.cpp \
- ../../DocDocxConverter/ParagraphPropertiesMapping.cpp \
- ../../DocDocxConverter/ParagraphPropertyExceptions.cpp \
- ../../DocDocxConverter/PictureDescriptor.cpp \
- ../../DocDocxConverter/PieceTable.cpp \
- ../../DocDocxConverter/PropertiesMapping.cpp \
- ../../DocDocxConverter/PropertyExceptions.cpp \
- ../../DocDocxConverter/RevisionData.cpp \
- ../../DocDocxConverter/SectionPropertiesMapping.cpp \
- ../../DocDocxConverter/SettingsMapping.cpp \
- ../../DocDocxConverter/SinglePropertyModifier.cpp \
- ../../DocDocxConverter/StyleSheet.cpp \
- ../../DocDocxConverter/StyleSheetDescription.cpp \
- ../../DocDocxConverter/StyleSheetInformation.cpp \
- ../../DocDocxConverter/StyleSheetMapping.cpp \
- ../../DocDocxConverter/TableCellPropertiesMapping.cpp \
- ../../DocDocxConverter/TableMapping.cpp \
- ../../DocDocxConverter/TablePropertiesMapping.cpp \
- ../../DocDocxConverter/TableRowPropertiesMapping.cpp \
- ../../DocDocxConverter/TextboxMapping.cpp \
- ../../DocDocxConverter/VMLPictureMapping.cpp \
- ../../DocDocxConverter/VMLShapeMapping.cpp \
- ../../DocDocxConverter/VMLShapeTypeMapping.cpp \
- ../../DocDocxConverter/WordDocument.cpp \
- ../../DocDocxConverter/WordprocessingDocument.cpp \
- ../../DocDocxConverter/FormFieldData.cpp \
- ../../DocDocxConverter/OfficeDrawing/Record.cpp \
- ../../DocDocxConverter/OfficeDrawing/RecordFactory.cpp \
- ../../DocDocxConverter/OfficeDrawing/ShapeTypeFactory.cpp
-}
-
-HEADERS += \
- ../DocFormatLib.h \
- ../../Common/Aggregat.h \
- ../../Common/FormatUtils.h \
- ../../Common/IOperand.h \
- ../../Common/IVirtualConstructor.h \
- ../../Common/LanguageCodes.h \
- ../../Common/Singleton.h \
- ../../Common/SPRMCodes.h \
- ../../Common/TargetOptions.h \
- ../../Common/TextMark.h \
- ../../Common/utf8.h \
- ../../Common/XmlTools.h \
- ../../DocDocxConverter/AbstractOpenXmlMapping.h \
- ../../DocDocxConverter/AnnotationOwnerList.h \
- ../../DocDocxConverter/AnnotationReferenceDescriptor.h \
- ../../DocDocxConverter/AutoSummaryInfo.h \
- ../../DocDocxConverter/BookmarkFirst.h \
- ../../DocDocxConverter/BorderCode.h \
- ../../DocDocxConverter/ByteStructure.h \
- ../../DocDocxConverter/CharacterPropertiesMapping.h \
- ../../DocDocxConverter/CharacterPropertyExceptions.h \
- ../../DocDocxConverter/CharacterRange.h \
- ../../DocDocxConverter/CommentsMapping.h \
- ../../DocDocxConverter/ContentTypes.h \
- ../../DocDocxConverter/ConversionContext.h \
- ../../DocDocxConverter/Converter.h \
- ../../DocDocxConverter/DateAndTime.h \
- ../../DocDocxConverter/DocumentMapping.h \
- ../../DocDocxConverter/DocumentProperties.h \
- ../../DocDocxConverter/DocumentTypographyInfo.h \
- ../../DocDocxConverter/DrawingObjectGrid.h \
- ../../DocDocxConverter/EmuValue.h \
- ../../DocDocxConverter/EndnoteDescriptor.h \
- ../../DocDocxConverter/EndnotesMapping.h \
- ../../DocDocxConverter/FieldCharacter.h \
- ../../DocDocxConverter/FileInformationBlock.h \
- ../../DocDocxConverter/FixedPointNumber.h \
- ../../DocDocxConverter/FontFamilyName.h \
- ../../DocDocxConverter/FontTableMapping.h \
- ../../DocDocxConverter/FooterMapping.h \
- ../../DocDocxConverter/FootnoteDescriptor.h \
- ../../DocDocxConverter/FootnotesMapping.h \
- ../../DocDocxConverter/FormattedDiskPage.h \
- ../../DocDocxConverter/FormattedDiskPageCHPX.h \
- ../../DocDocxConverter/FormattedDiskPagePAPX.h \
- ../../DocDocxConverter/Global.h \
- ../../DocDocxConverter/HeaderAndFooterTable.h \
- ../../DocDocxConverter/HeaderMapping.h \
- ../../DocDocxConverter/IBinaryReader.h \
- ../../DocDocxConverter/IMapping.h \
- ../../DocDocxConverter/IVisitable.h \
- ../../DocDocxConverter/LanguageId.h \
- ../../DocDocxConverter/LanguageIdMapping.h \
- ../../DocDocxConverter/LineSpacingDescriptor.h \
- ../../DocDocxConverter/ListData.h \
- ../../DocDocxConverter/ListFormatOverride.h \
- ../../DocDocxConverter/ListFormatOverrideLevel.h \
- ../../DocDocxConverter/ListFormatOverrideTable.h \
- ../../DocDocxConverter/ListLevel.h \
- ../../DocDocxConverter/ListTable.h \
- ../../DocDocxConverter/MainDocumentMapping.h \
- ../../DocDocxConverter/MemoryStream.h \
- ../../DocDocxConverter/NumberingMapping.h \
- ../../DocDocxConverter/OfficeArtContent.h \
- ../../DocDocxConverter/OleObject.h \
- ../../DocDocxConverter/OleObjectMapping.h \
- ../../DocDocxConverter/OpenXmlPackage.h \
- ../../DocDocxConverter/ParagraphHeight.h \
- ../../DocDocxConverter/ParagraphPropertiesMapping.h \
- ../../DocDocxConverter/ParagraphPropertyExceptions.h \
- ../../DocDocxConverter/PictureDescriptor.h \
- ../../DocDocxConverter/PieceDescriptor.h \
- ../../DocDocxConverter/PieceTable.h \
- ../../DocDocxConverter/Plex.h \
- ../../DocDocxConverter/PropertiesMapping.h \
- ../../DocDocxConverter/PropertyExceptions.h \
- ../../DocDocxConverter/RevisionData.h \
- ../../DocDocxConverter/RGBColor.h \
- ../../DocDocxConverter/SectionDescriptor.h \
- ../../DocDocxConverter/SectionPropertiesMapping.h \
- ../../DocDocxConverter/SectionPropertyExceptions.h \
- ../../DocDocxConverter/SettingsMapping.h \
- ../../DocDocxConverter/ShadingDescriptor.h \
- ../../DocDocxConverter/SinglePropertyModifier.h \
- ../../DocDocxConverter/Spa.h \
- ../../DocDocxConverter/SprmTDefTable.h \
- ../../DocDocxConverter/StringTable.h \
- ../../DocDocxConverter/StructuredStorageReader.h \
- ../../DocDocxConverter/StyleSheet.h \
- ../../DocDocxConverter/StyleSheetDescription.h \
- ../../DocDocxConverter/StyleSheetInformation.h \
- ../../DocDocxConverter/StyleSheetMapping.h \
- ../../DocDocxConverter/TabDescriptor.h \
- ../../DocDocxConverter/TableCellPropertiesMapping.h \
- ../../DocDocxConverter/TableInfo.h \
- ../../DocDocxConverter/TableMapping.h \
- ../../DocDocxConverter/TablePropertiesMapping.h \
- ../../DocDocxConverter/TablePropertyExceptions.h \
- ../../DocDocxConverter/TableRowPropertiesMapping.h \
- ../../DocDocxConverter/Tbkd.h \
- ../../DocDocxConverter/TextboxMapping.h \
- ../../DocDocxConverter/TwipsValue.h \
- ../../DocDocxConverter/VirtualStreamReader.h \
- ../../DocDocxConverter/VMLPictureMapping.h \
- ../../DocDocxConverter/VMLShapeMapping.h \
- ../../DocDocxConverter/VMLShapeTypeMapping.h \
- ../../DocDocxConverter/WideString.h \
- ../../DocDocxConverter/WordDocument.h \
- ../../DocDocxConverter/WordprocessingDocument.h \
- ../../DocDocxConverter/OfficeDrawing/BitmapBlip.h \
- ../../DocDocxConverter/OfficeDrawing/BlipStoreContainer.h \
- ../../DocDocxConverter/OfficeDrawing/BlipStoreEntry.h \
- ../../DocDocxConverter/OfficeDrawing/ChildAnchor.h \
- ../../DocDocxConverter/OfficeDrawing/ClientAnchor.h \
- ../../DocDocxConverter/OfficeDrawing/ClientData.h \
- ../../DocDocxConverter/OfficeDrawing/DrawingContainer.h \
- ../../DocDocxConverter/OfficeDrawing/DrawingGroup.h \
- ../../DocDocxConverter/OfficeDrawing/DrawingGroupRecord.h \
- ../../DocDocxConverter/OfficeDrawing/DrawingRecord.h \
- ../../DocDocxConverter/OfficeDrawing/GroupContainer.h \
- ../../DocDocxConverter/OfficeDrawing/GroupShapeRecord.h \
- ../../DocDocxConverter/OfficeDrawing/MetafilePictBlip.h \
- ../../DocDocxConverter/OfficeDrawing/OfficeArtClientTextbox.h \
- ../../DocDocxConverter/OfficeDrawing/PathParser.h \
- ../../DocDocxConverter/OfficeDrawing/PathSegment.h \
- ../../DocDocxConverter/OfficeDrawing/Record.h \
- ../../DocDocxConverter/OfficeDrawing/RecordFactory.h \
- ../../DocDocxConverter/OfficeDrawing/RegularContainer.h \
- ../../DocDocxConverter/OfficeDrawing/Shape.h \
- ../../DocDocxConverter/OfficeDrawing/ShapeContainer.h \
- ../../DocDocxConverter/OfficeDrawing/ShapeOptions.h \
- ../../DocDocxConverter/OfficeDrawing/ShapeType.h \
- ../../DocDocxConverter/OfficeDrawing/ShapeTypeFactory.h \
- ../../DocDocxConverter/OfficeDrawing/SplitMenuColorContainer.h \
- ../../DocDocxConverter/OfficeDrawing/UnknownRecord.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/ArcType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/ArrowType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/BevelType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/BlockArcType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/BracketsType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/CalloutsType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/CanType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/Connector.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/CubeType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/DiamondType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/DonutType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/FlowChartType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/FoldedCornerlType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/HeartType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/HexagonType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/IsoscelesTriangleType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/LightningBoltType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/LineType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/MoonType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/NoSmokingType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/OctagonType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/OvalType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/ParallelogramType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/PentagonType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/PictureFrameType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/PlaqueType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/PlusType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/RectangleType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/RightTriangleType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/RoundedRectangleType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/SmileyFaceType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/StarType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/SunType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/TextboxType.h \
- ../../DocDocxConverter/OfficeDrawing/Shapetypes/TrapezoidType.h \
- ../../../Common/3dParty/pole/pole.h \
- ../../DocDocxConverter/EncryptionHeader.h \
- ../../DocDocxConverter/DrawingPrimitives.h
diff --git a/ASCOfficeDocFile/DocFormatLib/Linux/docformatlib_converter.cpp b/ASCOfficeDocFile/DocFormatLib/Linux/docformatlib_converter.cpp
deleted file mode 100644
index af1eb3ba6d..0000000000
--- a/ASCOfficeDocFile/DocFormatLib/Linux/docformatlib_converter.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * 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 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * 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 "../../DocDocxConverter/AnnotationReferenceDescriptor.cpp"
-#include "../../DocDocxConverter/CharacterPropertiesMapping.cpp"
-#include "../../DocDocxConverter/Converter.cpp"
-#include "../../DocDocxConverter/DocumentMapping.cpp"
-#include "../../DocDocxConverter/DocumentProperties.cpp"
-#include "../../DocDocxConverter/FontFamilyName.cpp"
-#include "../../DocDocxConverter/FontTableMapping.cpp"
-#include "../../DocDocxConverter/FooterMapping.cpp"
-#include "../../DocDocxConverter/FormattedDiskPageCHPX.cpp"
-#include "../../DocDocxConverter/FormattedDiskPagePAPX.cpp"
-#include "../../DocDocxConverter/HeaderAndFooterTable.cpp"
-#include "../../DocDocxConverter/HeaderMapping.cpp"
-#include "../../DocDocxConverter/LanguageIdMapping.cpp"
-#include "../../DocDocxConverter/ListData.cpp"
-#include "../../DocDocxConverter/ListLevel.cpp"
-#include "../../DocDocxConverter/ListTable.cpp"
-#include "../../DocDocxConverter/MainDocumentMapping.cpp"
-#include "../../DocDocxConverter/NumberingMapping.cpp"
-#include "../../DocDocxConverter/OpenXmlPackage.cpp"
-#include "../../DocDocxConverter/ParagraphHeight.cpp"
-#include "../../DocDocxConverter/ParagraphPropertiesMapping.cpp"
-#include "../../DocDocxConverter/ParagraphPropertyExceptions.cpp"
-#include "../../DocDocxConverter/PictureDescriptor.cpp"
-#include "../../DocDocxConverter/PieceTable.cpp"
-#include "../../DocDocxConverter/PropertiesMapping.cpp"
-#include "../../DocDocxConverter/PropertyExceptions.cpp"
-#include "../../DocDocxConverter/RevisionData.cpp"
-#include "../../DocDocxConverter/SectionPropertiesMapping.cpp"
-#include "../../DocDocxConverter/SettingsMapping.cpp"
-#include "../../DocDocxConverter/SinglePropertyModifier.cpp"
-#include "../../DocDocxConverter/StyleSheet.cpp"
-#include "../../DocDocxConverter/StyleSheetDescription.cpp"
-#include "../../DocDocxConverter/StyleSheetInformation.cpp"
-#include "../../DocDocxConverter/StyleSheetMapping.cpp"
-#include "../../DocDocxConverter/TableCellPropertiesMapping.cpp"
-#include "../../DocDocxConverter/TableMapping.cpp"
-#include "../../DocDocxConverter/TablePropertiesMapping.cpp"
-#include "../../DocDocxConverter/TableRowPropertiesMapping.cpp"
-#include "../../DocDocxConverter/TextboxMapping.cpp"
-#include "../../DocDocxConverter/VMLPictureMapping.cpp"
-#include "../../DocDocxConverter/VMLShapeMapping.cpp"
-#include "../../DocDocxConverter/VMLShapeTypeMapping.cpp"
-#include "../../DocDocxConverter/WordDocument.cpp"
-#include "../../DocDocxConverter/WordprocessingDocument.cpp"
-#include "../../DocDocxConverter/FormFieldData.cpp"
-#include "../../DocDocxConverter/OfficeDrawing/Record.cpp"
-#include "../../DocDocxConverter/OfficeDrawing/RecordFactory.cpp"
-#include "../../DocDocxConverter/OfficeDrawing/ShapeTypeFactory.cpp"
diff --git a/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj b/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj
deleted file mode 100644
index 0f463c9e8a..0000000000
--- a/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj
+++ /dev/null
@@ -1,376 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {C5371405-338F-4B70-83BD-2A5CDF64F383}
- DocFormatLib
- Win32Proj
-
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
-
- Disabled
- ..\..\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- EditAndContinue
- 4005;4311;4312;%(DisableSpecificWarnings)
-
-
-
-
- X64
-
-
- Disabled
- _DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- ProgramDatabase
-
-
-
-
- WIN32;NDEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
- Level3
- ProgramDatabase
-
-
-
-
- X64
-
-
- ..\..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;%(AdditionalIncludeDirectories)
- NDEBUG;_LIB;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
- Level3
- ProgramDatabase
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj.filters b/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj.filters
index 6bcc883af7..15f23aa8e8 100644
--- a/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj.filters
+++ b/ASCOfficeDocFile/DocFormatLib/Win32/DocFormatLib.vcxproj.filters
@@ -1,713 +1,713 @@
-
-
-
-
- {b71e7e8a-fe3b-470f-aecc-cd46ae338e31}
-
-
- {08f46501-29da-4691-b19d-2f230e536ee2}
-
-
- {0c04a0b9-7265-4e3e-af45-0a86e4d7c49c}
-
-
- {bbeff7b2-a7b0-4cab-85a4-893aebfce8a8}
-
-
- {80f3b70c-514b-444d-8a10-21c4ccbea4a1}
-
-
- {6640ac5f-d20f-4e15-9a1c-230e6d19266e}
-
-
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common\pole
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\OfficeDrawing\Shapetypes
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
-
-
-
- Common\pole
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\OfficeDrawing
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
- Doc_2_Docx\Mapping
-
-
-
+
+
+
+
+ {b71e7e8a-fe3b-470f-aecc-cd46ae338e31}
+
+
+ {08f46501-29da-4691-b19d-2f230e536ee2}
+
+
+ {0c04a0b9-7265-4e3e-af45-0a86e4d7c49c}
+
+
+ {bbeff7b2-a7b0-4cab-85a4-893aebfce8a8}
+
+
+ {80f3b70c-514b-444d-8a10-21c4ccbea4a1}
+
+
+ {6640ac5f-d20f-4e15-9a1c-230e6d19266e}
+
+
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common\pole
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\OfficeDrawing\Shapetypes
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+
+
+
+ Common\pole
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\OfficeDrawing
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+ Doc_2_Docx\Mapping
+
+
+
\ No newline at end of file
diff --git a/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj b/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj
deleted file mode 100644
index 96e5cfb94f..0000000000
--- a/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}
- PptFormatTest
- Win32Proj
-
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- false
- Unicode
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- false
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
- false
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
-
-
- $(SolutionDir)$(Configuration)\
- $(Configuration)\
- false
-
-
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
-
-
-
- Disabled
- ../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/freetype-2.5.2/include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS;DONT_USED_EXTRA_LIBRARY;%(PreprocessorDefinitions)
- false
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- EditAndContinue
-
-
- Urlmon.lib;%(AdditionalDependencies)
- true
- true
- Console
- MachineX86
-
-
-
-
- X64
-
-
- Disabled
- ..\..\..\..\..\Common\OfficeDrawing;..\..\..\..\..\DesktopEditor\freetype-2.5.2\include;..\..\..\..\..\Common\OfficeDrawing\Shapes;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;%(PreprocessorDefinitions)
- false
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- ProgramDatabase
-
-
- Urlmon.lib;%(AdditionalDependencies)
- LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)
- true
- true
- Console
- MachineX64
-
-
-
-
- ..\..\..\..\..\Common\OfficeDrawing;..\..\..\..\..\DesktopEditor\freetype-2.5.2\include;..\..\..\..\..\Common\OfficeDrawing\Shapes;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
- Level3
- ProgramDatabase
-
-
- Urlmon.lib;%(AdditionalDependencies)
- true
- Console
- true
- true
- MachineX86
-
-
-
-
- X64
-
-
- ..\..\..\..\..\Common\OfficeDrawing;..\..\..\..\..\DesktopEditor\freetype-2.5.2\include;..\..\..\..\..\Common\OfficeDrawing\Shapes;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
- Level3
- ProgramDatabase
-
-
- Urlmon.lib;%(AdditionalDependencies)
- true
- Console
- true
- true
- MachineX64
-
-
-
-
-
-
-
-
-
- /bigobj
- %(AdditionalOptions)
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
-
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
-
-
-
-
- {36636678-ae25-4be6-9a34-2561d1bcf302}
- false
-
-
- {77ddc8d7-5b12-4ff2-9629-26aebca8436d}
- false
-
-
- {3423ec9a-52e4-4a4d-9753-edebc38785ef}
- false
-
-
- {a100103a-353e-45e8-a9b8-90b87cc5c0b0}
-
-
- {c27e9a9f-3a17-4482-9c5f-bf15c01e747c}
- false
-
-
- {c5371405-338f-4b70-83bd-2a5cdf64f383}
- false
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj.filters b/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj.filters
index 609fbbf31f..d544e43e41 100644
--- a/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj.filters
+++ b/ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcxproj.filters
@@ -1,63 +1,63 @@
-
-
-
-
- {684a6de4-5e01-434f-aa50-2efd22c26e73}
-
-
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
-
-
+
+
+
+
+ {684a6de4-5e01-434f-aa50-2efd22c26e73}
+
+
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+
+
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj b/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj
deleted file mode 100644
index 06afa6b578..0000000000
--- a/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- OdfFileReaderTest
- {C2882DDD-07E6-4314-AD4B-48F43F38D722}
- ASCOfficeOdfFileTest
- Win32Proj
-
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- Unicode
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- true
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- true
-
-
- $(Configuration)\
- $(Configuration)\
- false
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
-
-
-
- Disabled
- ../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- EditAndContinue
-
-
- gdi32.lib;Rpcrt4.lib;%(AdditionalDependencies)
- NotSet
-
- true
- Console
- MachineX86
-
-
-
-
- X64
-
-
- Disabled
- WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
- Level3
- ProgramDatabase
-
-
- kernel32.lib
- true
- Console
- MachineX64
-
-
-
-
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
- Use
- Level3
- ProgramDatabase
-
-
- kernel32.lib
- true
- Console
- true
- true
- MachineX86
-
-
-
-
- X64
-
-
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
- Use
- Level3
- ProgramDatabase
-
-
- kernel32.lib
- true
- Console
- true
- true
- MachineX64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {3423ec9a-52e4-4a4d-9753-edebc38785ef}
-
-
- {c27e9a9f-3a17-4482-9c5f-bf15c01e747c}
- false
-
-
- {609ed938-3ca8-4bed-b363-25096d4c4812}
- false
-
-
- {50e20601-4a8d-4afb-8870-63828d328429}
- false
-
-
- {41bed424-4eaf-4053-8a5f-1e2a387d53d1}
-
-
- {94954a67-a853-43b1-a727-6ef2774c5a6a}
- false
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj.filters b/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj.filters
index 960876b00b..575331b3fe 100644
--- a/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj.filters
+++ b/ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcxproj.filters
@@ -1,28 +1,28 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
-
-
- Common
-
-
-
-
- Common
-
-
- Common
-
-
- Common
-
-
- Common
-
-
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ Common
+
+
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
+ Common
+
+
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/include/xml/simple_xml_writer.h b/ASCOfficeOdfFile/include/xml/simple_xml_writer.h
index ca6b9478fb..7263e29058 100644
--- a/ASCOfficeOdfFile/include/xml/simple_xml_writer.h
+++ b/ASCOfficeOdfFile/include/xml/simple_xml_writer.h
@@ -1,327 +1,330 @@
-/*
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * 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 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * 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
-
-#include
-#include
-#include
-#include
-#include
-
-namespace cpdoccore
-{
-
-namespace xml
-{
-
-namespace writer
-{
-
- template struct chars { };
-
- template <>
- struct chars
- {
- static const char eq = '=';
- static const char quote = '\"';
- static const char space = ' ';
- static const char left_brocket = '<';
- static const char right_brocket = '>';
- static const char slash = '/';
- static const char colon = ':';
- static const char amp = '&';
- static const char apos = '\'';
- static const char * cdata_open() { return ""; }
- static const char * amp_str(){ return "&"; }
- static const char * left_brocket_str() { return "<"; }
- static const char * right_brocket_str() { return ">"; }
- static const char * apos_str() { return "'"; }
- static const char * quote_str() { return """; }
- };
-
- template <>
- struct chars
- {
- static const wchar_t eq = L'=';
- static const wchar_t quote = L'\"';
- static const wchar_t space = L' ';
- static const wchar_t left_brocket = L'<';
- static const wchar_t right_brocket = L'>';
- static const wchar_t slash = L'/';
- static const wchar_t colon = L':';
- static const wchar_t amp = L'&';
- static const wchar_t apos = L'\'';
- static const wchar_t * cdata_open() { return L""; }
- static const wchar_t * amp_str(){ return L"&"; }
- static const wchar_t * left_brocket_str() { return L"<"; }
- static const wchar_t * right_brocket_str() { return L">"; }
- static const wchar_t * apos_str() { return L"'"; }
- static const wchar_t * quote_str() { return L"""; }
- };
-
- template
- class element;
-
- //
- // xml::writer class
- //
- template
- class writer
- {
- public:
- // writer must be bound to an ostream
- writer(std::basic_ostream& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
- ~writer(void) { assert(elements_.empty()); }
-
- private:
- size_t level_;
- std::basic_ostream& os_; // output stream
- bool need_header_; // have we written an XML header yet?
- std::stack*> elements_; // stack of open element tags
-
-
- // write XML header, if necessary
- writer& header()
- {
- if (need_header_)
- {
- // TODO
- //os_ << "";
- need_header_ = false;
- }
- return *this;
- }
-
- // write a single character to the output stream
- writer& putc(T c)
- {
- os_.put(c);
- return *this;
- }
-
- // write a string to the output stream
- writer& puts(const T* str) {
- os_ << str;
- return *this;
- }
-
- template
- friend class element;
- };
-
- //
- // xml::element class
- //
- template
- class element
- {
- public:
- // create a new element tag, bound to an xml::writer
- element(writer& wr, std::basic_string, std::allocator > const & name) : wr_(wr), name_(name)
- {
- wr_.level_++;
- check_parent();
- wr_.header().putc('<').puts(name_.c_str());
- tagopen_ = true;
- wr_.elements_.push(this);
- }
-
- // close the current element tag
- ~element()
- {
- if (!wr_.elements_.empty() && wr_.elements_.top() == this)
- {
- wr_.elements_.pop();
- if (tagopen_)
- wr_.putc(chars::slash)
- .putc(chars::right_brocket);
- else
- wr_.putc(chars::left_brocket)
- .putc(chars::slash)
- .puts(name_.c_str())
- .putc(chars::right_brocket);
- }
- wr_.level_--;
- }
-
- // write an attribute for the current element
- element& attr(const T* name, const T* value)
- {
- assert(name != 0);
- assert(value != 0);
- assert(tagopen_);
- wr_.putc(chars::space)
- .puts(name)
- .putc(chars::eq)
- .putc(chars::quote);
- qputs(value);
- wr_.putc(chars::quote);
- return *this;
- }
-
- // attr() overload for std::string type
- element& attr(const T* name, const std::basic_string, std::allocator >& value)
- {
- return attr(name, value.c_str());
- }
-
- // attr() function template for all streamable types
- template
- element& attr(const T* name, V value)
- {
- std::basic_stringstream, std::allocator > ss;
- ss << value;
- attr(name, ss.str());
- return *this;
- }
-
- // write text content for the current element
- element& contents(const T* str)
- {
- assert(str != 0);
- check_parent();
- qputs(str);
- return *this;
- }
-
- // contents() overload for std::string type
- element& contents(const std::basic_string, std::allocator >& str)
- {
- return contents(str.c_str());
- }
-
- // contents() function template for all streamable types
- template
- element& contents(V value)
- {
- std::basic_stringstream, std::allocator > ss;
- ss << value;
- contents(ss.str());
- return *this;
- }
-
- std::basic_ostream& stream()
- {
- check_parent();
- return wr_.os_;
- }
-
- // write CDATA section
- element& cdata(const T * str)
- {
- assert(str != 0);
- check_parent();
- wr_.puts(chars::cdata_open());
- wr_.puts(str);
- wr_.puts(chars::cdata_close());
- return *this;
- }
-
- // cdata() overload for std::string type
- element& cdata(const std::basic_string, std::allocator >& str)
- {
- return cdata(str.c_str());
- }
-
- private:
- writer& wr_; // bound XML writer
- //const T* name_; // name of current element
- const std::basic_string, std::allocator > name_;
- bool tagopen_; // is the element tag for this element still open?
-
- // write a string quoting characters which have meaning in xml
- element& qputs(const T* str)
- {
- for (; *str; ++str)
- {
- switch (*str)
- {
- case chars::amp:
- wr_.puts(chars::amp_str()); break;
-
- case chars::left_brocket:
- wr_.puts(chars::left_brocket_str()); break;
-
- case chars::right_brocket:
- wr_.puts(chars::right_brocket_str()); break;
-
- case chars::apos:
- wr_.puts(chars::apos_str()); break;
-
- case chars::quote:
- wr_.puts(chars::quote_str()); break;
-
- default:
- wr_.putc(*str); break;
- }
- }
- return *this;
- }
-
- // check to see if we have a parent tag which needs to be closed
- void check_parent()
- {
- if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
- {
- wr_.putc(chars::right_brocket);
- wr_.elements_.top()->tagopen_ = false;
- }
- }
- };
-
-}
-
-}
-
-typedef xml::writer::writer xml_writer;
-typedef xml::writer::element xml_element;
-
-#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
-#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
-#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
-#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
-#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
-#define CP_XML_STREAM() _xml_node_.stream()
-
-#define CP_GET_XML_NODE() _xml_node_
-
-#define CP_ATTR_NODE xml_element & _xml_node_
-
-
-
-#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
-
-#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
-
-}
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include
+#include
+#include
+#include
+#include
+
+namespace cpdoccore
+{
+
+namespace xml
+{
+
+namespace writer
+{
+
+ template struct chars { };
+
+ template <>
+ struct chars
+ {
+ static const char eq = '=';
+ static const char quote = '\"';
+ static const char space = ' ';
+ static const char left_brocket = '<';
+ static const char right_brocket = '>';
+ static const char slash = '/';
+ static const char colon = ':';
+ static const char amp = '&';
+ static const char apos = '\'';
+ static const char * cdata_open() { return ""; }
+ static const char * amp_str(){ return "&"; }
+ static const char * left_brocket_str() { return "<"; }
+ static const char * right_brocket_str() { return ">"; }
+ static const char * apos_str() { return "'"; }
+ static const char * quote_str() { return """; }
+ };
+
+ template <>
+ struct chars
+ {
+ static const wchar_t eq = L'=';
+ static const wchar_t quote = L'\"';
+ static const wchar_t space = L' ';
+ static const wchar_t left_brocket = L'<';
+ static const wchar_t right_brocket = L'>';
+ static const wchar_t slash = L'/';
+ static const wchar_t colon = L':';
+ static const wchar_t amp = L'&';
+ static const wchar_t apos = L'\'';
+ static const wchar_t * cdata_open() { return L""; }
+ static const wchar_t * amp_str(){ return L"&"; }
+ static const wchar_t * left_brocket_str() { return L"<"; }
+ static const wchar_t * right_brocket_str() { return L">"; }
+ static const wchar_t * apos_str() { return L"'"; }
+ static const wchar_t * quote_str() { return L"""; }
+ };
+
+ template
+ class element;
+
+ //
+ // xml::writer class
+ //
+ template
+ class writer
+ {
+ public:
+ // writer must be bound to an ostream
+ writer(std::basic_ostream& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
+ ~writer(void) { assert(elements_.empty()); }
+
+ private:
+ size_t level_;
+ std::basic_ostream& os_; // output stream
+ bool need_header_; // have we written an XML header yet?
+ std::stack*> elements_; // stack of open element tags
+
+
+ // write XML header, if necessary
+ writer& header()
+ {
+ if (need_header_)
+ {
+ // TODO
+ //os_ << "";
+ need_header_ = false;
+ }
+ return *this;
+ }
+
+ // write a single character to the output stream
+ writer& putc(T c)
+ {
+ os_.put(c);
+ return *this;
+ }
+
+ // write a string to the output stream
+ writer& puts(const T* str) {
+ os_ << str;
+ return *this;
+ }
+
+ template
+ friend class element;
+ };
+
+ //
+ // xml::element class
+ //
+ template
+ class element
+ {
+ public:
+ // create a new element tag, bound to an xml::writer
+ element(writer& wr, std::basic_string, std::allocator > const & name) : wr_(wr), name_(name)
+ {
+ wr_.level_++;
+ check_parent();
+ wr_.header().putc('<').puts(name_.c_str());
+ tagopen_ = true;
+ wr_.elements_.push(this);
+ }
+
+ // close the current element tag
+ ~element()
+ {
+ if (!wr_.elements_.empty() && wr_.elements_.top() == this)
+ {
+ wr_.elements_.pop();
+ if (tagopen_)
+ wr_.putc(chars::slash)
+ .putc(chars::right_brocket);
+ else
+ wr_.putc(chars::left_brocket)
+ .putc(chars::slash)
+ .puts(name_.c_str())
+ .putc(chars::right_brocket);
+ }
+ wr_.level_--;
+ }
+
+ // write an attribute for the current element
+ element& attr(const T* name, const T* value)
+ {
+ assert(name != 0);
+ assert(value != 0);
+ assert(tagopen_);
+ wr_.putc(chars::space)
+ .puts(name)
+ .putc(chars::eq)
+ .putc(chars::quote);
+ qputs(value);
+ wr_.putc(chars::quote);
+ return *this;
+ }
+
+ // attr() overload for std::string type
+ element& attr(const T* name, const std::basic_string, std::allocator >& value)
+ {
+ return attr(name, value.c_str());
+ }
+
+ // attr() function template for all streamable types
+ template
+ element& attr(const T* name, V value)
+ {
+ std::basic_stringstream, std::allocator > ss;
+ ss << value;
+ attr(name, ss.str());
+ return *this;
+ }
+
+ // write text content for the current element
+ element& contents(const T* str)
+ {
+ assert(str != 0);
+ check_parent();
+ qputs(str);
+ return *this;
+ }
+
+ // contents() overload for std::string type
+ element& contents(const std::basic_string, std::allocator >& str)
+ {
+ return contents(str.c_str());
+ }
+
+ // contents() function template for all streamable types
+ template
+ element& contents(V value)
+ {
+ std::basic_stringstream, std::allocator > ss;
+ ss << value;
+ contents(ss.str());
+ return *this;
+ }
+
+ std::basic_ostream& stream()
+ {
+ check_parent();
+ return wr_.os_;
+ }
+
+ // write CDATA section
+ element& cdata(const T * str)
+ {
+ assert(str != 0);
+ check_parent();
+ wr_.puts(chars::cdata_open());
+ wr_.puts(str);
+ wr_.puts(chars::cdata_close());
+ return *this;
+ }
+
+ // cdata() overload for std::string type
+ element& cdata(const std::basic_string, std::allocator >& str)
+ {
+ return cdata(str.c_str());
+ }
+
+ private:
+ writer& wr_; // bound XML writer
+ //const T* name_; // name of current element
+ const std::basic_string, std::allocator > name_;
+ bool tagopen_; // is the element tag for this element still open?
+
+ // write a string quoting characters which have meaning in xml
+ element& qputs(const T* str)
+ {
+ for (; *str; ++str)
+ {
+ switch (*str)
+ {
+ case chars::amp:
+ wr_.puts(chars::amp_str()); break;
+
+ case chars::left_brocket:
+ wr_.puts(chars::left_brocket_str()); break;
+
+ case chars::right_brocket:
+ wr_.puts(chars::right_brocket_str()); break;
+
+ case chars::apos:
+ wr_.puts(chars::apos_str()); break;
+
+ case chars::quote:
+ wr_.puts(chars::quote_str()); break;
+
+ default:
+ wr_.putc(*str); break;
+ }
+ }
+ return *this;
+ }
+
+ // check to see if we have a parent tag which needs to be closed
+ void check_parent()
+ {
+ if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
+ {
+ wr_.putc(chars::right_brocket);
+ wr_.elements_.top()->tagopen_ = false;
+ }
+ }
+ };
+
+}
+
+}
+
+typedef xml::writer::writer xml_writer;
+typedef xml::writer::element xml_element;
+
+#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
+#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
+#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
+#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
+#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
+#define CP_XML_STREAM() _xml_node_.stream()
+
+#define CP_GET_XML_NODE() _xml_node_
+
+#define CP_ATTR_NODE xml_element & _xml_node_
+
+
+
+#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL)) // было (*VAl))
+
+#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
+
+#define CP_XML_NODE_SIMPLE_NONS() CP_XML_NODE(std::wstring(name))
+
+
+}
diff --git a/ASCOfficeOdfFile/src/odf/math_layout_elements.h b/ASCOfficeOdfFile/src/odf/math_layout_elements.h
index 1fb88b4079..1f20cdedb9 100644
--- a/ASCOfficeOdfFile/src/odf/math_layout_elements.h
+++ b/ASCOfficeOdfFile/src/odf/math_layout_elements.h
@@ -1,221 +1,221 @@
-/*
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * 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 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * 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
-
-#include "math_elements.h"
-
-#include "datatypes/common_attlists.h"
-#include "datatypes/fontstyle.h"
-#include "datatypes/fontweight.h"
-#include "datatypes/fontsize.h"
-
-namespace cpdoccore {
-
- using namespace odf_types;
-
-namespace odf_reader {
-
-class math_mrow : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMRow;
-
- math_mrow();
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
- bool next_element_to_prev_;
-};
-
-CP_REGISTER_OFFICE_ELEMENT2(math_mrow);
-CP_REGISTER_OFFICE_ELEMENT3(math_mrow);
-//--------------------------------------------------------------------------------------
-class math_mfrac : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMFrac;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_; //2 elements
-
- _CP_OPT(length) linethickness;
- //numalign left, central,right
- //denomalign
- _CP_OPT(Bool) bevelled;
-};
-
-CP_REGISTER_OFFICE_ELEMENT2(math_mfrac);
-CP_REGISTER_OFFICE_ELEMENT3(math_mfrac);
-//--------------------------------------------------------------------------------------
-class math_msqrt : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMSqrt;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_msqrt);
-CP_REGISTER_OFFICE_ELEMENT3(math_msqrt);
-
-//--------------------------------------------------------------------------------------
-class math_mroot : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMRoot;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_mroot);
-CP_REGISTER_OFFICE_ELEMENT3(math_mroot);
-
-//--------------------------------------------------------------------------------------
-class math_mstyle : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMStyle;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-
- common_math_style_attlist common_attlist_;
- _CP_OPT(font_size) mathsize_;
- _CP_OPT(color) color_;
- _CP_OPT(font_weight) fontweight_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_mstyle);
-CP_REGISTER_OFFICE_ELEMENT3(math_mstyle);
-//--------------------------------------------------------------------------------------
-
-class math_menclose : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMEnClose;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_menclose);
-CP_REGISTER_OFFICE_ELEMENT3(math_menclose);
-//--------------------------------------------------------------------------------------
-
-class math_mfenced : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMFenced;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_mfenced);
-CP_REGISTER_OFFICE_ELEMENT3(math_mfenced);
-//--------------------------------------------------------------------------------------
-
-class math_mpadded : public office_math_element
-{
-public:
- static const wchar_t * ns;
- static const wchar_t * name;
- static const xml::NodeType xml_type = xml::typeElement;
- static const ElementType type = typeMPadded;
-
- virtual void oox_convert(oox::math_context & Context);
-
-private:
- virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
- virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
-
- office_element_ptr_array content_;
-};
-CP_REGISTER_OFFICE_ELEMENT2(math_mpadded);
-CP_REGISTER_OFFICE_ELEMENT3(math_mpadded);
-//--------------------------------------------------------------------------------------
-//merror
-//mphantom
-}
-}
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+
+#include "datatypes/common_attlists.h"
+#include "datatypes/fontstyle.h"
+#include "datatypes/fontweight.h"
+#include "datatypes/fontsize.h"
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_reader {
+
+class math_mrow : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMRow;
+
+ math_mrow();
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+ bool next_element_to_prev_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mrow);
+CP_REGISTER_OFFICE_ELEMENT3(math_mrow);
+//--------------------------------------------------------------------------------------
+class math_mfrac : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMFrac;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_; //2 elements
+
+ _CP_OPT(length) linethickness;
+ //numalign left, central,right
+ //denomalign
+ _CP_OPT(Bool) bevelled;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mfrac);
+CP_REGISTER_OFFICE_ELEMENT3(math_mfrac);
+//--------------------------------------------------------------------------------------
+class math_msqrt : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSqrt;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_msqrt);
+CP_REGISTER_OFFICE_ELEMENT3(math_msqrt);
+
+//--------------------------------------------------------------------------------------
+class math_mroot : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMRoot;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_mroot);
+CP_REGISTER_OFFICE_ELEMENT3(math_mroot);
+
+//--------------------------------------------------------------------------------------
+class math_mstyle : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMStyle;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+
+ common_math_style_attlist common_attlist_;
+ _CP_OPT(font_size) mathsize_;
+ _CP_OPT(color) color_;
+ _CP_OPT(font_weight) fontweight_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_mstyle);
+CP_REGISTER_OFFICE_ELEMENT3(math_mstyle);
+//--------------------------------------------------------------------------------------
+
+class math_menclose : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMEnClose;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_menclose);
+CP_REGISTER_OFFICE_ELEMENT3(math_menclose);
+//--------------------------------------------------------------------------------------
+
+class math_mfenced : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMFenced;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_mfenced);
+CP_REGISTER_OFFICE_ELEMENT3(math_mfenced);
+//--------------------------------------------------------------------------------------
+
+class math_mpadded : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMPadded;
+
+ virtual void oox_convert(oox::math_context & Context);
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ office_element_ptr_array content_;
+};
+CP_REGISTER_OFFICE_ELEMENT2(math_mpadded);
+CP_REGISTER_OFFICE_ELEMENT3(math_mpadded);
+//--------------------------------------------------------------------------------------
+//merror
+//mphantom
+}
+}
diff --git a/ASCOfficeOdfFile/win32/cpcommon.vcxproj b/ASCOfficeOdfFile/win32/cpcommon.vcxproj
deleted file mode 100644
index 3922d4b125..0000000000
--- a/ASCOfficeOdfFile/win32/cpcommon.vcxproj
+++ /dev/null
@@ -1,416 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- OdfCommon
- {609ED938-3CA8-4BED-B363-25096D4C4812}
- cpcommon
- Win32Proj
-
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- $(VC_IncludePath);$(WindowsSDK_IncludePath);D:\_Work\core\Common\3dParty\boost\build\win_64\include;
- $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;D:\_Work\core\Common\3dParty\boost\build\win_64\lib;
-
-
- $(Configuration)\
- $(Configuration)\
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
-
- Disabled
- ..\include;..\src\odf\datatypes;..\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- NotUsing
-
- Level3
- EditAndContinue
- 4005;4311;4312;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
- X64
-
-
- Disabled
- ../include;../src/odf/datatypes;%(AdditionalIncludeDirectories)
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
- Speed
- ../include;../src/odf/datatypes;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
- X64
-
-
- Speed
- ../include;../src/odf/datatypes;%(AdditionalIncludeDirectories)
- NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/win32/cpodf.vcxproj b/ASCOfficeOdfFile/win32/cpodf.vcxproj
deleted file mode 100644
index 4b7c0ecd85..0000000000
--- a/ASCOfficeOdfFile/win32/cpodf.vcxproj
+++ /dev/null
@@ -1,547 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- OdfFormatReaderLib
- {50E20601-4A8D-4AFB-8870-63828D328429}
- cpodf
- Win32Proj
-
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
- $(Configuration)\
- $(Configuration)\
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
-
- Disabled
- ..\include;..\..\DesktopEditor\freetype-2.5.2\include;..\..\DesktopEditor\xml\libxml2\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- EditAndContinue
- 4005;4311;4312;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- X64
-
-
- Disabled
- ../include;../../../DesktopEditor/freetype-2.5.2/include;%(AdditionalIncludeDirectories)
- _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- Speed
- ../include;../../DesktopEditor/freetype-2.5.2/include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
- D:\WORK\VersionControl.exe $(ProjectDir)\ASCOfficeOdfFile\version.h
-
-
-
-
- X64
-
-
- Speed
- ../include;../../DesktopEditor/freetype-2.5.2/include;%(AdditionalIncludeDirectories)
- NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
- D:\WORK\VersionControl.exe $(ProjectDir)\ASCOfficeOdfFile\version.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.xdc
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
-
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {609ed938-3ca8-4bed-b363-25096d4c4812}
- false
-
-
- {41bed424-4eaf-4053-8a5f-1e2a387d53d1}
- false
-
-
- {94954a67-a853-43b1-a727-6ef2774c5a6a}
- false
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/win32/cpxml.vcxproj b/ASCOfficeOdfFile/win32/cpxml.vcxproj
deleted file mode 100644
index 4a5089d9b4..0000000000
--- a/ASCOfficeOdfFile/win32/cpxml.vcxproj
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- xml_wrapper
- {41BED424-4EAF-4053-8A5F-1E2A387D53D1}
- cpxml
- Win32Proj
-
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
- StaticLibrary
- v140
- Unicode
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
- $(Configuration)\
- $(Configuration)\
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
-
- Disabled
- ../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/xml/build/vs2005;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- EditAndContinue
- 4005;4311;4312;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- X64
-
-
- Disabled
- _DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- Speed
- WIN32;NDEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
- X64
-
-
- Speed
- NDEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName)-static.lib
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/win32/cpxml.vcxproj.filters b/ASCOfficeOdfFile/win32/cpxml.vcxproj.filters
index 9c26d29a6e..e273667f37 100644
--- a/ASCOfficeOdfFile/win32/cpxml.vcxproj.filters
+++ b/ASCOfficeOdfFile/win32/cpxml.vcxproj.filters
@@ -1,29 +1,29 @@
-
-
-
-
- {d4faedc5-417c-40bd-9ca2-07728764fdb3}
-
-
-
-
- xmllite
-
-
-
-
-
-
-
-
- xmllite
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {d4faedc5-417c-40bd-9ca2-07728764fdb3}
+
+
+
+
+ xmllite
+
+
+
+
+
+
+
+
+ xmllite
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ASCOfficeOdfFile/win32/formulasconvert.vcxproj b/ASCOfficeOdfFile/win32/formulasconvert.vcxproj
deleted file mode 100644
index b79cbb3340..0000000000
--- a/ASCOfficeOdfFile/win32/formulasconvert.vcxproj
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- OdfFormulasConvert
- {94954A67-A853-43B1-A727-6EF2774C5A6A}
- formulasconvert
-
-
-
- StaticLibrary
- v140
- MultiByte
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
- StaticLibrary
- v140
- MultiByte
- true
-
-
- StaticLibrary
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- $(VC_IncludePath);$(WindowsSDK_IncludePath);D:\_Work\core\Common\3dParty\boost\build\win_64\include;
- $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;D:\_Work\core\Common\3dParty\boost\build\win_64\lib;
-
-
- $(Configuration)\
- $(Configuration)\
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
-
-
-
- Disabled
- ..\include;%(AdditionalIncludeDirectories)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- Level3
- EditAndContinue
- 4005;4311;4312;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- X64
-
-
- Disabled
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- MultiThreadedDLL
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
- X64
-
-
- MultiThreadedDLL
- Level3
- ProgramDatabase
- 4311;4267;4996;4172;%(DisableSpecificWarnings)
-
-
- $(OutDir)$(ProjectName).lib
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj b/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj
deleted file mode 100644
index f99d339e03..0000000000
--- a/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- OdfFileWriterTest
- {FBA8446A-150F-4A10-B4DA-1022048D6473}
- ASCOfficeOdfFileWTest
- Win32Proj
-
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- Unicode
-
-
- Application
- v140
- Unicode
- true
-
-
- Application
- v140
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>14.0.23107.0
-
-
- $(Configuration)\
- $(Configuration)\
- true
- D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)
- D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- true
- $(VC_IncludePath);$(WindowsSDK_IncludePath);D:\_Work\core\Common\3dParty\boost\build\win_64\include;
- $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;D:\_Work\core\Common\3dParty\boost\build\win_64\lib;
-
-
- $(Configuration)\
- $(Configuration)\
- false
-
-
- $(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
-
-
-
- Disabled
- ../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/freetype-2.5.2/include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_USED_EXTRA_LIBRARY;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
- $(IntDir)OdfFileWriterTest.pdb
- Level3
- EditAndContinue
-
-
-
-Rpcrt4.lib;%(AdditionalDependencies)
- true
- Console
- MachineX86
-
-
-
-
- X64
-
-
- Disabled
- WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- Use
- Level3
- ProgramDatabase
-
-
- true
- Console
- MachineX64
-
-
-
-
- WIN32;NDEBUG;_CONSOLE;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)
- MultiThreadedDLL
- Use
- Level3
- ProgramDatabase
-
-
- true
- Console
- true
- true
- MachineX86
-
-
-
-
- X64
-
-
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
- Use
- Level3
- ProgramDatabase
-
-
- true
- Console
- true
- true
- MachineX64
-
-
-
-
-
-
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
- /bigobj %(AdditionalOptions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {609ed938-3ca8-4bed-b363-25096d4c4812}
- false
-
-
- {94954a67-a853-43b1-a727-6ef2774c5a6a}
- false
-
-
- {36636678-ae25-4be6-9a34-2561d1bcf302}
- false
-
-
- {3423ec9a-52e4-4a4d-9753-edebc38785ef}
- false
-
-
- {a100103a-353e-45e8-a9b8-90b87cc5c0b0}
-
-
- {c27e9a9f-3a17-4482-9c5f-bf15c01e747c}
- false
-
-
- {e5a67556-44da-4481-8f87-0a3aedbd20dd}
- false
-
-
- {bee01b53-244a-44e6-8947-ed9342d9247e}
- false
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj.filters b/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj.filters
index daee56ccd8..1e1295648b 100644
--- a/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj.filters
+++ b/ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcxproj.filters
@@ -1,68 +1,145 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {86911534-a032-4f20-95fd-78c867b9ea7b}
-
-
-
-
- Source Files
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files\oox
-
-
- Source Files
-
-
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {86911534-a032-4f20-95fd-78c867b9ea7b}
+
+
+
+
+ Source Files
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files
+
+
+ Source Files\oox
+
+
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
+ Source Files\oox
+
+
\ No newline at end of file
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.cpp
new file mode 100644
index 0000000000..8f310d9749
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.cpp
@@ -0,0 +1,287 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_elementaries.h"
+
+#include
+#include
+
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mstack::ns = L"math";
+const wchar_t * math_mstack::name = L"mstack";
+//----------------------------------------------------------------------------------------------------
+
+void math_mstack::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mstack::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mstack::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mrow::ns = L"math";
+const wchar_t * math_mrow::name = L"mrow";
+//----------------------------------------------------------------------------------------------------
+
+void math_mrow::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mrow::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mrow::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_msline::ns = L"math";
+const wchar_t * math_msline::name = L"msline";
+//----------------------------------------------------------------------------------------------------
+
+void math_msline::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msline::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msline::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_msgroup::ns = L"math";
+const wchar_t * math_msgroup::name = L"msgroup";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_msgroup::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msgroup::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msgroup::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msgroup::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+
+
+//---------------------------------------------------------------
+const wchar_t * math_mlongdiv::ns = L"math";
+const wchar_t * math_mlongdiv::name = L"mlongdiv";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_mlongdiv::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mlongdiv::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mlongdiv::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mlongdiv::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mscarry::ns = L"math";
+const wchar_t * math_mscarry::name = L"mscarry";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_mscarry::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mscarry::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mscarry::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mscarry::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+
+//---------------------------------------------------------------
+const wchar_t * math_mscarries::ns = L"math";
+const wchar_t * math_mscarries::name = L"mscarries";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_mscarries::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mscarries::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mscarries::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mscarries::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.h b/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.h
new file mode 100644
index 0000000000..a4caf7045f
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_elementaries.h
@@ -0,0 +1,221 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+
+namespace cpdoccore {
+namespace odf_writer {
+
+class math_mstack : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMStack;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mstack);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mstack);
+
+//--------------------------------------------------------------------
+
+class math_mrow : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSRow;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mrow);
+//CP_REGISTER_OFFICE_ELEMENT3(math_msrow);
+
+//--------------------------------------------------------------------
+
+class math_msline : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSLine;
+
+ CPDOCCORE_DEFINE_VISITABLE();
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_msline);
+//CP_REGISTER_OFFICE_ELEMENT3(math_msline);
+
+//--------------------------------------------------------------------
+
+class math_mlongdiv : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSLongDiv;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mlongdiv);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mlongdiv);
+
+//--------------------------------------------------------------------
+
+class math_mscarries : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSCarries;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mscarries);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mscarries);
+//--------------------------------------------------------------------
+
+class math_msgroup : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSGroup;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_msgroup);
+//CP_REGISTER_OFFICE_ELEMENT3(math_msgroup);
+
+//--------------------------------------------------------------------
+
+class math_mscarry : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSCarry;
+
+
+
+private:
+ virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mscarry);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mscarry);
+
+//--------------------------------------------------------------------
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_elements.cpp
new file mode 100644
index 0000000000..74d022f89e
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_elements.cpp
@@ -0,0 +1,184 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_elements.h"
+
+#include
+
+#include
+#include
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//---------------------------------------------------------------
+const wchar_t * office_math_element::ns = L"math";
+const wchar_t * office_math_element::name = L"math-element";
+//---------------------------------------------------------------
+const wchar_t * office_math::ns = L"math";
+const wchar_t * office_math::name = L"math";
+
+//----------------------------------------------------------------------------------------------------
+
+void office_math::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(semantics_);
+}
+
+void office_math::add_child_element(const office_element_ptr & child_element)
+{
+ if (!child_element) return;
+
+ if (typeMathSemantics == child_element->get_type())
+ {
+ semantics_ = child_element;
+ }
+ else if (semantics_)
+ semantics_->add_child_element(child_element);
+}
+
+void office_math::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR(L"xmlns", L"http://www.w3.org/1998/Math/MathML");
+
+ semantics_->serialize(CP_XML_STREAM());
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_semantics::ns = L"math";
+const wchar_t * math_semantics::name = L"semantics";
+//----------------------------------------------------------------------------------------------------
+
+void math_semantics::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_semantics::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_semantics::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ if (annotation_)
+ annotation_->serialize(CP_XML_STREAM());
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_annotation::ns = L"math";
+const wchar_t * math_annotation::name = L"annotation";
+//----------------------------------------------------------------------------------------------------
+
+void math_annotation::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_annotation::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_annotation::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ CP_XML_ATTR_OPT(L"math:text", text_);
+ CP_XML_ATTR_OPT(L"math:encoding", encoding_);
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_annotation_xml::ns = L"math";
+const wchar_t * math_annotation_xml::name = L"annotation-xml";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_annotation_xml::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_annotation_xml::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_annotation_xml::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ CP_XML_ATTR_OPT(L"math:text", text_);
+ CP_XML_ATTR_OPT(L"math:encoding", encoding_);
+ }
+ }
+}
+//----------------------------------------------------------------------------------------------------
+
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/math_elements.h
new file mode 100644
index 0000000000..786c277d68
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_elements.h
@@ -0,0 +1,159 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include
+#include
+#include
+#include
+#include
+
+#include "office_elements_create.h"
+
+#include "mathvariant.h"
+
+
+namespace cpdoccore {
+namespace odf_writer {
+
+class office_math_element : public office_element_impl
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+
+ static const ElementType type = typeMathElement;
+ static const xml::NodeType xml_type = xml::typeElement;
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name) {}
+ virtual void add_child_element(const office_element_ptr & child_element) {}
+
+ virtual void serialize(std::wostream & _Wostream) {}
+
+
+ CPDOCCORE_DEFINE_VISITABLE();
+ friend class odf_document;
+};
+
+//-------------------------------------------------------------------------------------------------------------------
+class office_math : public office_element_impl
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMath;
+
+ CPDOCCORE_DEFINE_VISITABLE();
+ friend class odf_document;
+
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+private:
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr semantics_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(office_math);
+//CP_REGISTER_OFFICE_ELEMENT3(office_math);
+//--------------------------------------------------------------------
+
+class math_semantics : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMathSemantics;
+
+private:
+ //virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ office_element_ptr annotation_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_semantics);
+//CP_REGISTER_OFFICE_ELEMENT3(math_semantics);
+//-------------------------------------------------------------------------------------------
+
+class math_annotation : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMathAnnotation;
+
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+ _CP_OPT(std::wstring) encoding_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_annotation);
+//CP_REGISTER_OFFICE_ELEMENT3(math_annotation);
+//--------------------------------------------------------------------
+class math_annotation_xml : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMathAnnotationXml;
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+ _CP_OPT(std::wstring) encoding_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_annotation_xml);
+//CP_REGISTER_OFFICE_ELEMENT3(math_annotation_xml);
+//--------------------------------------------------------------------
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.cpp
new file mode 100644
index 0000000000..aa38ed6721
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.cpp
@@ -0,0 +1,304 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_layout_elements.h"
+#include "math_token_elements.h"
+#include "style_text_properties.h"
+#include "math_limit_elements.h"
+
+#include
+#include
+
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//---------------------------------------------------------------
+const wchar_t * math_mrow::ns = L"math";
+const wchar_t * math_mrow::name = L"mrow";
+//----------------------------------------------------------------------------------------------------
+math_mrow::math_mrow()
+{
+ next_element_to_prev_ = false;
+}
+
+void math_mrow::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mrow::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mrow::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ //CP_XML_ATTR_OPT(L"math:bool", next_element_to_prev_); pich_qa?
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mfrac::ns = L"math";
+const wchar_t * math_mfrac::name = L"mfrac";
+//----------------------------------------------------------------------------------------------------
+
+
+void math_mfrac::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mfrac::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mfrac::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"math:linethickness", linethickness);
+ CP_XML_ATTR_OPT(L"bevelled", bevelled);
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+
+//---------------------------------------------------------------
+const wchar_t * math_msqrt::ns = L"math";
+const wchar_t * math_msqrt::name = L"msqrt";
+//----------------------------------------------------------------------------------------------------
+
+void math_msqrt::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msqrt::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msqrt::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mroot::ns = L"math";
+const wchar_t * math_mroot::name = L"mroot";
+//----------------------------------------------------------------------------------------------------
+
+void math_mroot::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mroot::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mroot::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mstyle::ns = L"math";
+const wchar_t * math_mstyle::name = L"mstyle";
+//----------------------------------------------------------------------------------------------------
+
+void math_mstyle::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mstyle::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mstyle::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"math:mathsize", mathsize_);
+ CP_XML_ATTR_OPT(L"mathcolor", color_);
+ CP_XML_ATTR_OPT(L"math:fontweight", fontweight_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//--------------------------------------------------
+
+//---------------------------------------------------------------
+const wchar_t * math_menclose::ns = L"math";
+const wchar_t * math_menclose::name = L"menclose";
+//----------------------------------------------------------------------------------------------------
+
+void math_menclose::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_menclose::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_menclose::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mfenced::ns = L"math";
+const wchar_t * math_mfenced::name = L"mfenced";
+//----------------------------------------------------------------------------------------------------
+
+void math_mfenced::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mfenced::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mfenced::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mpadded::ns = L"mpadded";
+const wchar_t * math_mpadded::name = L"mpadded";
+//----------------------------------------------------------------------------------------------------
+
+void math_mpadded::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mpadded::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mpadded::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.h
new file mode 100644
index 0000000000..8f5a3bbc57
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.h
@@ -0,0 +1,230 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+
+#include "../datatypes/common_attlists.h"
+#include "../datatypes/fontstyle.h"
+#include "../datatypes/fontweight.h"
+#include "../datatypes/fontsize.h"
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+ namespace odf_writer {
+
+ class math_mrow : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMRow;
+
+ math_mrow();
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ bool next_element_to_prev_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_mrow);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mrow);
+ //--------------------------------------------------------------------------------------
+ class math_mfrac : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMFrac;
+
+ _CP_OPT(Bool) bevelled;
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_; //2 elements
+
+ _CP_OPT(length) linethickness;
+ //numalign left, central,right
+ //denomalign
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_mfrac);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mfrac);
+ //--------------------------------------------------------------------------------------
+ class math_msqrt : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSqrt;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_msqrt);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_msqrt);
+
+ //--------------------------------------------------------------------------------------
+ class math_mroot : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMRoot;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_mroot);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mroot);
+
+ //--------------------------------------------------------------------------------------
+ class math_mstyle : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMStyle;
+
+
+ _CP_OPT(color) color_;
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+
+ common_math_style_attlist common_attlist_;
+ _CP_OPT(font_size) mathsize_;
+ _CP_OPT(font_weight) fontweight_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_mstyle);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mstyle);
+ //--------------------------------------------------------------------------------------
+
+ class math_menclose : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMEnClose;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_menclose);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_menclose);
+ //--------------------------------------------------------------------------------------
+
+ class math_mfenced : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMFenced;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_mfenced);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mfenced);
+ //--------------------------------------------------------------------------------------
+
+ class math_mpadded : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMPadded;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+ CP_REGISTER_OFFICE_ELEMENT2(math_mpadded);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mpadded);
+ //--------------------------------------------------------------------------------------
+ //merror
+ //mphantom
+ }
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.cpp
new file mode 100644
index 0000000000..939ac9b592
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.cpp
@@ -0,0 +1,307 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_limit_elements.h"
+
+#include
+#include
+#include
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//---------------------------------------------------------------
+const wchar_t * math_msub::ns = L"math";
+const wchar_t * math_msub::name = L"msub";
+//----------------------------------------------------------------------------------------------------
+void math_msub::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msub::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msub::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_msup::ns = L"math";
+const wchar_t * math_msup::name = L"msup";
+//----------------------------------------------------------------------------------------------------
+void math_msup::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msup::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msup::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_msubsup::ns = L"math";
+const wchar_t * math_msubsup::name = L"msubsup";
+//----------------------------------------------------------------------------------------------------
+void math_msubsup::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_msubsup::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_msubsup::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_none::ns = L"math";
+const wchar_t * math_none::name = L"none";
+//----------------------------------------------------------------------------------------------------
+void math_none::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_none::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_none::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------
+const wchar_t * math_mprescripts::ns = L"math";
+const wchar_t * math_mprescripts::name = L"mprescripts";
+
+void math_mprescripts::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ //CP_CREATE_ELEMENT(content_); //TODO pich
+}
+
+void math_mprescripts::add_child_element(const office_element_ptr & child_element)
+{
+ //content_.push_back(child_element);
+}
+
+void math_mprescripts::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ // pich_qa?
+ /*for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }*/
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_mmultiscripts::ns = L"math";
+const wchar_t * math_mmultiscripts::name = L"mmultiscripts";
+//----------------------------------------------------------------------------------------------------
+void math_mmultiscripts::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mmultiscripts::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mmultiscripts::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < pre_content_.size(); i++)
+ {
+ if (!pre_content_[i]) continue;
+ pre_content_[i]->serialize(CP_XML_STREAM());
+ }
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_munderover::ns = L"math";
+const wchar_t * math_munderover::name = L"munderover";
+//----------------------------------------------------------------------------------------------------
+void math_munderover::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_munderover::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_munderover::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_mover::ns = L"math";
+const wchar_t * math_mover::name = L"mover";
+//----------------------------------------------------------------------------------------------------
+void math_mover::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mover::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mover::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"accent", accent);
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//---------------------------------------------------------------
+const wchar_t * math_munder::ns = L"math";
+const wchar_t * math_munder::name = L"munder";
+//----------------------------------------------------------------------------------------------------
+void math_munder::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_munder::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_munder::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+} // odf_writer
+} // cpdoccore
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.h
new file mode 100644
index 0000000000..71a240cbfd
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.h
@@ -0,0 +1,238 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+#include "../datatypes/common_attlists.h"
+
+namespace cpdoccore {
+ using namespace odf_types;
+ namespace odf_writer {
+
+ class math_msub : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSub;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_msub);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_msub);
+ //--------------------------------------------------------------------
+ class math_msup : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSup;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_msup);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_msup);
+
+ //--------------------------------------------------------------------
+ class math_msubsup : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSubSup;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_msubsup);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_msubsup);
+
+ //--------------------------------------------------------------------
+ class math_none : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMNone;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_none);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_none);
+
+ //--------------------------------------------------------------------
+ class math_mprescripts : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMPreScripts;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_mprescripts);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mprescripts);
+
+ //--------------------------------------------------------------------
+ class math_mmultiscripts : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMMultiScripts;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ office_element_ptr_array pre_content_;
+ bool bSeparate = false;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_mmultiscripts);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mmultiscripts);
+
+ //--------------------------------------------------------------------
+ class math_munderover : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMUnderOver;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_; //3 exact - base, under, over
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_munderover);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_munderover);
+
+ //--------------------------------------------------------------------
+ class math_mover : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMOver;
+
+ _CP_OPT(Bool) accent;
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_mover);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_mover);
+
+ //--------------------------------------------------------------------
+ class math_munder : public office_math_element
+ {
+ public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMUnder;
+
+
+ private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+ };
+
+ CP_REGISTER_OFFICE_ELEMENT2(math_munder);
+ //CP_REGISTER_OFFICE_ELEMENT3(math_munder);
+ //--------------------------------------------------------------------
+ }
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.cpp
new file mode 100644
index 0000000000..91cb0e314e
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.cpp
@@ -0,0 +1,227 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_table_elements.h"
+#include "math_layout_elements.h"
+#include "math_limit_elements.h"
+
+#include
+#include
+
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mtable::ns = L"math";
+const wchar_t * math_mtable::name = L"mtable";
+//----------------------------------------------------------------------------------------------------
+
+void math_mtable::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mtable::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mtable::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mtr::ns = L"math";
+const wchar_t * math_mtr::name = L"mtr";
+//----------------------------------------------------------------------------------------------------
+
+void math_mtr::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mtr::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mtr::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mlabeledtr::ns = L"math";
+const wchar_t * math_mlabeledtr::name = L"mlabeledtr";
+//----------------------------------------------------------------------------------------------------
+
+void math_mlabeledtr::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mlabeledtr::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mlabeledtr::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mtd::ns = L"math";
+const wchar_t * math_mtd::name = L"mtd";
+//----------------------------------------------------------------------------------------------------
+void math_mtd::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mtd::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mtd::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_maligngroup::ns = L"math";
+const wchar_t * math_maligngroup::name = L"maligngroup";
+//----------------------------------------------------------------------------------------------------
+
+void math_maligngroup::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_maligngroup::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_maligngroup::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_malignmark::ns = L"math";
+const wchar_t * math_malignmark::name = L"malignmarke";
+//----------------------------------------------------------------------------------------------------
+
+void math_malignmark::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_malignmark::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_malignmark::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+} // odf_writer
+} // cpdoccore
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.h
new file mode 100644
index 0000000000..8e3ea21bc5
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_table_elements.h
@@ -0,0 +1,171 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+
+namespace cpdoccore {
+namespace odf_writer {
+
+class math_mtable : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMTable;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mtable);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mtable);
+//--------------------------------------------------------------------
+
+class math_malignmark : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMAlignMark;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_malignmark);
+//CP_REGISTER_OFFICE_ELEMENT3(math_malignmark);
+//--------------------------------------------------------------------
+
+class math_maligngroup : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMAlignGroup;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_maligngroup);
+//CP_REGISTER_OFFICE_ELEMENT3(math_maligngroup);
+//--------------------------------------------------------------------
+
+class math_mtd : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMTd;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mtd);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mtd);
+//--------------------------------------------------------------------
+
+class math_mlabeledtr : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMLabelEdTr;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mlabeledtr);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mlabeledtr);
+//--------------------------------------------------------------------
+
+class math_mtr : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMTr;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ office_element_ptr_array content_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mtr);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mtr);
+//--------------------------------------------------------------------
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.cpp
new file mode 100644
index 0000000000..2619a78512
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.cpp
@@ -0,0 +1,283 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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 "math_token_elements.h"
+#include "style_text_properties.h"
+
+#include
+
+#include
+#include
+#include
+#include
+
+namespace cpdoccore {
+
+ using namespace odf_types;
+
+namespace odf_writer {
+
+//---------------------------------------------------------------
+const wchar_t * math_mi::ns = L"math";
+const wchar_t * math_mi::name = L"mi";
+//----------------------------------------------------------------------------------------------------
+void math_mi::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mi::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mi::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_CONTENT(text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+void math_mi::add_text(const std::wstring & Text)
+{
+ text_ = Text;
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mo::ns = L"math";
+const wchar_t * math_mo::name = L"mo";
+//----------------------------------------------------------------------------------------------------
+void math_mo::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mo::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mo::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_CONTENT(text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+void math_mo::add_text(const std::wstring & Text)
+{
+ text_ = Text;
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mn::ns = L"math";
+const wchar_t * math_mn::name = L"mn";
+//----------------------------------------------------------------------------------------------------
+void math_mn::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mn::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mn::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_CONTENT(text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+
+void math_mn::add_text(const std::wstring & Text)
+{
+ text_ = Text;
+}
+
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_ms::ns = L"math";
+const wchar_t * math_ms::name = L"ms";
+//----------------------------------------------------------------------------------------------------
+void math_ms::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_ms::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_ms::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"math:text", text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mspace::ns = L"math";
+const wchar_t * math_mspace::name = L"mspace";
+//----------------------------------------------------------------------------------------------------
+void math_mspace::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mspace::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mspace::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"math:text", text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mtext::ns = L"math";
+const wchar_t * math_mtext::name = L"mtext";
+//----------------------------------------------------------------------------------------------------
+void math_mtext::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mtext::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mtext::add_text(const std::wstring & Text)
+{
+ text_ = Text;
+}
+
+void math_mtext::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_CONTENT(text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+}
+//----------------------------------------------------------------------------------------------------
+const wchar_t * math_mglyph::ns = L"math";
+const wchar_t * math_mglyph::name = L"mglyph";
+//----------------------------------------------------------------------------------------------------
+void math_mglyph::create_child_element(const std::wstring & Ns, const std::wstring & Name)
+{
+ CP_CREATE_ELEMENT(content_);
+}
+
+void math_mglyph::add_child_element(const office_element_ptr & child_element)
+{
+ content_.push_back(child_element);
+}
+
+void math_mglyph::serialize(std::wostream & _Wostream)
+{
+ CP_XML_WRITER(_Wostream)
+ {
+ CP_XML_NODE_SIMPLE_NONS()
+ {
+ CP_XML_ATTR_OPT(L"math:text", text_);
+ common_attlist_.serialize(CP_GET_XML_NODE());
+ for (size_t i = 0; i < content_.size(); i++)
+ {
+ if (!content_[i]) continue;
+ content_[i]->serialize(CP_XML_STREAM());
+ }
+ }
+ }
+} // odf_writer
+} // cpdoccore
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.h
new file mode 100644
index 0000000000..d566814a2f
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/math_token_elements.h
@@ -0,0 +1,217 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "math_elements.h"
+
+#include "../datatypes/common_attlists.h"
+
+namespace cpdoccore {
+namespace odf_writer {
+
+class math_mi : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMI;
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ virtual void add_text(const std::wstring & Text);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mi);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mi);
+//--------------------------------------------------------------------
+class math_mo : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMO;
+
+ _CP_OPT(bool) fence_;
+ _CP_OPT(bool) stretchy_;
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ virtual void add_text(const std::wstring & Text);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mo);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mo);
+//--------------------------------------------------------------------
+class math_mn : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMN;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ virtual void add_text(const std::wstring & Text);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mn);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mn);
+//--------------------------------------------------------------------
+class math_mtext : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMText;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ virtual void add_text(const std::wstring & Text);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mtext);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mtext);
+//--------------------------------------------------------------------
+class math_mspace : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMSpace;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mspace);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mspace);
+//--------------------------------------------------------------------
+class math_ms : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMS;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_ms);
+//CP_REGISTER_OFFICE_ELEMENT3(math_ms);
+//--------------------------------------------------------------------
+class math_mglyph : public office_math_element
+{
+public:
+ static const wchar_t * ns;
+ static const wchar_t * name;
+ static const xml::NodeType xml_type = xml::typeElement;
+ static const ElementType type = typeMGlyph;
+
+
+private:
+ virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
+ virtual void add_child_element(const office_element_ptr & child_element);
+
+ virtual void serialize(std::wostream & _Wostream);
+
+ odf_types::common_math_style_attlist common_attlist_;
+
+ office_element_ptr_array content_;
+ _CP_OPT(std::wstring) text_;
+};
+
+CP_REGISTER_OFFICE_ELEMENT2(math_mglyph);
+//CP_REGISTER_OFFICE_ELEMENT3(math_mglyph);
+//--------------------------------------------------------------------
+}
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp b/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
index 5ea8254790..dba7b50b00 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
+++ b/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
@@ -250,9 +250,9 @@ namespace odf_writer
}
//-------------------------------------------------------------------------------
- void object_files::set_content(content_content_ptr & _content)
+ void object_files::set_content(content_content_ptr & _content, bool bRootNode)
{
- content.set_content(_content);
+ content.set_content(_content, bRootNode);
meta = element_ptr(new meta_file());
}
void object_files::set_mediaitems(_mediaitems & mediaitems)
@@ -359,109 +359,120 @@ namespace odf_writer
void content_file::write(const std::wstring & RootPath, bool add_padding)
{
- std::wstringstream resStream;
- CP_XML_WRITER(resStream)
+ if (false == bXmlRootNodeWrite)
{
- CP_XML_NODE(L"office:document-content")
- {
- //CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
- //CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0" );
- //CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
- //CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
- //CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
- //CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
- //CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
- //CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/" );
- //CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
- //CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
- //CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" );
- //CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
- //CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
- //CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
- //CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML" );
- //CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
- //CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
- //CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office" );
- //CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer" );
- //CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc" );
- //CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events" );
- //CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms");
- //CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema" );
- //CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance" );
- //CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report" );
- //CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2" );
- //CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml" );
- //CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#" );
- //CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office" );
- //CP_XML_ATTR(L"xmlns:textooo", L"http://openoffice.org/2013/office" );
- //CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table" );
- //CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw" );
- //CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart" );
- //CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
- //CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
- //CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" );
- //CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" );
- //CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" );
- //CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" );
- //CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
-CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
-CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0");
-CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
-CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office" );
-CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
-CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
-CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/" );
-CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0" );
-CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
-CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
-CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" );
-CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
-CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report" );
-CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
-CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
-CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer" );
-CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc" );
-CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2" );
-CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
-CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table" );
-CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" );
-CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw" );
-CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" );
-CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#" );
-CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" );
-CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML" );
-CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0");
-CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
-CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events" );
-CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms" );
-CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema" );
-CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance" );
-CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" );
-CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml" );
-CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" );
-CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" );
-CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
-CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office");
-CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart");
-CP_XML_ATTR(L"office:version", L"1.2");
+ if (content)
+ {
+ simple_element elm(L"content.xml", content->content_str());
+ elm.write(RootPath, add_padding);
+ }
+ }
+ else
+ {
+ std::wstringstream resStream;
-
- if (content)
- {
- CP_XML_STREAM() << content->styles_str();
- }
- CP_XML_NODE(L"office:body")
+ CP_XML_WRITER(resStream)
+ {
+ CP_XML_NODE(L"office:document-content")
{
+ //CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
+ //CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0" );
+ //CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
+ //CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
+ //CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
+ //CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
+ //CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
+ //CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/" );
+ //CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
+ //CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
+ //CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" );
+ //CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+ //CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
+ //CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
+ //CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML" );
+ //CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
+ //CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
+ //CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office" );
+ //CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer" );
+ //CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc" );
+ //CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events" );
+ //CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms");
+ //CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema" );
+ //CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance" );
+ //CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report" );
+ //CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2" );
+ //CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml" );
+ //CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#" );
+ //CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office" );
+ //CP_XML_ATTR(L"xmlns:textooo", L"http://openoffice.org/2013/office" );
+ //CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table" );
+ //CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw" );
+ //CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart" );
+ //CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
+ //CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
+ //CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" );
+ //CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" );
+ //CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" );
+ //CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" );
+ //CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
+ CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
+ CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0");
+ CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
+ CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office");
+ CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
+ CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink");
+ CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/");
+ CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0");
+ CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0");
+ CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0");
+ CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+ CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0");
+ CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report");
+ CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0");
+ CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0");
+ CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer");
+ CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc");
+ CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2");
+ CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/");
+ CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table");
+ CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0");
+ CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw");
+ CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0");
+ CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#");
+ CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0");
+ CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML");
+ CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0");
+ CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0");
+ CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events");
+ CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms");
+ CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema");
+ CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance");
+ CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0");
+ CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml");
+ CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0");
+ CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
+ CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0");
+ CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office");
+ CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart");
+ CP_XML_ATTR(L"office:version", L"1.2");
+
+
if (content)
{
- CP_XML_STREAM() << content->content_str();
+ CP_XML_STREAM() << content->styles_str();
+ }
+ CP_XML_NODE(L"office:body")
+ {
+ if (content)
+ {
+ CP_XML_STREAM() << content->content_str();
+ }
}
}
}
+ simple_element elm(L"content.xml", resStream.str());
+ elm.write(RootPath, add_padding);
}
-
- simple_element elm(L"content.xml", resStream.str());
- elm.write(RootPath, add_padding);
}
void styles_file::write(const std::wstring & RootPath, bool add_padding)
{
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/object_package.h b/ASCOfficeOdfFileW/source/OdfFormat/object_package.h
index 4ccd73fd99..94e6ca4e51 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/object_package.h
+++ b/ASCOfficeOdfFileW/source/OdfFormat/object_package.h
@@ -123,8 +123,10 @@ namespace odf_writer
class content_file : public element
{
+ private:
+ bool bXmlRootNodeWrite = true;
public:
- void set_content(content_content_ptr & c){content = c;}
+ void set_content(content_content_ptr & c, bool bRootNode = true) { content = c; bXmlRootNodeWrite = bRootNode; }
virtual void write(const std::wstring & RootPath, bool add_padding = false);
content_content_ptr content;
@@ -203,7 +205,7 @@ namespace odf_writer
public:
object_files() {}
- void set_content (content_content_ptr & _content);
+ void set_content (content_content_ptr & _content, bool bRootNode = true);
void set_styles (content_simple_ptr & _styles);
void set_settings (content_simple_ptr & _settings);
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
index 8fcda34385..2e5723e2f2 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
@@ -46,6 +46,7 @@
#include "../../DesktopEditor/graphics/pro/Fonts.h"
+#include "../utils.h"
namespace cpdoccore {
@@ -53,10 +54,32 @@ namespace cpdoccore {
namespace odf_writer {
+ namespace utils
+ {
+
+ void calculate_size_font_symbols(_font_metrix & metrix, NSFonts::IApplicationFonts *appFonts)
+ {
+ std::pair appr = _graphics_utils_::calculate_size_symbol_asc(metrix.font_name, metrix.font_size, metrix.italic, metrix.bold, appFonts);
+
+ if (appr.first < 0.01 || appr.second < 0.01)
+ {
+ appr.first = _graphics_utils_::calculate_size_symbol_win(metrix.font_name, metrix.font_size, false/*metrix.italic*/, false/*metrix.bold*/);
+ appr.first = ((int)(appr.first + 0.5) + 2 * (int)appr.first) / 3.;
+ }
+
+ if (appr.first > 0)
+ {
+ //pixels to pt
+ metrix.approx_symbol_size = appr.first;///1.1;//"1.2" волшебное число оО
+ metrix.IsCalc = true;
+ }
+
+ }
+ }
//////////////////////////////////////////////////////////////////////////////////////////////////
odf_conversion_context::odf_conversion_context(_office_type_document type_, package::odf_document * outputDocument)
- : type (type_), chart_context_ (this), page_layout_context_(this)
+ : type (type_), chart_context_ (this), page_layout_context_(this), math_context_(this), font_metrix_()
{
output_document_ = outputDocument;
current_object_ = 0;
@@ -75,6 +98,34 @@ void odf_conversion_context::set_fonts_directory(std::wstring pathFonts)
if (applicationFonts_)
applicationFonts_->InitializeFromFolder(pathFonts);
}
+void odf_conversion_context::calculate_font_metrix(std::wstring name, double size, bool italic, bool bold)
+{
+ if (font_metrix_.IsCalc) return;
+
+ if (size < 1)
+ size = 12;
+
+ font_metrix_.font_size = size;
+ font_metrix_.italic = italic;
+ font_metrix_.bold = bold;
+ font_metrix_.font_name = name;
+
+ ////////////////////////////////////////////
+ utils::calculate_size_font_symbols(font_metrix_, applicationFonts_);
+}
+double odf_conversion_context::convert_symbol_width(double val)
+{
+ //width = ((int)((column_width * Digit_Width + 5) / Digit_Width * 256 )) / 256.;
+ //width = (int)(((256. * width + ((int)(128. / Digit_Width ))) / 256. ) * Digit_Width ); //in pixels
+ //
+ //_dxR = dxR / 1024. * width * 9525.; // to emu
+
+ val = ((int)((val * font_metrix_.approx_symbol_size + 5) / font_metrix_.approx_symbol_size * 256)) / 256.;
+
+ double pixels = (int)(((256. * val + ((int)(128. / font_metrix_.approx_symbol_size))) / 256.) * font_metrix_.approx_symbol_size); //in pixels
+
+ return pixels * 0.75; //* 9525. * 72.0 / (360000.0 * 2.54);
+}
odf_style_context* odf_conversion_context::styles_context()
{
@@ -101,6 +152,10 @@ odf_chart_context* odf_conversion_context::chart_context()
return &chart_context_;
}
+odf_math_context* odf_conversion_context::math_context()
+{
+ return &math_context_;
+}
odf_number_styles_context* odf_conversion_context::numbers_styles_context()
{
@@ -149,7 +204,7 @@ void odf_conversion_context::end_document()
package::object_files *object_files = new package::object_files();
if (object_files)
{
- object_files->set_content (content_root_);
+ object_files->set_content (content_root_, object.content_ext);
object_files->set_styles (content_style_);
object_files->set_mediaitems(object.mediaitems);
object_files->set_settings (content_settings_);
@@ -170,7 +225,22 @@ void odf_conversion_context::end_document()
}
else
{
- rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
+ switch (object.content->get_type())
+ {
+ case typeOfficeText:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.text"), object_files->local_path)); break;
+ case typeOfficeSpreadsheet:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.spreadsheet"), object_files->local_path)); break;
+ case typeOfficePresentation:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.presentation"), object_files->local_path)); break;
+ case typeOfficeChart:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.chart"), object_files->local_path)); break;
+ case typeMath:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.formula"), object_files->local_path)); break;
+ default:
+ rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
+ break;
+ }
}
output_document_->add_object(package::element_ptr(object_files), isRoot);
@@ -205,10 +275,11 @@ void odf_conversion_context::start_presentation()
create_element(L"office", L"scripts", objects_.back().scripts, this);
}
-void odf_conversion_context::create_object()
+void odf_conversion_context::create_object(bool bAddContentExt)
{
_object obj;
+ obj.content_ext = bAddContentExt;
obj.style_context = boost::make_shared();
obj.settings_context = boost::make_shared();
@@ -228,6 +299,43 @@ void odf_conversion_context::end_chart()
end_object();
chart_context_.set_styles_context(styles_context());
}
+bool odf_conversion_context::start_math()
+{
+ if (false == math_context_.isEmpty()) return false;
+
+ drawing_context()->start_drawing();
+ drawing_context()->set_anchor(anchor_type::AsChar);
+
+ drawing_context()->start_object(get_next_name_object()); //имитация рисованного объекта - высота-ширина ????
+
+ create_object(false);
+ create_element(L"math", L"math", objects_.back().content, this, true);
+
+ math_context_.set_styles_context(odf_conversion_context::styles_context());
+ math_context_.start_math(get_current_object_element());
+
+ return true;
+}
+void odf_conversion_context::end_math()
+{
+ math_context_.end_math();
+
+ end_object();
+ math_context_.set_styles_context(styles_context());
+
+ calculate_font_metrix(L"Cambria Math", 12, false, false); // смотреть по формуле - перевычислять только если есть изменения
+
+ int count_symbol_height = 3; //сосчитать в math_context_
+ int count_symbol_width = 10;
+
+ _CP_OPT(double)width = convert_symbol_width(count_symbol_width);
+ _CP_OPT(double)height = convert_symbol_width(count_symbol_height);
+
+ //drawing_context()->set_size(width, height);
+
+ drawing_context()->end_object();
+ drawing_context()->end_drawing();
+}
void odf_conversion_context::end_text()
{
end_object();
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h b/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
index a75c0be9a7..351a01f6c0 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
@@ -40,6 +40,7 @@
#include "odf_drawing_context.h"
#include "odf_chart_context.h"
+#include "odf_math_context.h"
#include "odf_controls_context.h"
#include "mediaitems.h"
@@ -52,16 +53,28 @@ namespace NSFonts
namespace cpdoccore {
namespace odf_writer {
-class office_element;
-typedef shared_ptr::Type office_element_ptr;
+//----------------------------------------------------------------------
+ struct _font_metrix
+ {
+ bool IsCalc = false;
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-enum _office_type_document
-{
- TextDocument,
- SpreadsheetDocument,
- PresentationDocument
-};
+ std::wstring font_name;
+ double font_size = 0;
+ bool italic = false;
+ bool bold = false;
+
+ double approx_symbol_size = 0;//in pt
+ };
+//----------------------------------------------------------------------
+ class office_element;
+ typedef shared_ptr::Type office_element_ptr;
+//----------------------------------------------------------------------
+ enum _office_type_document
+ {
+ TextDocument,
+ SpreadsheetDocument,
+ PresentationDocument
+ };
class odf_conversion_context : boost::noncopyable
{
struct _object
@@ -79,6 +92,8 @@ class odf_conversion_context : boost::noncopyable
_mediaitems mediaitems;
boost::unordered_map mapFonts;
+
+ bool content_ext = true;
};
public:
@@ -113,6 +128,7 @@ public:
odf_settings_context * settings_context();
odf_chart_context * chart_context();
odf_page_layout_context * page_layout_context();
+ odf_math_context * math_context();
odf_number_styles_context * numbers_styles_context();
_mediaitems * mediaitems();
@@ -120,6 +136,9 @@ public:
void start_chart();
void end_chart();
+ virtual bool start_math();
+ virtual void end_math();
+
void start_spreadsheet();
void end_spreadsheet();
@@ -129,7 +148,7 @@ public:
void start_presentation();
void end_presentation();
- void create_object();
+ void create_object(bool bAddContentExt = true);
void end_object();
std::wstring get_next_name_object();
@@ -139,20 +158,24 @@ public:
void add_tab(_CP_OPT(int) type, _CP_OPT(odf_types::length) length, _CP_OPT(int) leader);
void end_tabs();
+ void calculate_font_metrix(std::wstring name, double size, bool italic, bool bold);
+ double convert_symbol_width(double val);
private:
+ _font_metrix font_metrix_;
+
odf_element_state temporary_;
std::vector<_object> objects_;//"0" = root
odf_chart_context chart_context_;
odf_page_layout_context page_layout_context_;
+ odf_math_context math_context_;
void process_styles (_object & object, bool isRoot);
void process_settings (_object & object, bool isRoot);
int current_object_;
-
//page_layout_container & pageLayoutContainer() { return page_layout_container_; }
//fonts_container & fontContainer() { return fonts_container_; }
//list_style_container & listStyleContainer() { return list_style_container_; }
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.cpp
new file mode 100644
index 0000000000..30c6276df4
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.cpp
@@ -0,0 +1,203 @@
+/*
+* (c) Copyright Ascensio System SIA 2010-2019
+*
+* 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 20A-12 Ernesta Birznieka-Upisha
+* street, Riga, Latvia, EU, LV-1050.
+*
+* 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 "logging.h"
+
+#include
+
+#include "../../../ASCOfficeOdfFile/formulasconvert/formulasconvert.h"
+
+#include
+
+#include "odf_math_context.h"
+#include "odf_text_context.h"
+#include "odf_style_context.h"
+#include "odf_drawing_context.h"
+
+#include "odf_conversion_context.h"
+
+#include "ods_table_state.h"
+
+#include "math_elements.h"
+#include "math_layout_elements.h"
+#include "math_table_elements.h"
+#include "math_limit_elements.h"
+#include "math_token_elements.h"
+//#include "math_elementaries.h"
+
+
+
+namespace cpdoccore
+{
+using namespace odf_types;
+
+namespace odf_writer
+{
+ struct odf_math_state
+ {
+ odf_math_state() { }
+ void clear()
+ {
+ elements_.clear();
+ }
+ std::vector elements_;
+ };
+
+ struct odf_math_level_state
+ {
+ style_text_properties *text_properties_;
+ style_paragraph_properties *paragraph_properties_;
+
+ office_element_ptr elm;
+ };
+
+ class odf_math_context::Impl
+ {
+ public:
+ Impl(odf_conversion_context *odf_context) : odf_context_(odf_context)
+ {
+ styles_context_ = NULL;
+ current_paragraph_properties = NULL;
+ current_text_properties = NULL;
+ }
+ odf_math_state current_math_state_;
+ void clear_current();
+
+ style_paragraph_properties *current_paragraph_properties;
+ style_text_properties *current_text_properties;
+ std::vector current_level_; //постоянно меняющийся список уровней наследования
+ std::vector math_list_; //все элементы .. для удобства разделение по "топам"
+ odf_conversion_context *odf_context_;
+ office_math *root_element_;
+
+ odf_style_context *styles_context_;
+ };
+
+ void odf_math_context::Impl::clear_current()
+ {
+ current_math_state_.clear();
+ }
+
+ static formulasconvert::oox2odf_converter formulas_converter_math;
+
+ odf_math_context::odf_math_context(odf_conversion_context *odf_context)
+ : impl_(new odf_math_context::Impl(odf_context)), lvl_of_me(0), counter(0)
+ {
+ mo = { L'+', L'-', L'±', L'∓', L'∙', L'×', L'∗', L'÷', L'/', L'≂', L'⊕', L'⊖', L'⊙', L'⊗', L'⊘', L'∘', L'¬', L'∧', L'∨', // un/bi operators
+ L'=', L'≠', L'<', L'≤', L'>', L'≥', L'≪', L'≫', L'≈', L'~', L'≃', L'≡', L'∝', L'∥', L'⟂', L'|', L'∤', L'→', L'⊷', // relations
+ L'⊶', L'≝', L'⇐', L'⇔', L'⇒', L'≺', L'≻', L'≼', L'≽', L'≾', L'≿', L'⊀', L'⊁', // relationships over sets
+ L'∈', L'∉', L'∋', L'∩', L'∪', L'//', L'/', L'⊂', L'⊆', L'⊃', L'⊇', L'⊄', L'⊈', L'⊅', L'⊉', //
+ L'∞', L'∂', L'∇', L'∃', L'∄', L'∀', L'ħ', L'ƛ', L'ℜ', L'ℑ', L'℘', L'ℒ', L'ℱ', L'←', L'→', L'↑', L'↓', // others
+ L'…', L'⋯', L'⋮', L'⋰', L'⋱', L'∞', L'→',
+ L'∫', L'∬', 'L∭', L'∮', L'∯', L'∰',
+ L'∑', L'∏', L'∐', L'⋃', L'⋂', L'⋀', L'⋁', L'≝', L'≞', L'≜'
+ };
+ debug_stream.open("LogCounter.txt");
+ }
+
+ odf_math_context::~odf_math_context()
+ {
+ debug_stream.close();
+ }
+
+ void odf_math_context::set_styles_context(odf_style_context * style_context)
+ {
+ impl_->styles_context_ = style_context;
+
+ impl_->odf_context_->drawing_context()->set_styles_context(style_context);
+ }
+
+ odf_drawing_context * odf_math_context::drawing_context()
+ {
+ return impl_->odf_context_->drawing_context();
+ }
+
+ odf_text_context * odf_math_context::text_context()
+ {
+ return impl_->odf_context_->text_context();
+ }
+
+ void odf_math_context::start_math(office_element_ptr & root)
+ {
+ impl_->root_element_ = dynamic_cast(root.get());
+
+ if (!impl_->root_element_) return;
+
+ impl_->root_element_->create_child_element(L"math", L"semantics");
+
+ size_t level = impl_->current_level_.size();
+
+ odf_math_level_state level_state = { NULL, NULL, root };
+ odf_element_state state(root, L"", office_element_ptr(), level);
+
+ impl_->current_level_.push_back(level_state);
+ impl_->current_math_state_.elements_.push_back(state);
+ }
+
+ void odf_math_context::start_element(office_element_ptr & elm)
+ {
+
+ impl_->current_level_.back().elm->add_child_element(elm);
+
+ size_t level = impl_->current_level_.size();
+
+ odf_element_state state(elm, L"", office_element_ptr(), level);
+ odf_math_level_state level_state = { NULL, NULL, elm };
+
+ impl_->current_level_.push_back(level_state);
+ impl_->current_math_state_.elements_.push_back(state);
+ }
+
+ void odf_math_context::end_element()
+ {
+ impl_->current_level_.pop_back();
+ }
+ bool odf_math_context::isEmpty()
+ {
+ return impl_->current_level_.empty();
+ }
+ void odf_math_context::end_math()
+ {
+ if (impl_->current_math_state_.elements_.empty()) return;
+
+
+
+ end_element();
+ ///////////////////
+
+
+
+
+ impl_->clear_current();
+ }
+}
+}
\ No newline at end of file
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.h b/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.h
new file mode 100644
index 0000000000..981e6a70e3
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_math_context.h
@@ -0,0 +1,100 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include
+#include
+#include
+#include
+#include "office_elements_create.h"
+#include
+//#include "../../../ASCOfficeOdfFile/src/odf/datatypes/mathclass.h"
+
+
+#define CREATE_MATH_TAG(tag)\
+ odf_writer::office_element_ptr elm;\
+ odf_writer::create_element(L"math", tag, elm, odf_context());\
+ //odf_context()->math_context()->debug_stream << tag << "\n";
+
+#define OPEN_MATH_TAG(elm)\
+ odf_context()->math_context()->start_element(elm); \
+ odf_context()->math_context()->counter++; \
+ //odf_context()->math_context()->debug_stream << L"open, counter is " << odf_context()->math_context()->counter << "\n";
+
+#define CLOSE_MATH_TAG\
+ odf_context()->math_context()->end_element();\
+ odf_context()->math_context()->counter--; \
+ //odf_context()->math_context()->debug_stream /*std::wcout*/ << L"close, counter is " << odf_context()->math_context()->counter << "\n";
+
+namespace cpdoccore {
+ namespace odf_writer
+ {
+ class odf_conversion_context;
+ class odf_style_context;
+ class odf_text_context;
+ class odf_drawing_context;
+
+ class odf_math_context
+ {
+ public:
+ odf_math_context(odf_conversion_context *odf_context);
+ ~odf_math_context();
+
+ void set_styles_context(odf_style_context * style_context);
+
+ odf_drawing_context *drawing_context();
+ odf_text_context *text_context();
+
+ void start_math(office_element_ptr & root);
+
+ void start_element(office_element_ptr & elm); // office_math_element TODO
+
+ void end_element();
+
+ std::vector> brackets;
+ int lvl_of_me;
+ std::vector end_counter;
+ int counter;
+ std::set mo;
+
+ void end_math();
+
+ std::wofstream debug_stream;
+
+ bool isEmpty();
+ private:
+ class Impl;
+ _CP_PTR(Impl) impl_;
+ };
+
+ }
+}
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
index ce802e73ba..49de75711d 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
+++ b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
@@ -39,8 +39,6 @@
#include
-#include "../utils.h"
-
#include "ods_conversion_context.h"
#include "office_spreadsheet.h"
@@ -57,33 +55,10 @@ namespace cpdoccore {
namespace odf_writer {
-namespace utils
-{
-
-void calculate_size_font_symbols(_font_metrix & metrix, NSFonts::IApplicationFonts *appFonts)
-{
- std::pair appr = _graphics_utils_::calculate_size_symbol_asc(metrix.font_name, metrix.font_size, metrix.italic, metrix.bold, appFonts);
-
- if (appr.first < 0.01 || appr.second < 0.01)
- {
- appr.first = _graphics_utils_::calculate_size_symbol_win(metrix.font_name,metrix.font_size,false/*metrix.italic*/,false/*metrix.bold*/);
- appr.first = ((int)(appr.first + 0.5) + 2 * (int)appr.first)/3.;
- }
-
- if (appr.first > 0)
- {
- //pixels to pt
- metrix.approx_symbol_size = appr.first ;///1.1;//"1.2" волшебное число оО
- metrix.IsCalc = true;
- }
-
-}
-}
ods_conversion_context::ods_conversion_context(package::odf_document * outputDocument)
: odf_conversion_context (SpreadsheetDocument, outputDocument),
table_context_(*this), current_text_context_(NULL)
{
- font_metrix_ = _font_metrix();
}
@@ -483,21 +458,6 @@ void ods_conversion_context::end_cell()
current_table()->end_cell();
end_text_context();
}
-void ods_conversion_context::calculate_font_metrix(std::wstring name, double size, bool italic, bool bold)
-{
- if (font_metrix_.IsCalc) return;
-
- if (size < 1)
- size = 12;
-
- font_metrix_.font_size = size;
- font_metrix_.italic = italic;
- font_metrix_.bold = bold;
- font_metrix_.font_name = name;
-
-////////////////////////////////////////////
- utils::calculate_size_font_symbols(font_metrix_, applicationFonts_);
-}
void ods_conversion_context::start_columns()
{
@@ -723,19 +683,6 @@ void ods_conversion_context::add_external_reference(const std::wstring & ref)
external.ref = ref;
externals_.push_back(external);
}
-double ods_conversion_context::convert_symbol_width(double val)
-{
- //width = ((int)((column_width * Digit_Width + 5) / Digit_Width * 256 )) / 256.;
- //width = (int)(((256. * width + ((int)(128. / Digit_Width ))) / 256. ) * Digit_Width ); //in pixels
- //
- //_dxR = dxR / 1024. * width * 9525.; // to emu
-
- val = ((int)((val * font_metrix_.approx_symbol_size + 5) / font_metrix_.approx_symbol_size * 256 )) / 256.;
-
- double pixels = (int)(((256. * val + ((int)(128. / font_metrix_.approx_symbol_size ))) / 256. ) * font_metrix_.approx_symbol_size ); //in pixels
-
- return pixels * 0.75; //* 9525. * 72.0 / (360000.0 * 2.54);
-}
void ods_conversion_context::start_table_view( int view_id )
{
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
index 2f174df750..7400aa532d 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
+++ b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
@@ -40,19 +40,6 @@ namespace odf_writer {
class office_spreadsheet;
class odf_text_context;
-struct _font_metrix
-{
- _font_metrix(){IsCalc = italic = bold = false; font_size = approx_symbol_size =0;}
- bool IsCalc;
-
- std::wstring font_name;
- double font_size;
- bool italic;
- bool bold;
-
- double approx_symbol_size;//in pt
-};
-
struct ods_external_state
{
std::wstring ref;
@@ -74,8 +61,6 @@ public:
void add_column(int start_column, int repeated, int level = 0, bool _default = false);
void end_columns();
- void calculate_font_metrix(std::wstring name, double size, bool italic, bool bold);
-
void start_rows();
void start_row(int _start_row, int repeated, int level = 0, bool _default = false);
void end_row();
@@ -132,8 +117,6 @@ public:
void add_text(const std::wstring &text);
void add_header_footer_image(const std::wstring & name, office_element_ptr image);
-
- double convert_symbol_width(double val);
void add_defined_range (const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable = false);
void add_defined_expression (const std::wstring & name, const std::wstring & value, int sheet_id, bool printable = false);
@@ -155,7 +138,6 @@ public:
std::vector externals_;
private:
- _font_metrix font_metrix_;
ods_table_context table_context_;
odf_text_context* current_text_context_;
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.cpp
index d0b5ac6dbb..43b1ebf310 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.cpp
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.cpp
@@ -270,6 +270,18 @@ void odt_conversion_context::start_drawings()
drawing_context_.push_back(new_drawing_context_);
}
+bool odt_conversion_context::start_math()
+{
+ if (false == math_context()->isEmpty()) return false;
+
+ start_drawings();
+ return odf_conversion_context::start_math();
+}
+void odt_conversion_context::end_math()
+{
+ odf_conversion_context::end_math();
+ end_drawings();
+}
void odt_conversion_context::end_drawings()
{
if (drawing_context_.empty()) return;
diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.h b/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.h
index 8e73e848f3..fe145392d4 100644
--- a/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.h
+++ b/ASCOfficeOdfFileW/source/OdfFormat/odt_conversion_context.h
@@ -74,25 +74,28 @@ public:
virtual odf_style_context * styles_context();
- odf_comment_context * comment_context();
+ odf_comment_context * comment_context();
odf_table_context * table_context();
odf_notes_context * notes_context();
- void start_drawings ();
- void end_drawings ();
+ void start_drawings ();
+ void end_drawings ();
+
+ virtual bool start_math();
+ virtual void end_math();
void add_text_content (const std::wstring & text);
- void start_paragraph (bool styled = false);
- void end_paragraph ();
+ void start_paragraph (bool styled = false);
+ void end_paragraph ();
void add_paragraph_break(int type);
- void start_hyperlink (const std::wstring& link, const std::wstring& location);
- void end_hyperlink ();
+ void start_hyperlink (const std::wstring& link, const std::wstring& location);
+ void end_hyperlink ();
- void start_bookmark (int id, const std::wstring& name);
- void end_bookmark (int id);
+ void start_bookmark (int id, const std::wstring& name);
+ void end_bookmark (int id);
void start_sequence ();
void end_sequence ();
diff --git a/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp b/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
index 169772d7d0..686f648a15 100644
--- a/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+++ b/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
@@ -530,6 +530,224 @@ void OoxConverter::convert(OOX::WritingElement *oox_unknown)
{
//бяка
}break;
+ //--Math
+ case OOX::et_m_oMath:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mathPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_oMathPara:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_oMathParaPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_ctrlPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_acc:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_accPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_argPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_bar:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_barPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_borderBox:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_borderBoxPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_box:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_boxPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_brk:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_d:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_dPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_eqArr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_eqArrPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_f:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_fPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_func:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_funcPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_groupChr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_groupChrPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_limLow:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_limLowPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_limUpp:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_limUppPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mathFont:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_m:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mc:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mcPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mcs:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_mr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_r:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_t:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_nary:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_naryPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_phant:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_phantPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_rad:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_radPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sPre:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sPrePr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSub:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSubPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSubSup:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSubSupPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSup:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_sSupPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_m_e:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }break;
+ case OOX::et_w_rPr:
+ {
+ convert(dynamic_cast(oox_unknown));
+ }
+ break;
default:
{
_CP_LOG << L"[warning] : no convert element(" << oox_unknown->getType() << L")\n";
diff --git a/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h b/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
index 41602e3b2d..cef538916d 100644
--- a/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
+++ b/ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
@@ -33,6 +33,7 @@
#include
#include "../../../Common/DocxFormat/Source/Base/SmartPtr.h"
+#include "../../Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h"
#include "../progressCallback.h"
@@ -65,7 +66,6 @@ namespace cpdoccore
class style_chart_properties;
class style_drawing_page_properties;
class graphic_format_properties;
-
namespace package
{
class odf_document;
@@ -281,6 +281,81 @@ namespace OOX
{
class CWrap;
}
+ namespace Logic
+ {
+ class CDeg;
+ class CDen;
+ class CElement;
+ class CFName;
+ class CLim;
+ class CNum;
+ class COMath;
+ class CSub;
+ class CSup;
+ class CCtrlPr;
+ class CAcc;
+ class CAccPr;
+ class CArgPr;
+ class CBar;
+ class CBarPr;
+ class CBorderBox;
+ class CBorderBoxPr;
+ class CBox;
+ class CBoxPr;
+ class CBrk;
+ class CDelimiter;
+ class CDelimiterPr;
+ class CEqArr;
+ class CEqArrPr;
+ class CFPr;
+ class CFraction;
+ class CFunc;
+ class CFuncPr;
+ class CGroupChr;
+ class CGroupChrPr;
+ class CLimLow;
+ class CLimLowPr;
+ class CLimUpp;
+ class CLimUppPr;
+ class CMathFont;
+ class CMathPr;
+ class CMatrix;
+ class CMc;
+ class CMcPr;
+ class CMcs;
+ class CMDel;
+ class CMIns;
+ class CMPr;
+ class CMr;
+ class CMRPr;
+ class CMRun;
+ class CMText;
+ class CNary;
+ class CNaryPr;
+ class COMathPara;
+ class COMathParaPr;
+ class CPhant;
+ class CPhantPr;
+ class CRad;
+ class CRadPr;
+ class CSPre;
+ class CSPrePr;
+ class CSSub;
+ class CSSubPr;
+ class CSSubSup;
+ class CSSubSupPr;
+ class CSSup;
+ class CSSupPr;
+ //class CType;
+ //class CSupHide;
+ //class CSubHide;
+ //class CBegChr;
+ //class CEndChr;
+ //class CDiff;
+ //class CDegHide;
+ //class CChr;
+ //class CArgSz;
+ }
}
namespace SimpleTypes
{
@@ -368,6 +443,8 @@ namespace PPTX
}
}
+using namespace cpdoccore;
+
namespace Oox2Odf
{
class OoxConverter
@@ -574,11 +651,101 @@ public:
void convert(OOX::Vml::CVmlCommonElements *vml_attr);
void convert(OOX::Vml::CFormulas *vml_formulas);
- void convert(OOX::Drawing::COfficeArtExtensionList *ext_list);
- void convert(OOX::Drawing::COfficeArtExtension *art_ext);
+ void convert(OOX::Drawing::COfficeArtExtensionList *ext_list);
+ void convert(OOX::Drawing::COfficeArtExtension *art_ext);
+//math............................................................................................................................
+ std::vector>& brackets();
+ int& lvl_of_me();
+ std::vector& end_counter();
+ void mrow();
+ void endOfMrow();
+ void resizeBrackets();
+ void convert(OOX::Logic::COMath *oox_math);
+ void convert(OOX::Logic::CMathPr *oox_math_pr);
+ bool convert(OOX::Logic::CCtrlPr *oox_ctrl_pr);
+ void convert(OOX::Logic::CAcc *oox_acc);
+ void convert(OOX::Logic::CAccPr *oox_acc_pr);
+ void convert(OOX::Logic::CArgPr *oox_arg_pr);
+ void convert(OOX::Logic::CBar *oox_bar);
+ void convert(OOX::Logic::CBarPr *oox_bar_pr);
+ void convert(OOX::Logic::CBorderBox *oox_border_box);
+ void convert(OOX::Logic::CBorderBoxPr *oox_border_box_pr);
+ void convert(OOX::Logic::CBox *oox_box);
+ void convert(OOX::Logic::CBoxPr *oox_box_pr);
+ void convert(OOX::Logic::CBrk *oox_brk);
+ void convert(OOX::Logic::CDelimiter *oox_del);
+ std::pair convert(OOX::Logic::CDelimiterPr *oox_del_pr);
+ void convert(OOX::Logic::CEqArr *oox_eq_arr);
+ void convert(OOX::Logic::CEqArrPr *oox_eq_arr_pr);
+ std::wstring convert(OOX::Logic::CFPr *oox_f_pr);
+ void convert(OOX::Logic::CFraction *oox_fraction);
+ void convert(OOX::Logic::CFunc *oox_func);
+ void convert(OOX::Logic::CFuncPr *oox_func_pr);
+ void convert(OOX::Logic::CGroupChr *oox_group_ch);
+ bool convert(OOX::Logic::CGroupChrPr *oox_group_ch_pr);
+ void convert(OOX::Logic::CLimLow *oox_lim_low);
+ void convert(OOX::Logic::CLimLowPr *oox_lim_low_pr);
+ void convert(OOX::Logic::CLimUpp *oox_lim_upp);
+ void convert(OOX::Logic::CLimUppPr *oox_lim_upp_pr);
+ void convert(OOX::Logic::CMathFont *oox_math_font);
+ void convert(OOX::Logic::CMatrix *oox_matrix);
+ void convert(OOX::Logic::CMc *oox_mc);
+ void convert(OOX::Logic::CMcPr *oox_mc_pr);
+ void convert(OOX::Logic::CMcs *oox_mcs);
+ void convert(OOX::Logic::CMDel *oox_m_del);
+ void convert(OOX::Logic::CMIns *oox_m_ins);
+ void convert(OOX::Logic::CMPr *oox_m_pr);
+ void convert(OOX::Logic::CMr *oox_mr);
+ void convert(OOX::Logic::CMRun *oox_run);
+ void convert(OOX::Logic::CMText *oox_text);
+ void convert(OOX::Logic::CNary *oox_nary);
+ std::pair convert(OOX::Logic::CNaryPr *oox_nary_pr);
+ void convert(OOX::Logic::COMathPara *oox_math_para);
+ void convert(OOX::Logic::COMathParaPr *oox_math_para_pr);
+ void convert(OOX::Logic::CPhant *oox_phant);
+ void convert(OOX::Logic::CPhantPr *oox_phant_pr);
+ void convert(OOX::Logic::CRad *oox_rad);
+ bool convert(OOX::Logic::CRadPr *oox_rad_pr);
+ void convert(OOX::Logic::CSPre *oox_s_pre);
+ void convert(OOX::Logic::CSPrePr *oox_s_pre_pr);
+ void convert(OOX::Logic::CSSub *oox_ssub);
+ void convert(OOX::Logic::CSSubPr *oox_ssub_pr);
+ void convert(OOX::Logic::CSSubSup *oox_ssub_sup);
+ void convert(OOX::Logic::CSSubSupPr *oox_ssub_sup_pr);
+ void convert(OOX::Logic::CSSup *oox_ssup);
+ void convert(OOX::Logic::CSSupPr *oox_ssup_pr);
+ void convert(OOX::Logic::CNum *oox_num);
+ void convert(OOX::Logic::CDen *oox_den);
+ std::wstring convert(OOX::Logic::CBegChr *oox_beg_chr);
+ std::wstring convert(OOX::Logic::CEndChr *oox_end_chr);
+ void convert(OOX::Logic::CElement *oox_elm);
+ bool convert(OOX::Logic::CDegHide *oox_deg_hide);
+ void convert(OOX::Logic::CDeg *oox_deg, OOX::Logic::CElement *oox_elm);
+ void convert(OOX::Logic::CSup *oox_sup, OOX::Logic::CElement *oox_elm);
+ void convert(OOX::Logic::CSub *oox_sub, OOX::Logic::CElement *oox_elm);
+ void convert(OOX::Logic::CFName *oox_fname);
+ void convert(OOX::Logic::CLim *oox_lim);
+ void convert(OOX::Logic::CChr *oox_chr);
+ void convert(OOX::Logic::CSup *oox_csup);
+ void convert(OOX::Logic::CSub *oox_csub);
+ bool convert(OOX::Logic::CSubHide *oox_subHide);
+ bool convert(OOX::Logic::CSupHide *oox_supHide);
+ std::wstring convert(OOX::Logic::CType *oox_type);
+ void convert(OOX::Logic::CDiff *oox_diff);
+ void convert(OOX::Logic::CArgSz *oox_arg_sz);
+ void convert(OOX::Logic::COpEmu *oox_op_emu);
+ bool convert(OOX::Logic::CPos *oox_pos);
+ void convert(OOX::Logic::CVertJc *oox_vert_jc);
+ void convert(OOX::Logic::CNoBreak *oox_no_break);
+ void convert(OOX::Logic::CCount *oox_count);
+ void convert(OOX::Logic::CMcJc *oox_mc_jc);
+ void convert(OOX::Logic::CPlcHide *oox_plc_hide);
+ bool convert(OOX::Logic::CRunProperty *oox_r_pr);
+
//-----------------------------------
void RGB2HSL(DWORD argb, double& dH, double& dS, double& dL);
DWORD HSL2RGB(double dH, double dS, double dL);
+
};
} // namespace Oox2Odf
diff --git a/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp b/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
index 4852dcbea6..4ae8f77ef9 100644
--- a/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+++ b/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
@@ -449,7 +449,7 @@ void DocxConverter::convert(OOX::WritingElement *oox_unknown)
case OOX::et_w_tc:
{
convert(dynamic_cast(oox_unknown));
- }break;
+ }break;
default:
{
OoxConverter::convert(oox_unknown);
@@ -5321,6 +5321,5 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
return true;
}
-
}
diff --git a/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h b/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
index 42a4a159a7..cb4565a581 100644
--- a/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
+++ b/ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
@@ -1,278 +1,278 @@
-/*
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * 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 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * 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
-
-#include "Converter.h"
-
-#include
-#include
-
-#include "../../../Common/DocxFormat/Source/Common/SimpleTypes_Word.h"
-
-namespace OOX
-{
- class CDocx;
- class CDocxFlat;
- class CTheme;
- class CDocDefaults;
- class CStyle;
- class CComment;
- class CStyles;
-
- namespace Logic
- {
- class CIns;
- class CDel;
- class CPPrChange;
- class CRPrChange;
- class CSectPrChange;
- class CTrPrChange;
- class CTcPrChange;
- class CTblPrChange;
- class CTblGridChange;
- class CParagraph;
- class CParagraphProperty;
- class CPTab;
- class CSmartTag;
- class CRun;
- class CSym;
- class CRunProperty;
- class CSectionProperty;
- class CText;
- class CAlternateContent;
- class CDrawing;
-// class CGroupShape;
-// class CShape;
- class CControl;
- class CPicture;
- class CObject;
- class CPBdr;
- class CHyperlink;
- class CFldChar;
- class CFldSimple;
- class CInstrText;
- class CDelText;
- class CCommentRangeStart;
- class CCommentRangeEnd;
- class CCommentReference;
- class CFootnoteReference;
- class CEndnoteReference;
- class CTbl;
- class CTblGrid;
- class CTr;
- class CTc;
- class CTblGridCol;
- class CTableCellProperties;
- class CTableProperty;
- class CTableRowProperties;
- class CTcBorders;
- class CTblBorders;
- class CSdt;
- class CSdtContent;
- class CBackground;
- class CLockedCanvas;
- class CBookmarkStart;
- class CBookmarkEnd;
- class CBgPict;
-
- }
- namespace Numbering
- {
- class CAbstractNum;
- class CLvl;
- class CNumLvl;
- }
-}
-namespace ComplexTypes
-{
- namespace Word
- {
- class CColor;
- class CJc;
- class CBorder;
- class CShading;
- class CFramePr;
- class CTblWidth;
- class CPageBorder;
- class CTrackChange;
- class CShading;
- }
-}
-namespace cpdoccore
-{
- namespace odf_writer
- {
- namespace package
- {
- class odf_document;
- }
- class ods_conversion_context;
- class odf_conversion_context;
- class odt_conversion_context;
- }
-}
-
-using namespace cpdoccore;
-
-namespace Oox2Odf
-{
- class DocxConverter : public OoxConverter
- {
- public:
- DocxConverter(const std::wstring & path, bool bTemplate);
- ~DocxConverter();
-
- virtual bool convertDocument();
-
- virtual OOX::IFileContainer *current_document();
- virtual odf_writer::odf_conversion_context *odf_context();
- virtual PPTX::Theme *oox_theme();
- virtual PPTX::Logic::ClrMap *oox_clrMap();
- virtual std::wstring find_link_by_id (const std::wstring & sId, int t);
- virtual NSCommon::smart_ptr find_file_by_id (const std::wstring & sId);
-
- void convert (OOX::WritingElement *oox_unknown);
- std::wstring dump_text (OOX::WritingElement *oox_unknown);
- private:
- struct _section
- {
- OOX::Logic::CSectionProperty *props;
- size_t start_para;
- size_t end_para;
-
- bool bContinue = false;
- } *current_section_properties;
- OOX::CDocx *docx_document;
- OOX::CDocxFlat *docx_flat_document;
-
- odf_writer::odt_conversion_context *odt_context;
- OOX::Logic::CSectionProperty *last_section_properties;
-
- void apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logic::CSectionProperty *other);
-
- void convert_document ();
- void convert_styles ();
- void convert_lists_styles ();
- void convert_settings ();
-
- void convert_footnote (int oox_ref_id);
- void convert_endnote (int oox_ref_id);
- void convert_comment (int oox_comm_id);
- void convert_hdr_ftr (std::wstring sId);
-
- void convert(OOX::Logic::CSdtContent *oox_sdt);
- void convert(OOX::Logic::CBackground *oox_background, int type);
- void convert(OOX::Logic::CBgPict *oox_background, int type);
- void convert(OOX::Logic::CSdt *oox_sdt);
- void convert(OOX::Logic::CSectionProperty *oox_section_pr, bool bSection, const std::wstring & master_name = L"", bool bAlways = false);
- void convert(OOX::Logic::CParagraph *oox_paragraph);
- void convert(OOX::Logic::CRun *oox_run);
- void convert(OOX::Logic::CParagraphProperty *oox_para_prop, odf_writer::style_paragraph_properties *paragraph_properties);
- void convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf_writer::style_paragraph_properties *paragraph_properties);
- void convert(OOX::Logic::CRunProperty *oox_run_prop, odf_writer::style_text_properties *text_properties, bool is_list_styles = false);
- void convert(OOX::Logic::CFldSimple *oox_fld);
- void convert(OOX::Logic::CFldChar *oox_fld);
- void convert(OOX::Logic::CInstrText *oox_instrText);
- void convert(OOX::Logic::CDelText *oox_delText);
- void convert(OOX::Logic::CText *oox_text);
- void convert(OOX::Logic::CHyperlink *oox_hyperlink);
- void convert(OOX::Logic::CSym *oox_sym);
- void convert(OOX::Logic::CSmartTag *oox_tag);
- void convert(OOX::Logic::CPTab *oox_ptab);
- void convert(OOX::Logic::CBookmarkStart *oox_bookmark_start);
- void convert(OOX::Logic::CBookmarkEnd *oox_bookmark_end);
-
- int convert(ComplexTypes::Word::CTrackChange *oox_change, int type);
- void convert(OOX::Logic::CIns *oox_ins);
- void convert(OOX::Logic::CDel *oox_del);
- int convert(OOX::Logic::CPPrChange *oox_para_prop_change);
- int convert(OOX::Logic::CRPrChange *oox_run_prop_change);
- int convert(OOX::Logic::CSectPrChange *oox_sect_prop_change);
- int convert(OOX::Logic::CTrPrChange *oox_tr_prop_change);
- int convert(OOX::Logic::CTcPrChange *oox_tc_prop_change);
- int convert(OOX::Logic::CTblPrChange *oox_table_prop_change);
- int convert(OOX::Logic::CTblGridChange *oox_table_grid_prop_change);
-
- void convert(OOX::Logic::CAlternateContent *oox_alt_content);
- void convert(OOX::Logic::CDrawing *oox_drawing);
- void convert(OOX::Logic::CPicture *oox_pict);
- void convert(OOX::Logic::CObject *oox_obj);
-
- void convert(OOX::Drawing::CAnchor *oox_anchor);
- void convert(OOX::Drawing::CInline *oox_inline);
-
- void convert(SimpleTypes::CTheme<> *oox_font_theme,_CP_OPT(std::wstring) & odf_font_name);
- void convert(ComplexTypes::Word::CShading *shading, _CP_OPT(odf_types::color) & odf_color);
- void convert(ComplexTypes::Word::CColor *color, _CP_OPT(odf_types::color) & odf_color);
- void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf_types::length) & odf_size);
- void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf_types::length_or_percent) & odf_size);
- void convert(ComplexTypes::Word::CTblWidth *oox_size, _CP_OPT(odf_types::length) & odf_size);
- void convert(ComplexTypes::Word::CJc *oox_jc, _CP_OPT(odf_types::text_align) & align);
- void convert(ComplexTypes::Word::CBorder *borderProp, std::wstring & odf_border_prop);
- void convert(ComplexTypes::Word::CPageBorder *borderProp, std::wstring & odf_border_prop);
-
- void convert(OOX::Logic::CPBdr *oox_border, odf_writer::style_paragraph_properties *paragraph_properties);
- void convert(OOX::Logic::CTcBorders *oox_border, odf_writer::style_table_cell_properties *table_cell_properties);
- void convert(OOX::Logic::CTblBorders *oox_border, odf_writer::style_table_cell_properties *table_cell_properties);
- //void convert(OOX::Logic::CTblBorders *oox_border, odf_writer::style_table_properties *table_properties);
-
- void convert(SimpleTypes::CHexColor<> *color, SimpleTypes::CThemeColor<> *theme_color,
- SimpleTypes::CUcharHexNumber<>* theme_tint,
- SimpleTypes::CUcharHexNumber<>* theme_shade, _CP_OPT(odf_types::color) & odf_color);
- void convert(OOX::CDocDefaults *def_style, OOX::CStyles *styles);
- void convert(OOX::CStyle *style);
- void convert_table_style(OOX::CStyle *oox_style);
- void convert(OOX::Numbering::CLvl *oox_num_lvl, OOX::Numbering::CNumLvl *oox_num_lvl_over, int lvl);
-
- void convert(OOX::Logic::CCommentRangeStart *oox_comm_start);
- void convert(OOX::Logic::CCommentRangeEnd *oox_comm_end);
- void convert(OOX::Logic::CCommentReference *oox_comm_ref);
- void convert(OOX::CComment *oox_comm);
-
- void convert(OOX::Logic::CFootnoteReference *oox_note_ref);
- void convert(OOX::Logic::CEndnoteReference *oox_note_ref);
-
- void convert(OOX::Logic::CTbl *oox_table);
- void convert(OOX::Logic::CTblGrid *oox_table_grid);
- void convert(OOX::Logic::CTr *oox_table_row);
- void convert(OOX::Logic::CTc *oox_table_cell);
-
- bool convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr, int col = -1);
- bool convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr, odf_writer::style_table_cell_properties *table_cell_properties/*,odf_writer::style_table_cell_properties * table_cell_properties = NULL*/);
- bool convert(OOX::Logic::CTableProperty *oox_table_pr, bool base_styled);
- bool convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer::style_table_properties *table_properties);
- void convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer::style_table_cell_properties *table_cell_properties);
- void convert(OOX::Logic::CTableRowProperties *oox_table_row_pr);
- void convert(OOX::Logic::CTableRowProperties *oox_table_row_pr, odf_writer::style_table_row_properties *table_row_properties);
-//--------------------------------------------------------------------------------
- };
-}
+/*
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * 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
+
+#include "Converter.h"
+
+#include
+#include
+
+#include "../../../Common/DocxFormat/Source/Common/SimpleTypes_Word.h"
+#include "../../Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h"
+
+namespace OOX
+{
+ class CDocx;
+ class CDocxFlat;
+ class CTheme;
+ class CDocDefaults;
+ class CStyle;
+ class CComment;
+ class CStyles;
+
+ namespace Logic
+ {
+ class CIns;
+ class CDel;
+ class CPPrChange;
+ class CRPrChange;
+ class CSectPrChange;
+ class CTrPrChange;
+ class CTcPrChange;
+ class CTblPrChange;
+ class CTblGridChange;
+ class CParagraph;
+ class CParagraphProperty;
+ class CPTab;
+ class CSmartTag;
+ class CRun;
+ class CSym;
+ class CRunProperty;
+ class CSectionProperty;
+ class CText;
+ class CAlternateContent;
+ class CDrawing;
+// class CGroupShape;
+// class CShape;
+ class CControl;
+ class CPicture;
+ class CObject;
+ class CPBdr;
+ class CHyperlink;
+ class CFldChar;
+ class CFldSimple;
+ class CInstrText;
+ class CDelText;
+ class CCommentRangeStart;
+ class CCommentRangeEnd;
+ class CCommentReference;
+ class CFootnoteReference;
+ class CEndnoteReference;
+ class CTbl;
+ class CTblGrid;
+ class CTr;
+ class CTc;
+ class CTblGridCol;
+ class CTableCellProperties;
+ class CTableProperty;
+ class CTableRowProperties;
+ class CTcBorders;
+ class CTblBorders;
+ class CSdt;
+ class CSdtContent;
+ class CBackground;
+ class CLockedCanvas;
+ class CBookmarkStart;
+ class CBookmarkEnd;
+ class CBgPict;
+ }
+ namespace Numbering
+ {
+ class CAbstractNum;
+ class CLvl;
+ class CNumLvl;
+ }
+}
+namespace ComplexTypes
+{
+ namespace Word
+ {
+ class CColor;
+ class CJc;
+ class CBorder;
+ class CShading;
+ class CFramePr;
+ class CTblWidth;
+ class CPageBorder;
+ class CTrackChange;
+ class CShading;
+ }
+}
+namespace cpdoccore
+{
+ namespace odf_writer
+ {
+ namespace package
+ {
+ class odf_document;
+ }
+ class ods_conversion_context;
+ class odf_conversion_context;
+ class odt_conversion_context;
+ }
+}
+
+using namespace cpdoccore;
+
+namespace Oox2Odf
+{
+ class DocxConverter : public OoxConverter
+ {
+ public:
+ DocxConverter(const std::wstring & path, bool bTemplate);
+ ~DocxConverter();
+
+ virtual bool convertDocument();
+
+ virtual OOX::IFileContainer *current_document();
+ virtual odf_writer::odf_conversion_context *odf_context();
+ virtual PPTX::Theme *oox_theme();
+ virtual PPTX::Logic::ClrMap *oox_clrMap();
+ virtual std::wstring find_link_by_id (const std::wstring & sId, int t);
+ virtual NSCommon::smart_ptr find_file_by_id (const std::wstring & sId);
+
+ void convert (OOX::WritingElement *oox_unknown);
+ std::wstring dump_text (OOX::WritingElement *oox_unknown);
+ private:
+ struct _section
+ {
+ OOX::Logic::CSectionProperty *props;
+ size_t start_para;
+ size_t end_para;
+
+ bool bContinue = false;
+ } *current_section_properties;
+ OOX::CDocx *docx_document;
+ OOX::CDocxFlat *docx_flat_document;
+
+ odf_writer::odt_conversion_context *odt_context;
+ OOX::Logic::CSectionProperty *last_section_properties;
+
+ void apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logic::CSectionProperty *other);
+
+ void convert_document ();
+ void convert_styles ();
+ void convert_lists_styles ();
+ void convert_settings ();
+
+ void convert_footnote (int oox_ref_id);
+ void convert_endnote (int oox_ref_id);
+ void convert_comment (int oox_comm_id);
+ void convert_hdr_ftr (std::wstring sId);
+
+ void convert(OOX::Logic::CSdtContent *oox_sdt);
+ void convert(OOX::Logic::CBackground *oox_background, int type);
+ void convert(OOX::Logic::CBgPict *oox_background, int type);
+ void convert(OOX::Logic::CSdt *oox_sdt);
+ void convert(OOX::Logic::CSectionProperty *oox_section_pr, bool bSection, const std::wstring & master_name = L"", bool bAlways = false);
+ void convert(OOX::Logic::CParagraph *oox_paragraph);
+ void convert(OOX::Logic::CRun *oox_run);
+ void convert(OOX::Logic::CParagraphProperty *oox_para_prop, odf_writer::style_paragraph_properties *paragraph_properties);
+ void convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf_writer::style_paragraph_properties *paragraph_properties);
+ void convert(OOX::Logic::CRunProperty *oox_run_prop, odf_writer::style_text_properties *text_properties, bool is_list_styles = false);
+ void convert(OOX::Logic::CFldSimple *oox_fld);
+ void convert(OOX::Logic::CFldChar *oox_fld);
+ void convert(OOX::Logic::CInstrText *oox_instrText);
+ void convert(OOX::Logic::CDelText *oox_delText);
+ void convert(OOX::Logic::CText *oox_text);
+ void convert(OOX::Logic::CHyperlink *oox_hyperlink);
+ void convert(OOX::Logic::CSym *oox_sym);
+ void convert(OOX::Logic::CSmartTag *oox_tag);
+ void convert(OOX::Logic::CPTab *oox_ptab);
+ void convert(OOX::Logic::CBookmarkStart *oox_bookmark_start);
+ void convert(OOX::Logic::CBookmarkEnd *oox_bookmark_end);
+
+ int convert(ComplexTypes::Word::CTrackChange *oox_change, int type);
+ void convert(OOX::Logic::CIns *oox_ins);
+ void convert(OOX::Logic::CDel *oox_del);
+ int convert(OOX::Logic::CPPrChange *oox_para_prop_change);
+ int convert(OOX::Logic::CRPrChange *oox_run_prop_change);
+ int convert(OOX::Logic::CSectPrChange *oox_sect_prop_change);
+ int convert(OOX::Logic::CTrPrChange *oox_tr_prop_change);
+ int convert(OOX::Logic::CTcPrChange *oox_tc_prop_change);
+ int convert(OOX::Logic::CTblPrChange *oox_table_prop_change);
+ int convert(OOX::Logic::CTblGridChange *oox_table_grid_prop_change);
+
+ void convert(OOX::Logic::CAlternateContent *oox_alt_content);
+ void convert(OOX::Logic::CDrawing *oox_drawing);
+ void convert(OOX::Logic::CPicture *oox_pict);
+ void convert(OOX::Logic::CObject *oox_obj);
+
+ void convert(OOX::Drawing::CAnchor *oox_anchor);
+ void convert(OOX::Drawing::CInline *oox_inline);
+
+ void convert(SimpleTypes::CTheme<> *oox_font_theme,_CP_OPT(std::wstring) & odf_font_name);
+ void convert(ComplexTypes::Word::CShading *shading, _CP_OPT(odf_types::color) & odf_color);
+ void convert(ComplexTypes::Word::CColor *color, _CP_OPT(odf_types::color) & odf_color);
+ void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf_types::length) & odf_size);
+ void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf_types::length_or_percent) & odf_size);
+ void convert(ComplexTypes::Word::CTblWidth *oox_size, _CP_OPT(odf_types::length) & odf_size);
+ void convert(ComplexTypes::Word::CJc *oox_jc, _CP_OPT(odf_types::text_align) & align);
+ void convert(ComplexTypes::Word::CBorder *borderProp, std::wstring & odf_border_prop);
+ void convert(ComplexTypes::Word::CPageBorder *borderProp, std::wstring & odf_border_prop);
+
+ void convert(OOX::Logic::CPBdr *oox_border, odf_writer::style_paragraph_properties *paragraph_properties);
+ void convert(OOX::Logic::CTcBorders *oox_border, odf_writer::style_table_cell_properties *table_cell_properties);
+ void convert(OOX::Logic::CTblBorders *oox_border, odf_writer::style_table_cell_properties *table_cell_properties);
+ //void convert(OOX::Logic::CTblBorders *oox_border, odf_writer::style_table_properties *table_properties);
+
+ void convert(SimpleTypes::CHexColor<> *color, SimpleTypes::CThemeColor<> *theme_color,
+ SimpleTypes::CUcharHexNumber<>* theme_tint,
+ SimpleTypes::CUcharHexNumber<>* theme_shade, _CP_OPT(odf_types::color) & odf_color);
+ void convert(OOX::CDocDefaults *def_style, OOX::CStyles *styles);
+ void convert(OOX::CStyle *style);
+ void convert_table_style(OOX::CStyle *oox_style);
+ void convert(OOX::Numbering::CLvl *oox_num_lvl, OOX::Numbering::CNumLvl *oox_num_lvl_over, int lvl);
+
+ void convert(OOX::Logic::CCommentRangeStart *oox_comm_start);
+ void convert(OOX::Logic::CCommentRangeEnd *oox_comm_end);
+ void convert(OOX::Logic::CCommentReference *oox_comm_ref);
+ void convert(OOX::CComment *oox_comm);
+
+ void convert(OOX::Logic::CFootnoteReference *oox_note_ref);
+ void convert(OOX::Logic::CEndnoteReference *oox_note_ref);
+
+ void convert(OOX::Logic::CTbl *oox_table);
+ void convert(OOX::Logic::CTblGrid *oox_table_grid);
+ void convert(OOX::Logic::CTr *oox_table_row);
+ void convert(OOX::Logic::CTc *oox_table_cell);
+
+ bool convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr, int col = -1);
+ bool convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr, odf_writer::style_table_cell_properties *table_cell_properties/*,odf_writer::style_table_cell_properties * table_cell_properties = NULL*/);
+ bool convert(OOX::Logic::CTableProperty *oox_table_pr, bool base_styled);
+ bool convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer::style_table_properties *table_properties);
+ void convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer::style_table_cell_properties *table_cell_properties);
+ void convert(OOX::Logic::CTableRowProperties *oox_table_row_pr);
+ void convert(OOX::Logic::CTableRowProperties *oox_table_row_pr, odf_writer::style_table_row_properties *table_row_properties);
+ //------------------------------------------------------------------------
+ };
+}
diff --git a/ASCOfficeOdfFileW/source/Oox2OdfConverter/MathConverter.cpp b/ASCOfficeOdfFileW/source/Oox2OdfConverter/MathConverter.cpp
new file mode 100644
index 0000000000..4b3ed2bf91
--- /dev/null
+++ b/ASCOfficeOdfFileW/source/Oox2OdfConverter/MathConverter.cpp
@@ -0,0 +1,1275 @@
+#include "Converter.h"
+
+//#include "../utils.h"
+
+#include "../../../Common/DocxFormat/Source/DocxFormat/DocxFlat.h"
+
+#include "../OdfFormat/odf_conversion_context.h"
+#include "../../ASCOfficeOdfFileW/source/OdfFormat/math_layout_elements.h"
+#include "../../ASCOfficeOdfFileW/source/OdfFormat/math_limit_elements.h"
+#include
+#include
+#include
+#include
+namespace Oox2Odf
+{
+ std::vector>& OoxConverter::brackets()
+ {
+ return odf_context()->math_context()->brackets;
+ }
+
+ int& OoxConverter::lvl_of_me()
+ {
+ return odf_context()->math_context()->lvl_of_me;
+ }
+
+ std::vector& OoxConverter::end_counter()
+ {
+ return odf_context()->math_context()->end_counter;
+ }
+
+ void OoxConverter::mrow() // обертка для тега
+ {
+ CREATE_MATH_TAG(L"mrow");
+ OPEN_MATH_TAG(elm);
+ }
+
+ void OoxConverter::endOfMrow() // закрывашка тега
+ {
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::resizeBrackets()
+ {
+ lvl_of_me()++;
+ brackets().resize(brackets().size() + 1);
+ }
+
+ void OoxConverter::convert(OOX::Logic::COMath *oox_math)
+ {
+ if (!oox_math) return;
+
+ brackets().resize(1);
+
+ bool bStart = odf_context()->start_math();
+
+
+ for (size_t i = 0; i < oox_math->m_arrItems.size(); ++i)
+ {
+ convert(oox_math->m_arrItems[i]);
+ }
+
+ if (bStart) odf_context()->end_math();
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMathPr *oox_math_pr)
+ {
+ if (!oox_math_pr) return;
+
+ for (size_t i = 0; i < oox_math_pr->m_arrItems.size(); ++i)
+ {
+ convert(oox_math_pr->m_arrItems[i]);
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::COMathPara *oox_math_para)
+ {
+ if (!oox_math_para) return;
+
+ odf_context()->start_math();
+
+ for (size_t i = 0; i < oox_math_para->m_arrItems.size(); ++i)
+ {
+ convert(oox_math_para->m_arrItems[i]);
+ }
+ odf_context()->end_math();
+ }
+
+ void OoxConverter::convert(OOX::Logic::COMathParaPr *oox_math_para_pr)
+ {
+ if (!oox_math_para_pr) return;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CCtrlPr *oox_ctrl_pr)
+ {
+ if (!oox_ctrl_pr) return false;
+
+ convert(oox_ctrl_pr->m_oARPr.GetPointer());
+ convert(oox_ctrl_pr->m_oDel.GetPointer());
+ convert(oox_ctrl_pr->m_oIns.GetPointer());
+ return true;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CAcc *oox_acc)
+ {
+ if (!oox_acc) return;
+
+ CREATE_MATH_TAG(L"mover");
+
+ OPEN_MATH_TAG(elm);
+
+ convert(oox_acc->m_oElement.GetPointer());
+ convert(oox_acc->m_oAccPr.GetPointer());
+
+ CLOSE_MATH_TAG;
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CAccPr *oox_acc_pr)
+ {
+ if (!oox_acc_pr) return;
+
+ convert(oox_acc_pr->m_oChr.GetPointer());
+ convert(oox_acc_pr->m_oCtrlPr.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CArgPr *oox_arg_pr)
+ {
+ if (!oox_arg_pr) return;
+
+ convert(oox_arg_pr->m_oArgSz.GetPointer());
+ }
+
+
+ void OoxConverter::convert(OOX::Logic::CArgSz *oox_arg_sz)
+ {
+ if (!oox_arg_sz) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBar *oox_bar)
+ {
+ if (!oox_bar) return;
+
+ convert(oox_bar->m_oBarPr.GetPointer());
+ convert(oox_bar->m_oElement.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBarPr *oox_bar_pr)
+ {
+ if (!oox_bar_pr) return;
+
+ convert(oox_bar_pr->m_oCtrlPr.GetPointer());
+ convert(oox_bar_pr->m_oPos.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBorderBox *oox_border_box)
+ {
+ if (!oox_border_box) return;
+
+ convert(oox_border_box->m_oBorderBoxPr.GetPointer());
+ convert(oox_border_box->m_oElement.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBorderBoxPr *oox_border_box_pr)
+ {
+ if (!oox_border_box_pr) return;
+
+
+ convert(oox_border_box_pr->m_oCtrlPr.GetPointer());
+ convert(oox_border_box_pr->m_oHideBot.GetPointer());
+ convert(oox_border_box_pr->m_oHideLeft.GetPointer());
+ convert(oox_border_box_pr->m_oHideRight.GetPointer());
+ convert(oox_border_box_pr->m_oHideTop.GetPointer());
+ convert(oox_border_box_pr->m_oStrikeBLTR.GetPointer());
+ convert(oox_border_box_pr->m_oStrikeH.GetPointer());
+ convert(oox_border_box_pr->m_oStrikeTLBR.GetPointer());
+ convert(oox_border_box_pr->m_oStrikeV.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBox *oox_box)
+ {
+ if (!oox_box) return;
+
+
+ convert(oox_box->m_oBoxPr.GetPointer());
+ convert(oox_box->m_oElement.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBoxPr *oox_box_pr)
+ {
+ if (!oox_box_pr) return;
+
+
+ convert(oox_box_pr->m_oAln.GetPointer());
+ convert(oox_box_pr->m_oBrk.GetPointer());
+ convert(oox_box_pr->m_oCtrlPr.GetPointer());
+ convert(oox_box_pr->m_oDiff.GetPointer());
+ convert(oox_box_pr->m_oNoBreak.GetPointer());
+ convert(oox_box_pr->m_oOpEmu.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CNoBreak *oox_no_break)
+ {
+ if (!oox_no_break) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::COpEmu *oox_op_emu)
+ {
+ if (!oox_op_emu) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CDiff *oox_diff)
+ {
+ if (!oox_diff) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CBrk *oox_brk)
+ {
+ if (!oox_brk) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CDelimiter *oox_del)
+ {
+ if (!oox_del) return;
+
+ std::pair begEndChrs;
+ for (size_t i = 0; i < oox_del->m_arrItems.size(); ++i)
+ {
+ if(oox_del->m_arrItems[i]->getType() == OOX::et_m_dPr)
+ begEndChrs = convert((OOX::Logic::CDelimiterPr*)(oox_del->m_arrItems[i]));
+ }
+
+ {
+ CREATE_MATH_TAG(L"mo");
+ elm->add_text(begEndChrs.first);
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ }
+
+ for (size_t i = 0; i < oox_del->m_arrItems.size(); ++i)
+ {
+ if (!(oox_del->m_arrItems[i]->getType() == OOX::et_m_dPr))
+ convert(oox_del->m_arrItems[i]);
+ }
+
+ {
+ CREATE_MATH_TAG(L"mo")
+ elm->add_text(begEndChrs.second);
+ OPEN_MATH_TAG(elm)
+ CLOSE_MATH_TAG
+ }
+ }
+
+ std::pair OoxConverter::convert(OOX::Logic::CDelimiterPr *oox_del_pr)
+ {
+ std::pair result(L"(", L")");
+
+ if (!oox_del_pr) return result;
+
+
+ result.first = convert(oox_del_pr->m_oBegChr.GetPointer());
+ convert(oox_del_pr->m_oCtrlPr.GetPointer());
+ convert(oox_del_pr->m_oGrow.GetPointer());
+ convert(oox_del_pr->m_oSepChr.GetPointer());
+ convert(oox_del_pr->m_oShp.GetPointer());
+ result.second = convert(oox_del_pr->m_oEndChr.GetPointer());
+ return result;
+ }
+
+ std::wstring OoxConverter::convert(OOX::Logic::CBegChr * oox_beg_chr)
+ {
+ if (!oox_beg_chr) return L"(";
+
+ std::wstring s_val = oox_beg_chr->m_val->GetValue();
+ brackets()[lvl_of_me()].push_back(s_val);
+ return s_val;
+ }
+
+ std::wstring OoxConverter::convert(OOX::Logic::CEndChr * oox_end_chr)
+ {
+ if (!oox_end_chr) return L")";
+
+ std::wstring s_val = oox_end_chr->m_val->GetValue();
+ brackets()[lvl_of_me()].push_back(s_val);
+ return s_val;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CEqArr *oox_eq_arr)
+ {
+ if (!oox_eq_arr) return;
+
+ if(oox_eq_arr->m_arrItems[0]->getType() == OOX::EElementType::et_m_eqArrPr)
+ convert(oox_eq_arr->m_arrItems[0]);
+
+ for (size_t i = 1; i < oox_eq_arr->m_arrItems.size() - 1; ++i)
+ {
+ CREATE_MATH_TAG(L"munder");
+ OPEN_MATH_TAG(elm);
+ mrow();
+ convert(oox_eq_arr->m_arrItems[i]);
+ endOfMrow();
+ if(i != oox_eq_arr->m_arrItems.size() - 2)
+ mrow();
+ }
+
+ mrow();
+ convert(oox_eq_arr->m_arrItems[oox_eq_arr->m_arrItems.size() - 1]);
+ endOfMrow();
+
+ for (size_t i = 1; i < oox_eq_arr->m_arrItems.size() - 1; ++i)
+ {
+ CLOSE_MATH_TAG;
+ if (i != oox_eq_arr->m_arrItems.size() - 2)
+ endOfMrow();
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::CEqArrPr *oox_eq_arr_pr)
+ {
+ if (!oox_eq_arr_pr) return;
+
+ convert(oox_eq_arr_pr->m_oBaseJc.GetPointer());
+ convert(oox_eq_arr_pr->m_oCtrlPr.GetPointer());
+ convert(oox_eq_arr_pr->m_oMaxDist.GetPointer());
+ convert(oox_eq_arr_pr->m_oObjDist.GetPointer());
+ convert(oox_eq_arr_pr->m_oRSp.GetPointer());
+ convert(oox_eq_arr_pr->m_oRSpRule.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CFraction *oox_fraction)
+ {
+ if (!oox_fraction) return;
+
+
+ std::wstring val = convert(oox_fraction->m_oFPr.GetPointer());
+
+ if (val == L"lin")
+ {
+ mrow();
+ convert(oox_fraction->m_oNum.GetPointer());
+ endOfMrow();
+ CREATE_MATH_TAG(L"mo");
+ OPEN_MATH_TAG(elm);
+ elm->add_text(L"/");
+ CLOSE_MATH_TAG;
+ mrow();
+ convert(oox_fraction->m_oDen.GetPointer());
+ endOfMrow();
+ }
+ else if (val == L"noBar")
+ {
+ CREATE_MATH_TAG(L"mtable");
+ OPEN_MATH_TAG(elm);
+ {
+ CREATE_MATH_TAG(L"mtr");
+ OPEN_MATH_TAG(elm);
+ {
+ CREATE_MATH_TAG(L"mtd");
+ OPEN_MATH_TAG(elm);
+ mrow();
+ convert(oox_fraction->m_oNum.GetPointer());
+ endOfMrow();
+ CLOSE_MATH_TAG;
+ }
+ CLOSE_MATH_TAG;
+ }
+ {
+ CREATE_MATH_TAG(L"mtr");
+ OPEN_MATH_TAG(elm);
+ {
+ CREATE_MATH_TAG(L"mtd");
+ OPEN_MATH_TAG(elm);
+ mrow();
+ convert(oox_fraction->m_oDen.GetPointer());
+ endOfMrow();
+ CLOSE_MATH_TAG;
+ }
+ CLOSE_MATH_TAG;
+ }
+ CLOSE_MATH_TAG;
+ }
+ else
+ {
+ CREATE_MATH_TAG(L"mfrac");
+
+ typedef odf_writer::math_mfrac* T;
+
+ T tmp = dynamic_cast(elm.get());
+
+
+ if (tmp)
+ {
+ if (val == L"skw")
+ {
+
+ tmp->bevelled = true;
+ }
+ }
+
+ OPEN_MATH_TAG(elm);
+ mrow();
+ convert(oox_fraction->m_oNum.GetPointer());
+ endOfMrow();
+ mrow();
+ convert(oox_fraction->m_oDen.GetPointer());
+ endOfMrow();
+ CLOSE_MATH_TAG;
+ }
+ }
+
+ std::wstring OoxConverter::convert(OOX::Logic::CFPr *oox_f_pr)
+ {
+ if (!oox_f_pr) return L"";
+
+ std::wstring result = convert(oox_f_pr->m_oType.GetPointer());
+ convert(oox_f_pr->m_oCtrlPr.GetPointer());
+ return result;
+ }
+
+ std::wstring OoxConverter::convert(OOX::Logic::CType *oox_type)
+ {
+ if (!oox_type) return L"";
+
+ std::wstring val = oox_type->m_val->ToString();
+
+ return val;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CNum *oox_num)
+ {
+ if (!oox_num) return;
+
+ for (size_t i = 0; i < oox_num->m_arrItems.size(); ++i)
+ {
+ convert(oox_num->m_arrItems[i]);
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::CDen *oox_den)
+ {
+ if (!oox_den) return;
+
+ for (size_t i = 0; i < oox_den->m_arrItems.size(); ++i)
+ {
+ convert(oox_den->m_arrItems[i]);
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::CFunc *oox_func)
+ {
+ if (!oox_func) return;
+
+ convert(oox_func->m_oFuncPr.GetPointer());
+ convert(oox_func->m_oFName.GetPointer());
+
+
+ convert(oox_func->m_oElement.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CFuncPr *oox_func_pr)
+ {
+ if (!oox_func_pr) return;
+
+ convert(oox_func_pr->m_oCtrlPr.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CFName *oox_fname)
+ {
+ if (!oox_fname) return;
+
+ for (size_t i = 0; i < oox_fname->m_arrItems.size(); ++i)
+ convert(oox_fname->m_arrItems[i]);
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CGroupChr *oox_group_ch)
+ {
+ if (!oox_group_ch) return;
+
+ bool flag = convert(oox_group_ch->m_oGroupChrPr.GetPointer());
+ std::wstring tag;
+ if (flag) tag = L"mover";
+ else tag = L"munder";
+
+
+ CREATE_MATH_TAG(tag.c_str());
+ OPEN_MATH_TAG(elm);
+ convert(oox_group_ch->m_oElement.GetPointer());
+ convert(oox_group_ch->m_oGroupChrPr->m_oChr.GetPointer());
+ CLOSE_MATH_TAG;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CGroupChrPr *oox_group_ch_pr)
+ {
+ if (!oox_group_ch_pr) return false;
+
+ bool flag = false;
+
+ //convert(oox_group_ch_pr->m_oChr.GetPointer());
+ convert(oox_group_ch_pr->m_oCtrlPr.GetPointer());
+ flag = convert(oox_group_ch_pr->m_oPos.GetPointer());
+ convert(oox_group_ch_pr->m_oVertJc.GetPointer());
+
+ return flag;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CPos *oox_pos)
+ {
+ if (!oox_pos) return false;
+
+ if (oox_pos->m_val->ToString() == L"top") return true;
+ else return false;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CVertJc *oox_vert_jc)
+ {
+ if (!oox_vert_jc) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CLimLow *oox_lim_low)
+ {
+ if (!oox_lim_low) return;
+
+ mrow();
+
+
+ CREATE_MATH_TAG(L"munder")
+ OPEN_MATH_TAG(elm)
+
+
+ convert(oox_lim_low->m_oElement.GetPointer());
+ convert(oox_lim_low->m_oLimLowPr.GetPointer());
+ convert(oox_lim_low->m_oLim.GetPointer());
+
+ CLOSE_MATH_TAG
+
+ endOfMrow();
+ }
+
+ void OoxConverter::convert(OOX::Logic::CLim *oox_lim)
+ {
+ if (!oox_lim) return;
+
+ mrow();
+
+ for (size_t i = 0; i < oox_lim->m_arrItems.size(); ++i)
+ convert(oox_lim->m_arrItems[i]);
+
+ endOfMrow();
+ }
+
+ void OoxConverter::convert(OOX::Logic::CLimLowPr *oox_lim_low_pr)
+ {
+ if (!oox_lim_low_pr) return;
+
+ convert(oox_lim_low_pr->m_oCtrlPr.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CLimUpp *oox_lim_upp)
+ {
+ if (!oox_lim_upp) return;
+
+
+ CREATE_MATH_TAG(L"mover")
+ OPEN_MATH_TAG(elm)
+
+
+ convert(oox_lim_upp->m_oElement.GetPointer());
+ convert(oox_lim_upp->m_oLimUppPr.GetPointer());
+ convert(oox_lim_upp->m_oLim.GetPointer());
+
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::convert(OOX::Logic::CLimUppPr *oox_lim_upp_pr)
+ {
+ if (!oox_lim_upp_pr) return;
+
+ convert(oox_lim_upp_pr->m_oCtrlPr.GetPointer());
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMathFont *oox_math_font)
+ {
+ if (!oox_math_font) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMatrix *oox_matrix)
+ {
+ if (!oox_matrix) return;
+
+ CREATE_MATH_TAG(L"mtable");
+ OPEN_MATH_TAG(elm);
+
+ for (size_t i = 0; i < oox_matrix->m_arrItems.size(); ++i)
+ {
+ convert(oox_matrix->m_arrItems[i]);
+ }
+ CLOSE_MATH_TAG;
+
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMc *oox_mc)
+ {
+ if (!oox_mc) return;
+
+ convert(oox_mc->m_oMcPr.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMcPr *oox_mc_pr)
+ {
+ if (!oox_mc_pr) return;
+
+ convert(oox_mc_pr->m_oCount.GetPointer());
+ convert(oox_mc_pr->m_oMcJc.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CCount *oox_count)
+ {
+ if (!oox_count) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMcJc *oox_mc_jc)
+ {
+ if (!oox_mc_jc) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMcs *oox_mcs)
+ {
+ if (!oox_mcs) return;
+
+ for (size_t i = 0; i < oox_mcs->m_arrItems.size(); ++i)
+ {
+ convert(oox_mcs->m_arrItems[i]);
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMDel *oox_m_del)
+ {
+ if (!oox_m_del) return;
+
+
+ CREATE_MATH_TAG(L"mathMDel")
+ OPEN_MATH_TAG(elm)
+
+ convert(oox_m_del->m_oRun.GetPointer());
+
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMIns *oox_m_ins)
+ {
+ if (!oox_m_ins) return;
+
+ CREATE_MATH_TAG(L"mathMIns")
+ OPEN_MATH_TAG(elm)
+
+ convert(oox_m_ins->m_oRun.GetPointer());
+
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMPr *oox_m_pr)
+ {
+ if (!oox_m_pr) return;
+
+ convert(oox_m_pr->m_oBaseJc.GetPointer());
+ convert(oox_m_pr->m_oCGp.GetPointer());
+ convert(oox_m_pr->m_oCGpRule.GetPointer());
+ convert(oox_m_pr->m_oCSp.GetPointer());
+ convert(oox_m_pr->m_oCtrlPr.GetPointer());
+ convert(oox_m_pr->m_oMcs.GetPointer());
+ convert(oox_m_pr->m_oMcs.GetPointer());
+ convert(oox_m_pr->m_oPlcHide.GetPointer());
+ convert(oox_m_pr->m_oRSp.GetPointer());
+ convert(oox_m_pr->m_oRSpRule.GetPointer());
+ }
+
+ void OoxConverter::convert(OOX::Logic::CPlcHide *oox_plc_hide)
+ {
+ if (!oox_plc_hide) return;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMr *oox_mr)
+ {
+ if (!oox_mr) return;
+
+ CREATE_MATH_TAG(L"mtr");
+ OPEN_MATH_TAG(elm);
+
+ for (size_t i = 0; i < oox_mr->m_arrItems.size(); ++i)
+ {
+ CREATE_MATH_TAG(L"mtd");
+ OPEN_MATH_TAG(elm);
+ convert(oox_mr->m_arrItems[i]);
+ CLOSE_MATH_TAG;
+ }
+
+ CLOSE_MATH_TAG;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMRun *oox_mrun)
+ {
+ if (!oox_mrun) return;
+
+ convert(oox_mrun->m_oAnnotationRef.GetPointer());
+ convert(oox_mrun->m_oARPr.GetPointer());
+ convert(oox_mrun->m_oBr.GetPointer());
+ convert(oox_mrun->m_oCommentReference.GetPointer());
+ convert(oox_mrun->m_oContentPart.GetPointer());
+ convert(oox_mrun->m_oContinuationSeparator.GetPointer());
+ convert(oox_mrun->m_oCr.GetPointer());
+ convert(oox_mrun->m_oDayLong.GetPointer());
+ convert(oox_mrun->m_oDayShort.GetPointer());
+ convert(oox_mrun->m_oDel.GetPointer());
+ convert(oox_mrun->m_oDelInstrText.GetPointer());
+ convert(oox_mrun->m_oDelText.GetPointer());
+ convert(oox_mrun->m_oDrawing.GetPointer());
+ convert(oox_mrun->m_oEndnoteRef.GetPointer());
+ convert(oox_mrun->m_oEndnoteReference.GetPointer());
+ convert(oox_mrun->m_oEndnoteReference.GetPointer());
+ convert(oox_mrun->m_oFldChar.GetPointer());
+ convert(oox_mrun->m_oFootnoteRef.GetPointer());
+ convert(oox_mrun->m_oFootnoteReference.GetPointer());
+ convert(oox_mrun->m_oIns.GetPointer());
+ convert(oox_mrun->m_oInstrText.GetPointer());
+ convert(oox_mrun->m_oLastRenderedPageBreak.GetPointer());
+ convert(oox_mrun->m_oMonthLong.GetPointer());
+ convert(oox_mrun->m_oMonthShort.GetPointer());
+ //convert(oox_mrun->m_oMRPr.GetPointer());
+ bool clrFlag = convert(oox_mrun->m_oRPr.GetPointer());
+ convert(oox_mrun->m_oMText.GetPointer());
+ convert(oox_mrun->m_oNoBreakHyphen.GetPointer());
+ convert(oox_mrun->m_oObject.GetPointer());
+ convert(oox_mrun->m_oPgNum.GetPointer());
+ convert(oox_mrun->m_oPtab.GetPointer());
+ convert(oox_mrun->m_oRuby.GetPointer());
+ convert(oox_mrun->m_oSeparator.GetPointer());
+ convert(oox_mrun->m_oSoftHyphen.GetPointer());
+ convert(oox_mrun->m_oSym.GetPointer());
+ convert(oox_mrun->m_oTab.GetPointer());
+ convert(oox_mrun->m_oText.GetPointer());
+ convert(oox_mrun->m_oYearLong.GetPointer());
+ convert(oox_mrun->m_oYearShort.GetPointer());
+ if (clrFlag)
+ CLOSE_MATH_TAG;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CRunProperty *oox_r_pr)
+ {
+ if (!oox_r_pr) return false;
+
+ if (oox_r_pr->m_oColor.IsInit())
+ {
+ if (oox_r_pr->m_oColor->m_oVal.IsInit())
+ {
+ std::wstring clr = oox_r_pr->m_oColor->m_oVal.GetPointer()->ToString();
+ std::wstring clr2(L"#");
+ clr.erase(0, 2);
+ clr2 += clr;
+ CREATE_MATH_TAG(L"mstyle");
+ typedef odf_writer::math_mstyle * T;
+
+ T tmp = dynamic_cast(elm.get());
+ tmp->color_ = clr2;
+ OPEN_MATH_TAG(elm);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CMText *oox_text)
+ {
+ if (!oox_text) return;
+
+ std::set& mo = odf_context()->math_context()->mo;
+
+ std::wstring s_val = oox_text->m_sText;
+ std::wstring sub_s_val = L"";
+
+ for (size_t i = 0; i < s_val.size(); i++)
+ {
+ wchar_t w_val = s_val[i];
+
+ if (w_val == L'=')
+ {
+ if (sub_s_val.size() != 0)
+ {
+ CREATE_MATH_TAG(L"mi");
+ elm->add_text(sub_s_val);
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ sub_s_val.clear();
+ }
+ CREATE_MATH_TAG(L"mtext");
+
+ elm->add_text(std::wstring(1, s_val[i]));
+
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ }
+
+ else if (w_val <= 57 && w_val >= 48)
+ {
+ if (sub_s_val.size() != 0)
+ {
+ CREATE_MATH_TAG(L"mi");
+ elm->add_text(sub_s_val);
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ sub_s_val.clear();
+ }
+
+ CREATE_MATH_TAG(L"mn");
+
+ elm->add_text(std::wstring(1, s_val[i]));
+
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ }
+ else if (mo.find(w_val) != mo.end())
+ {
+ if (sub_s_val.size() != 0)
+ {
+ CREATE_MATH_TAG(L"mi");
+ elm->add_text(sub_s_val);
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ sub_s_val.clear();
+ }
+
+ CREATE_MATH_TAG(L"mo");
+
+ elm->add_text(std::wstring(1, s_val[i]));
+
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ }
+ else //
+ {
+ sub_s_val += s_val[i];
+ }
+
+ if ((i == s_val.size() - 1) && (sub_s_val.size() != 0))
+ {
+ CREATE_MATH_TAG(L"mi");
+ elm->add_text(sub_s_val);
+ OPEN_MATH_TAG(elm);
+ CLOSE_MATH_TAG;
+ }
+ }
+ }
+
+ void OoxConverter::convert(OOX::Logic::CNary *oox_nary)
+ {
+ if (!oox_nary) return;
+
+ nullable>* ref = &(oox_nary->m_oNaryPr->m_oCtrlPr->m_oRPr->m_oColor->m_oVal);
+ bool flag_color = false;
+ if (ref->IsInit())
+ {
+ std::wstring clr = ref->GetPointer()->ToString();
+ std::wstring clr2(L"#");
+ clr.erase(0, 2);
+ clr2 += clr;
+ CREATE_MATH_TAG(L"mstyle");
+ typedef odf_writer::math_mstyle* T;
+
+ T tmp = dynamic_cast(elm.get());
+ tmp->color_ = clr2;
+ OPEN_MATH_TAG(elm);
+ flag_color = true;
+ }
+
+ mrow();
+
+ bool flag_nary = false; // TODO REFAC
+ if ((oox_nary->m_oSub.GetPointer()->m_arrItems.size() != 0) && (oox_nary->m_oSup.GetPointer()->m_arrItems.size() != 0))
+ {
+ CREATE_MATH_TAG(L"munderover");
+ OPEN_MATH_TAG(elm);
+ flag_nary = true;
+ }
+ else if ((oox_nary->m_oSub.GetPointer()->m_arrItems.size() != 0) && (oox_nary->m_oSup.GetPointer()->m_arrItems.size() == 0))
+ {
+ CREATE_MATH_TAG(L"munder");
+ OPEN_MATH_TAG(elm);
+ flag_nary = true;
+ }
+
+ else if ((oox_nary->m_oSub.GetPointer()->m_arrItems.size() == 0) && (oox_nary->m_oSup.GetPointer()->m_arrItems.size() != 0))
+ {
+ CREATE_MATH_TAG(L"mover");
+ OPEN_MATH_TAG(elm);
+ flag_nary = true;
+ }
+
+ std::pair flags;
+ flags = convert(oox_nary->m_oNaryPr.GetPointer());
+
+
+ if (!flags.first)
+ {
+ mrow();
+ convert(oox_nary->m_oSub.GetPointer());
+ endOfMrow();
+ }
+ if (!flags.second)
+ {
+ mrow();
+ convert(oox_nary->m_oSup.GetPointer());
+ endOfMrow();
+ }
+
+
+ if (flag_nary)
+ {
+ CLOSE_MATH_TAG;
+ }
+
+ endOfMrow();
+
+ if(flag_color)
+ CLOSE_MATH_TAG;
+ convert(oox_nary->m_oElement.GetPointer());
+
+ }
+
+ std::pair OoxConverter::convert(OOX::Logic::CNaryPr *oox_nary_pr)
+ {
+ std::pair result = { false, false};
+ if (!oox_nary_pr) return result;
+
+ convert(oox_nary_pr->m_oCtrlPr.GetPointer());
+ convert(oox_nary_pr->m_oChr.GetPointer());
+ convert(oox_nary_pr->m_oGrow.GetPointer());
+ result.first = convert(oox_nary_pr->m_oSubHide.GetPointer());
+ result.second = convert(oox_nary_pr->m_oSupHide.GetPointer());
+
+ return result;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CSubHide *oox_subHide)
+ {
+ if (!oox_subHide) return false;
+
+ bool result = oox_subHide->m_val->ToBool();
+ return result;
+ }
+
+ bool OoxConverter::convert(OOX::Logic::CSupHide *oox_supHide)
+ {
+ if (!oox_supHide) return false;
+ bool result = oox_supHide->m_val->ToBool();
+ return result;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CChr * oox_chr)
+ {
+ CREATE_MATH_TAG(L"mo")
+ OPEN_MATH_TAG(elm)
+
+ if (!oox_chr)
+ elm->add_text(L"∫");
+ else
+ elm->add_text(oox_chr->m_val->GetValue());
+
+ CLOSE_MATH_TAG;
+ }
+
+ void OoxConverter::convert(OOX::Logic::CPhant *oox_phant)
+ {
+ if (!oox_phant) return;
+
+ CREATE_MATH_TAG(L"mathPhant")
+ OPEN_MATH_TAG(elm)
+
+ convert(oox_phant->m_oElement.GetPointer());
+ convert(oox_phant->m_oPhantPr.GetPointer());
+
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::convert(OOX::Logic::CPhantPr *oox_phant_pr)
+ {
+ if (!oox_phant_pr) return;
+
+ CREATE_MATH_TAG(L"mathPhantPr")
+ OPEN_MATH_TAG(elm)
+
+ convert(oox_phant_pr->m_oCtrlPr.GetPointer());
+ convert(oox_phant_pr->m_oShow.GetPointer());
+ convert(oox_phant_pr->m_oTransp.GetPointer());
+ convert(oox_phant_pr->m_oZeroAsc.GetPointer());
+ convert(oox_phant_pr->m_oZeroDesc.GetPointer());
+ convert(oox_phant_pr->m_oZeroWid.GetPointer());
+
+ CLOSE_MATH_TAG
+ }
+
+ void OoxConverter::convert(OOX::Logic::CRad *oox_rad)
+ {
+ if (!oox_rad) return;
+
+ nullable