mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
201 Commits
v5.2.8.14
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| a8668df5fd | |||
| cc228f3393 | |||
| 19904acd30 | |||
| 30d175144a | |||
| acf15abe41 | |||
| 5a7fc7f548 | |||
| e7326556e0 | |||
| c589d8fe8a | |||
| a28e8f1357 | |||
| 8b7bb944bc | |||
| 14ee946069 | |||
| 7aebdd8ec5 | |||
| 977baafc03 | |||
| 31b854bc70 | |||
| e274dc50d7 | |||
| d153db627b | |||
| 9cc6bc14c5 | |||
| 775c57be5d | |||
| da37aeb039 | |||
| 751c6647a2 | |||
| ec2344ccd5 | |||
| 0494882541 | |||
| 07b0ba71d9 | |||
| 299ef4873f | |||
| 93c7819106 | |||
| 16c3f81dee | |||
| 7fc67bdadf | |||
| 31deb60343 | |||
| 7e83e168db | |||
| a4c0fbe4ea | |||
| ae0f5867dd | |||
| 0dd4fc9c14 | |||
| 3a92ef2395 | |||
| 23c9a65fcb | |||
| ba55f1436d | |||
| f1c1d62a4d | |||
| c2bdec6bde | |||
| 93d0ebfa09 | |||
| 6f881e2066 | |||
| 8be0d7f2b3 | |||
| cbbb4c19de | |||
| f4e0ce53b4 | |||
| 8f332c3c09 | |||
| 4721a4a96b | |||
| 44a0c65637 | |||
| 4de7090c78 | |||
| 6f09ec71f9 | |||
| b122d75f34 | |||
| ed613f7ec1 | |||
| e0bc06d3db | |||
| 366f16aa4f | |||
| 662c687520 | |||
| efc70421e2 | |||
| 7522ad9167 | |||
| f7922fcea8 | |||
| 84bd16951f | |||
| 4e4e1e4ba5 | |||
| 7959642072 | |||
| 815f96a50a | |||
| eb493b4f11 | |||
| 64702e3797 | |||
| 97818245dc | |||
| 3821c60576 | |||
| cc06effd5e | |||
| 94beedb1ec | |||
| 102db77f55 | |||
| 0181cf493f | |||
| c515c2bf00 | |||
| bea475a3cd | |||
| a2454e78d4 | |||
| abbbda090d | |||
| f4d9901576 | |||
| c727f0cba8 | |||
| 8b568ddefb | |||
| 3953fd1add | |||
| d0661e871d | |||
| ec173776ea | |||
| 0a3b9fb8e9 | |||
| c4a46114a2 | |||
| e0630979c5 | |||
| 8bc8b7cf58 | |||
| 14f4364962 | |||
| 9de3cb016f | |||
| f12cd8ff8f | |||
| 436015b5d2 | |||
| c078df93c9 | |||
| e5e8e01490 | |||
| 4fcc3b4f41 | |||
| ce44e50d0e | |||
| 143590f17b | |||
| abb7a85337 | |||
| f0fe00aa3e | |||
| e58f1929e1 | |||
| 2143869e69 | |||
| ac6a1a19da | |||
| fb574f1994 | |||
| 3cde3a4444 | |||
| eb2221f006 | |||
| d9d1473fd0 | |||
| 9576ce5f28 | |||
| 7092922d1b | |||
| e112c63f12 | |||
| ae9ec197f1 | |||
| f467912988 | |||
| 63b71d256b | |||
| 51cbcfa9f2 | |||
| 945d43997a | |||
| b64541e6bd | |||
| 5b7d637c78 | |||
| f6d38c1f1b | |||
| 503e87077b | |||
| 73ef4140a2 | |||
| fcede43d99 | |||
| c37f011d6d | |||
| 52ec27a679 | |||
| a687e49a6a | |||
| 4dddc6d9bc | |||
| 8bb23e9ce1 | |||
| d2b6444730 | |||
| 08738092c6 | |||
| 8e220427eb | |||
| 962c31dc2a | |||
| d12cc81745 | |||
| e21e0afb45 | |||
| f40d82a097 | |||
| 9112c87b1f | |||
| 78bbaecefe | |||
| ee4167ec8c | |||
| 658bfbc348 | |||
| 5ca5597c58 | |||
| e2db849b03 | |||
| 23ba8a23a4 | |||
| 4df09fd25a | |||
| 6180fedb0b | |||
| 5895bc9641 | |||
| a5a6686501 | |||
| 4c930e716b | |||
| 595ecae254 | |||
| d34b850c52 | |||
| 24332cca42 | |||
| 55e7777abb | |||
| b7c8bc2769 | |||
| 13900daf08 | |||
| 2feb1ac8e8 | |||
| d872f4220c | |||
| e859821647 | |||
| 18cbd41c84 | |||
| 8985395ef1 | |||
| f4d72572c0 | |||
| bc319bddbf | |||
| 8625e93ac5 | |||
| 1493e4a949 | |||
| 85bf4b8fac | |||
| b1b911b538 | |||
| 2192bff46b | |||
| e4e6acd1bc | |||
| 7418b2327a | |||
| 18d610e3e0 | |||
| 4e81420eed | |||
| e26f836da7 | |||
| 538e477818 | |||
| b212e878c6 | |||
| 05694d13f3 | |||
| 1dd72c99a2 | |||
| 4b73e58693 | |||
| bee4f57dd3 | |||
| 142f9f57a3 | |||
| 28346c4571 | |||
| 9810087ee1 | |||
| 2b8e1456c2 | |||
| 49723e648a | |||
| b0a2104b21 | |||
| e4986f4202 | |||
| bd1dc5a7b6 | |||
| 1ccbe323f4 | |||
| 3811169415 | |||
| 2871769479 | |||
| acdce1edb9 | |||
| 67a40a5fc4 | |||
| 67cd654785 | |||
| 3816162555 | |||
| d8121d1a12 | |||
| a76bf57051 | |||
| 97b92cf75c | |||
| 506de8e9e1 | |||
| 677e3e49e0 | |||
| 02c84d107b | |||
| 49cd76d0f3 | |||
| 26f32dd511 | |||
| 395e54cf76 | |||
| 40476e7555 | |||
| 04f06c23a1 | |||
| a9a635747a | |||
| 4027a0de25 | |||
| f4fa754ce4 | |||
| 7d88a91fcc | |||
| 069b12839f | |||
| aa609336ca | |||
| 452917f213 | |||
| 5b5ccdc9be | |||
| adf7ca65ea |
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,8 @@ dictionaries/
|
||||
LicenceManager/
|
||||
Common/boost_1_58_0
|
||||
Common/3dParty/boost/boost_1_58_0
|
||||
Common/3dParty/boost/ios
|
||||
Common/3dParty/boost/osx
|
||||
Common/3dParty/icu/win_64
|
||||
Common/3dParty/icu/win_32
|
||||
Common/3dParty/icu/linux_64
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
#include "../../DesktopEditor/common/Types.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/unicode_util.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
@ -992,6 +992,11 @@ namespace DocFileFormat
|
||||
_writeAfterRun = oVmlMapper.m_equationXml;
|
||||
bFormula = true;
|
||||
}
|
||||
else if (oVmlMapper.m_isBlob)
|
||||
{
|
||||
_writeAfterRun = oVmlMapper.m_blobXml;
|
||||
bFormula = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "MainDocumentMapping.h"
|
||||
#include "OfficeDrawing/FillStyleBooleanProperties.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -88,10 +87,11 @@ namespace DocFileFormat
|
||||
m_document->DocProperties->bDisplayBackgroundShape = true;
|
||||
ShapeContainer* pShape = m_document->GetOfficeArt()->GetShapeBackgound();
|
||||
|
||||
OptionEntryPtr boolFill = pShape->ExtractOption(fillStyleBooleanProperties);
|
||||
ODRAW::OfficeArtFOPTEPtr boolFill = pShape->ExtractOption(fillStyleBooleanProperties);
|
||||
|
||||
FillStyleBooleanProperties booleans(boolFill ? boolFill->op : 0);
|
||||
if (booleans.fUsefFilled && !booleans.fFilled)
|
||||
ODRAW::FillStyleBooleanProperties* booleans = dynamic_cast<ODRAW::FillStyleBooleanProperties*>(boolFill.get());
|
||||
|
||||
if (booleans && (booleans->fUsefFilled && !booleans->fFilled))
|
||||
{
|
||||
bFilled = false;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
unsigned char* m_Data;
|
||||
unsigned char* m_Data;
|
||||
unsigned long m_Size;
|
||||
unsigned long m_Position;
|
||||
bool bMemoryCopy;
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
// 2.3.7.43 Fill Style Boolean Properties - [MS-ODRAW] — v20130726
|
||||
|
||||
class FillStyleBooleanProperties
|
||||
{
|
||||
public:
|
||||
FillStyleBooleanProperties(unsigned int op)
|
||||
{
|
||||
fNoFillHitTest = FormatUtils::BitmaskToBool(op, 0x1);
|
||||
fillUseRect = FormatUtils::BitmaskToBool(op, 0x1 << 1);
|
||||
fillShape = FormatUtils::BitmaskToBool(op, 0x1 << 2);
|
||||
fHitTestFill = FormatUtils::BitmaskToBool(op, 0x1 << 3);
|
||||
fFilled = FormatUtils::BitmaskToBool(op, 0x1 << 4);
|
||||
fUseShapeAnchor = FormatUtils::BitmaskToBool(op, 0x1 << 5);
|
||||
fRecolorFillAsPicture = FormatUtils::BitmaskToBool(op, 0x1 << 6);
|
||||
|
||||
// 0x1 << 7-15 is ununsed
|
||||
|
||||
fUsefNoFillHitTest = FormatUtils::BitmaskToBool(op, 0x1 << 16);
|
||||
fUsefillUseRect = FormatUtils::BitmaskToBool(op, 0x1 << 17);
|
||||
fUsefillShape = FormatUtils::BitmaskToBool(op, 0x1 << 18);
|
||||
fUseHitTestFill = FormatUtils::BitmaskToBool(op, 0x1 << 19);
|
||||
fUsefFilled = FormatUtils::BitmaskToBool(op, 0x1 << 20);
|
||||
fUsefUseShapeAnchor = FormatUtils::BitmaskToBool(op, 0x1 << 21);
|
||||
fUsefRecolorFillAsPicture = FormatUtils::BitmaskToBool(op, 0x1 << 22);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool fNoFillHitTest;
|
||||
bool fillUseRect;
|
||||
bool fillShape;
|
||||
bool fHitTestFill;
|
||||
bool fFilled;
|
||||
bool fUseShapeAnchor;
|
||||
bool fRecolorFillAsPicture;
|
||||
bool fUsefNoFillHitTest;
|
||||
bool fUsefillUseRect;
|
||||
bool fUsefillShape;
|
||||
bool fUseHitTestFill;
|
||||
bool fUsefFilled;
|
||||
bool fUsefUseShapeAnchor;
|
||||
bool fUsefRecolorFillAsPicture;
|
||||
|
||||
};
|
||||
}
|
||||
@ -1,114 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
// 2.3.6.31 Geometry Boolean Properties - [MS-ODRAW] — v20130726
|
||||
|
||||
class GeometryTextBooleanProperties
|
||||
{
|
||||
public:
|
||||
GeometryTextBooleanProperties(unsigned int op)
|
||||
{
|
||||
gtextFStrikethrough = FormatUtils::BitmaskToBool(op, 0x1);
|
||||
gtextFSmallcaps = FormatUtils::BitmaskToBool(op, 0x1 << 1);
|
||||
gtextFShadow = FormatUtils::BitmaskToBool(op, 0x1 << 2);
|
||||
gtextFUnderline = FormatUtils::BitmaskToBool(op, 0x1 << 3);
|
||||
gtextFItalic = FormatUtils::BitmaskToBool(op, 0x1 << 4);
|
||||
gtextFBold = FormatUtils::BitmaskToBool(op, 0x1 << 5);
|
||||
gtextFDxMeasure = FormatUtils::BitmaskToBool(op, 0x1 << 6);
|
||||
gtextFNormalize = FormatUtils::BitmaskToBool(op, 0x1 << 7);
|
||||
gtextFBestFit = FormatUtils::BitmaskToBool(op, 0x1 << 8);
|
||||
gtextFShrinkFit = FormatUtils::BitmaskToBool(op, 0x1 << 9);
|
||||
gtextFStretch = FormatUtils::BitmaskToBool(op, 0x1 << 10);
|
||||
gtextFTight = FormatUtils::BitmaskToBool(op, 0x1 << 11);
|
||||
gtextFKern = FormatUtils::BitmaskToBool(op, 0x1 << 12);
|
||||
gtextFVertical = FormatUtils::BitmaskToBool(op, 0x1 << 13);
|
||||
fGtext = FormatUtils::BitmaskToBool(op, 0x1 << 14);
|
||||
gtextFReverseRows = FormatUtils::BitmaskToBool(op, 0x1 << 15);
|
||||
|
||||
fUsegtextFSStrikeThrough = FormatUtils::BitmaskToBool(op, 0x1 << 16);
|
||||
fUsegtextFSmallcaps = FormatUtils::BitmaskToBool(op, 0x1 << 17);
|
||||
fUsegtextFShadow = FormatUtils::BitmaskToBool(op, 0x1 << 18);
|
||||
fUsegtextFUnderline = FormatUtils::BitmaskToBool(op, 0x1 << 19);
|
||||
fUsegtextFItalic = FormatUtils::BitmaskToBool(op, 0x1 << 20);
|
||||
fUsegtextFBold = FormatUtils::BitmaskToBool(op, 0x1 << 21);
|
||||
fUsegtextFDxMeasure = FormatUtils::BitmaskToBool(op, 0x1 << 22);
|
||||
fUsegtextFNormalize = FormatUtils::BitmaskToBool(op, 0x1 << 23);
|
||||
fUsegtextFBestFit = FormatUtils::BitmaskToBool(op, 0x1 << 24);
|
||||
fUsegtextFShrinkFit = FormatUtils::BitmaskToBool(op, 0x1 << 25);
|
||||
fUsegtextFStretch = FormatUtils::BitmaskToBool(op, 0x1 << 26);
|
||||
fUsegtextFTight = FormatUtils::BitmaskToBool(op, 0x1 << 27);
|
||||
fUsegtextFKern = FormatUtils::BitmaskToBool(op, 0x1 << 28);
|
||||
fUsegtextFVertical = FormatUtils::BitmaskToBool(op, 0x1 << 29);
|
||||
fUsefGtext = FormatUtils::BitmaskToBool(op, 0x1 << 30);
|
||||
fUsegtextFReverseRows = FormatUtils::BitmaskToBool(op, 0x40000000);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool gtextFStrikethrough;
|
||||
bool gtextFSmallcaps;
|
||||
bool gtextFShadow;
|
||||
bool gtextFUnderline;
|
||||
bool gtextFItalic;
|
||||
bool gtextFBold;
|
||||
bool gtextFDxMeasure;
|
||||
bool gtextFNormalize;
|
||||
bool gtextFBestFit;
|
||||
bool gtextFShrinkFit;
|
||||
bool gtextFStretch;
|
||||
bool gtextFTight;
|
||||
bool gtextFKern;
|
||||
bool gtextFVertical;
|
||||
bool fGtext;
|
||||
bool gtextFReverseRows;
|
||||
|
||||
bool fUsegtextFSStrikeThrough;
|
||||
bool fUsegtextFSmallcaps;
|
||||
bool fUsegtextFShadow;
|
||||
bool fUsegtextFUnderline;
|
||||
bool fUsegtextFItalic;
|
||||
bool fUsegtextFBold;
|
||||
bool fUsegtextFDxMeasure;
|
||||
bool fUsegtextFNormalize;
|
||||
bool fUsegtextFBestFit;
|
||||
bool fUsegtextFShrinkFit;
|
||||
bool fUsegtextFStretch;
|
||||
bool fUsegtextFTight;
|
||||
bool fUsegtextFKern;
|
||||
bool fUsegtextFVertical;
|
||||
bool fUsefGtext;
|
||||
bool fUsegtextFReverseRows;
|
||||
};
|
||||
}
|
||||
@ -1,126 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
// 2.3.4.44 Group Shape Boolean Properties - [MS-ODRAW] — v20130726
|
||||
|
||||
class GroupShapeBooleanProperties
|
||||
{
|
||||
public:
|
||||
GroupShapeBooleanProperties(unsigned int op)
|
||||
{
|
||||
fPrint = FormatUtils::BitmaskToBool(op, 0x1);
|
||||
fHidden = FormatUtils::BitmaskToBool(op, 0x2);
|
||||
fOneD = FormatUtils::BitmaskToBool(op, 0x4);
|
||||
fIsButton = FormatUtils::BitmaskToBool(op, 0x8);
|
||||
|
||||
fOnDblClickNotify = FormatUtils::BitmaskToBool(op, 0x10);
|
||||
fBehindDocument = FormatUtils::BitmaskToBool(op, 0x20);
|
||||
fEditedWrap = FormatUtils::BitmaskToBool(op, 0x40);
|
||||
fScriptAnchor = FormatUtils::BitmaskToBool(op, 0x80);
|
||||
|
||||
fReallyHidden = FormatUtils::BitmaskToBool(op, 0x100);
|
||||
fAllowOverlap = FormatUtils::BitmaskToBool(op, 0x200);
|
||||
fUserDrawn = FormatUtils::BitmaskToBool(op, 0x400);
|
||||
fHorizRule = FormatUtils::BitmaskToBool(op, 0x800);
|
||||
|
||||
fNoshadeHR = FormatUtils::BitmaskToBool(op, 0x1000);
|
||||
fStandardHR = FormatUtils::BitmaskToBool(op, 0x2000);
|
||||
fIsBullet = FormatUtils::BitmaskToBool(op, 0x4000);
|
||||
fLayoutInCell = FormatUtils::BitmaskToBool(op, 0x8000);
|
||||
|
||||
fUsefPrint = FormatUtils::BitmaskToBool(op, 0x10000);
|
||||
fUsefHidden = FormatUtils::BitmaskToBool(op, 0x20000);
|
||||
fUsefOneD = FormatUtils::BitmaskToBool(op, 0x40000);
|
||||
fUsefIsButton = FormatUtils::BitmaskToBool(op, 0x80000);
|
||||
|
||||
fUsefOnDblClickNotify = FormatUtils::BitmaskToBool(op, 0x100000);
|
||||
fUsefBehindDocument = FormatUtils::BitmaskToBool(op, 0x200000);
|
||||
fUsefEditedWrap = FormatUtils::BitmaskToBool(op, 0x400000);
|
||||
fUsefScriptAnchor = FormatUtils::BitmaskToBool(op, 0x800000);
|
||||
|
||||
fUsefReallyHidden = FormatUtils::BitmaskToBool(op, 0x1000000);
|
||||
fUsefAllowOverlap = FormatUtils::BitmaskToBool(op, 0x2000000);
|
||||
fUsefUserDrawn = FormatUtils::BitmaskToBool(op, 0x4000000);
|
||||
fUsefHorizRule = FormatUtils::BitmaskToBool(op, 0x8000000);
|
||||
|
||||
fUsefNoshadeHR = FormatUtils::BitmaskToBool(op, 0x10000000);
|
||||
fUsefStandardHR = FormatUtils::BitmaskToBool(op, 0x20000000);
|
||||
fUsefIsBullet = FormatUtils::BitmaskToBool(op, 0x40000000);
|
||||
fUsefLayoutInCell = FormatUtils::BitmaskToBool(op, 0x80000000);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool fPrint;
|
||||
bool fHidden;
|
||||
bool fOneD;
|
||||
bool fIsButton;
|
||||
|
||||
bool fOnDblClickNotify;
|
||||
bool fBehindDocument;
|
||||
bool fEditedWrap;
|
||||
bool fScriptAnchor;
|
||||
|
||||
bool fReallyHidden;
|
||||
bool fAllowOverlap;
|
||||
bool fUserDrawn;
|
||||
bool fHorizRule;
|
||||
|
||||
bool fNoshadeHR;
|
||||
bool fStandardHR;
|
||||
bool fIsBullet;
|
||||
bool fLayoutInCell;
|
||||
|
||||
bool fUsefPrint;
|
||||
bool fUsefHidden;
|
||||
bool fUsefOneD;
|
||||
bool fUsefIsButton;
|
||||
|
||||
bool fUsefOnDblClickNotify;
|
||||
bool fUsefBehindDocument;
|
||||
bool fUsefEditedWrap;
|
||||
bool fUsefScriptAnchor;
|
||||
|
||||
bool fUsefReallyHidden;
|
||||
bool fUsefAllowOverlap;
|
||||
bool fUsefUserDrawn;
|
||||
bool fUsefHorizRule;
|
||||
|
||||
bool fUsefNoshadeHR;
|
||||
bool fUsefStandardHR;
|
||||
bool fUsefIsBullet;
|
||||
bool fUsefLayoutInCell;
|
||||
};
|
||||
}
|
||||
@ -1,91 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
// 2.3.8.38 Line Style Boolean Properties - [MS-ODRAW] — v20130726
|
||||
|
||||
class LineStyleBooleanProperties
|
||||
{
|
||||
public:
|
||||
LineStyleBooleanProperties(unsigned int op)
|
||||
{
|
||||
fNoLineDrawDash = FormatUtils::BitmaskToBool(op, 0x1);
|
||||
fLineFillShape = FormatUtils::BitmaskToBool(op, 0x2);
|
||||
fHitTestLine = FormatUtils::BitmaskToBool(op, 0x4);
|
||||
fLine = FormatUtils::BitmaskToBool(op, 0x8);
|
||||
|
||||
fArrowheadsOK = FormatUtils::BitmaskToBool(op, 0x10);
|
||||
fInsetPenOK = FormatUtils::BitmaskToBool(op, 0x20);
|
||||
fInsetPen = FormatUtils::BitmaskToBool(op, 0x40);
|
||||
|
||||
//Reserved 0x80 0x100
|
||||
|
||||
fLineOpaqueBackColor = FormatUtils::BitmaskToBool(op, 0x200);
|
||||
|
||||
//Unused 0x400 0x800 0x1000 0x2000 0x4000 0x8000
|
||||
|
||||
fUsefNoLineDrawDash = FormatUtils::BitmaskToBool(op, 0x10000);
|
||||
fUsefLineFillShape = FormatUtils::BitmaskToBool(op, 0x20000);
|
||||
fUsefHitTestLine = FormatUtils::BitmaskToBool(op, 0x40000);
|
||||
fUsefLine = FormatUtils::BitmaskToBool(op, 0x80000);
|
||||
fUsefArrowheadsOK = FormatUtils::BitmaskToBool(op, 0x100000);
|
||||
fUsefInsetPenOK = FormatUtils::BitmaskToBool(op, 0x200000);
|
||||
fUsefInsetPen = FormatUtils::BitmaskToBool(op, 0x400000);
|
||||
|
||||
//Reserved 0x800000 0x1000000
|
||||
|
||||
fUsefLineOpaqueBackColor = FormatUtils::BitmaskToBool(op, 0x2000000);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool fNoLineDrawDash;
|
||||
bool fLineFillShape;
|
||||
bool fHitTestLine;
|
||||
bool fLine;
|
||||
bool fArrowheadsOK;
|
||||
bool fInsetPenOK;
|
||||
bool fInsetPen;
|
||||
bool fLineOpaqueBackColor;
|
||||
|
||||
bool fUsefNoLineDrawDash;
|
||||
bool fUsefLineFillShape;
|
||||
bool fUsefHitTestLine;
|
||||
bool fUsefLine;
|
||||
bool fUsefArrowheadsOK;
|
||||
bool fUsefInsetPenOK;
|
||||
bool fUsefInsetPen;
|
||||
bool fUsefLineOpaqueBackColor;
|
||||
};
|
||||
}
|
||||
@ -1,280 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "PathSegment.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
struct _guides
|
||||
{
|
||||
unsigned char type;
|
||||
|
||||
unsigned char param_type1;
|
||||
unsigned char param_type2;
|
||||
unsigned char param_type3;
|
||||
|
||||
WORD param1;
|
||||
WORD param2;
|
||||
WORD param3;
|
||||
};
|
||||
class PathParser
|
||||
{
|
||||
public:
|
||||
|
||||
PathParser (const unsigned char* pSegmentInfo, unsigned int pSegmentInfoSize, const unsigned char* pVertices, unsigned int pVerticesSize, std::vector<_guides> & guides)
|
||||
{
|
||||
|
||||
if ((pSegmentInfo != NULL) && (pSegmentInfoSize > 0))
|
||||
{
|
||||
unsigned short nElems = FormatUtils::BytesToUInt16(pSegmentInfo, 0, pSegmentInfoSize);
|
||||
unsigned short nElemsAlloc = FormatUtils::BytesToUInt16(pSegmentInfo, 2, pSegmentInfoSize);
|
||||
unsigned short cb = FormatUtils::BytesToUInt16(pSegmentInfo, 4, pSegmentInfoSize);
|
||||
|
||||
unsigned short cbElement = 4;
|
||||
|
||||
int offset = 6;
|
||||
if (cb == 0xfff0)
|
||||
cbElement = 2;
|
||||
|
||||
if (nElems == 0)
|
||||
{
|
||||
nElems = (pSegmentInfoSize - offset) / cbElement;
|
||||
}
|
||||
for (unsigned short i = 0; i < nElems; ++i)
|
||||
{
|
||||
PathSegment oSegment = PathSegment(FormatUtils::BytesToInt32(pSegmentInfo + offset, (i * cbElement), pSegmentInfoSize - offset));
|
||||
m_arSegments.push_back (oSegment);
|
||||
}
|
||||
|
||||
if ((long)pSegmentInfoSize < (long)(cb * nElems)) // Есть несколько файлов с мусором вместо данных
|
||||
m_arSegments.clear();
|
||||
}
|
||||
|
||||
if ((NULL != pVertices) && (pVerticesSize > 0))
|
||||
{
|
||||
unsigned short nElems = FormatUtils::BytesToUInt16(pVertices, 0, pVerticesSize);
|
||||
unsigned short nElemsAlloc = FormatUtils::BytesToUInt16(pVertices, 2, pVerticesSize);
|
||||
unsigned short cb = FormatUtils::BytesToUInt16(pVertices, 4, pVerticesSize);
|
||||
|
||||
unsigned short cbElement = 4;
|
||||
|
||||
if (cb == 0xfff0)
|
||||
cbElement = 2;
|
||||
|
||||
int offset = 6;
|
||||
|
||||
for (unsigned short i = 0; i < nElems; ++i)
|
||||
{
|
||||
POINT point;
|
||||
if (cbElement == 4)
|
||||
{
|
||||
point.x = FormatUtils::BytesToInt32(pVertices + offset, 0, pVerticesSize - offset);
|
||||
point.y = FormatUtils::BytesToInt32(pVertices + offset + cbElement, 0 , pVerticesSize - offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
point.x = FormatUtils::BytesToInt16(pVertices + offset, 0, pVerticesSize - offset);
|
||||
point.y = FormatUtils::BytesToInt16(pVertices + offset + cbElement, 0 , pVerticesSize - offset);
|
||||
}
|
||||
offset += cbElement * 2;
|
||||
|
||||
LONG lMinF = (LONG)0x80000000;
|
||||
if (lMinF <= point.x)
|
||||
{
|
||||
int index = (DWORD)point.x - 0x80000000;
|
||||
if (index >= 0 && index < (int)guides.size())
|
||||
{
|
||||
point.x = guides[index].param3;
|
||||
}
|
||||
}
|
||||
if (lMinF <= point.y)
|
||||
{
|
||||
int index = (DWORD)point.y - 0x80000000;
|
||||
if (index >= 0 && index < (int)guides.size())
|
||||
{
|
||||
point.y = guides[index].param3;
|
||||
}
|
||||
}
|
||||
if ((size_t)point.y > 0xffff)
|
||||
{
|
||||
point.y &= 0xffff;
|
||||
}
|
||||
if ((size_t)point.x > 0xffff)
|
||||
{
|
||||
point.x &= 0xffff;
|
||||
}
|
||||
m_arPoints.push_back(point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline std::wstring GetVmlPath () const
|
||||
{
|
||||
if ((0 == m_arSegments.size()) && (0 == m_arPoints.size()))
|
||||
return std::wstring(L"");
|
||||
|
||||
std::wstring strVmlPath;
|
||||
int valuePointer = 0;
|
||||
|
||||
if (0 == m_arSegments.size())
|
||||
{
|
||||
for (size_t i = 0; i < m_arPoints.size(); ++i)
|
||||
{
|
||||
strVmlPath += L"l";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[i].x);
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[i].y);
|
||||
|
||||
++valuePointer;
|
||||
}
|
||||
|
||||
strVmlPath += L"xe";
|
||||
|
||||
return strVmlPath;
|
||||
}
|
||||
|
||||
int cc = 0;
|
||||
std::vector<PathSegment>::const_iterator end = m_arSegments.end();
|
||||
for (std::vector<PathSegment>::const_iterator iter = m_arSegments.begin(); iter != end; ++iter, cc++)
|
||||
{
|
||||
switch (iter->Type)
|
||||
{
|
||||
case PathSegment::msopathLineTo:
|
||||
{
|
||||
for (int i = 0; i < iter->Count; ++i)
|
||||
{
|
||||
if (valuePointer + 1 > (int)m_arPoints.size())
|
||||
{
|
||||
break;
|
||||
|
||||
strVmlPath += L"l";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[0].x);
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[0].y);
|
||||
|
||||
++valuePointer;
|
||||
|
||||
//break;
|
||||
}
|
||||
else
|
||||
{
|
||||
strVmlPath += L"l";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].x );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].y );
|
||||
|
||||
++valuePointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PathSegment::msopathCurveTo:
|
||||
{
|
||||
for (int i = 0; i < iter->Count; ++i)
|
||||
{
|
||||
if (valuePointer + 3 > (int)m_arPoints.size())
|
||||
break;
|
||||
strVmlPath += L"c";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].x );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].y );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer + 1].x );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer + 1].y );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer + 2].x );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer + 2].y );
|
||||
valuePointer += 3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PathSegment::msopathMoveTo:
|
||||
{
|
||||
if (valuePointer < (int)m_arPoints.size())
|
||||
{
|
||||
strVmlPath += L"m";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].x );
|
||||
strVmlPath += L",";
|
||||
strVmlPath += FormatUtils::IntToWideString(m_arPoints[valuePointer].y );
|
||||
|
||||
++valuePointer;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PathSegment::msopathClose:
|
||||
{
|
||||
strVmlPath += L"x";
|
||||
}
|
||||
break;
|
||||
|
||||
case PathSegment::msopathEnd:
|
||||
{
|
||||
strVmlPath += L"e";
|
||||
}
|
||||
break;
|
||||
|
||||
case PathSegment::msopathEscape:
|
||||
{
|
||||
if (PathSegment::msopathEscapeNoFill == iter->EscapeCode)
|
||||
strVmlPath += L"nf";
|
||||
|
||||
if (PathSegment::msopathEscapeNoLine == iter->EscapeCode)
|
||||
strVmlPath += L"ns";
|
||||
}
|
||||
case PathSegment::msopathClientEscape:
|
||||
case PathSegment::msopathInvalid:
|
||||
{
|
||||
//ignore escape segments and invalid segments
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// end the path
|
||||
if ( !strVmlPath.empty() && ( strVmlPath[strVmlPath.size() - 1] != L'e' ) )
|
||||
strVmlPath +=L"e";
|
||||
|
||||
return strVmlPath;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::vector<POINT> m_arPoints;
|
||||
std::vector<PathSegment> m_arSegments;
|
||||
};
|
||||
}
|
||||
@ -1,101 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class PathSegment
|
||||
{
|
||||
public:
|
||||
|
||||
enum MSOPATHTYPE
|
||||
{
|
||||
msopathLineTo,
|
||||
msopathCurveTo,
|
||||
msopathMoveTo,
|
||||
msopathClose,
|
||||
msopathEnd,
|
||||
msopathEscape,
|
||||
msopathClientEscape,
|
||||
msopathInvalid
|
||||
};
|
||||
|
||||
enum MSOPATHESCAPE
|
||||
{
|
||||
msopathEscapeExtension = 0x00000000,
|
||||
msopathEscapeAngleEllipseTo = 0x00000001,
|
||||
msopathEscapeAngleEllipse = 0x00000002,
|
||||
msopathEscapeArcTo = 0x00000003,
|
||||
msopathEscapeArc = 0x00000004,
|
||||
msopathEscapeClockwiseArcTo = 0x00000005,
|
||||
msopathEscapeClockwiseArc = 0x00000006,
|
||||
msopathEscapeEllipticalQuadrantX = 0x00000007,
|
||||
msopathEscapeEllipticalQuadrantY = 0x00000008,
|
||||
msopathEscapeQuadraticBezier = 0x00000009,
|
||||
msopathEscapeNoFill = 0x0000000A,
|
||||
msopathEscapeNoLine = 0x0000000B,
|
||||
msopathEscapeAutoLine = 0x0000000C,
|
||||
msopathEscapeAutoCurve = 0x0000000D,
|
||||
msopathEscapeCornerLine = 0x0000000E,
|
||||
msopathEscapeCornerCurve = 0x0000000F,
|
||||
msopathEscapeSmoothLine = 0x00000010,
|
||||
msopathEscapeSmoothCurve = 0x00000011,
|
||||
msopathEscapeSymmetricLine = 0x00000012,
|
||||
msopathEscapeSymmetricCurve = 0x00000013,
|
||||
msopathEscapeFreeform = 0x00000014,
|
||||
msopathEscapeFillColor = 0x00000015,
|
||||
msopathEscapeLineColor = 0x00000016
|
||||
};
|
||||
|
||||
PathSegment (unsigned short segment): Type(msopathInvalid), Count(0), EscapeCode(msopathEscapeExtension), VertexCount(0)
|
||||
{
|
||||
Type = (MSOPATHTYPE)FormatUtils::BitmaskToInt (segment, 0xE000);
|
||||
|
||||
if (msopathEscape == Type)
|
||||
{
|
||||
EscapeCode = (MSOPATHESCAPE)FormatUtils::BitmaskToInt (segment, 0x1F00);
|
||||
VertexCount = FormatUtils::BitmaskToInt (segment, 0x00FF);
|
||||
}
|
||||
else
|
||||
{
|
||||
Count = FormatUtils::BitmaskToInt (segment, 0x1FFF);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
MSOPATHTYPE Type;
|
||||
int Count;
|
||||
int VertexCount;
|
||||
MSOPATHESCAPE EscapeCode;
|
||||
};
|
||||
}
|
||||
@ -1,97 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../Common/FormatUtils.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
// 2.3.20.1 Protection Boolean Properties - [MS-ODRAW] — v20130726
|
||||
|
||||
class ProtectionBooleanProperties
|
||||
{
|
||||
public:
|
||||
ProtectionBooleanProperties(unsigned int op)
|
||||
{
|
||||
fLockAgainstGrouping = FormatUtils::BitmaskToBool(op,0x1);
|
||||
fLockAdjustHandles = FormatUtils::BitmaskToBool(op,0x2);
|
||||
fLockText = FormatUtils::BitmaskToBool(op,0x4);
|
||||
fLockVertices = FormatUtils::BitmaskToBool(op,0x8);
|
||||
|
||||
fLockCropping = FormatUtils::BitmaskToBool(op,0x10);
|
||||
fLockAgainstSelect = FormatUtils::BitmaskToBool(op,0x20);
|
||||
fLockPosition = FormatUtils::BitmaskToBool(op,0x30);
|
||||
fLockAspectRatio = FormatUtils::BitmaskToBool(op,0x40);
|
||||
|
||||
fLockRotation = FormatUtils::BitmaskToBool(op,0x100);
|
||||
fLockAgainstUngrouping = FormatUtils::BitmaskToBool(op,0x200);
|
||||
|
||||
//unused 0x400 0x800 0x1000 0x2000 0x4000 0x8000
|
||||
|
||||
fUsefLockAgainstGrouping = FormatUtils::BitmaskToBool(op,0x10000);
|
||||
fUsefLockAdjustHandles = FormatUtils::BitmaskToBool(op,0x20000);
|
||||
fUsefLockText = FormatUtils::BitmaskToBool(op,0x40000);
|
||||
fUsefLockVertices = FormatUtils::BitmaskToBool(op,0x80000);
|
||||
|
||||
fUsefLockCropping = FormatUtils::BitmaskToBool(op,0x100000);
|
||||
fUsefLockAgainstSelect = FormatUtils::BitmaskToBool(op,0x200000);
|
||||
fUsefLockPosition = FormatUtils::BitmaskToBool(op,0x400000);
|
||||
fUsefLockAspectRatio = FormatUtils::BitmaskToBool(op,0x800000);
|
||||
|
||||
fUsefLockRotation = FormatUtils::BitmaskToBool(op,0x1000000);
|
||||
fUsefLockAgainstUngrouping = FormatUtils::BitmaskToBool(op,0x2000000);
|
||||
}
|
||||
|
||||
|
||||
bool fLockAgainstGrouping;
|
||||
bool fLockAdjustHandles;
|
||||
bool fLockText;
|
||||
bool fLockVertices;
|
||||
bool fLockCropping;
|
||||
bool fLockAgainstSelect;
|
||||
bool fLockPosition;
|
||||
bool fLockAspectRatio;
|
||||
bool fLockRotation;
|
||||
bool fLockAgainstUngrouping;
|
||||
|
||||
bool fUsefLockAgainstGrouping;
|
||||
bool fUsefLockAdjustHandles;
|
||||
bool fUsefLockText;
|
||||
bool fUsefLockVertices;
|
||||
bool fUsefLockCropping;
|
||||
bool fUsefLockAgainstSelect;
|
||||
bool fUsefLockPosition;
|
||||
bool fUsefLockAspectRatio;
|
||||
bool fUsefLockRotation;
|
||||
bool fUsefLockAgainstUngrouping;
|
||||
};
|
||||
}
|
||||
@ -75,9 +75,9 @@ namespace DocFileFormat
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( std::vector<Record*>::const_iterator iter1 = this->Children.begin(); iter1 != this->Children.end(); iter1++ )
|
||||
for ( size_t j = 0; j < this->Children.size(); ++j)
|
||||
{
|
||||
ShapeOptions* sh_options = dynamic_cast<ShapeOptions*>( *iter1 );
|
||||
ShapeOptions* sh_options = dynamic_cast<ShapeOptions*>( this->Children[j] );
|
||||
if (sh_options)
|
||||
{
|
||||
if (sh_options->OptionsByID.end() != sh_options->OptionsByID.find(Pib))
|
||||
@ -101,16 +101,17 @@ namespace DocFileFormat
|
||||
return new ShapeContainer( _reader, bodySize, typeCode, version, instance );
|
||||
}
|
||||
|
||||
OptionEntryPtr ExtractOption(const PropertyId & prop) const
|
||||
ODRAW::OfficeArtFOPTEPtr ExtractOption(const PropertyId & prop) const
|
||||
{
|
||||
OptionEntryPtr ret;
|
||||
ODRAW::OfficeArtFOPTEPtr ret;
|
||||
|
||||
for ( size_t i = 0; i < this->Children.size(); ++i )
|
||||
{
|
||||
ShapeOptions* opt = dynamic_cast<ShapeOptions*>( this->Children[i] );
|
||||
|
||||
if ( opt == NULL ) continue;
|
||||
|
||||
std::map<PropertyId, OptionEntryPtr>::iterator pFind = opt->OptionsByID.find(prop);
|
||||
std::map<PropertyId, ODRAW::OfficeArtFOPTEPtr>::iterator pFind = opt->OptionsByID.find(prop);
|
||||
if (pFind != opt->OptionsByID.end())
|
||||
{
|
||||
ret = pFind->second;
|
||||
@ -119,9 +120,9 @@ namespace DocFileFormat
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<OptionEntryPtr> ExtractOptions() const
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> ExtractOptions() const
|
||||
{
|
||||
std::vector<OptionEntryPtr> ret;
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> ret;
|
||||
|
||||
//build the list of all option entries of this shape
|
||||
for ( size_t i = 0; i < this->Children.size(); ++i )
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Record.h"
|
||||
#include "../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtRGFOPTE.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -526,21 +527,6 @@ namespace DocFileFormat
|
||||
LineDashing_LongDashDotDotGEL
|
||||
} LineDashing;
|
||||
|
||||
struct OptionEntry
|
||||
{
|
||||
OptionEntry() : pid(PropertyId_left), fBid(false), fComplex(false), op(0)
|
||||
{
|
||||
}
|
||||
|
||||
PropertyId pid;
|
||||
bool fBid;
|
||||
bool fComplex;
|
||||
unsigned int op;
|
||||
std::shared_ptr<unsigned char> opComplex;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<OptionEntry> OptionEntryPtr;
|
||||
|
||||
class ShapeOptions: public Record
|
||||
{
|
||||
public:
|
||||
@ -548,9 +534,9 @@ namespace DocFileFormat
|
||||
static const unsigned short TYPE_CODE_0xF121 = 0xF121;
|
||||
static const unsigned short TYPE_CODE_0xF122 = 0xF122;
|
||||
|
||||
std::vector<OptionEntryPtr> Options;
|
||||
std::map<PropertyId, OptionEntryPtr> OptionsByID;
|
||||
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> Options;
|
||||
std::map<PropertyId, ODRAW::OfficeArtFOPTEPtr> OptionsByID;
|
||||
|
||||
ShapeOptions() : Record()
|
||||
{
|
||||
}
|
||||
@ -563,41 +549,24 @@ namespace DocFileFormat
|
||||
{
|
||||
long pos = Reader->GetPosition();
|
||||
|
||||
//parse the flags and the simple values
|
||||
// parse the flags and the simple values
|
||||
for (unsigned int i = 0; i < instance; ++i)
|
||||
{
|
||||
OptionEntryPtr entry = std::shared_ptr<OptionEntry>(new OptionEntry());
|
||||
unsigned short flag = Reader->ReadUInt16();
|
||||
ODRAW::OfficeArtFOPTEPtr fopte = ODRAW::OfficeArtFOPTE::load_and_create(Reader);
|
||||
if (!fopte)continue;
|
||||
|
||||
entry->pid = (PropertyId)FormatUtils::BitmaskToInt (flag, 0x3FFF);
|
||||
entry->fBid = FormatUtils::BitmaskToBool (flag, 0x4000);
|
||||
entry->fComplex = FormatUtils::BitmaskToBool (flag, 0x8000);
|
||||
entry->op = Reader->ReadUInt32();
|
||||
|
||||
Options.push_back( entry );
|
||||
Options.push_back(fopte);
|
||||
}
|
||||
// complex load
|
||||
|
||||
//parse the complex values & sorted by pid
|
||||
for (unsigned int i = 0; i < instance; ++i)
|
||||
for(size_t i = 0; i < Options.size(); ++i)
|
||||
{
|
||||
if (Options[i]->fComplex && Options[i]->op > 0)
|
||||
{
|
||||
unsigned int size = Options[i]->op;
|
||||
|
||||
if (Options[i]->pid == 0x0145 ||
|
||||
Options[i]->pid == 0x0146 ||
|
||||
Options[i]->pid == 0x0197 ||
|
||||
Options[i]->pid == 0x0156 ||
|
||||
Options[i]->pid == 0x0155 ||
|
||||
Options[i]->pid == 0x0151 ||
|
||||
Options[i]->pid == 0x0152 ||
|
||||
Options[i]->pid == 0x0157 ||
|
||||
Options[i]->pid == 0x0158)//mso arrays
|
||||
size += 6;
|
||||
Options[i]->opComplex = std::shared_ptr<unsigned char>(Reader->ReadBytes( size, true ));
|
||||
if(Options[i]->fComplex && Options[i]->op > 0)
|
||||
{
|
||||
Options[i]->ReadComplexData(Reader);
|
||||
}
|
||||
|
||||
OptionsByID.insert(std::make_pair(Options[i]->pid, Options[i]));
|
||||
OptionsByID.insert(std::make_pair((PropertyId)Options[i]->opid, Options[i]));
|
||||
}
|
||||
|
||||
Reader->Seek(( pos + size ), 0/*STREAM_SEEK_SET*/);
|
||||
|
||||
@ -31,13 +31,15 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ProtectionBooleanProperties.h"
|
||||
#include "../IVisitable.h"
|
||||
#include "../../Common/XmlTools.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
||||
#include <list>
|
||||
|
||||
namespace ODRAW
|
||||
{
|
||||
class OfficeArtFOPTE;
|
||||
typedef boost::shared_ptr<OfficeArtFOPTE> OfficeArtFOPTEPtr;
|
||||
}
|
||||
namespace DocFileFormat
|
||||
{
|
||||
enum MSOSPT
|
||||
@ -274,9 +276,6 @@ namespace DocFileFormat
|
||||
position = pos;
|
||||
xrange = xRange;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
std::wstring position;
|
||||
std::wstring xrange;
|
||||
std::wstring switchHandle;
|
||||
@ -289,7 +288,7 @@ namespace DocFileFormat
|
||||
{
|
||||
public:
|
||||
|
||||
ShapeType (unsigned int typeCode) : Filled(true), Stroked(true), Lock(0), TypeCode(typeCode), Joins(miter), ShapeConcentricFill(false)
|
||||
ShapeType (unsigned int typeCode) : Filled(true), Stroked(true), TypeCode(typeCode), Joins(miter), ShapeConcentricFill(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -301,8 +300,7 @@ namespace DocFileFormat
|
||||
{
|
||||
return TypeCode;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// This string describes a sequence of commands that define the shape’s path.
|
||||
/// This string describes both the pSegmentInfo array and pVertices array in the shape’s geometry properties.
|
||||
std::wstring Path;
|
||||
@ -344,7 +342,7 @@ namespace DocFileFormat
|
||||
bool Stroked;
|
||||
/// Speicfies the locked properties of teh shape.
|
||||
/// By default nothing is locked.
|
||||
ProtectionBooleanProperties Lock;
|
||||
ODRAW::OfficeArtFOPTEPtr Lock;
|
||||
|
||||
///
|
||||
std::wstring Textpath;
|
||||
|
||||
@ -60,9 +60,9 @@ namespace DocFileFormat
|
||||
this->Filled = false;
|
||||
this->Stroked = false;
|
||||
|
||||
//pictures have a lock on the aspect ratio by default
|
||||
this->Lock.fUsefLockAspectRatio = true;
|
||||
this->Lock.fLockAspectRatio = true;
|
||||
// //pictures have a lock on the aspect ratio by default
|
||||
//this->Lock.fUsefLockAspectRatio = true;
|
||||
// this->Lock.fLockAspectRatio = true;
|
||||
}
|
||||
void SetType(unsigned int nType)
|
||||
{
|
||||
|
||||
@ -1,92 +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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class ThreeDStyleBooleanProperties
|
||||
{
|
||||
public:
|
||||
ThreeDStyleBooleanProperties(unsigned int op)
|
||||
{
|
||||
fUsefc3DConstrainRotation = GETBIT(op, 0);
|
||||
fUsefc3DRotationCenterAuto = GETBIT(op, 1);
|
||||
fUsefc3DParallel = GETBIT(op, 2);
|
||||
fUsefc3DKeyHarsh = GETBIT(op, 3);
|
||||
fUsefc3DFillHarsh = GETBIT(op, 4);
|
||||
|
||||
fc3DConstrainRotation = GETBIT(op, 16);
|
||||
fc3DRotationCenterAuto = GETBIT(op, 17);
|
||||
fc3DParallel = GETBIT(op, 18);
|
||||
fc3DKeyHarsh = GETBIT(op, 19);
|
||||
fc3DFillHarsh = GETBIT(op, 20);
|
||||
}
|
||||
bool fUsefc3DConstrainRotation;
|
||||
bool fUsefc3DRotationCenterAuto;
|
||||
bool fUsefc3DParallel;
|
||||
bool fUsefc3DKeyHarsh;
|
||||
bool fUsefc3DFillHarsh;
|
||||
|
||||
bool fc3DConstrainRotation;
|
||||
bool fc3DRotationCenterAuto;
|
||||
bool fc3DParallel;
|
||||
bool fc3DKeyHarsh;
|
||||
bool fc3DFillHarsh;
|
||||
};
|
||||
class ThreeDObjectBooleanProperties
|
||||
{
|
||||
public:
|
||||
ThreeDObjectBooleanProperties(unsigned int op)
|
||||
{
|
||||
fUsef3D = GETBIT(op, 0);
|
||||
fUsefc3DMetallic = GETBIT(op, 1);
|
||||
fUsefc3DUseExtrusionColor = GETBIT(op, 2);
|
||||
fUsefc3DLightFace = GETBIT(op, 3);
|
||||
|
||||
// 12 unused
|
||||
|
||||
f3D = GETBIT(op, 16);
|
||||
fc3DMetallic = GETBIT(op, 17);
|
||||
fc3DUseExtrusionColor = GETBIT(op, 18);
|
||||
fc3DLightFace = GETBIT(op, 19);
|
||||
}
|
||||
bool fUsef3D;
|
||||
bool fUsefc3DMetallic;
|
||||
bool fUsefc3DUseExtrusionColor;
|
||||
bool fUsefc3DLightFace;
|
||||
|
||||
bool f3D;
|
||||
bool fc3DMetallic;
|
||||
bool fc3DUseExtrusionColor;
|
||||
bool fc3DLightFace;
|
||||
};
|
||||
}
|
||||
@ -32,9 +32,38 @@
|
||||
|
||||
|
||||
#include "SettingsMapping.h"
|
||||
#include "../../OfficeCryptReader/source/CryptTransform.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
std::string DecodeBase64(const std::string & value)
|
||||
{
|
||||
int nLength = 0;
|
||||
unsigned char *pData = NULL;
|
||||
std::string result;
|
||||
|
||||
NSFile::CBase64Converter::Decode(value.c_str(), value.length(), pData, nLength);
|
||||
if (pData)
|
||||
{
|
||||
result = std::string((char*)pData, nLength);
|
||||
delete []pData; pData = NULL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
std::wstring EncodeBase64(const std::string & value)
|
||||
{
|
||||
int nLength = 0;
|
||||
char *pData = NULL;
|
||||
std::string result;
|
||||
|
||||
NSFile::CBase64Converter::Encode((BYTE*)value.c_str(), value.length(), pData, nLength, NSBase64::B64_BASE64_FLAG_NOCRLF);
|
||||
if (pData)
|
||||
{
|
||||
result = std::string(pData, nLength);
|
||||
delete []pData; pData = NULL;
|
||||
}
|
||||
return std::wstring(result.begin(), result.end());
|
||||
}
|
||||
SettingsMapping::SettingsMapping (ConversionContext* ctx): PropertiesMapping(&m_oXmlWriter)
|
||||
{
|
||||
_ctx = ctx;
|
||||
@ -49,11 +78,39 @@ namespace DocFileFormat
|
||||
//start w:settings
|
||||
m_oXmlWriter.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||
m_oXmlWriter.WriteNodeBegin( L"w:settings", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_oXmlWriter.WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_oXmlWriter.WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
if (_ctx->_doc->FIB->m_FibBase.fWriteReservation)
|
||||
{
|
||||
m_oXmlWriter.WriteNodeBegin( L"w:writeProtection", TRUE );
|
||||
WideString* passw = static_cast<WideString*>(_ctx->_doc->AssocNames->operator[]( 17 ));
|
||||
if (passw && false == passw->empty())
|
||||
{
|
||||
CRYPT::_ecmaWriteProtectData data;
|
||||
|
||||
CRYPT::ECMAWriteProtect protect;
|
||||
protect.SetCryptData(data);
|
||||
protect.SetPassword(*passw);
|
||||
|
||||
protect.Generate();
|
||||
protect.GetCryptData(data);
|
||||
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:cryptProviderType", L"rsaAES");
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:cryptAlgorithmSid", 14); //sha-512
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:cryptAlgorithmType", L"typeAny");
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:cryptAlgorithmClass", L"hash");
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:cryptSpinCount", data.spinCount);
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:hash", EncodeBase64(data.hashValue));
|
||||
//m_oXmlWriter.WriteAttribute ( L"w:salt", EncodeBase64(data.saltValue));
|
||||
m_oXmlWriter.WriteAttribute ( L"w:algorithmName", L"SHA-512");
|
||||
m_oXmlWriter.WriteAttribute ( L"w:spinCount", data.spinCount);
|
||||
m_oXmlWriter.WriteAttribute ( L"w:hashValue", EncodeBase64(data.hashValue));
|
||||
m_oXmlWriter.WriteAttribute ( L"w:saltValue", EncodeBase64(data.saltValue));
|
||||
}
|
||||
m_oXmlWriter.WriteNodeEnd( L"", TRUE, TRUE );
|
||||
}
|
||||
//zoom
|
||||
m_oXmlWriter.WriteNodeBegin ( L"w:zoom", TRUE );
|
||||
m_oXmlWriter.WriteAttribute ( L"w:percent", FormatUtils::IntToWideString( dop->wScaleSaved > 0 ? dop->wScaleSaved : 100 ) );
|
||||
|
||||
@ -33,41 +33,18 @@
|
||||
#include "VMLPictureMapping.h"
|
||||
#include "VMLShapeMapping.h"
|
||||
|
||||
#include "OfficeDrawing/GeometryBooleanProperties.h"
|
||||
#include "OfficeDrawing/GeometryTextBooleanProperties.h"
|
||||
#include "OfficeDrawing/GroupShapeBooleanProperties.h"
|
||||
#include "OfficeDrawing/MetafilePictBlip.h"
|
||||
|
||||
#include "../../DesktopEditor/common/String.h"
|
||||
#include "../../DesktopEditor/common/StringExt.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Document.h"
|
||||
|
||||
#include "../../DesktopEditor/common/File.h"
|
||||
#include "../../DesktopEditor/raster/BgraFrame.h"
|
||||
|
||||
#include "../../ASCOfficePPTFile/PPTFormatLib/Reader/ReadStructures.h"
|
||||
|
||||
using namespace DocFileFormat;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD iType; // Record type EMR_HEADER
|
||||
DWORD nSize; // Record size in bytes. This may be greater
|
||||
// than the sizeof(ENHMETAHEADER).
|
||||
RECT rclBounds; // Inclusive-inclusive bounds in device units
|
||||
RECT rclFrame; // Inclusive-inclusive Picture Frame .01mm unit
|
||||
DWORD dSignature; // Signature. Must be ENHMETA_SIGNATURE.
|
||||
DWORD nVersion; // Version number
|
||||
DWORD nBytes; // Size of the metafile in bytes
|
||||
DWORD nRecords; // Number of records in the metafile
|
||||
WORD nHandles; // Number of handles in the handle table
|
||||
// Handle index zero is reserved.
|
||||
WORD sReserved; // Reserved. Must be zero.
|
||||
DWORD nDescription; // Number of chars in the unicode desc string
|
||||
// This is 0 if there is no description string
|
||||
DWORD offDescription; // Offset to the metafile description record.
|
||||
// This is 0 if there is no description string
|
||||
DWORD nPalEntries; // Number of entries in the metafile palette.
|
||||
SIZE szlDevice; // Size of the reference device in pels
|
||||
SIZE szlMillimeters; // Size of the reference device in millimeters
|
||||
} ENHMETAHEADER3;
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -138,6 +115,51 @@ namespace DocFileFormat
|
||||
}
|
||||
return btWin32;
|
||||
}
|
||||
bool VMLPictureMapping::ParseEmbeddedBlob( const std::string & xmlString, std::wstring & newXmlString)
|
||||
{
|
||||
newXmlString.clear();
|
||||
|
||||
std::wstring sTempFolder = m_context->_doc->m_sTempFolder;
|
||||
if (sTempFolder.empty())
|
||||
{
|
||||
sTempFolder = NSFile::CFileBinary::GetTempPath();
|
||||
}
|
||||
|
||||
std::wstring sTempXmlFile = NSDirectory::CreateTempFileWithUniqueName(sTempFolder, L"emb");
|
||||
|
||||
NSFile::CFileBinary file;
|
||||
file.CreateFileW(sTempXmlFile);
|
||||
file.WriteFile((BYTE*)xmlString.c_str(), xmlString.size());
|
||||
file.CloseFile();
|
||||
|
||||
COfficeUtils officeUtils(NULL);
|
||||
|
||||
BYTE *utf8Data = NULL;
|
||||
ULONG utf8DataSize = 0;
|
||||
if (S_OK != officeUtils.LoadFileFromArchive(sTempXmlFile, L"drs/shapexml.xml", &utf8Data, utf8DataSize))
|
||||
{
|
||||
if (S_OK == officeUtils.IsFileExistInArchive(sTempXmlFile, L"drs/diagrams"))
|
||||
{
|
||||
officeUtils.LoadFileFromArchive(sTempXmlFile, L"drs/diagrams/drawing1.xml", &utf8Data, utf8DataSize);
|
||||
}
|
||||
else if (S_OK != officeUtils.LoadFileFromArchive(sTempXmlFile, L"drs/e2oDoc.xml", &utf8Data, utf8DataSize))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (utf8Data && utf8DataSize > 0)
|
||||
{
|
||||
newXmlString = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8(utf8Data, utf8DataSize);
|
||||
|
||||
delete []utf8Data;
|
||||
}
|
||||
NSFile::CFileBinary::Remove(sTempXmlFile);
|
||||
|
||||
if (newXmlString.empty()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
bool VMLPictureMapping::ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString)
|
||||
{
|
||||
newXmlString.clear();
|
||||
@ -221,6 +243,7 @@ namespace DocFileFormat
|
||||
m_isBullete = false;
|
||||
m_isEquation = false;
|
||||
m_isEmbedded = false;
|
||||
m_isBlob = false;
|
||||
|
||||
m_imageData = new XMLTools::XMLElement( L"v:imagedata" );
|
||||
}
|
||||
@ -256,7 +279,7 @@ namespace DocFileFormat
|
||||
std::wstring strHeight = FormatUtils::DoubleToWideString( height.ToPoints() );
|
||||
std::wstring strStyle;
|
||||
|
||||
std::vector<OptionEntryPtr> options;
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> options;
|
||||
|
||||
PictureFrameType type;
|
||||
Shape* pShape = NULL;
|
||||
@ -296,31 +319,37 @@ namespace DocFileFormat
|
||||
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
OptionEntryPtr & iter = options[i];
|
||||
switch ( iter->pid )
|
||||
ODRAW::OfficeArtFOPTEPtr & iter = options[i];
|
||||
switch ( iter->opid )
|
||||
{
|
||||
case wzEquationXML:
|
||||
{
|
||||
m_isEquation = true;
|
||||
m_isEmbedded = true;
|
||||
|
||||
m_embeddedData = std::string((char*)iter->opComplex.get(), iter->op);
|
||||
|
||||
if (ParseEmbeddedEquation( m_embeddedData, m_equationXml))
|
||||
ODRAW::XmlString *pXml = dynamic_cast<ODRAW::XmlString*>(iter.get());
|
||||
if (pXml)
|
||||
{
|
||||
m_isEmbedded = false;
|
||||
m_isEquation = true;
|
||||
m_isEmbedded = true;
|
||||
|
||||
m_embeddedData = pXml->data;
|
||||
|
||||
if (ParseEmbeddedEquation( m_embeddedData, m_equationXml))
|
||||
{
|
||||
m_isEmbedded = false;
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case metroBlob:
|
||||
{
|
||||
//встроенная неведомая хуйня
|
||||
m_isEmbedded = true;
|
||||
m_embeddedData = std::string((char*)iter->opComplex.get(), iter->op);
|
||||
|
||||
//if (ParseEmbeddedBlob( m_embeddedData, m_blobXml)) // todoooo
|
||||
//{
|
||||
// m_isEmbedded = false;
|
||||
//}
|
||||
{//встроенная неведомая хуйня
|
||||
ODRAW::MetroBlob* blob = dynamic_cast<ODRAW::MetroBlob*>(iter.get());
|
||||
if (blob)
|
||||
{
|
||||
m_isBlob = true;
|
||||
m_isEmbedded = true;
|
||||
//if (ParseEmbeddedBlob( blob->data.first, blob->data.second)) // todoooo
|
||||
//{
|
||||
// m_isEmbedded = false;
|
||||
//}
|
||||
}
|
||||
}break;
|
||||
//BORDERS
|
||||
case borderBottomColor:
|
||||
@ -411,9 +440,9 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case groupShapeBooleans:
|
||||
{
|
||||
GroupShapeBooleanProperties groupShapeBooleans(iter->op);
|
||||
ODRAW::GroupShapeBooleanProperties* booleans = dynamic_cast<ODRAW::GroupShapeBooleanProperties*>(iter.get());
|
||||
|
||||
if (groupShapeBooleans.fUsefBehindDocument && groupShapeBooleans.fBehindDocument)
|
||||
if (booleans->fUsefBehindDocument && booleans->fBehindDocument)
|
||||
{
|
||||
//The shape is behind the text, so the z-index must be negative.
|
||||
appendStyleProperty(&strStyle, L"z-index", L"-1" );
|
||||
@ -423,7 +452,7 @@ namespace DocFileFormat
|
||||
// appendStyleProperty( &strStyle, L"z-index", FormatUtils::IntToWideString(zIndex + 0x7ffff));
|
||||
//}
|
||||
|
||||
if (groupShapeBooleans.fHidden && groupShapeBooleans.fUsefHidden)
|
||||
if (booleans->fHidden && booleans->fUsefHidden)
|
||||
{
|
||||
appendStyleProperty(&strStyle, L"visibility", L"hidden");
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@ namespace DocFileFormat
|
||||
void writePictureBorder (const std::wstring & name, const BorderCode* brc);
|
||||
void appendStyleProperty( std::wstring* b, const std::wstring& propName, const std::wstring& propValue ) const;
|
||||
bool ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString );
|
||||
bool ParseEmbeddedBlob(const std::string & xmlString, std::wstring & newXmlString);
|
||||
std::wstring GetShapeID(const Shape* pShape) const;
|
||||
protected:
|
||||
/// Copies the picture from the binary stream to the zip archive
|
||||
@ -69,11 +70,13 @@ namespace DocFileFormat
|
||||
static std::wstring GetTargetExt (Global::BlipType nType);
|
||||
static std::wstring GetContentType (Global::BlipType nType);
|
||||
|
||||
bool m_isBlob;
|
||||
bool m_isBullete;
|
||||
bool m_isEquation;
|
||||
bool m_isEmbedded;
|
||||
std::string m_embeddedData;
|
||||
std::wstring m_equationXml;
|
||||
std::wstring m_blobXml;
|
||||
|
||||
std::wstring m_shapeId;
|
||||
private:
|
||||
|
||||
@ -38,24 +38,11 @@
|
||||
#include "OfficeDrawing/Shapetypes/OvalType.h"
|
||||
#include "OfficeDrawing/Shapetypes/RectangleType.h"
|
||||
#include "OfficeDrawing/Shapetypes/RoundedRectangleType.h"
|
||||
|
||||
#include "OfficeDrawing/threeDBooleanProperties.h"
|
||||
#include "OfficeDrawing/OfficeArtClientTextbox.h"
|
||||
#include "OfficeDrawing/DiagramBooleanProperties.h"
|
||||
#include "OfficeDrawing/GeometryBooleanProperties.h"
|
||||
#include "OfficeDrawing/ShadowStyleBooleanProperties.h"
|
||||
#include "OfficeDrawing/GeometryBooleanProperties.h"
|
||||
#include "OfficeDrawing/FillStyleBooleanProperties.h"
|
||||
#include "OfficeDrawing/GeometryBooleanProperties.h"
|
||||
#include "OfficeDrawing/FillStyleBooleanProperties.h"
|
||||
#include "OfficeDrawing/LineStyleBooleanProperties.h"
|
||||
#include "OfficeDrawing/GeometryTextBooleanProperties.h"
|
||||
#include "OfficeDrawing/GroupShapeBooleanProperties.h"
|
||||
#include "OfficeDrawing/ProtectionBooleanProperties.h"
|
||||
|
||||
#include "DrawingPrimitives.h"
|
||||
|
||||
#include "../../DesktopEditor/common/String.h"
|
||||
#include "../../DesktopEditor/common/StringExt.h"
|
||||
|
||||
#include "../Common/FormatUtils.h"
|
||||
|
||||
@ -141,12 +128,13 @@ namespace DocFileFormat
|
||||
{
|
||||
if ((container != NULL) && (!container->Children.empty()))
|
||||
{
|
||||
ShapeContainer* groupShape = static_cast<ShapeContainer*>(container->Children[0]);
|
||||
GroupShapeRecord* gsr = static_cast<GroupShapeRecord*>(groupShape->Children[0]);
|
||||
Shape* shape = static_cast<Shape*>(groupShape->Children[1]);
|
||||
ShapeContainer* groupShape = static_cast<ShapeContainer*>(container->Children[0]);
|
||||
GroupShapeRecord* gsr = static_cast<GroupShapeRecord*>(groupShape->Children[0]);
|
||||
Shape* shape = static_cast<Shape*>(groupShape->Children[1]);
|
||||
|
||||
ChildAnchor* anchor = groupShape->FirstChildWithType<ChildAnchor>();
|
||||
std::vector<OptionEntryPtr> options = groupShape->ExtractOptions();
|
||||
ChildAnchor* anchor = groupShape->FirstChildWithType<ChildAnchor>();
|
||||
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> options = groupShape->ExtractOptions();
|
||||
|
||||
m_shapeId = GetShapeID(shape);
|
||||
|
||||
@ -159,12 +147,12 @@ namespace DocFileFormat
|
||||
// Write wrap coords
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
switch (options[i]->pid)
|
||||
switch (options[i]->opid)
|
||||
{
|
||||
case pWrapPolygonVertices:
|
||||
{
|
||||
std::wstring wrapCoords = GetWrapCoords(options[i]);
|
||||
if (wrapCoords.length())
|
||||
if (!wrapCoords.empty())
|
||||
m_pXmlWriter->WriteAttribute(L"wrapcoords", wrapCoords);
|
||||
}
|
||||
break;
|
||||
@ -229,9 +217,10 @@ namespace DocFileFormat
|
||||
bool freeform = true;
|
||||
std::wstring sShapeId;
|
||||
|
||||
std::vector<OptionEntryPtr> options = pContainer->ExtractOptions();
|
||||
ChildAnchor* pAnchor = pContainer->FirstChildWithType<ChildAnchor>();
|
||||
ClientAnchor* clientAnchor = pContainer->FirstChildWithType<ClientAnchor>();
|
||||
std::vector<ODRAW::OfficeArtFOPTEPtr> options = pContainer->ExtractOptions();
|
||||
|
||||
ChildAnchor* pAnchor = pContainer->FirstChildWithType<ChildAnchor>();
|
||||
ClientAnchor* clientAnchor = pContainer->FirstChildWithType<ClientAnchor>();
|
||||
|
||||
WriteBeginShapeNode (pShape);
|
||||
|
||||
@ -267,20 +256,20 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
EmuValue ShadowOffsetX;
|
||||
EmuValue ShadowOffsetY;
|
||||
EmuValue SecondShadowOffsetX;
|
||||
EmuValue SecondShadowOffsetY;
|
||||
EmuValue ViewPointX;
|
||||
EmuValue ViewPointY;
|
||||
EmuValue ViewPointZ;
|
||||
boost::optional<EmuValue> ShadowOffsetX;
|
||||
boost::optional<EmuValue> ShadowOffsetY;
|
||||
boost::optional<EmuValue> SecondShadowOffsetX;
|
||||
boost::optional<EmuValue> SecondShadowOffsetY;
|
||||
boost::optional<EmuValue> ViewPointX;
|
||||
boost::optional<EmuValue> ViewPointY;
|
||||
boost::optional<EmuValue> ViewPointZ;
|
||||
|
||||
double viewPointOriginX = 0;
|
||||
double viewPointOriginY = 0;
|
||||
double ShadowOriginX = 0;
|
||||
double ShadowOriginY = 0;
|
||||
unsigned int xCoord = 0;
|
||||
unsigned int yCoord = 0;
|
||||
boost::optional<double> viewPointOriginX;
|
||||
boost::optional<double> viewPointOriginY;
|
||||
boost::optional<double> ShadowOriginX;
|
||||
boost::optional<double> ShadowOriginY;
|
||||
boost::optional<unsigned int> xCoord;
|
||||
boost::optional<unsigned int> yCoord;
|
||||
|
||||
bool bStroked = true;
|
||||
bool bFilled = true;
|
||||
@ -301,36 +290,34 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring sTextboxStyle;
|
||||
|
||||
OptionEntryPtr opSegmentInfo;
|
||||
OptionEntryPtr opVerticles;
|
||||
OptionEntryPtr opInscribe;
|
||||
OptionEntryPtr opConnectAngles;
|
||||
OptionEntryPtr opConnectLocs;
|
||||
|
||||
ThreeDStyleBooleanProperties threeDStyleProps_(0);
|
||||
ODRAW::OfficeArtFOPTEPtr opSegmentInfo;
|
||||
ODRAW::OfficeArtFOPTEPtr opVerticles;
|
||||
ODRAW::OfficeArtFOPTEPtr opInscribe;
|
||||
ODRAW::OfficeArtFOPTEPtr opConnectAngles;
|
||||
ODRAW::OfficeArtFOPTEPtr opConnectLocs;
|
||||
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
OptionEntryPtr & iter = options[i];
|
||||
switch (iter->pid)
|
||||
ODRAW::OfficeArtFOPTEPtr & iter = options[i];
|
||||
switch (iter->opid)
|
||||
{
|
||||
//BOOLEANS
|
||||
case geometryBooleans:
|
||||
{
|
||||
GeometryBooleanProperties booleans(iter->op);
|
||||
if (booleans.fUsefLineOK && !booleans.fLineOK)
|
||||
ODRAW::GeometryBooleanProperties *booleans = dynamic_cast<ODRAW::GeometryBooleanProperties*>(iter.get());
|
||||
if (booleans->fUsefLineOK && !booleans->fLineOK)
|
||||
{
|
||||
bStroked = false;
|
||||
}
|
||||
if (booleans.fUsefFillOK && !booleans.fFillOK)
|
||||
if (booleans->fUsefFillOK && !booleans->fFillOK)
|
||||
{
|
||||
bFilled = false;
|
||||
}
|
||||
if (booleans.fUsef3DOK && booleans.f3DOK)
|
||||
if (booleans->fUsef3DOK && booleans->f3DOK)
|
||||
{
|
||||
b3D = true;
|
||||
}
|
||||
if (booleans.fUsefShadowOK && booleans.fShadowOK)
|
||||
if (booleans->fUsefShadowOK && booleans->fShadowOK)
|
||||
{
|
||||
bShadow = true;
|
||||
}
|
||||
@ -338,21 +325,21 @@ namespace DocFileFormat
|
||||
break;
|
||||
case fillStyleBooleanProperties:
|
||||
{
|
||||
FillStyleBooleanProperties booleans(iter->op);
|
||||
if (booleans.fUsefFilled && !booleans.fFilled)
|
||||
ODRAW::FillStyleBooleanProperties *booleans = dynamic_cast<ODRAW::FillStyleBooleanProperties *>(iter.get());
|
||||
if (booleans->fUsefFilled && !booleans->fFilled)
|
||||
{
|
||||
bFilled = false;
|
||||
}
|
||||
|
||||
if (booleans.fUsefUseShapeAnchor && booleans.fUseShapeAnchor)
|
||||
if (booleans->fUsefUseShapeAnchor && booleans->fUseShapeAnchor)
|
||||
{
|
||||
appendValueAttribute(&m_fill, L"rotate", L"t");
|
||||
}
|
||||
}break;
|
||||
case lineStyleBooleans:
|
||||
{
|
||||
LineStyleBooleanProperties booleans(iter->op);
|
||||
if (booleans.fUsefLine && !booleans.fLine)
|
||||
ODRAW::LineStyleBooleanProperties *booleans = dynamic_cast<ODRAW::LineStyleBooleanProperties *>(iter.get());
|
||||
if (booleans->fUsefLine && !booleans->fLine)
|
||||
{
|
||||
bStroked = false;
|
||||
}
|
||||
@ -360,20 +347,19 @@ namespace DocFileFormat
|
||||
break;
|
||||
case protectionBooleans:
|
||||
{
|
||||
ProtectionBooleanProperties booleans(iter->op);
|
||||
//ProtectionBooleanProperties booleans(iter->op);
|
||||
}
|
||||
break;
|
||||
case diagramBooleans:
|
||||
{
|
||||
DiagramBooleanProperties booleans(iter->op);
|
||||
}
|
||||
break;
|
||||
case groupShapeBooleans:
|
||||
{
|
||||
GroupShapeBooleanProperties booleans(iter->op);
|
||||
if (booleans.fUsefLayoutInCell)
|
||||
ODRAW::GroupShapeBooleanProperties *booleans = dynamic_cast<ODRAW::GroupShapeBooleanProperties *>(iter.get());
|
||||
if (booleans->fUsefLayoutInCell)
|
||||
{
|
||||
layoutInCell = booleans.fLayoutInCell;
|
||||
layoutInCell = booleans->fLayoutInCell;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -541,8 +527,8 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case fillAngle:
|
||||
{
|
||||
FixedPointNumber fllAngl( iter->op );
|
||||
appendValueAttribute(&m_fill, L"angle", FormatUtils::DoubleToWideString( fllAngl.ToAngle() ));
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) appendValueAttribute(&m_fill, L"angle", FormatUtils::DoubleToWideString( point->dVal ));
|
||||
}break;
|
||||
case fillShadeType:
|
||||
{
|
||||
@ -550,7 +536,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case fillShadeColors:
|
||||
{
|
||||
appendValueAttribute(&m_fill, L"colors", getFillColorString( iter->opComplex.get(), iter->op ));
|
||||
appendValueAttribute(&m_fill, L"colors", getFillColorString( iter ));
|
||||
}break;
|
||||
case fillFocus:
|
||||
{
|
||||
@ -582,11 +568,11 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case fillBlipName:
|
||||
{
|
||||
std::wstring name;
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex.get(), iter->op, ENCODING_UTF16);
|
||||
if (!name.empty())
|
||||
appendValueAttribute(&m_fill, L"o:title", FormatUtils::XmlEncode(name));
|
||||
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
appendValueAttribute(&m_fill, L"o:title", FormatUtils::XmlEncode(str->string_));
|
||||
}
|
||||
}break;
|
||||
case fillOpacity:
|
||||
{
|
||||
@ -640,7 +626,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case shadowStyleBooleanProperties:
|
||||
{
|
||||
ShadowStyleBooleanProperties props(iter->op);
|
||||
//ODRAW::ShadowStyleBooleanProperties
|
||||
|
||||
}break;
|
||||
// OLE
|
||||
@ -664,21 +650,23 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case pibName:
|
||||
{
|
||||
std::wstring name;
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex.get(), iter->op, ENCODING_UTF16);
|
||||
if (!name.empty())
|
||||
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(name));
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(str->string_));
|
||||
}
|
||||
}break;
|
||||
// 3D STYLE
|
||||
case threeDStyleBooleanProperties:
|
||||
{
|
||||
threeDStyleProps_ = ThreeDStyleBooleanProperties(iter->op);
|
||||
ODRAW::ThreeDStyleBooleanProperties* booleans = dynamic_cast<ODRAW::ThreeDStyleBooleanProperties*>(iter.get());
|
||||
}break;
|
||||
case threeDObjectBooleanProperties:
|
||||
{
|
||||
ThreeDObjectBooleanProperties booleans(iter->op);
|
||||
ODRAW::ThreeDObjectBooleanProperties* booleans = dynamic_cast<ODRAW::ThreeDObjectBooleanProperties*>(iter.get());
|
||||
|
||||
if (booleans.fUsef3D && !booleans.f3D) b3D = false;
|
||||
if (booleans->fUsef3D && !booleans->f3D)
|
||||
b3D = false;
|
||||
}break;
|
||||
case c3DRenderMode:
|
||||
{
|
||||
@ -715,37 +703,34 @@ namespace DocFileFormat
|
||||
appendValueAttribute(&m_3dstyle, L"color", color);
|
||||
}break;
|
||||
case c3DSkewAngle:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
FixedPointNumber skewAngle( iter->op );
|
||||
appendValueAttribute(&m_3dstyle, L"skewangle", FormatUtils::DoubleToWideString( skewAngle.ToAngle() ));
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) appendValueAttribute(&m_3dstyle, L"skewangle", FormatUtils::DoubleToWideString( point->dVal ));
|
||||
}break;
|
||||
case c3DXViewpoint:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && !threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
ViewPointX = EmuValue( FixedPointNumber( iter->op ).Integral );
|
||||
}break;
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) ViewPointX = EmuValue( (int)point->dVal );
|
||||
}break;
|
||||
case c3DYViewpoint:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && !threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
ViewPointY = EmuValue( FixedPointNumber( iter->op ).Integral );
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) ViewPointY = EmuValue( (int)point->dVal );
|
||||
}break;
|
||||
case c3DZViewpoint:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && !threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
ViewPointZ = EmuValue( FixedPointNumber( iter->op ).Integral );
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) ViewPointZ = EmuValue( (int)point->dVal );
|
||||
}break;
|
||||
case c3DOriginX:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && !threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
FixedPointNumber dOriginX( iter->op );
|
||||
viewPointOriginX = ( dOriginX.Integral / 65536.0 );
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) viewPointOriginX = point->dVal;
|
||||
}break;
|
||||
case c3DOriginY:
|
||||
if (threeDStyleProps_.fUsefc3DParallel && !threeDStyleProps_.fc3DParallel)
|
||||
{
|
||||
FixedPointNumber dOriginY( iter->op );
|
||||
viewPointOriginY = (dOriginY.Integral / 65536.0 );
|
||||
ODRAW::FixedPoint* point = dynamic_cast<ODRAW::FixedPoint*>(iter.get());
|
||||
if (point) viewPointOriginY = point->dVal;
|
||||
}break;
|
||||
// TEXTBOX
|
||||
case lTxid:
|
||||
@ -777,30 +762,35 @@ namespace DocFileFormat
|
||||
// Word Art
|
||||
case gtextUNICODE:
|
||||
{
|
||||
std::wstring text = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex.get(), (iter->op)/2);
|
||||
|
||||
text = FormatUtils::XmlEncode(text);
|
||||
|
||||
if (std::wstring::npos != text.find(L"\n"))
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
m_textpath.AppendText(text);
|
||||
std::wstring text = FormatUtils::XmlEncode(str->string_);
|
||||
if (std::wstring::npos != text.find(L"\n"))
|
||||
{
|
||||
m_textpath.AppendText(text);
|
||||
}
|
||||
text = ReplaceString(text, L"\n", L"
");
|
||||
appendValueAttribute(&m_textpath, L"string", text);
|
||||
}
|
||||
text = ReplaceString(text, L"\n", L"
");
|
||||
appendValueAttribute(&m_textpath, L"string", text);
|
||||
}break;
|
||||
case gtextFont:
|
||||
{
|
||||
std::wstring font = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex.get(), (iter->op)/2);
|
||||
size_t i = font.size();
|
||||
while (i > 0)
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
if (font[i-1] != 0) break;
|
||||
i--;
|
||||
}
|
||||
if (i < font.size()) font.erase(font.begin() + i, font.end());
|
||||
std::wstring font = str->string_;
|
||||
size_t i = font.size();
|
||||
while (i > 0)
|
||||
{
|
||||
if (font[i-1] != 0) break;
|
||||
i--;
|
||||
}
|
||||
if (i < font.size()) font.erase(font.begin() + i, font.end());
|
||||
|
||||
font = std::wstring(L"\"") + font + std::wstring(L"\"");
|
||||
appendStyleProperty(&m_textPathStyle, L"font-family", font);
|
||||
font = std::wstring(L"\"") + font + std::wstring(L"\"");
|
||||
appendStyleProperty(&m_textPathStyle, L"font-family", font);
|
||||
}
|
||||
}break;
|
||||
case gtextSize:
|
||||
{
|
||||
@ -814,29 +804,29 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case geometryTextBooleanProperties:
|
||||
{
|
||||
GeometryTextBooleanProperties props(iter->op);
|
||||
if (props.fUsegtextFBestFit && props.gtextFBestFit)
|
||||
ODRAW::GeometryTextBooleanProperties *props = dynamic_cast<ODRAW::GeometryTextBooleanProperties*>(iter.get());
|
||||
if (props->fUsegFBestFit && props->fBestFit)
|
||||
{
|
||||
appendValueAttribute(&m_textpath, L"fitshape", L"t");
|
||||
}
|
||||
if (props.fUsegtextFShrinkFit && props.gtextFShrinkFit)
|
||||
if (props->fUsegFShrinkFit && props->fShrinkFit)
|
||||
{
|
||||
appendValueAttribute(&m_textpath, L"trim", L"t");
|
||||
}
|
||||
if (props.fUsegtextFVertical && props.gtextFVertical)
|
||||
if (props->fUsegFVertical && props->fVertical)
|
||||
{
|
||||
appendStyleProperty(&m_textPathStyle, L"v-rotate-letters", L"t");
|
||||
//_twistDimension = true;
|
||||
}
|
||||
if (props.fUsegtextFKern && props.gtextFKern)
|
||||
if (props->fUsegFKern && props->fKern)
|
||||
{
|
||||
appendStyleProperty(&m_textPathStyle, L"v-text-kern", L"t");
|
||||
}
|
||||
if (props.fUsegtextFItalic && props.gtextFItalic)
|
||||
if (props->fUsegFItalic && props->fItalic)
|
||||
{
|
||||
appendStyleProperty(&m_textPathStyle, L"font-style", L"italic");
|
||||
}
|
||||
if (props.fUsegtextFBold && props.gtextFBold)
|
||||
if (props->fUsegFBold && props->fBold)
|
||||
{
|
||||
appendStyleProperty(&m_textPathStyle, L"font-weight", L"bold");
|
||||
}
|
||||
@ -848,20 +838,17 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
if (opVerticles && opSegmentInfo)
|
||||
{
|
||||
const unsigned char* pVP = opVerticles->opComplex.get();
|
||||
unsigned int nVP = opVerticles->op;
|
||||
const unsigned char* pSI = opSegmentInfo->opComplex.get();
|
||||
unsigned int nSI = opSegmentInfo->op;
|
||||
|
||||
PathParser oParser (pSI, nSI, pVP, nVP, m_arrGuides);
|
||||
std::wstring path = oParser.GetVmlPath();
|
||||
ODRAW::PVertices* pVP = dynamic_cast<ODRAW::PVertices*>(opVerticles.get());
|
||||
ODRAW::PSegmentInfo* pSI = dynamic_cast<ODRAW::PSegmentInfo*>(opSegmentInfo.get());
|
||||
if (pVP && pSI)
|
||||
{
|
||||
ODRAW::PathParser oParser (pSI->complex.data, pVP->complex.data, m_arrGuides);
|
||||
std::wstring path = oParser.GetVmlPath();
|
||||
|
||||
if (false == path.empty())
|
||||
m_pXmlWriter->WriteAttribute (L"path", path);
|
||||
}
|
||||
if (freeform && (xCoord == 0 || yCoord == 0 ))
|
||||
if (freeform && (!xCoord || !yCoord ))
|
||||
{
|
||||
xCoord = 21600;
|
||||
yCoord = 21600;
|
||||
@ -881,9 +868,9 @@ namespace DocFileFormat
|
||||
m_pXmlWriter->WriteAttribute(L"o:allowincell", L"f");
|
||||
}
|
||||
|
||||
if ( xCoord > 0 && yCoord > 0 )
|
||||
if ( xCoord && yCoord )
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( xCoord ) + L"," + FormatUtils::IntToWideString( yCoord ) ));
|
||||
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( *xCoord ) + L"," + FormatUtils::IntToWideString( *yCoord ) ));
|
||||
}
|
||||
|
||||
int nCode = 0;
|
||||
@ -917,15 +904,15 @@ namespace DocFileFormat
|
||||
//build shadow offsets
|
||||
std::wstring offset;
|
||||
|
||||
if ( ShadowOffsetX != 0 )
|
||||
if ( ShadowOffsetX)
|
||||
{
|
||||
offset += FormatUtils::DoubleToWideString( ShadowOffsetX.ToPoints() );
|
||||
offset += FormatUtils::DoubleToWideString( ShadowOffsetX->ToPoints() );
|
||||
offset += L"pt";
|
||||
}
|
||||
if ( ShadowOffsetY != 0 )
|
||||
if ( ShadowOffsetY )
|
||||
{
|
||||
offset += L",";
|
||||
offset += FormatUtils::DoubleToWideString( ShadowOffsetY.ToPoints() );
|
||||
offset += FormatUtils::DoubleToWideString( ShadowOffsetY->ToPoints() );
|
||||
offset += L"pt";
|
||||
}
|
||||
if ( !offset.empty() )
|
||||
@ -935,16 +922,16 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring offset2;
|
||||
|
||||
if ( SecondShadowOffsetX != 0 )
|
||||
if ( SecondShadowOffsetX)
|
||||
{
|
||||
offset2 += FormatUtils::DoubleToWideString( SecondShadowOffsetX.ToPoints() );
|
||||
offset2 += FormatUtils::DoubleToWideString( SecondShadowOffsetX->ToPoints() );
|
||||
offset2 += L"pt";
|
||||
}
|
||||
|
||||
if ( SecondShadowOffsetY != 0 )
|
||||
if ( SecondShadowOffsetY)
|
||||
{
|
||||
offset2 += L",";
|
||||
offset2 += FormatUtils::DoubleToWideString(SecondShadowOffsetY.ToPoints());
|
||||
offset2 += FormatUtils::DoubleToWideString(SecondShadowOffsetY->ToPoints());
|
||||
offset2 += L"pt";
|
||||
}
|
||||
|
||||
@ -954,9 +941,9 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//build shadow origin
|
||||
if ( ( ShadowOriginX != 0 ) && ( ShadowOriginY != 0 ) )
|
||||
if ( ShadowOriginX && ShadowOriginY)
|
||||
{
|
||||
appendValueAttribute(&m_shadow, L"origin", (FormatUtils::DoubleToWideString(shadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(shadowOriginY)));
|
||||
appendValueAttribute(&m_shadow, L"origin", FormatUtils::DoubleToWideString(*ShadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(*ShadowOriginY));
|
||||
}
|
||||
|
||||
// write shadow
|
||||
@ -967,41 +954,41 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//write the viewpoint
|
||||
if ( ( ViewPointX != 0 ) || ( ViewPointY != 0 ) || ( ViewPointZ != 0 ) )
|
||||
if ( ViewPointX || ViewPointY || ViewPointZ )
|
||||
{
|
||||
std::wstring viewPoint;
|
||||
|
||||
if ( ViewPointX != 0 )
|
||||
if ( ViewPointX )
|
||||
{
|
||||
viewPoint += FormatUtils::IntToWideString( ViewPointX ) + L"pt";
|
||||
viewPoint += FormatUtils::IntToWideString( *ViewPointX ) + L"pt";
|
||||
}
|
||||
viewPoint += L",";
|
||||
if ( ViewPointY != 0 )
|
||||
if ( ViewPointY)
|
||||
{
|
||||
viewPoint += FormatUtils::IntToWideString( ViewPointY ) + L"pt";
|
||||
viewPoint += FormatUtils::IntToWideString( *ViewPointY ) + L"pt";
|
||||
}
|
||||
viewPoint += L",";
|
||||
if ( ViewPointZ != 0 )
|
||||
if ( ViewPointZ)
|
||||
{
|
||||
viewPoint += FormatUtils::IntToWideString( ViewPointZ ) + L"pt";
|
||||
viewPoint += FormatUtils::IntToWideString( *ViewPointZ ) + L"pt";
|
||||
}
|
||||
|
||||
appendValueAttribute(&m_3dstyle, L"viewpoint", viewPoint);
|
||||
}
|
||||
// write the viewpointorigin
|
||||
if ( ( viewPointOriginX != 0 ) || ( viewPointOriginY != 0 ) )
|
||||
if ( viewPointOriginX || viewPointOriginY)
|
||||
{
|
||||
std::wstring viewPointOrigin;
|
||||
|
||||
if ( viewPointOriginX != 0 )
|
||||
if ( viewPointOriginX )
|
||||
{
|
||||
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginX, L"%.2f" );
|
||||
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( *viewPointOriginX, L"%.2f" );
|
||||
}
|
||||
|
||||
if ( viewPointOriginY != 0 )
|
||||
if ( viewPointOriginY )
|
||||
{
|
||||
viewPointOrigin += L",";
|
||||
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginY, L"%.2f" );
|
||||
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( *viewPointOriginY, L"%.2f" );
|
||||
}
|
||||
|
||||
appendValueAttribute(&m_3dstyle, L"viewpointorigin", viewPointOrigin);
|
||||
@ -1272,37 +1259,23 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
/// Build the VML wrapcoords string for a given pWrapPolygonVertices
|
||||
std::wstring VMLShapeMapping::GetWrapCoords(const OptionEntryPtr& pWrapPolygonVertices) const
|
||||
std::wstring VMLShapeMapping::GetWrapCoords(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
ODRAW::PWrapPolygonVertices* pWrapPolygonVertices = dynamic_cast<ODRAW::PWrapPolygonVertices*>(pOpt.get());
|
||||
if (!pWrapPolygonVertices) return L"";
|
||||
|
||||
std::wstring coords;
|
||||
|
||||
MemoryStream oStream(pWrapPolygonVertices->opComplex.get(), pWrapPolygonVertices->op);
|
||||
std::list<int> arrVertices;
|
||||
|
||||
unsigned short nElems = oStream.ReadUInt16();
|
||||
unsigned short nElemsAlloc = oStream.ReadUInt16();
|
||||
unsigned short cbElem = oStream.ReadUInt16();
|
||||
|
||||
if ( ( nElems > 0 ) && ( cbElem > 0 ) && ( nElems <= nElemsAlloc ) )
|
||||
for (size_t i = 0; i < pWrapPolygonVertices->complex.data.size(); ++i)
|
||||
{
|
||||
//!!!TODO: read the Int32 coordinates!!!
|
||||
while (oStream.GetPosition() < oStream.GetSize())
|
||||
{
|
||||
arrVertices.push_back(oStream.ReadInt32());
|
||||
}
|
||||
|
||||
std::list<int>::const_iterator end = arrVertices.end();
|
||||
for (std::list<int>::const_iterator iter = arrVertices.begin(); iter != end; ++iter)
|
||||
{
|
||||
coords += FormatUtils::IntToWideString(*iter);
|
||||
coords += L",";
|
||||
}
|
||||
|
||||
coords.erase(coords.size() - 1);
|
||||
coords += FormatUtils::IntToWideString(pWrapPolygonVertices->complex.data[i++].x);
|
||||
coords += L",";
|
||||
coords += FormatUtils::IntToWideString(pWrapPolygonVertices->complex.data[i].y);
|
||||
coords += L",";
|
||||
}
|
||||
|
||||
coords.erase(coords.size() - 1);
|
||||
|
||||
return coords;
|
||||
}
|
||||
|
||||
@ -1594,7 +1567,7 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
void VMLShapeMapping::AppendOptionsToStyle (std::wstring* oStyle, const std::vector<OptionEntryPtr>& options, int zIndex) const
|
||||
void VMLShapeMapping::AppendOptionsToStyle (std::wstring* oStyle, const std::vector<ODRAW::OfficeArtFOPTEPtr>& options, int zIndex) const
|
||||
{
|
||||
bool bRelH = false;
|
||||
bool bRelV = false;
|
||||
@ -1606,8 +1579,8 @@ namespace DocFileFormat
|
||||
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
const OptionEntryPtr & iter = options[i];
|
||||
switch (iter->pid)
|
||||
const ODRAW::OfficeArtFOPTEPtr & iter = options[i];
|
||||
switch (iter->opid)
|
||||
{
|
||||
// POSITIONING
|
||||
case posh:
|
||||
@ -1633,9 +1606,9 @@ namespace DocFileFormat
|
||||
// BOOLEANS
|
||||
case groupShapeBooleans:
|
||||
{
|
||||
GroupShapeBooleanProperties groupShapeBooleans(iter->op);
|
||||
ODRAW::GroupShapeBooleanProperties* booleans = dynamic_cast<ODRAW::GroupShapeBooleanProperties*>(iter.get());
|
||||
|
||||
if (groupShapeBooleans.fUsefBehindDocument && groupShapeBooleans.fBehindDocument && !bZIndex)
|
||||
if (booleans->fUsefBehindDocument && booleans->fBehindDocument && !bZIndex)
|
||||
{
|
||||
//The shape is behind the text, so the z-index must be negative.
|
||||
appendStyleProperty(oStyle, L"z-index", L"-1" );
|
||||
@ -1647,7 +1620,7 @@ namespace DocFileFormat
|
||||
bZIndex = true;
|
||||
}
|
||||
|
||||
if (groupShapeBooleans.fHidden && groupShapeBooleans.fUsefHidden)
|
||||
if (booleans->fHidden && booleans->fUsefHidden)
|
||||
{
|
||||
appendStyleProperty(oStyle, L"visibility", L"hidden" );
|
||||
}
|
||||
@ -1714,7 +1687,7 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//
|
||||
std::wstring VMLShapeMapping::buildStyle (const Shape* shape, const ChildAnchor* anchor, const std::vector<OptionEntryPtr>& options, int zIndex) const
|
||||
std::wstring VMLShapeMapping::buildStyle (const Shape* shape, const ChildAnchor* anchor, const std::vector<ODRAW::OfficeArtFOPTEPtr>& options, int zIndex) const
|
||||
{
|
||||
std::wstring style;
|
||||
|
||||
@ -1722,19 +1695,19 @@ namespace DocFileFormat
|
||||
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
const OptionEntryPtr & iter = options[i];
|
||||
const ODRAW::OfficeArtFOPTEPtr & iter = options[i];
|
||||
|
||||
if (geometryTextBooleanProperties == iter->pid)
|
||||
if (geometryTextBooleanProperties == iter->opid)
|
||||
{
|
||||
GeometryTextBooleanProperties props(iter->op);
|
||||
ODRAW::GeometryTextBooleanProperties* booleans = dynamic_cast<ODRAW::GeometryTextBooleanProperties*>(iter.get());
|
||||
|
||||
if (props.fUsegtextFVertical && props.gtextFVertical)
|
||||
if (booleans->fUsegFVertical && booleans->fVertical)
|
||||
{
|
||||
twistDimensions = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (PropertyId_rotation == iter->pid)
|
||||
else if (PropertyId_rotation == iter->opid)
|
||||
{
|
||||
double dAngle = (double)((int)iter->op) / 65535.0;
|
||||
|
||||
@ -1867,29 +1840,18 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring VMLShapeMapping::getFillColorString(const unsigned char* p, unsigned int size) const
|
||||
std::wstring VMLShapeMapping::getFillColorString(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
ODRAW::FillShadeColors* pColors = dynamic_cast<ODRAW::FillShadeColors*>(pOpt.get());
|
||||
if (!pColors) return L"";
|
||||
|
||||
std::wstring result;
|
||||
|
||||
if ( ( p != NULL ) && ( size > 0 ) )
|
||||
for (size_t i = 0; i < pColors->complex.data.size(); ++i)
|
||||
{
|
||||
// parse the IMsoArray
|
||||
unsigned short nElems = FormatUtils::BytesToUInt16(p, 0, size);
|
||||
unsigned short nElemsAlloc = FormatUtils::BytesToUInt16(p, 2, size);
|
||||
unsigned short cb = FormatUtils::BytesToUInt16(p, 4, size);
|
||||
|
||||
for ( unsigned short i = 0; i < nElems; i++ )
|
||||
{
|
||||
int pos = ( 6 + ( i * cb ) );
|
||||
|
||||
RGBColor color(FormatUtils::BytesToInt32(p, pos, size ), RedFirst);
|
||||
int colorPos = FormatUtils::BytesToInt32(p, ( pos + 4 ), size);
|
||||
|
||||
result += FormatUtils::IntToWideString(colorPos);
|
||||
result += L"f #";
|
||||
result += color.SixDigitHexCode;
|
||||
result += L";";
|
||||
}
|
||||
result += FormatUtils::IntToWideString((int)pColors->complex.data[i].dPosition);
|
||||
result += L"f #";
|
||||
result += pColors->complex.data[i].color.sColorRGB;
|
||||
result += L";";
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -1959,41 +1921,15 @@ namespace DocFileFormat
|
||||
|
||||
return wrapType;
|
||||
}
|
||||
std::wstring VMLShapeMapping::GetConnectAngles(const OptionEntryPtr& opAngles) const
|
||||
std::wstring VMLShapeMapping::GetConnectAngles(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
if (!opAngles) return L"";
|
||||
if (!opAngles->opComplex) return L"";
|
||||
ODRAW::PConnectionSitesDir* pAngles = dynamic_cast<ODRAW::PConnectionSitesDir*>(pOpt.get());
|
||||
if (!pAngles) return L"";
|
||||
|
||||
MemoryStream reader(opAngles->opComplex.get(), opAngles->op);
|
||||
|
||||
unsigned short nElems = reader.ReadUInt16();
|
||||
unsigned short nElemsAlloc = reader.ReadUInt16();
|
||||
unsigned short nElemSize = reader.ReadUInt16();
|
||||
|
||||
bool bTruncated = false;
|
||||
|
||||
if (0xFFF0 == nElemSize)
|
||||
{
|
||||
nElemSize = 4;
|
||||
bTruncated = true;
|
||||
}
|
||||
|
||||
long dwSize = nElems * nElemSize;
|
||||
|
||||
if (opAngles->op - 6 != (dwSize))
|
||||
{
|
||||
bool b = false;
|
||||
}
|
||||
if (nElemSize < 1) return L"";
|
||||
|
||||
int count = dwSize / nElemSize;
|
||||
|
||||
std::wstring angles;
|
||||
for (int i = 0; i < count; ++i)
|
||||
for (size_t i = 0; i < pAngles->complex.data.size(); ++i)
|
||||
{
|
||||
DWORD v = reader.ReadUInt32();
|
||||
double val = (double)((WORD)(v >> 16) + ((WORD)(v) / 65536.0));
|
||||
angles += std::to_wstring((int)val) + (i < (count - 1) ? L"," : L"");
|
||||
angles += std::to_wstring((int)pAngles->complex.data[i].dVal) + (i < (pAngles->complex.data.size() - 1) ? L"," : L"");
|
||||
}
|
||||
return angles;
|
||||
}
|
||||
@ -2007,180 +1943,74 @@ namespace DocFileFormat
|
||||
|
||||
if (index >= 0 && index < (int)m_arrGuides.size())
|
||||
{
|
||||
new_val = m_arrGuides[index].param3;
|
||||
new_val = m_arrGuides[index].m_param_value3;
|
||||
}
|
||||
|
||||
}
|
||||
return new_val;
|
||||
}
|
||||
void VMLShapeMapping::GetGuides( const OptionEntryPtr& opGuides )
|
||||
void VMLShapeMapping::GetGuides( const ODRAW::OfficeArtFOPTEPtr& pOpt )
|
||||
{
|
||||
if (!opGuides) return;
|
||||
if (!opGuides->opComplex) return;
|
||||
|
||||
MemoryStream reader(opGuides->opComplex.get(), opGuides->op);
|
||||
ODRAW::PGuides* pGuides = dynamic_cast<ODRAW::PGuides*>(pOpt.get());
|
||||
if (!pGuides) return;
|
||||
|
||||
unsigned short nElems = reader.ReadUInt16();
|
||||
unsigned short nElemsAlloc = reader.ReadUInt16();
|
||||
unsigned short nElemSize = reader.ReadUInt16();
|
||||
m_arrGuides = pGuides->complex.data;
|
||||
//for (size_t i = 0; i < pGuides->complex.data.size(); ++i)
|
||||
//{
|
||||
// _guides g;
|
||||
|
||||
bool bTruncated = false;
|
||||
// g.type = pGuides->complex.data[i].type;
|
||||
|
||||
if (0xFFF0 == nElemSize)
|
||||
{
|
||||
nElemSize = 4;
|
||||
bTruncated = true;
|
||||
}
|
||||
if (nElemSize == 0)
|
||||
{
|
||||
nElemSize = 2; //enredobar.doc
|
||||
}
|
||||
long dwSize = nElems * nElemSize;
|
||||
// g.param_type1 = pGuides->complex.data[i].param_type1;
|
||||
// g.param_type2 = pGuides->complex.data[i].param_type2;
|
||||
// g.param_type3 = pGuides->complex.data[i].param_type3;
|
||||
|
||||
if (opGuides->op - 6 != (dwSize))
|
||||
{
|
||||
bool b = false;
|
||||
if (nElems > 0x7fff)
|
||||
{
|
||||
dwSize = (opGuides->op - 6);
|
||||
}
|
||||
}
|
||||
int count = dwSize / nElemSize; //1x (int or short)
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
_guides g;
|
||||
WORD flags = reader.ReadUInt16();
|
||||
// g.param1 = pGuides->complex.data[i].param1;
|
||||
// g.param2 = pGuides->complex.data[i].param2;
|
||||
// g.param3 = pGuides->complex.data[i].param3;
|
||||
|
||||
g.type = flags & 0x1FFF;
|
||||
|
||||
g.param_type1 = (unsigned char)(flags & 0x04);
|
||||
g.param_type2 = (unsigned char)(flags & 0x02);
|
||||
g.param_type3 = (unsigned char)(flags & 0x01);
|
||||
|
||||
g.param1 = reader.ReadUInt16();
|
||||
g.param2 = reader.ReadUInt16();
|
||||
g.param3 = reader.ReadUInt16();
|
||||
|
||||
m_arrGuides.push_back(g);
|
||||
}
|
||||
// m_arrGuides.push_back(g);
|
||||
//}
|
||||
}
|
||||
|
||||
std::wstring VMLShapeMapping::GetConnectLocs( const OptionEntryPtr& opLocs ) const
|
||||
std::wstring VMLShapeMapping::GetConnectLocs( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const
|
||||
{
|
||||
if (!opLocs) return L"";
|
||||
if (!opLocs->opComplex) return L"";
|
||||
ODRAW::PConnectionSites* pConnection = dynamic_cast<ODRAW::PConnectionSites*>(pOpt.get());
|
||||
if (!pConnection) return L"";
|
||||
|
||||
MemoryStream reader(opLocs->opComplex.get(), opLocs->op);
|
||||
|
||||
unsigned short nElems = reader.ReadUInt16();
|
||||
unsigned short nElemsAlloc = reader.ReadUInt16();
|
||||
unsigned short nElemSize = reader.ReadUInt16();
|
||||
|
||||
bool bTruncated = false;
|
||||
|
||||
if (0xFFF0 == nElemSize)
|
||||
{
|
||||
nElemSize = 4;
|
||||
bTruncated = true;
|
||||
}
|
||||
if (nElemSize == 0)
|
||||
{
|
||||
nElemSize = 2; //enredobar.doc
|
||||
}
|
||||
long dwSize = nElems * nElemSize;
|
||||
|
||||
if (opLocs->op - 6 != (dwSize))
|
||||
{
|
||||
bool b = false;
|
||||
if (nElems > 0x7fff)
|
||||
{
|
||||
dwSize = (opLocs->op - 6);
|
||||
}
|
||||
}
|
||||
int count = dwSize / nElemSize; //2x (int or short)
|
||||
|
||||
std::wstring locs;
|
||||
for (int i = 0; i < count; ++i)
|
||||
for (size_t i = 0; i < pConnection->complex.data.size(); ++i)
|
||||
{
|
||||
POINT pt;
|
||||
|
||||
if (bTruncated)
|
||||
{
|
||||
pt.x = reader.ReadInt16();
|
||||
pt.y = reader.ReadInt16();
|
||||
}
|
||||
else
|
||||
{
|
||||
pt.x = reader.ReadInt32();
|
||||
pt.y = reader.ReadInt32();
|
||||
}
|
||||
|
||||
pt.x = UpdateFromGuides(pt.x);
|
||||
pt.y = UpdateFromGuides(pt.y);
|
||||
pt.x = UpdateFromGuides(pConnection->complex.data[i].x);
|
||||
pt.y = UpdateFromGuides(pConnection->complex.data[i].y);
|
||||
|
||||
locs += std::to_wstring(pt.x) + L"," + std::to_wstring(pt.y) + (i < (count - 1) ? L";" : L"");
|
||||
locs += std::to_wstring(pt.x) + L"," + std::to_wstring(pt.y) + (i < (pConnection->complex.data.size() - 1) ? L";" : L"");
|
||||
}
|
||||
|
||||
return locs;
|
||||
}
|
||||
|
||||
std::vector<std::wstring> VMLShapeMapping::GetTextRectangles( const OptionEntryPtr& opInscribe ) const
|
||||
std::vector<std::wstring> VMLShapeMapping::GetTextRectangles( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const
|
||||
{
|
||||
std::vector<std::wstring> rectangles;
|
||||
|
||||
if (!opInscribe) return rectangles;
|
||||
if (!opInscribe->opComplex) return rectangles;
|
||||
|
||||
MemoryStream reader(opInscribe->opComplex.get(), opInscribe->op);
|
||||
|
||||
unsigned short nElems = reader.ReadUInt16();
|
||||
unsigned short nElemsAlloc = reader.ReadUInt16();
|
||||
unsigned short nElemSize = reader.ReadUInt16();
|
||||
|
||||
bool bTruncated = false;
|
||||
|
||||
if (0xFFF0 == nElemSize)
|
||||
{
|
||||
nElemSize = 4;
|
||||
bTruncated = true;
|
||||
}
|
||||
else nElemSize = 2;
|
||||
|
||||
long dwSize = nElems * nElemSize;
|
||||
|
||||
if (opInscribe->op - 6 != (dwSize))
|
||||
{
|
||||
bool b = false;
|
||||
}
|
||||
int count = dwSize / nElemSize; //4x (int or short)
|
||||
ODRAW::PInscribe* pInscribe = dynamic_cast<ODRAW::PInscribe*>(pOpt.get());
|
||||
if (!pInscribe) return rectangles;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
for (size_t i = 0; i < pInscribe->complex.data.size(); ++i)
|
||||
{
|
||||
RECT rc;
|
||||
|
||||
if (bTruncated)
|
||||
{
|
||||
rc.top = reader.ReadInt16();
|
||||
rc.left = reader.ReadInt16();
|
||||
rc.right = reader.ReadInt16();
|
||||
rc.bottom = reader.ReadInt16();
|
||||
}
|
||||
else
|
||||
{
|
||||
rc.top = reader.ReadInt32();
|
||||
rc.left = reader.ReadInt32();
|
||||
rc.right = reader.ReadInt32();
|
||||
rc.bottom = reader.ReadInt32();
|
||||
}
|
||||
rc.top = UpdateFromGuides(rc.top);
|
||||
rc.left = UpdateFromGuides(rc.left);
|
||||
rc.right = UpdateFromGuides(rc.right);
|
||||
rc.bottom = UpdateFromGuides(rc.bottom);
|
||||
rc.top = UpdateFromGuides(pInscribe->complex.data[i].t);
|
||||
rc.left = UpdateFromGuides(pInscribe->complex.data[i].l);
|
||||
rc.right = UpdateFromGuides(pInscribe->complex.data[i].r);
|
||||
rc.bottom = UpdateFromGuides(pInscribe->complex.data[i].b);
|
||||
|
||||
rectangles.push_back( std::to_wstring(rc.top) + L"," + std::to_wstring(rc.left) + L"," +
|
||||
std::to_wstring(rc.right) + L"," + std::to_wstring(rc.bottom));
|
||||
}
|
||||
|
||||
return rectangles;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -48,7 +48,6 @@
|
||||
#include "OfficeDrawing/ChildAnchor.h"
|
||||
#include "OfficeDrawing/ClientAnchor.h"
|
||||
#include "OfficeDrawing/Shapetypes/LineType.h"
|
||||
#include "OfficeDrawing/PathParser.h"
|
||||
#include "OfficeDrawing/MetafilePictBlip.h"
|
||||
#include "OfficeDrawing/BitmapBlip.h"
|
||||
|
||||
@ -90,8 +89,8 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring getTextboxAnchor( unsigned int anchor ) const;
|
||||
|
||||
std::wstring buildStyle ( const Shape* shape, const ChildAnchor* anchor, const std::vector<OptionEntryPtr>& options, int zIndex ) const;
|
||||
void AppendOptionsToStyle ( std::wstring* style, const std::vector<OptionEntryPtr>& options, int zIndex ) const;
|
||||
std::wstring buildStyle ( const Shape* shape, const ChildAnchor* anchor, const std::vector<ODRAW::OfficeArtFOPTEPtr>& options, int zIndex ) const;
|
||||
void AppendOptionsToStyle ( std::wstring* style, const std::vector<ODRAW::OfficeArtFOPTEPtr>& options, int zIndex ) const;
|
||||
|
||||
int UpdateFromGuides(const int val) const;
|
||||
|
||||
@ -100,7 +99,7 @@ namespace DocFileFormat
|
||||
std::wstring getArrowLength ( unsigned int op ) const;
|
||||
std::wstring getArrowWidth ( unsigned int op ) const;
|
||||
std::wstring getFillMethod ( unsigned int p ) const;
|
||||
std::wstring getFillColorString( const unsigned char* p, unsigned int size ) const;
|
||||
std::wstring getFillColorString( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const;
|
||||
|
||||
std::wstring getFillType ( unsigned int p ) const;
|
||||
std::wstring getShadowType ( unsigned int p ) const;
|
||||
@ -114,14 +113,14 @@ namespace DocFileFormat
|
||||
std::wstring GetLineFrom (const ChildAnchor* pAnchor) const;
|
||||
std::wstring GetLineTo (const ChildAnchor* pAnchor) const;
|
||||
|
||||
std::wstring GetWrapCoords ( const OptionEntryPtr& pOpt ) const;
|
||||
std::vector<std::wstring> GetTextRectangles ( const OptionEntryPtr& pOpt ) const;
|
||||
std::wstring GetConnectAngles ( const OptionEntryPtr& pOpt ) const;
|
||||
std::wstring GetConnectLocs ( const OptionEntryPtr& pOpt ) const;
|
||||
void GetGuides ( const OptionEntryPtr& pOpt );
|
||||
std::wstring GetWrapCoords ( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const;
|
||||
std::vector<std::wstring> GetTextRectangles ( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const;
|
||||
std::wstring GetConnectAngles ( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const;
|
||||
std::wstring GetConnectLocs ( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const;
|
||||
void GetGuides ( const ODRAW::OfficeArtFOPTEPtr& pOpt );
|
||||
|
||||
int m_nAdjValues[8];
|
||||
std::vector<_guides> m_arrGuides;
|
||||
std::vector<ODRAW::MSOSG> m_arrGuides;
|
||||
|
||||
bool m_isInlineShape;
|
||||
Spa* m_pSpa;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "VMLShapeTypeMapping.h"
|
||||
#include "OfficeDrawing/Shapetypes/OvalType.h"
|
||||
#include "OfficeDrawing/Shapetypes/WordArtText.h"
|
||||
#include "../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtFOPTE.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -170,8 +171,9 @@ namespace DocFileFormat
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"", true );
|
||||
|
||||
//Lock
|
||||
if ( ( pShape->Lock.fUsefLockAspectRatio ) && ( pShape->Lock.fLockAspectRatio ) )
|
||||
//Lock ???
|
||||
ODRAW::ProtectionBooleanProperties *prot = dynamic_cast<ODRAW::ProtectionBooleanProperties*>(pShape->Lock.get());
|
||||
if ((prot) && (prot->fUsefLockAspectRatio && prot->fLockAspectRatio))
|
||||
{
|
||||
appendValueAttribute( _lock, L"aspectratio", L"t" );
|
||||
}
|
||||
|
||||
@ -88,6 +88,7 @@ namespace DocFileFormat
|
||||
friend class VMLPictureMapping;
|
||||
friend class OpenXmlPackage;
|
||||
friend class TextboxMapping;
|
||||
friend class SettingsMapping;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -208,28 +208,19 @@ HEADERS += \
|
||||
../../DocDocxConverter/OfficeDrawing/ChildAnchor.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ClientAnchor.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ClientData.h \
|
||||
../../DocDocxConverter/OfficeDrawing/DiagramBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/DrawingContainer.h \
|
||||
../../DocDocxConverter/OfficeDrawing/DrawingGroup.h \
|
||||
../../DocDocxConverter/OfficeDrawing/DrawingGroupRecord.h \
|
||||
../../DocDocxConverter/OfficeDrawing/DrawingRecord.h \
|
||||
../../DocDocxConverter/OfficeDrawing/FillStyleBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/GeometryBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/GeometryTextBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/GroupContainer.h \
|
||||
../../DocDocxConverter/OfficeDrawing/GroupShapeBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/GroupShapeRecord.h \
|
||||
../../DocDocxConverter/OfficeDrawing/LineStyleBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/MetafilePictBlip.h \
|
||||
../../DocDocxConverter/OfficeDrawing/OfficeArtClientTextbox.h \
|
||||
../../DocDocxConverter/OfficeDrawing/PathParser.h \
|
||||
../../DocDocxConverter/OfficeDrawing/PathSegment.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ProtectionBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/Record.h \
|
||||
../../DocDocxConverter/OfficeDrawing/RecordFactory.h \
|
||||
../../DocDocxConverter/OfficeDrawing/RegularContainer.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ShadowStyleBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/threeDBooleanProperties.h \
|
||||
../../DocDocxConverter/OfficeDrawing/Shape.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ShapeContainer.h \
|
||||
../../DocDocxConverter/OfficeDrawing/ShapeOptions.h \
|
||||
|
||||
@ -775,10 +775,6 @@
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\ClientData.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\DiagramBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\DrawingContainer.h"
|
||||
>
|
||||
@ -795,34 +791,14 @@
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\DrawingRecord.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\FillStyleBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\GeometryBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\GeometryTextBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\GroupContainer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\GroupShapeBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\GroupShapeRecord.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\LineStyleBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\MetafilePictBlip.h"
|
||||
>
|
||||
@ -831,18 +807,6 @@
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\OfficeArtClientTextbox.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\PathParser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\PathSegment.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\ProtectionBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\Record.cpp"
|
||||
>
|
||||
@ -863,10 +827,6 @@
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\RegularContainer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\ShadowStyleBooleanProperties.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\DocDocxConverter\OfficeDrawing\Shape.h"
|
||||
>
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#define COMMENTS_WRITER
|
||||
|
||||
#include "../../XlsxSerializerCom/Common/Common.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
|
||||
|
||||
namespace Writers
|
||||
{
|
||||
@ -50,21 +51,28 @@ namespace Writers
|
||||
std::wstring m_sComment;
|
||||
std::wstring m_sCommentExt;
|
||||
std::wstring m_sPeople;
|
||||
std::wstring m_sDocumentComment;
|
||||
std::wstring m_sDocumentCommentExt;
|
||||
std::wstring m_sDocumentPeople;
|
||||
|
||||
CommentsWriter(std::wstring sDir) : m_sDir(sDir)
|
||||
{
|
||||
}
|
||||
void setElements(std::wstring& sComment, std::wstring& sCommentExt, std::wstring& sPeople)
|
||||
void setElements(std::wstring& sComment, std::wstring& sCommentExt, std::wstring& sPeople, std::wstring& sDocumentComment, std::wstring& sDocumentCommentExt, std::wstring& sDocumentPeople)
|
||||
{
|
||||
m_sComment = sComment;
|
||||
m_sCommentExt = sCommentExt;
|
||||
m_sPeople = sPeople;
|
||||
m_sDocumentComment = sDocumentComment;
|
||||
m_sDocumentCommentExt = sDocumentCommentExt;
|
||||
m_sDocumentPeople = sDocumentPeople;
|
||||
}
|
||||
void Write()
|
||||
{
|
||||
std::wstring sDir = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR;
|
||||
if(false == m_sComment.empty())
|
||||
{
|
||||
OOX::CPath filePath = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("comments.xml");
|
||||
OOX::CPath filePath = sDir + OOX::FileTypes::Comments.DefaultFileName().GetPath();
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(filePath.GetPath());
|
||||
@ -76,7 +84,7 @@ namespace Writers
|
||||
if(false == m_sCommentExt.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("commentsExtended.xml"));
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::CommentsExt.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_commentExt_Start);
|
||||
oFile.WriteStringUTF8(m_sCommentExt);
|
||||
oFile.WriteStringUTF8(g_string_commentExt_End);
|
||||
@ -85,12 +93,43 @@ namespace Writers
|
||||
if(false == m_sPeople.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("people.xml"));
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::People.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_people_Start);
|
||||
oFile.WriteStringUTF8(m_sPeople);
|
||||
oFile.WriteStringUTF8(g_string_people_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
if(false == m_sDocumentComment.empty())
|
||||
{
|
||||
OOX::CPath filePath = sDir + OOX::FileTypes::DocumentComments.DefaultFileName().GetPath();
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(filePath.GetPath());
|
||||
oFile.WriteStringUTF8(g_string_comment_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentComment);
|
||||
oFile.WriteStringUTF8(g_string_comment_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
if(false == m_sDocumentCommentExt.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_commentExt_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentCommentExt);
|
||||
oFile.WriteStringUTF8(g_string_commentExt_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
if(false == m_sDocumentPeople.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_people_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentPeople);
|
||||
oFile.WriteStringUTF8(g_string_people_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -58,6 +58,11 @@ namespace NSBinPptxRW
|
||||
{
|
||||
class CDrawingConverter;
|
||||
}
|
||||
namespace OOX
|
||||
{
|
||||
class CApp;
|
||||
class CCore;
|
||||
}
|
||||
|
||||
namespace Writers
|
||||
{
|
||||
@ -87,6 +92,8 @@ namespace Writers
|
||||
std::wstring m_sThemePath;
|
||||
int m_nDocPrIndex;
|
||||
BinDocxRW::CComments* m_pComments;
|
||||
OOX::CApp* m_pApp;
|
||||
OOX::CCore* m_pCore;
|
||||
|
||||
FileWriter (std::wstring sDirOutput,std::wstring sFontDir, bool bNoFontDir, int nVersion, bool bSaveChartAsImg, NSBinPptxRW::CDrawingConverter* pDrawingConverter, std::wstring sThemePath)
|
||||
: m_pDrawingConverter(pDrawingConverter), m_sThemePath(sThemePath), m_bSaveChartAsImg(bSaveChartAsImg),
|
||||
@ -105,9 +112,16 @@ namespace Writers
|
||||
m_oWebSettingsWriter (sDirOutput),
|
||||
m_nDocPrIndex(0),
|
||||
m_pComments(NULL),
|
||||
m_oCustomXmlWriter (sDirOutput, pDrawingConverter)
|
||||
m_oCustomXmlWriter (sDirOutput, pDrawingConverter),
|
||||
m_pApp (NULL),
|
||||
m_pCore (NULL)
|
||||
{
|
||||
}
|
||||
~FileWriter()
|
||||
{
|
||||
RELEASEOBJECT(m_pApp);
|
||||
RELEASEOBJECT(m_pCore);
|
||||
}
|
||||
int getNextDocPr()
|
||||
{
|
||||
m_nDocPrIndex++;
|
||||
|
||||
@ -42,15 +42,15 @@ class SectPr
|
||||
{
|
||||
public:
|
||||
std::wstring sHeaderFooterReference;
|
||||
double W;
|
||||
double H;
|
||||
long W;
|
||||
long H;
|
||||
BYTE cOrientation;
|
||||
double Left;
|
||||
double Top;
|
||||
double Right;
|
||||
double Bottom;
|
||||
double Header;
|
||||
double Footer;
|
||||
long Left;
|
||||
long Top;
|
||||
long Right;
|
||||
long Bottom;
|
||||
long Header;
|
||||
long Footer;
|
||||
bool TitlePg;
|
||||
bool EvenAndOddHeaders;
|
||||
BYTE SectionType;
|
||||
@ -61,6 +61,13 @@ public:
|
||||
std::wstring footnotePr;
|
||||
std::wstring endnotePr;
|
||||
|
||||
bool bW;
|
||||
bool bH;
|
||||
bool bOrientation;
|
||||
bool bLeft;
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
bool bHeader;
|
||||
bool bFooter;
|
||||
bool bTitlePg;
|
||||
@ -69,18 +76,16 @@ public:
|
||||
bool bPageNumStart;
|
||||
SectPr()
|
||||
{
|
||||
W = Page_Width;
|
||||
H = Page_Height;
|
||||
cOrientation = orientation_Portrait;
|
||||
Left = 30;
|
||||
Top = 20;
|
||||
Right = 15;
|
||||
Bottom = 20;
|
||||
Header = 12.5;
|
||||
Footer = 12.5;
|
||||
sHeaderFooterReference = _T("");
|
||||
cols = _T("<w:cols w:space=\"708\"/>");
|
||||
|
||||
bW = false;
|
||||
bH = false;
|
||||
bOrientation = false;
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
bRight = false;
|
||||
bBottom = false;
|
||||
bHeader = false;
|
||||
bFooter = false;
|
||||
bTitlePg = false;
|
||||
@ -91,14 +96,6 @@ public:
|
||||
std::wstring Write()
|
||||
{
|
||||
std::wstring sRes = _T("");
|
||||
long nWidth = SerializeCommon::Round(W * g_dKoef_mm_to_twips);
|
||||
long nHeight = SerializeCommon::Round(H * g_dKoef_mm_to_twips);
|
||||
long nMLeft = SerializeCommon::Round(Left * g_dKoef_mm_to_twips);
|
||||
long nMTop = SerializeCommon::Round(Top * g_dKoef_mm_to_twips);
|
||||
long nMRight = SerializeCommon::Round(Right * g_dKoef_mm_to_twips);
|
||||
long nMBottom = SerializeCommon::Round(Bottom * g_dKoef_mm_to_twips);
|
||||
long nMHeader = SerializeCommon::Round(Header * g_dKoef_mm_to_twips);
|
||||
long nMFooter = SerializeCommon::Round(Footer * g_dKoef_mm_to_twips);
|
||||
|
||||
if(!sHeaderFooterReference.empty())
|
||||
sRes += sHeaderFooterReference;
|
||||
@ -120,19 +117,41 @@ public:
|
||||
}
|
||||
sRes += L"<w:type w:val=\"" + sType + L"\"/>";
|
||||
}
|
||||
sRes += L"<w:pgSz w:w=\"" + std::to_wstring(nWidth) + L"\" w:h=\"" + std::to_wstring(nHeight) + L"\"";
|
||||
if(orientation_Portrait != cOrientation)
|
||||
sRes += L" w:orient=\"landscape\"";
|
||||
sRes += L"/>";
|
||||
if((bW && bH) || bOrientation)
|
||||
{
|
||||
sRes += L"<w:pgSz";
|
||||
if(bW && bH)
|
||||
{
|
||||
sRes += L" w:w=\"" + std::to_wstring(W) + L"\" w:h=\"" + std::to_wstring(H) + L"\"";
|
||||
}
|
||||
if(bOrientation)
|
||||
{
|
||||
if(orientation_Portrait != cOrientation)
|
||||
sRes += L" w:orient=\"landscape\"";
|
||||
else
|
||||
sRes += L" w:orient=\"portrait\"";
|
||||
}
|
||||
|
||||
sRes += L"<w:pgMar w:top=\"" + std::to_wstring(nMTop) + L"\" w:right=\"" + std::to_wstring(nMRight) +
|
||||
L"\" w:bottom=\"" + std::to_wstring(nMBottom) + L"\" w:left=\"" + std::to_wstring(nMLeft) + L"\" w:gutter=\"0\"";
|
||||
sRes += L"/>";
|
||||
}
|
||||
|
||||
if(bHeader)
|
||||
sRes += L" w:header=\"" + std::to_wstring(nMHeader) + L"\"";
|
||||
if(bFooter)
|
||||
sRes += L" w:footer=\"" + std::to_wstring(nMFooter) + L"\"";
|
||||
sRes += L"/>";
|
||||
if(bLeft || bTop || bRight || bBottom || bHeader || bFooter)
|
||||
{
|
||||
sRes += L"<w:pgMar";
|
||||
if(bTop)
|
||||
sRes += L" w:top=\"" + std::to_wstring(Top) + L"\"";
|
||||
if(bRight)
|
||||
sRes += L" w:right=\"" + std::to_wstring(Right) + L"\"";
|
||||
if(bBottom)
|
||||
sRes += L" w:bottom=\"" + std::to_wstring(Bottom) + L"\"";
|
||||
if(bLeft)
|
||||
sRes += L" w:left=\"" + std::to_wstring(Left) + L"\"";
|
||||
if(bHeader)
|
||||
sRes += L" w:header=\"" + std::to_wstring(Header) + L"\"";
|
||||
if(bFooter)
|
||||
sRes += L" w:footer=\"" + std::to_wstring(Footer) + L"\"";
|
||||
sRes += L" w:gutter=\"0\"/>";
|
||||
}
|
||||
if(!pgBorders.empty())
|
||||
sRes += pgBorders;
|
||||
|
||||
@ -245,6 +264,7 @@ class Spacing
|
||||
public:
|
||||
bool bLineRule;
|
||||
bool bLine;
|
||||
bool bLineTwips;
|
||||
bool bAfter;
|
||||
bool bBefore;
|
||||
bool bAfterAuto;
|
||||
@ -252,14 +272,16 @@ public:
|
||||
|
||||
BYTE LineRule;
|
||||
double Line;
|
||||
double After;
|
||||
double Before;
|
||||
long LineTwips;
|
||||
long After;
|
||||
long Before;
|
||||
bool AfterAuto;
|
||||
bool BeforeAuto;
|
||||
Spacing()
|
||||
{
|
||||
bLineRule = false;
|
||||
bLine = false;
|
||||
bLineTwips = false;
|
||||
bAfter = false;
|
||||
bBefore = false;
|
||||
bAfterAuto = false;
|
||||
@ -335,10 +357,48 @@ public:
|
||||
sShd += L"<w:shd";
|
||||
if(bValue)
|
||||
{
|
||||
if(shd_Nil == Value)
|
||||
sShd += L" w:val=\"nil\"";
|
||||
else
|
||||
sShd += L" w:val=\"clear\"";
|
||||
switch(Value)
|
||||
{
|
||||
case SimpleTypes::shdClear : sShd += L" w:val=\"clear\""; break;
|
||||
case SimpleTypes::shdDiagCross : sShd += L" w:val=\"diagCross\""; break;
|
||||
case SimpleTypes::shdDiagStripe : sShd += L" w:val=\"diagStripe\""; break;
|
||||
case SimpleTypes::shdHorzCross : sShd += L" w:val=\"horzCross\""; break;
|
||||
case SimpleTypes::shdHorzStripe : sShd += L" w:val=\"horzStripe\""; break;
|
||||
case SimpleTypes::shdNil : sShd += L" w:val=\"nil\""; break;
|
||||
case SimpleTypes::shdPct10 : sShd += L" w:val=\"pct10\""; break;
|
||||
case SimpleTypes::shdPct12 : sShd += L" w:val=\"pct12\""; break;
|
||||
case SimpleTypes::shdPct15 : sShd += L" w:val=\"pct15\""; break;
|
||||
case SimpleTypes::shdPct20 : sShd += L" w:val=\"pct20\""; break;
|
||||
case SimpleTypes::shdPct25 : sShd += L" w:val=\"pct25\""; break;
|
||||
case SimpleTypes::shdPct30 : sShd += L" w:val=\"pct30\""; break;
|
||||
case SimpleTypes::shdPct35 : sShd += L" w:val=\"pct35\""; break;
|
||||
case SimpleTypes::shdPct37 : sShd += L" w:val=\"pct37\""; break;
|
||||
case SimpleTypes::shdPct40 : sShd += L" w:val=\"pct40\""; break;
|
||||
case SimpleTypes::shdPct45 : sShd += L" w:val=\"pct45\""; break;
|
||||
case SimpleTypes::shdPct5 : sShd += L" w:val=\"pct5\""; break;
|
||||
case SimpleTypes::shdPct50 : sShd += L" w:val=\"pct50\""; break;
|
||||
case SimpleTypes::shdPct55 : sShd += L" w:val=\"pct55\""; break;
|
||||
case SimpleTypes::shdPct60 : sShd += L" w:val=\"pct60\""; break;
|
||||
case SimpleTypes::shdPct62 : sShd += L" w:val=\"pct62\""; break;
|
||||
case SimpleTypes::shdPct65 : sShd += L" w:val=\"pct65\""; break;
|
||||
case SimpleTypes::shdPct70 : sShd += L" w:val=\"pct70\""; break;
|
||||
case SimpleTypes::shdPct75 : sShd += L" w:val=\"pct75\""; break;
|
||||
case SimpleTypes::shdPct80 : sShd += L" w:val=\"pct80\""; break;
|
||||
case SimpleTypes::shdPct85 : sShd += L" w:val=\"pct85\""; break;
|
||||
case SimpleTypes::shdPct87 : sShd += L" w:val=\"pct87\""; break;
|
||||
case SimpleTypes::shdPct90 : sShd += L" w:val=\"pct90\""; break;
|
||||
case SimpleTypes::shdPct95 : sShd += L" w:val=\"pct95\""; break;
|
||||
case SimpleTypes::shdReverseDiagStripe : sShd += L" w:val=\"reverseDiagStripe\""; break;
|
||||
case SimpleTypes::shdSolid : sShd += L" w:val=\"solid\""; break;
|
||||
case SimpleTypes::shdThinDiagCross : sShd += L" w:val=\"thinDiagCross\""; break;
|
||||
case SimpleTypes::shdThinDiagStripe : sShd += L" w:val=\"thinDiagStripe\""; break;
|
||||
case SimpleTypes::shdThinHorzCross : sShd += L" w:val=\"thinHorzCross\""; break;
|
||||
case SimpleTypes::shdThinHorzStripe : sShd += L" w:val=\"thinHorzStripe\""; break;
|
||||
case SimpleTypes::shdThinReverseDiagStripe : sShd += L" w:val=\"thinReverseDiagStripe\""; break;
|
||||
case SimpleTypes::shdThinVertStripe : sShd += L" w:val=\"thinVertStripe\""; break;
|
||||
case SimpleTypes::shdVertStripe : sShd += L" w:val=\"vertStripe\""; break;
|
||||
default : sShd += L" w:val=\"solid\""; break;
|
||||
}
|
||||
}
|
||||
sShd += L" w:color=\"auto\"";
|
||||
if(bColor)
|
||||
@ -363,7 +423,7 @@ class Tab
|
||||
{
|
||||
public:
|
||||
BYTE Val;
|
||||
double Pos;
|
||||
long Pos;
|
||||
BYTE Leader;
|
||||
bool bLeader;
|
||||
Tab()
|
||||
@ -397,11 +457,11 @@ public:
|
||||
docRGB HighLight;
|
||||
std::wstring Shd;
|
||||
std::wstring RStyle;
|
||||
double Spacing;
|
||||
long Spacing;
|
||||
bool DStrikeout;
|
||||
bool Caps;
|
||||
bool SmallCaps;
|
||||
double Position;
|
||||
long Position;
|
||||
BYTE FontHint;
|
||||
bool BoldCs;
|
||||
bool ItalicCs;
|
||||
@ -642,13 +702,11 @@ public:
|
||||
}
|
||||
if(bSpacing)
|
||||
{
|
||||
long nSpacing = SerializeCommon::Round( g_dKoef_mm_to_twips * Spacing);
|
||||
pCStringWriter->WriteString(L"<w:spacing w:val=\"" + std::to_wstring(nSpacing) + L"\"/>");
|
||||
pCStringWriter->WriteString(L"<w:spacing w:val=\"" + std::to_wstring(Spacing) + L"\"/>");
|
||||
}
|
||||
if(bPosition)
|
||||
{
|
||||
long nPosition = SerializeCommon::Round( g_dKoef_mm_to_hps * Position);
|
||||
std::wstring sPosition = L"<w:position w:val=\"" + std::to_wstring(nPosition) + L"\"/>";
|
||||
std::wstring sPosition = L"<w:position w:val=\"" + std::to_wstring(Position) + L"\"/>";
|
||||
pCStringWriter->WriteString(sPosition);
|
||||
}
|
||||
if(bFontSize)
|
||||
@ -1001,6 +1059,26 @@ public:
|
||||
};
|
||||
class PaddingsToWrite
|
||||
{
|
||||
public:
|
||||
long Left;
|
||||
long Top;
|
||||
long Right;
|
||||
long Bottom;
|
||||
|
||||
bool bLeft;
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
public: PaddingsToWrite()
|
||||
{
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
bRight = false;
|
||||
bBottom = false;
|
||||
}
|
||||
};
|
||||
class PaddingsToWriteMM
|
||||
{
|
||||
public:
|
||||
double Left;
|
||||
double Top;
|
||||
@ -1011,7 +1089,7 @@ public:
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
public: PaddingsToWrite()
|
||||
public: PaddingsToWriteMM()
|
||||
{
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
@ -1028,7 +1106,7 @@ public:
|
||||
double Y;
|
||||
double Width;
|
||||
double Height;
|
||||
PaddingsToWrite Paddings;
|
||||
PaddingsToWriteMM Paddings;
|
||||
int m_nDocPr;
|
||||
|
||||
bool bMediaId;
|
||||
@ -1167,8 +1245,8 @@ class docBorder
|
||||
{
|
||||
public:
|
||||
docRGB Color;
|
||||
double Space;
|
||||
double Size;
|
||||
long Space;
|
||||
long Size;
|
||||
BYTE Value;
|
||||
CThemeColor ThemeColor;
|
||||
|
||||
@ -1201,13 +1279,11 @@ public:
|
||||
}
|
||||
if(bSize)
|
||||
{
|
||||
long nSize = SerializeCommon::Round(g_dKoef_mm_to_eightpoint * Size);
|
||||
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(nSize) + L"\"");
|
||||
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(Size) + L"\"");
|
||||
}
|
||||
if(bSpace)
|
||||
{
|
||||
long nSpace = SerializeCommon::Round(g_dKoef_mm_to_pt * Space);
|
||||
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(nSpace) + L"\"");
|
||||
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(Space) + L"\"");
|
||||
}
|
||||
if(bThemeColor && ThemeColor.IsNoEmpty())
|
||||
{
|
||||
@ -2074,8 +2150,8 @@ public:
|
||||
class CDrawingPropertyWrapPoint
|
||||
{
|
||||
public:
|
||||
double X;
|
||||
double Y;
|
||||
__int64 X;
|
||||
__int64 Y;
|
||||
|
||||
bool bX;
|
||||
bool bY;
|
||||
@ -2122,29 +2198,29 @@ public:
|
||||
long DataLength;
|
||||
BYTE Type;
|
||||
bool BehindDoc;
|
||||
double DistL;
|
||||
double DistT;
|
||||
double DistR;
|
||||
double DistB;
|
||||
__int64 DistL;
|
||||
__int64 DistT;
|
||||
__int64 DistR;
|
||||
__int64 DistB;
|
||||
bool LayoutInCell;
|
||||
unsigned long RelativeHeight;
|
||||
bool BSimplePos;
|
||||
double EffectExtentL;
|
||||
double EffectExtentT;
|
||||
double EffectExtentR;
|
||||
double EffectExtentB;
|
||||
double Width;
|
||||
double Height;
|
||||
__int64 EffectExtentL;
|
||||
__int64 EffectExtentT;
|
||||
__int64 EffectExtentR;
|
||||
__int64 EffectExtentB;
|
||||
__int64 Width;
|
||||
__int64 Height;
|
||||
BYTE PositionHRelativeFrom;
|
||||
BYTE PositionHAlign;
|
||||
double PositionHPosOffset;
|
||||
double PositionHPctOffset;
|
||||
__int64 PositionHPosOffset;
|
||||
double PositionHPctOffset;
|
||||
BYTE PositionVRelativeFrom;
|
||||
BYTE PositionVAlign;
|
||||
double PositionVPosOffset;
|
||||
__int64 PositionVPosOffset;
|
||||
double PositionVPctOffset;
|
||||
double SimplePosX;
|
||||
double SimplePosY;
|
||||
__int64 SimplePosX;
|
||||
__int64 SimplePosY;
|
||||
std::wstring sChartRels;
|
||||
std::wstring sSizeRelH;
|
||||
std::wstring sSizeRelV;
|
||||
@ -2234,24 +2310,17 @@ public:
|
||||
{
|
||||
if(bWidth && bHeight)
|
||||
{
|
||||
__int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width);
|
||||
__int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height);
|
||||
|
||||
if(false == bChart)
|
||||
sXml += L"<wp:inline xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
|
||||
distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight) + L"\"/>";
|
||||
distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height) + L"\"/>";
|
||||
else
|
||||
sXml += L"<w:drawing><wp:inline distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\">\
|
||||
<wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight) + L"\"/>";
|
||||
<wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height) + L"\"/>";
|
||||
|
||||
if(bEffectExtentL && bEffectExtentT && bEffectExtentR && bEffectExtentB)
|
||||
{
|
||||
__int64 emuEffectExtentL = (__int64)(g_dKoef_mm_to_emu * EffectExtentL);
|
||||
__int64 emuEffectExtentT = (__int64)(g_dKoef_mm_to_emu * EffectExtentT);
|
||||
__int64 emuEffectExtentR = (__int64)(g_dKoef_mm_to_emu * EffectExtentR);
|
||||
__int64 emuEffectExtentB = (__int64)(g_dKoef_mm_to_emu * EffectExtentB);
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(emuEffectExtentL) + L"\" t=\"" + std::to_wstring(emuEffectExtentT) +
|
||||
L"\" r=\"" + std::to_wstring(emuEffectExtentR) + L"\" b=\"" + std::to_wstring(emuEffectExtentB) + L"\"/>";
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(EffectExtentL) + L"\" t=\"" + std::to_wstring(EffectExtentT) +
|
||||
L"\" r=\"" + std::to_wstring(EffectExtentR) + L"\" b=\"" + std::to_wstring(EffectExtentB) + L"\"/>";
|
||||
}
|
||||
|
||||
if(!sDocPr.empty())
|
||||
@ -2293,13 +2362,13 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
__int64 emuDistB = 0;
|
||||
|
||||
if(bDistL)
|
||||
emuDistL = (__int64)(g_dKoef_mm_to_emu * DistL);
|
||||
emuDistL = DistL;
|
||||
if(bDistT)
|
||||
emuDistT = (__int64)(g_dKoef_mm_to_emu * DistT);
|
||||
emuDistT = DistT;
|
||||
if(bDistR)
|
||||
emuDistR = (__int64)(g_dKoef_mm_to_emu * DistR);
|
||||
emuDistR = DistR;
|
||||
if(bDistB)
|
||||
emuDistB = (__int64)(g_dKoef_mm_to_emu * DistB);
|
||||
emuDistB = DistB;
|
||||
int nSimplePos = 0;
|
||||
if(bBSimplePos && BSimplePos)
|
||||
nSimplePos = 1;
|
||||
@ -2328,10 +2397,10 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
|
||||
__int64 emuX = 0;
|
||||
if(bSimplePosX)
|
||||
emuX = (__int64)(g_dKoef_mm_to_emu * SimplePosX);
|
||||
emuX = SimplePosX;
|
||||
__int64 emuY = 0;
|
||||
if(bSimplePosY)
|
||||
emuY = (__int64)(g_dKoef_mm_to_emu * SimplePosY);
|
||||
emuY = SimplePosY;
|
||||
sXml += L"<wp:simplePos x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
|
||||
if(bPositionHRelativeFrom && (bPositionHAlign || bPositionHPosOffset || bPositionHPctOffset))
|
||||
@ -2362,8 +2431,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
else if(bPositionHPosOffset)
|
||||
{
|
||||
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionHPosOffset);
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(emuPosOffset) + L"</wp:posOffset>";
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(PositionHPosOffset) + L"</wp:posOffset>";
|
||||
}
|
||||
else if(bPositionHPctOffset)
|
||||
{
|
||||
@ -2400,8 +2468,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
else if(bPositionVPosOffset)
|
||||
{
|
||||
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionVPosOffset);
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(emuPosOffset) + L"</wp:posOffset>";
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(PositionVPosOffset) + L"</wp:posOffset>";
|
||||
}
|
||||
else if(bPositionVPctOffset)
|
||||
{
|
||||
@ -2410,20 +2477,13 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
sXml += L"<wp:positionV relativeFrom=\"" + sRelativeFrom + L"\">" + sContent + L"</wp:positionV>";
|
||||
}
|
||||
__int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width);
|
||||
__int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height);
|
||||
|
||||
sXml += L"<wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight)+ L"\"/>";
|
||||
sXml += L"<wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height)+ L"\"/>";
|
||||
|
||||
if(bEffectExtentL && bEffectExtentT && bEffectExtentR && bEffectExtentB)
|
||||
{
|
||||
__int64 emuEffectExtentL = (__int64)(g_dKoef_mm_to_emu * EffectExtentL);
|
||||
__int64 emuEffectExtentT = (__int64)(g_dKoef_mm_to_emu * EffectExtentT);
|
||||
__int64 emuEffectExtentR = (__int64)(g_dKoef_mm_to_emu * EffectExtentR);
|
||||
__int64 emuEffectExtentB = (__int64)(g_dKoef_mm_to_emu * EffectExtentB);
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(emuEffectExtentL) +
|
||||
L"\" t=\"" + std::to_wstring(emuEffectExtentT) + L"\" r=\"" + std::to_wstring(emuEffectExtentR) +
|
||||
L"\" b=\"" + std::to_wstring(emuEffectExtentB) + L"\"/>";
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(EffectExtentL) +
|
||||
L"\" t=\"" + std::to_wstring(EffectExtentT) + L"\" r=\"" + std::to_wstring(EffectExtentR) +
|
||||
L"\" b=\"" + std::to_wstring(EffectExtentB) + L"\"/>";
|
||||
}
|
||||
if(bDrawingPropertyWrap && DrawingPropertyWrap.bWrappingType)
|
||||
{
|
||||
@ -2454,9 +2514,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
|
||||
if(DrawingPropertyWrap.bStart && DrawingPropertyWrap.Start.bX && DrawingPropertyWrap.Start.bY)
|
||||
{
|
||||
__int64 emuX = (__int64)(g_dKoef_mm_to_emu * DrawingPropertyWrap.Start.X);
|
||||
__int64 emuY = (__int64)(g_dKoef_mm_to_emu * DrawingPropertyWrap.Start.Y);
|
||||
sXml += L"<wp:start x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
sXml += L"<wp:start x=\"" + std::to_wstring(DrawingPropertyWrap.Start.X) + L"\" y=\"" + std::to_wstring(DrawingPropertyWrap.Start.Y) + L"\"/>";
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < DrawingPropertyWrap.Points.size(); ++i)
|
||||
@ -2464,9 +2522,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
CDrawingPropertyWrapPoint* pWrapPoint = DrawingPropertyWrap.Points[i];
|
||||
if(pWrapPoint->bX && pWrapPoint->bY)
|
||||
{
|
||||
__int64 emuX = (__int64)(g_dKoef_mm_to_emu * pWrapPoint->X);
|
||||
__int64 emuY = (__int64)(g_dKoef_mm_to_emu * pWrapPoint->Y);
|
||||
sXml += L"<wp:lineTo x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
sXml += L"<wp:lineTo x=\"" + std::to_wstring(pWrapPoint->X) + L"\" y=\"" + std::to_wstring(pWrapPoint->Y) + L"\"/>";
|
||||
}
|
||||
}
|
||||
sXml += L"</wp:wrapPolygon>";
|
||||
|
||||
@ -38,6 +38,9 @@
|
||||
#include "../BinWriter/BinReaderWriterDefines.h"
|
||||
#include "../../XlsxSerializerCom/Writer/BinaryReader.h"
|
||||
|
||||
#include "../../ASCOfficePPTXFile/PPTXFormat/App.h"
|
||||
#include "../../ASCOfficePPTXFile/PPTXFormat/Core.h"
|
||||
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Docx.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Document.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/FontTable.h"
|
||||
@ -47,6 +50,8 @@
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Footnote.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Endnote.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Settings/Settings.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/App.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/Core.h"
|
||||
|
||||
#include "../DocWrapper/XlsxSerializer.h"
|
||||
|
||||
@ -455,7 +460,13 @@ public:
|
||||
case c_oSerProp_rPrType::Spacing:
|
||||
{
|
||||
orPr->bSpacing = true;
|
||||
orPr->Spacing = m_oBufferedStream.GetDouble();
|
||||
orPr->Spacing = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::SpacingTwips:
|
||||
{
|
||||
orPr->bSpacing = true;
|
||||
orPr->Spacing = m_oBufferedStream.GetLong();
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::DStrikeout:
|
||||
@ -479,7 +490,13 @@ public:
|
||||
case c_oSerProp_rPrType::Position:
|
||||
{
|
||||
orPr->bPosition = true;
|
||||
orPr->Position = m_oBufferedStream.GetDouble();
|
||||
orPr->Position = SerializeCommon::Round( g_dKoef_mm_to_hps * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::PositionHps:
|
||||
{
|
||||
orPr->bPosition = true;
|
||||
orPr->Position = m_oBufferedStream.GetLong();
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::FontHint:
|
||||
@ -723,12 +740,12 @@ public:
|
||||
{
|
||||
Spacing oSpacing;
|
||||
READ2_DEF(length, res, this->ReadSpacing, &oSpacing);
|
||||
if(oSpacing.bLine || oSpacing.bAfter || oSpacing.bAfterAuto || oSpacing.bBefore || oSpacing.bBeforeAuto)
|
||||
if(oSpacing.bLine || oSpacing.bLineTwips || oSpacing.bAfter || oSpacing.bAfterAuto || oSpacing.bBefore || oSpacing.bBeforeAuto)
|
||||
{
|
||||
pCStringWriter->WriteString(std::wstring(L"<w:spacing"));
|
||||
BYTE bLineRule = linerule_Auto;
|
||||
//проверяется bLine, а не bLineRule чтобы всегда писать LineRule, если есть w:line
|
||||
if(oSpacing.bLine)
|
||||
if(oSpacing.bLine || oSpacing.bLineTwips)
|
||||
{
|
||||
if(oSpacing.bLineRule)
|
||||
bLineRule = oSpacing.LineRule;
|
||||
@ -756,10 +773,13 @@ public:
|
||||
}
|
||||
pCStringWriter->WriteString(sLine);
|
||||
}
|
||||
else if(oSpacing.bLineTwips)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:line=\"" + std::to_wstring(oSpacing.LineTwips) + L"\"");
|
||||
}
|
||||
if(oSpacing.bAfter)
|
||||
{
|
||||
long After = SerializeCommon::Round( g_dKoef_mm_to_twips * oSpacing.After);
|
||||
std::wstring sAfter = L" w:after=\"" + std::to_wstring(After) + L"\"";
|
||||
std::wstring sAfter = L" w:after=\"" + std::to_wstring(oSpacing.After) + L"\"";
|
||||
pCStringWriter->WriteString(sAfter);
|
||||
}
|
||||
if(oSpacing.bAfterAuto)
|
||||
@ -771,8 +791,7 @@ public:
|
||||
}
|
||||
if(oSpacing.bBefore)
|
||||
{
|
||||
long Before = SerializeCommon::Round( g_dKoef_mm_to_twips * oSpacing.Before);
|
||||
std::wstring sBefore = L" w:before=\"" + std::to_wstring(Before) + L"\"";
|
||||
std::wstring sBefore = L" w:before=\"" + std::to_wstring(oSpacing.Before) + L"\"";
|
||||
pCStringWriter->WriteString(sBefore);
|
||||
}
|
||||
if(oSpacing.bBeforeAuto)
|
||||
@ -816,7 +835,6 @@ public:
|
||||
for(size_t i = 0; i < nLen; ++i)
|
||||
{
|
||||
Tab& oTab = oTabs.m_aTabs[i];
|
||||
long nTab = SerializeCommon::Round( g_dKoef_mm_to_twips * oTab.Pos);
|
||||
std::wstring sVal;
|
||||
switch(oTab.Val)
|
||||
{
|
||||
@ -825,7 +843,7 @@ public:
|
||||
case g_tabtype_clear: sVal = L"clear"; break;
|
||||
default: sVal = L"left"; break;
|
||||
}
|
||||
pCStringWriter->WriteString(L"<w:tab w:val=\"" + sVal + L"\" w:pos=\"" + std::to_wstring(nTab) + L"\"");
|
||||
pCStringWriter->WriteString(L"<w:tab w:val=\"" + sVal + L"\" w:pos=\"" + std::to_wstring(oTab.Pos) + L"\"");
|
||||
if (oTab.bLeader)
|
||||
{
|
||||
std::wstring sLeader;
|
||||
@ -937,6 +955,11 @@ public:
|
||||
pCStringWriter->WriteString(L" w:left=\"" + std::to_wstring(nIndLeft) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_LeftTwips:
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:left=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_Right:
|
||||
{
|
||||
double dIndRight = m_oBufferedStream.GetDouble();
|
||||
@ -945,18 +968,34 @@ public:
|
||||
pCStringWriter->WriteString(L" w:right=\"" + std::to_wstring(nIndRight) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_RightTwips:
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:right=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_FirstLine:
|
||||
{
|
||||
double dIndFirstLine = m_oBufferedStream.GetDouble();
|
||||
long nIndFirstLine = SerializeCommon::Round(dIndFirstLine * g_dKoef_mm_to_twips);
|
||||
std::wstring sIndFirstLine;
|
||||
if(nIndFirstLine > 0)
|
||||
if(nIndFirstLine >= 0)
|
||||
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
|
||||
else
|
||||
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
|
||||
pCStringWriter->WriteString(sIndFirstLine);
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_FirstLineTwips:
|
||||
{
|
||||
long nIndFirstLine = m_oBufferedStream.GetLong();
|
||||
std::wstring sIndFirstLine;
|
||||
if(nIndFirstLine >= 0)
|
||||
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
|
||||
else
|
||||
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
|
||||
pCStringWriter->WriteString(sIndFirstLine);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
break;
|
||||
@ -973,17 +1012,29 @@ public:
|
||||
pSpacing->bLine = true;
|
||||
pSpacing->Line = m_oBufferedStream.GetDouble();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_LineTwips:
|
||||
pSpacing->bLineTwips = true;
|
||||
pSpacing->LineTwips = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_LineRule:
|
||||
pSpacing->bLineRule = true;
|
||||
pSpacing->LineRule = m_oBufferedStream.GetUChar();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_Before:
|
||||
pSpacing->bBefore = true;
|
||||
pSpacing->Before = m_oBufferedStream.GetDouble();
|
||||
pSpacing->Before = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_BeforeTwips:
|
||||
pSpacing->bBefore = true;
|
||||
pSpacing->Before = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_After:
|
||||
pSpacing->bAfter = true;
|
||||
pSpacing->After = m_oBufferedStream.GetDouble();
|
||||
pSpacing->After = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_AfterTwips:
|
||||
pSpacing->bAfter = true;
|
||||
pSpacing->After = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_BeforeAuto:
|
||||
pSpacing->bBeforeAuto = true;
|
||||
@ -1020,7 +1071,9 @@ public:
|
||||
if(c_oSerProp_pPrType::Tab_Item_Val == type)
|
||||
poTabItem->Val = m_oBufferedStream.GetUChar();
|
||||
else if(c_oSerProp_pPrType::Tab_Item_Pos == type)
|
||||
poTabItem->Pos = m_oBufferedStream.GetDouble();
|
||||
poTabItem->Pos = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
else if(c_oSerProp_pPrType::Tab_Item_PosTwips == type)
|
||||
poTabItem->Pos = m_oBufferedStream.GetLong();
|
||||
else if(c_oSerProp_pPrType::Tab_Item_Leader == type)
|
||||
{
|
||||
poTabItem->bLeader = true;
|
||||
@ -1113,12 +1166,22 @@ public:
|
||||
else if( c_oSerBorderType::Space == type )
|
||||
{
|
||||
odocBorder->bSpace = true;
|
||||
odocBorder->Space = m_oBufferedStream.GetDouble();
|
||||
odocBorder->Space = SerializeCommon::Round(g_dKoef_mm_to_pt * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSerBorderType::SpacePoint == type )
|
||||
{
|
||||
odocBorder->bSpace = true;
|
||||
odocBorder->Space = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSerBorderType::Size == type )
|
||||
{
|
||||
odocBorder->bSize = true;
|
||||
odocBorder->Size = m_oBufferedStream.GetDouble();
|
||||
odocBorder->Size = SerializeCommon::Round(g_dKoef_mm_to_eightpoint * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSerBorderType::Size8Point == type )
|
||||
{
|
||||
odocBorder->bSize = true;
|
||||
odocBorder->Size = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSerBorderType::Value == type )
|
||||
{
|
||||
@ -1374,15 +1437,28 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if( c_oSer_pgSzType::Orientation == type )
|
||||
{
|
||||
pSectPr->bOrientation = true;
|
||||
pSectPr->cOrientation = m_oBufferedStream.GetUChar();
|
||||
}
|
||||
else if( c_oSer_pgSzType::W == type )
|
||||
{
|
||||
pSectPr->W = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bW = true;
|
||||
pSectPr->W = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgSzType::WTwips == type )
|
||||
{
|
||||
pSectPr->bW = true;
|
||||
pSectPr->W = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgSzType::H == type )
|
||||
{
|
||||
pSectPr->H = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bH = true;
|
||||
pSectPr->H = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgSzType::HTwips == type )
|
||||
{
|
||||
pSectPr->bH = true;
|
||||
pSectPr->H = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -1394,29 +1470,63 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if( c_oSer_pgMarType::Left == type )
|
||||
{
|
||||
pSectPr->Left = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bLeft = true;
|
||||
pSectPr->Left = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::LeftTwips == type )
|
||||
{
|
||||
pSectPr->bLeft = true;
|
||||
pSectPr->Left = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Top == type )
|
||||
{
|
||||
pSectPr->Top = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bTop = true;
|
||||
pSectPr->Top = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::TopTwips == type )
|
||||
{
|
||||
pSectPr->bTop = true;
|
||||
pSectPr->Top = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Right == type )
|
||||
{
|
||||
pSectPr->Right = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bRight = true;
|
||||
pSectPr->Right = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::RightTwips == type )
|
||||
{
|
||||
pSectPr->bRight = true;
|
||||
pSectPr->Right = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Bottom == type )
|
||||
{
|
||||
pSectPr->Bottom = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bBottom = true;
|
||||
pSectPr->Bottom = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::BottomTwips == type )
|
||||
{
|
||||
pSectPr->bBottom = true;
|
||||
pSectPr->Bottom = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Header == type )
|
||||
{
|
||||
pSectPr->bHeader = true;
|
||||
pSectPr->Header = m_oBufferedStream.GetDouble();
|
||||
pSectPr->Header = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::HeaderTwips == type )
|
||||
{
|
||||
pSectPr->bHeader = true;
|
||||
pSectPr->Header = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Footer == type )
|
||||
{
|
||||
pSectPr->bFooter = true;
|
||||
pSectPr->Footer = m_oBufferedStream.GetDouble();
|
||||
pSectPr->Footer = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::FooterTwips == type )
|
||||
{
|
||||
pSectPr->bFooter = true;
|
||||
pSectPr->Footer = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -1716,6 +1826,10 @@ public:
|
||||
long nInd = SerializeCommon::Round( g_dKoef_mm_to_twips * dInd);
|
||||
pWiterTblPr->TableInd = L"<w:tblInd w:w=\"" + std::to_wstring(nInd) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableIndTwips == type )
|
||||
{
|
||||
pWiterTblPr->TableInd = L"<w:tblInd w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableW == type )
|
||||
{
|
||||
docW odocW;
|
||||
@ -1815,6 +1929,10 @@ public:
|
||||
long nSpacing = SerializeCommon::Round( g_dKoef_mm_to_twips * dSpacing);
|
||||
pWiterTblPr->TableCellSpacing = L"<w:tblCellSpacing w:w=\"" + std::to_wstring(nSpacing) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableCellSpacingTwips == type )
|
||||
{
|
||||
pWiterTblPr->TableCellSpacing = L"<w:tblCellSpacing w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::tblCaption == type )
|
||||
{
|
||||
pWiterTblPr->Caption = m_oBufferedStream.GetString3(length);
|
||||
@ -1959,6 +2077,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:tblpX=\"" + std::to_wstring(nX) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpXTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:tblpX=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpXSpec == type )
|
||||
{
|
||||
std::wstring sXml;
|
||||
@ -1992,6 +2114,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:tblpY=\"" + std::to_wstring(nY) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpYTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:tblpY=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpYSpec == type )
|
||||
{
|
||||
std::wstring sXml;
|
||||
@ -2087,6 +2213,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L"<w:tblCellSpacing w:w=\"" + std::to_wstring(nSpacing) + L"\" w:type=\"dxa\"/>");
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::TableCellSpacingTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L"<w:tblCellSpacing w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>");
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::Height == type )
|
||||
{
|
||||
RowHeight val;
|
||||
@ -2180,6 +2310,10 @@ public:
|
||||
double dHeight = m_oBufferedStream.GetDouble();
|
||||
pHeight->nHeight = SerializeCommon::Round( g_dKoef_mm_to_twips * dHeight);
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::Height_ValueTwips == type )
|
||||
{
|
||||
pHeight->nHeight = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -2358,6 +2492,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:leftFromText=\"" + std::to_wstring(nLeft) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::leftTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:leftFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::top == type)
|
||||
{
|
||||
double dTop = m_oBufferedStream.GetDouble();
|
||||
@ -2365,6 +2503,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:topFromText=\"" + std::to_wstring(nTop) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::topTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:topFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::right == type)
|
||||
{
|
||||
double dRight = m_oBufferedStream.GetDouble();
|
||||
@ -2372,6 +2514,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:rightFromText=\"" + std::to_wstring(nRight) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::rightTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:rightFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::bottom == type)
|
||||
{
|
||||
double dBottom = m_oBufferedStream.GetDouble();
|
||||
@ -2379,6 +2525,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:bottomFromText=\"" + std::to_wstring(nBottom) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::bottomTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:bottomFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3300,10 +3450,12 @@ public:
|
||||
{
|
||||
double dDefTabStop = m_oBufferedStream.GetDouble();
|
||||
long nDefTabStop = SerializeCommon::Round(dDefTabStop * g_dKoef_mm_to_twips);
|
||||
std::wstring sXml;
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:defaultTabStop w:val=\"" + std::to_wstring(nDefTabStop) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_SettingsType::DefaultTabStopTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:defaultTabStop w:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_SettingsType::MathPr == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(_T("<m:mathPr>"));
|
||||
@ -3334,6 +3486,16 @@ public:
|
||||
READ1_DEF(length, res, this->ReadEndnotePr, &oEdnProps);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(oEdnProps.toXML());
|
||||
}
|
||||
else if( c_oSer_SettingsType::DecimalSymbol == type )
|
||||
{
|
||||
std::wstring sDecimalSymbol = m_oBufferedStream.GetString3(length);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:decimalSymbol w:val=\"" + XmlUtils::EncodeXmlString(sDecimalSymbol) + L"\"/>");
|
||||
}
|
||||
else if( c_oSer_SettingsType::ListSeparator == type )
|
||||
{
|
||||
std::wstring sListSeparator = m_oBufferedStream.GetString3(length);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:listSeparator w:val=\"" + XmlUtils::EncodeXmlString(sListSeparator) + L"\"/>");
|
||||
}
|
||||
else if( c_oSer_SettingsType::SdtGlobalColor == type )
|
||||
{
|
||||
rPr oRPr(m_oFileWriter.m_oFontTableWriter.m_mapFonts);
|
||||
@ -3588,6 +3750,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:interSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:interSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3620,6 +3786,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:intraSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:intraSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3633,6 +3803,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:lMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:lMargin m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3684,6 +3858,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:postSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:postSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3697,6 +3875,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:preSp m:val=\"" + std::to_wstring(lVal)+ L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:preSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3710,6 +3892,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:rMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:rMargin m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3740,6 +3926,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:wrapIndent m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:wrapIndent m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -7155,6 +7345,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(ngridCol)+ L"\"/>");
|
||||
}
|
||||
else if( c_oSerDocTableType::tblGrid_ItemTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong())+ L"\"/>");
|
||||
}
|
||||
else if( c_oSerDocTableType::tblGridChange == type )
|
||||
{
|
||||
TrackRevision oTrackRevision;
|
||||
@ -7411,7 +7605,8 @@ public:
|
||||
m_oFileWriter.m_pDrawingConverter->m_pImageManager->m_nDocumentType = XMLWRITER_DOC_TYPE_XLSX;
|
||||
m_oFileWriter.m_pDrawingConverter->SetDstContentRels();
|
||||
|
||||
std::wstring sThemePath = m_oFileWriter.m_sThemePath;
|
||||
std::wstring sThemePath = m_oFileWriter.m_sThemePath;
|
||||
std::wstring sDrawingsPath = m_oFileWriter.m_oChartWriter.m_sDir + FILE_SEPARATOR_STR + L"word" + FILE_SEPARATOR_STR + L"drawings";
|
||||
|
||||
size_t nPos = sThemePath.rfind(FILE_SEPARATOR_STR);
|
||||
if (std::wstring::npos != nPos)
|
||||
@ -7419,11 +7614,11 @@ public:
|
||||
sThemePath = sThemePath.substr(0, nPos);
|
||||
}
|
||||
|
||||
BinXlsxRW::SaveParams oSaveParams(sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());
|
||||
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());
|
||||
BinXlsxRW::BinaryChartReader oBinaryChartReader(m_oBufferedStream, oSaveParams, m_oFileWriter.m_pDrawingConverter);
|
||||
|
||||
OOX::Spreadsheet::CChartSpace* pChartSpace = new OOX::Spreadsheet::CChartSpace(NULL);
|
||||
oBinaryChartReader.ReadCT_ChartSpace(length, &pChartSpace->m_oChartSpace);
|
||||
oBinaryChartReader.ReadCT_ChartSpace(length, pChartSpace);
|
||||
|
||||
//save xlsx
|
||||
_INT32 nChartCount = m_oFileWriter.m_pDrawingConverter->GetDocumentChartsCount();
|
||||
@ -7449,15 +7644,11 @@ public:
|
||||
pChartSpace->m_oChartSpace.m_externalData->m_autoUpdate->m_val = new bool(false);
|
||||
}
|
||||
|
||||
//save chart.xml
|
||||
NSStringUtils::CStringBuilder sw;
|
||||
pChartSpace->toXML(sw);
|
||||
|
||||
std::wstring sFilename;
|
||||
std::wstring sRelsName;
|
||||
std::wstring sContent = sw.GetData();
|
||||
|
||||
m_oFileWriter.m_oChartWriter.AddChart(sContent, sRelsName, sFilename, nChartIndex);
|
||||
std::wstring sFilename = L"chart" + std::to_wstring(nChartIndex) + L".xml";
|
||||
std::wstring sRelsName = L"charts/" + sFilename;
|
||||
|
||||
OOX::CPath pathChartsFile = pathChartsDir + FILE_SEPARATOR_STR + sFilename;
|
||||
pChartSpace->write(pathChartsFile, OOX::CPath(L"/word/charts"), *m_oFileWriter.m_pDrawingConverter->GetContentTypes());
|
||||
|
||||
OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + FILE_SEPARATOR_STR + sFilename + L".rels";
|
||||
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(pathChartsRels.GetPath());
|
||||
@ -7466,7 +7657,7 @@ public:
|
||||
std::wstring bstrChartRelType = OOX::FileTypes::Chart.RelationType();
|
||||
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(bstrChartRelType, sRelsName, std::wstring(), &rIdChart);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", L"/word/charts", sFilename);
|
||||
//m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", L"/word/charts", sFilename);
|
||||
|
||||
pDrawingProperty->sChartRels = L"rId" + std::to_wstring( rIdChart);
|
||||
|
||||
@ -7495,22 +7686,42 @@ public:
|
||||
else if ( c_oSerImageType2::DistL == type )
|
||||
{
|
||||
pDrawingProperty->bDistL = true;
|
||||
pDrawingProperty->DistL = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistL = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistLEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistL = true;
|
||||
pDrawingProperty->DistL = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistT == type )
|
||||
{
|
||||
pDrawingProperty->bDistT = true;
|
||||
pDrawingProperty->DistT = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistT = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistTEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistT = true;
|
||||
pDrawingProperty->DistT = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistR == type )
|
||||
{
|
||||
pDrawingProperty->bDistR = true;
|
||||
pDrawingProperty->DistR = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistR = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistREmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistR = true;
|
||||
pDrawingProperty->DistR = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistB == type )
|
||||
{
|
||||
pDrawingProperty->bDistB = true;
|
||||
pDrawingProperty->DistB = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistB = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistBEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistB = true;
|
||||
pDrawingProperty->DistB = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::LayoutInCell == type )
|
||||
{
|
||||
@ -7635,7 +7846,6 @@ public:
|
||||
}
|
||||
else if (pDrawingProperty->nObjectType == 2)
|
||||
{
|
||||
|
||||
BinXlsxRW::CXlsxSerializer oXlsxSerializer;
|
||||
oXlsxSerializer.setDrawingConverter(m_oFileWriter.m_pDrawingConverter);
|
||||
|
||||
@ -7650,10 +7860,16 @@ public:
|
||||
std::wstring strDstEmbeddedTemp = strDstEmbedded + FILE_SEPARATOR_STR + L"Temp";
|
||||
NSDirectory::CreateDirectory(strDstEmbeddedTemp);
|
||||
|
||||
std::wstring strDstEmbeddedTempXl = strDstEmbeddedTemp + FILE_SEPARATOR_STR + L"xl";
|
||||
NSDirectory::CreateDirectory(strDstEmbeddedTempXl);
|
||||
|
||||
std::wstring strDstEmbeddedTempThemePath = strDstEmbeddedTempXl + FILE_SEPARATOR_STR + L"theme";
|
||||
std::wstring strDstEmbeddedTempDrawingPath = strDstEmbeddedTempXl + FILE_SEPARATOR_STR + L"drawings";
|
||||
|
||||
int id = m_oFileWriter.m_oChartWriter.nEmbeddedCount++;
|
||||
|
||||
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring( id + 1) + L".xlsx";
|
||||
BinXlsxRW::SaveParams oSaveParams(m_oFileWriter.m_sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());//???
|
||||
BinXlsxRW::SaveParams oSaveParams(strDstEmbeddedTempDrawingPath, strDstEmbeddedTempThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());//???
|
||||
|
||||
OOX::Spreadsheet::CXlsx oXlsx;
|
||||
|
||||
@ -7750,22 +7966,42 @@ public:
|
||||
if ( c_oSerEffectExtent::Left == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentL = true;
|
||||
pDrawingProperty->EffectExtentL = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentL = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::LeftEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentL = true;
|
||||
pDrawingProperty->EffectExtentL = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Top == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentT = true;
|
||||
pDrawingProperty->EffectExtentT = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentT = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::TopEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentT = true;
|
||||
pDrawingProperty->EffectExtentT = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Right == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentR = true;
|
||||
pDrawingProperty->EffectExtentR = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentR = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::RightEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentR = true;
|
||||
pDrawingProperty->EffectExtentR = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Bottom == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentB = true;
|
||||
pDrawingProperty->EffectExtentB = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentB = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::BottomEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentB = true;
|
||||
pDrawingProperty->EffectExtentB = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7778,12 +8014,22 @@ public:
|
||||
if ( c_oSerExtent::Cx == type )
|
||||
{
|
||||
pDrawingProperty->bWidth = true;
|
||||
pDrawingProperty->Width = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->Width = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerExtent::CxEmu == type )
|
||||
{
|
||||
pDrawingProperty->bWidth = true;
|
||||
pDrawingProperty->Width = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerExtent::Cy == type )
|
||||
{
|
||||
pDrawingProperty->bHeight = true;
|
||||
pDrawingProperty->Height = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->Height = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerExtent::CyEmu == type )
|
||||
{
|
||||
pDrawingProperty->bHeight = true;
|
||||
pDrawingProperty->Height = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7806,7 +8052,12 @@ public:
|
||||
else if ( c_oSerPosHV::PosOffset == type )
|
||||
{
|
||||
pDrawingProperty->bPositionHPosOffset = true;
|
||||
pDrawingProperty->PositionHPosOffset = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->PositionHPosOffset = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPosHV::PosOffsetEmu == type )
|
||||
{
|
||||
pDrawingProperty->bPositionHPosOffset = true;
|
||||
pDrawingProperty->PositionHPosOffset = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPosHV::PctOffset == type )
|
||||
{
|
||||
@ -7834,7 +8085,12 @@ public:
|
||||
else if ( c_oSerPosHV::PosOffset == type )
|
||||
{
|
||||
pDrawingProperty->bPositionVPosOffset = true;
|
||||
pDrawingProperty->PositionVPosOffset = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->PositionVPosOffset = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPosHV::PosOffsetEmu == type )
|
||||
{
|
||||
pDrawingProperty->bPositionVPosOffset = true;
|
||||
pDrawingProperty->PositionVPosOffset = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPosHV::PctOffset == type )
|
||||
{
|
||||
@ -7852,12 +8108,22 @@ public:
|
||||
if ( c_oSerSimplePos::X == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosX = true;
|
||||
pDrawingProperty->SimplePosX = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->SimplePosX = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerSimplePos::XEmu == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosX = true;
|
||||
pDrawingProperty->SimplePosX = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerSimplePos::Y == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosY = true;
|
||||
pDrawingProperty->SimplePosY = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->SimplePosY = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerSimplePos::YEmu == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosY = true;
|
||||
pDrawingProperty->SimplePosY = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7953,12 +8219,22 @@ public:
|
||||
if ( c_oSerPoint2D::X == type )
|
||||
{
|
||||
pWrapPoint->bX = true;
|
||||
pWrapPoint->X = m_oBufferedStream.GetDouble();
|
||||
pWrapPoint->X = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPoint2D::XEmu == type )
|
||||
{
|
||||
pWrapPoint->bX = true;
|
||||
pWrapPoint->X = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPoint2D::Y == type )
|
||||
{
|
||||
pWrapPoint->bY = true;
|
||||
pWrapPoint->Y = m_oBufferedStream.GetDouble();
|
||||
pWrapPoint->Y = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPoint2D::YEmu == type )
|
||||
{
|
||||
pWrapPoint->bY = true;
|
||||
pWrapPoint->Y = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -8437,6 +8713,7 @@ public:
|
||||
long nSettingsOffset = -1;
|
||||
long nDocumentOffset = -1;
|
||||
long nCommentsOffset = -1;
|
||||
long nDocumentCommentsOffset = -1;
|
||||
|
||||
std::vector<BYTE> aTypes;
|
||||
std::vector<long> aOffBits;
|
||||
@ -8471,6 +8748,10 @@ public:
|
||||
{
|
||||
nCommentsOffset = mtiOffBits;
|
||||
}
|
||||
else if(c_oSerTableTypes::DocumentComments == mtiType)
|
||||
{
|
||||
nDocumentCommentsOffset = mtiOffBits;
|
||||
}
|
||||
else
|
||||
{
|
||||
aTypes.push_back(mtiType);
|
||||
@ -8520,6 +8801,15 @@ public:
|
||||
if(c_oSerConstants::ReadOk != res)
|
||||
return res;
|
||||
}
|
||||
Binary_CommentsTableReader oBinary_DocumentCommentsTableReader(m_oBufferedStream, m_oFileWriter);
|
||||
if(-1 != nDocumentCommentsOffset)
|
||||
{
|
||||
int nOldPos = m_oBufferedStream.GetPos();
|
||||
m_oBufferedStream.Seek(nDocumentCommentsOffset);
|
||||
res = oBinary_DocumentCommentsTableReader.Read();
|
||||
if(c_oSerConstants::ReadOk != res)
|
||||
return res;
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < aTypes.size(); ++i)
|
||||
{
|
||||
@ -8537,6 +8827,26 @@ public:
|
||||
//case c_oSerTableTypes::Document:
|
||||
// res = Binary_DocumentTableReader(m_oBufferedStream, m_oFileWriter, m_oFileWriter.m_oDocumentWriter).Read();
|
||||
// break;
|
||||
case c_oSerTableTypes::App:
|
||||
{
|
||||
PPTX::App oApp(NULL);
|
||||
oApp.fromPPTY(&m_oBufferedStream);
|
||||
OOX::CApp* pApp = new OOX::CApp(NULL);
|
||||
pApp->FromPptxApp(&oApp);
|
||||
pApp->SetRequiredDefaults();
|
||||
m_oFileWriter.m_pApp = pApp;
|
||||
}
|
||||
break;
|
||||
case c_oSerTableTypes::Core:
|
||||
{
|
||||
PPTX::Core oCore(NULL);
|
||||
oCore.fromPPTY(&m_oBufferedStream);
|
||||
OOX::CCore* pCore = new OOX::CCore(NULL);
|
||||
pCore->FromPptxCore(&oCore);
|
||||
pCore->SetRequiredDefaults();
|
||||
m_oFileWriter.m_pCore = pCore;
|
||||
}
|
||||
break;
|
||||
case c_oSerTableTypes::HdrFtr:
|
||||
res = Binary_HdrFtrTableReader(m_oBufferedStream, m_oFileWriter, m_oFileWriter.m_pComments).Read();
|
||||
break;
|
||||
@ -8650,6 +8960,7 @@ public:
|
||||
+ FILE_SEPARATOR_STR + L"_rels"
|
||||
+ FILE_SEPARATOR_STR + L"document.xml.rels";
|
||||
|
||||
//comments
|
||||
CComments& oComments= oBinary_CommentsTableReader.m_oComments;
|
||||
Writers::CommentsWriter& oCommentsWriter = m_oFileWriter.m_oCommentsWriter;
|
||||
|
||||
@ -8657,25 +8968,47 @@ public:
|
||||
std::wstring sContentEx = oComments.writeContentExt(); //важно чтобы writeContentExt вызывался после writeContent
|
||||
std::wstring sPeople = oComments.writePeople();
|
||||
|
||||
oCommentsWriter.setElements(sContent, sContentEx, sPeople);
|
||||
std::wstring sDocumentContent = oBinary_DocumentCommentsTableReader.m_oComments.writeContent();
|
||||
std::wstring sDocumentContentEx = oBinary_DocumentCommentsTableReader.m_oComments.writeContentExt(); //важно чтобы writeContentExt вызывался после writeContent
|
||||
std::wstring sDocumentPeople = oBinary_DocumentCommentsTableReader.m_oComments.writePeople();
|
||||
|
||||
oCommentsWriter.setElements(sContent, sContentEx, sPeople, sDocumentContent, sDocumentContentEx, sDocumentPeople);
|
||||
|
||||
if(false == oCommentsWriter.m_sComment.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", L"comments.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml", L"/word", L"comments.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::Comments.RelationType(), OOX::FileTypes::Comments.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::Comments.OverrideType(), L"/word", OOX::FileTypes::Comments.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sCommentExt.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.microsoft.com/office/2011/relationships/commentsExtended", L"commentsExtended.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml", L"/word", L"commentsExtended.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::CommentsExt.RelationType(), OOX::FileTypes::CommentsExt.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::CommentsExt.OverrideType(), L"/word", OOX::FileTypes::CommentsExt.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sPeople.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.microsoft.com/office/2011/relationships/people", L"people.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.people+xml", L"/word", L"people.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::People.RelationType(), OOX::FileTypes::People.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::People.OverrideType(), L"/word", OOX::FileTypes::People.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentComment.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentComments.RelationType(), OOX::FileTypes::DocumentComments.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentComments.OverrideType(), L"/word", OOX::FileTypes::DocumentComments.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentCommentExt.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentCommentsExt.RelationType(), OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentCommentsExt.OverrideType(), L"/word", OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentPeople.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentPeople.RelationType(), OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentPeople.OverrideType(), L"/word", OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath());
|
||||
}
|
||||
|
||||
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(fileRelsPath.GetPath());
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
namespace Writers
|
||||
{
|
||||
static std::wstring g_string_set_Start = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><w:settings xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\">");
|
||||
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"15\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val=\".\"/><w:listSeparator w:val=\",\"/>");
|
||||
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"15\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults>");
|
||||
static std::wstring g_string_set_End = _T("</w:settings>");
|
||||
|
||||
class SettingWriter
|
||||
|
||||
@ -36,17 +36,6 @@ namespace BinDocxRW
|
||||
{
|
||||
const double eps = 0.001;
|
||||
|
||||
const int Page_Width = 210;
|
||||
const int Page_Height = 297;
|
||||
|
||||
const int X_Left_Margin = 30; // 3 cm
|
||||
const int X_Right_Margin = 15; // 1.5 cm
|
||||
const int Y_Bottom_Margin = 20; // 2 cm
|
||||
const int Y_Top_Margin = 20; // 2 cm
|
||||
|
||||
const double Y_Default_Header = 12.5; // 1.25 cm расстояние от верха страницы до верха верхнего колонтитула
|
||||
const double Y_Default_Footer = 12.5; // 1.25 cm расстояние от низа страницы до низа нижнего колонтитула
|
||||
|
||||
const int shd_Clear = 0;
|
||||
const int shd_Nil = 1;
|
||||
|
||||
@ -156,7 +145,9 @@ extern int g_nCurFormatVersion;
|
||||
Endnotes = 11,
|
||||
Background = 12,
|
||||
VbaProject = 13,
|
||||
App = 14
|
||||
App = 15,
|
||||
Core = 16,
|
||||
DocumentComments = 17
|
||||
};}
|
||||
namespace c_oSerSigTypes{enum c_oSerSigTypes
|
||||
{
|
||||
@ -311,7 +302,9 @@ extern int g_nCurFormatVersion;
|
||||
RowBandSize = 15,
|
||||
ColBandSize = 16,
|
||||
tblCaption = 17,
|
||||
tblDescription = 18
|
||||
tblDescription = 18,
|
||||
TableIndTwips = 19,
|
||||
TableCellSpacingTwips = 20
|
||||
};}
|
||||
namespace c_oSer_tblpPrType{enum c_oSer_tblpPrType
|
||||
{
|
||||
@ -328,7 +321,9 @@ extern int g_nCurFormatVersion;
|
||||
VertAnchor = 3,
|
||||
TblpY = 4,
|
||||
TblpYSpec = 5,
|
||||
Paddings = 6
|
||||
Paddings = 6,
|
||||
TblpXTwips = 7,
|
||||
TblpYTwips = 8
|
||||
};}
|
||||
namespace c_oSerProp_pPrType{enum c_oSerProp_pPrType
|
||||
{
|
||||
@ -365,7 +360,14 @@ extern int g_nCurFormatVersion;
|
||||
numPr_Ins = 32,
|
||||
pPrChange = 33,
|
||||
outlineLvl = 34,
|
||||
Tab_Item_Leader = 35
|
||||
Tab_Item_Leader = 35,
|
||||
Ind_LeftTwips = 36,
|
||||
Ind_RightTwips = 37,
|
||||
Ind_FirstLineTwips = 38,
|
||||
Spacing_LineTwips = 39,
|
||||
Spacing_BeforeTwips = 40,
|
||||
Spacing_AfterTwips = 41,
|
||||
Tab_Item_PosTwips = 42
|
||||
};}
|
||||
namespace c_oSerProp_rPrType{enum c_oSerProp_rPrType
|
||||
{
|
||||
@ -406,7 +408,9 @@ extern int g_nCurFormatVersion;
|
||||
Ins = 34,
|
||||
rPrChange = 35,
|
||||
MoveFrom = 36,
|
||||
MoveTo = 37
|
||||
MoveTo = 37,
|
||||
SpacingTwips = 38,
|
||||
PositionHps = 39
|
||||
};}
|
||||
namespace c_oSerProp_rowPrType{enum c_oSerProp_rowPrType
|
||||
{
|
||||
@ -427,7 +431,9 @@ extern int g_nCurFormatVersion;
|
||||
TableHeader = 14,
|
||||
Del = 15,
|
||||
Ins = 16,
|
||||
trPrChange = 17
|
||||
trPrChange = 17,
|
||||
TableCellSpacingTwips = 18,
|
||||
Height_ValueTwips = 19
|
||||
};}
|
||||
namespace c_oSerProp_cellPrType{enum c_oSerProp_cellPrType
|
||||
{
|
||||
@ -517,7 +523,8 @@ extern int g_nCurFormatVersion;
|
||||
tblGridChange = 9,
|
||||
Sdt = 10,
|
||||
BookmarkStart = 11,
|
||||
BookmarkEnd = 12
|
||||
BookmarkEnd = 12,
|
||||
tblGrid_ItemTwips = 13
|
||||
};}
|
||||
namespace c_oSerRunType{enum c_oSerRunType
|
||||
{
|
||||
@ -607,26 +614,37 @@ extern int g_nCurFormatVersion;
|
||||
SizeRelV = 28,
|
||||
Embedded = 29,
|
||||
GraphicFramePr = 30,
|
||||
DocPr = 31
|
||||
DocPr = 31,
|
||||
DistBEmu = 32,
|
||||
DistLEmu = 33,
|
||||
DistREmu = 34,
|
||||
DistTEmu = 35
|
||||
};}
|
||||
namespace c_oSerEffectExtent{enum c_oSerEffectExtent
|
||||
{
|
||||
Left = 0,
|
||||
Top = 1,
|
||||
Right = 2,
|
||||
Bottom = 3
|
||||
Bottom = 3,
|
||||
LeftEmu = 4,
|
||||
TopEmu = 5,
|
||||
RightEmu = 6,
|
||||
BottomEmu = 7
|
||||
};}
|
||||
namespace c_oSerExtent{enum c_oSerExtent
|
||||
{
|
||||
Cx = 0,
|
||||
Cy = 1
|
||||
Cy = 1,
|
||||
CxEmu = 2,
|
||||
CyEmu = 3
|
||||
};}
|
||||
namespace c_oSerPosHV{enum c_oSerPosHV
|
||||
{
|
||||
RelativeFrom = 0,
|
||||
Align = 1,
|
||||
PosOffset = 2,
|
||||
PctOffset = 3
|
||||
PctOffset = 3,
|
||||
PosOffsetEmu = 4
|
||||
};}
|
||||
namespace c_oSerSizeRelHV{enum c_oSerSizeRelHV
|
||||
{
|
||||
@ -636,7 +654,9 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSerSimplePos{enum c_oSerSimplePos
|
||||
{
|
||||
X = 0,
|
||||
Y = 1
|
||||
Y = 1,
|
||||
XEmu = 2,
|
||||
YEmu = 3
|
||||
};}
|
||||
namespace c_oSerWrapSquare{enum c_oSerWrapSquare
|
||||
{
|
||||
@ -645,20 +665,28 @@ extern int g_nCurFormatVersion;
|
||||
DistR = 2,
|
||||
DistB = 3,
|
||||
WrapText = 4,
|
||||
EffectExtent = 5
|
||||
EffectExtent = 5,
|
||||
DistLEmu = 6,
|
||||
DistTEmu = 7,
|
||||
DistREmu = 8,
|
||||
DistBEmu = 9
|
||||
};}
|
||||
namespace c_oSerWrapThroughTight{enum c_oSerWrapThroughTight
|
||||
{
|
||||
DistL = 0,
|
||||
DistR = 1,
|
||||
WrapText = 2,
|
||||
WrapPolygon = 3
|
||||
WrapPolygon = 3,
|
||||
DistLEmu = 4,
|
||||
DistREmu = 5
|
||||
};}
|
||||
namespace c_oSerWrapTopBottom{enum c_oSerWrapTopBottom
|
||||
{
|
||||
DistT = 0,
|
||||
DistB = 1,
|
||||
EffectExtent = 2
|
||||
EffectExtent = 2,
|
||||
DistTEmu = 3,
|
||||
DistBEmu = 4
|
||||
};}
|
||||
namespace c_oSerWrapPolygon{enum c_oSerWrapPolygon
|
||||
{
|
||||
@ -670,7 +698,9 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSerPoint2D{enum c_oSerPoint2D
|
||||
{
|
||||
X = 0,
|
||||
Y = 1
|
||||
Y = 1,
|
||||
XEmu = 2,
|
||||
YEmu = 3
|
||||
};}
|
||||
namespace c_oSerBorderType{enum c_oSerBorderType
|
||||
{
|
||||
@ -678,7 +708,9 @@ extern int g_nCurFormatVersion;
|
||||
Space = 1,
|
||||
Size = 2,
|
||||
Value = 3,
|
||||
ColorTheme = 4
|
||||
ColorTheme = 4,
|
||||
SpacePoint = 5,
|
||||
Size8Point = 6
|
||||
};}
|
||||
namespace c_oSerShdType{enum c_oSerShdType
|
||||
{
|
||||
@ -691,7 +723,11 @@ extern int g_nCurFormatVersion;
|
||||
left = 0,
|
||||
top = 1,
|
||||
right = 2,
|
||||
bottom = 3
|
||||
bottom = 3,
|
||||
leftTwips = 4,
|
||||
topTwips = 5,
|
||||
rightTwips = 6,
|
||||
bottomTwips = 7
|
||||
};}
|
||||
namespace c_oSerMarginsType{enum c_oSerMarginsType
|
||||
{
|
||||
@ -725,7 +761,9 @@ extern int g_nCurFormatVersion;
|
||||
{
|
||||
W = 0,
|
||||
H = 1,
|
||||
Orientation = 2
|
||||
Orientation = 2,
|
||||
WTwips = 3,
|
||||
HTwips = 4
|
||||
};}
|
||||
namespace c_oSer_pgMarType{enum c_oSer_pgMarType
|
||||
{
|
||||
@ -734,7 +772,13 @@ extern int g_nCurFormatVersion;
|
||||
Right = 2,
|
||||
Bottom = 3,
|
||||
Header = 4,
|
||||
Footer = 5
|
||||
Footer = 5,
|
||||
LeftTwips = 6,
|
||||
TopTwips = 7,
|
||||
RightTwips = 8,
|
||||
BottomTwips = 9,
|
||||
HeaderTwips = 10,
|
||||
FooterTwips = 11
|
||||
};}
|
||||
namespace c_oSer_ColorType{enum c_oSer_ColorType
|
||||
{
|
||||
@ -765,7 +809,10 @@ extern int g_nCurFormatVersion;
|
||||
EndnotePr = 5,
|
||||
SdtGlobalColor = 6,
|
||||
SdtGlobalShowHighlight = 7,
|
||||
Compat = 8
|
||||
Compat = 8,
|
||||
DefaultTabStopTwips = 9,
|
||||
DecimalSymbol = 10,
|
||||
ListSeparator = 11
|
||||
};}
|
||||
namespace c_oSer_MathPrType{enum c_oSer_SettingsType
|
||||
{
|
||||
@ -860,7 +907,8 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSer_OMathBottomNodesValType{enum c_oSer_OMathBottomNodesValType
|
||||
{
|
||||
Val = 0,
|
||||
AlnAt = 1
|
||||
AlnAt = 1,
|
||||
ValTwips = 2
|
||||
};}
|
||||
namespace c_oSer_OMathContentType{enum c_oSer_OMathContentType
|
||||
{
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
#include "../DocWrapper/FontProcessor.h"
|
||||
#include "../../Common/Base64.h"
|
||||
#include "../../ASCOfficePPTXFile/Editor/FontCutter.h"
|
||||
#include "../../ASCOfficePPTXFile/PPTXFormat/App.h"
|
||||
#include "../../ASCOfficePPTXFile/PPTXFormat/Core.h"
|
||||
#include "../../XlsxSerializerCom/Reader/BinaryWriter.h"
|
||||
#include "BinEquationWriter.h"
|
||||
|
||||
@ -148,15 +150,15 @@ namespace BinDocxRW
|
||||
WriteThemeColor(c_oSerBorderType::ColorTheme, border.m_oColor, border.m_oThemeColor, border.m_oThemeTint, border.m_oThemeShade);
|
||||
if(border.m_oSpace.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Space);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(border.m_oSpace->ToMM());
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::SpacePoint);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(border.m_oSpace->GetValue());
|
||||
}
|
||||
if(border.m_oSz.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Size);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(border.m_oSz->ToMM());
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Size8Point);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(border.m_oSz->GetValue());
|
||||
}
|
||||
//Val
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Value);
|
||||
@ -315,85 +317,51 @@ namespace BinDocxRW
|
||||
void WriteShd(const ComplexTypes::Word::CShading& Shd)
|
||||
{
|
||||
//Type
|
||||
if(false != Shd.m_oVal.IsInit())
|
||||
if (false != Shd.m_oVal.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerShdType::Value);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
switch(Shd.m_oVal.get().GetValue())
|
||||
{
|
||||
case SimpleTypes::shdNil: m_oStream.WriteBYTE(shd_Nil);break;
|
||||
default: m_oStream.WriteBYTE(shd_Clear);break;
|
||||
}
|
||||
m_oStream.WriteBYTE(Shd.m_oVal.get().GetValue()); //Misalignment-footer.doc
|
||||
|
||||
}
|
||||
//Value
|
||||
if(false != Shd.m_oFill.IsInit())
|
||||
if (false != Shd.m_oFill.IsInit())
|
||||
WriteColor(c_oSerShdType::Color, Shd.m_oFill.get());
|
||||
else if (false != Shd.m_oColor.IsInit())
|
||||
WriteColor(c_oSerShdType::Color, Shd.m_oColor.get());
|
||||
|
||||
WriteThemeColor(c_oSerShdType::ColorTheme, Shd.m_oFill, Shd.m_oThemeFill, Shd.m_oThemeFillTint, Shd.m_oThemeFillShade);
|
||||
}
|
||||
void WriteDistance(const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistL,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistT,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistR,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistB)
|
||||
{
|
||||
//left
|
||||
if(false != m_oDistL.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::left);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistL.get().ToMM());
|
||||
}
|
||||
//top
|
||||
if(false != m_oDistT.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::top);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistT.get().ToMM());
|
||||
}
|
||||
//Right
|
||||
if(false != m_oDistR.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::right);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistR.get().ToMM());
|
||||
}
|
||||
//bottom
|
||||
if(false != m_oDistB.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottom);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistB.get().ToMM());
|
||||
}
|
||||
}
|
||||
void WritePaddings(const nullable<SimpleTypes::CTwipsMeasure>& left, const nullable<SimpleTypes::CTwipsMeasure>& top,
|
||||
const nullable<SimpleTypes::CTwipsMeasure>& right, const nullable<SimpleTypes::CTwipsMeasure>& bottom)
|
||||
{
|
||||
//left
|
||||
if(left.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::left);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(left.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::leftTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(left->ToTwips());
|
||||
}
|
||||
//top
|
||||
if(top.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::top);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(top.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::topTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(top->ToTwips());
|
||||
}
|
||||
//Right
|
||||
if(right.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::right);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(right.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::rightTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(right->ToTwips());
|
||||
}
|
||||
//bottom
|
||||
if(bottom.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottom);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(bottom.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottomTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(bottom->ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteFont(std::wstring& sFontName, BYTE bType, DocWrapper::FontProcessor& m_oFontProcessor)
|
||||
@ -701,9 +669,9 @@ namespace BinDocxRW
|
||||
//Spacing
|
||||
if(false != rPr->m_oSpacing.IsInit() && false != rPr->m_oSpacing->m_oVal.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Spacing);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rPr->m_oSpacing->m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::SpacingTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rPr->m_oSpacing->m_oVal->ToTwips());
|
||||
}
|
||||
//DStrikeout
|
||||
if(false != rPr->m_oDStrike.IsInit())
|
||||
@ -729,9 +697,9 @@ namespace BinDocxRW
|
||||
//Position
|
||||
if(false != rPr->m_oPosition.IsInit() && false != rPr->m_oPosition->m_oVal.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Position);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rPr->m_oPosition->m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::PositionHps);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rPr->m_oPosition->m_oVal->ToHps());
|
||||
}
|
||||
//BoldCs
|
||||
if(rPr->m_oBoldCs.IsInit())
|
||||
@ -1066,29 +1034,29 @@ namespace BinDocxRW
|
||||
//Left
|
||||
if(false != Ind.m_oStart.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oStart.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_LeftTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oStart.get().ToTwips());
|
||||
}
|
||||
//Right
|
||||
if(false != Ind.m_oEnd.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oEnd.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_RightTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oEnd.get().ToTwips());
|
||||
}
|
||||
//FirstLine
|
||||
if(false != Ind.m_oFirstLine.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLine);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oFirstLine.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oFirstLine.get().ToTwips());
|
||||
}
|
||||
else if(false != Ind.m_oHanging.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLine);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble( -1 * Ind.m_oHanging.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG( -1 * Ind.m_oHanging.get().ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteSpacing(const ComplexTypes::Word::CSpacing& Spacing)
|
||||
@ -1101,24 +1069,9 @@ namespace BinDocxRW
|
||||
//Line
|
||||
if(false != Spacing.m_oLine.IsInit())
|
||||
{
|
||||
const SimpleTypes::CSignedTwipsMeasure& oLine = Spacing.m_oLine.get();
|
||||
double dLineMm = oLine.ToMm();
|
||||
if(dLineMm < 0)
|
||||
{
|
||||
dLineMm = -dLineMm;
|
||||
eLineSpacingRule = SimpleTypes::linespacingruleExact;
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_Line);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
if(SimpleTypes::linespacingruleAuto == eLineSpacingRule)
|
||||
{
|
||||
SimpleTypes::CSignedTwipsMeasure oTmp;oTmp.FromPoints(12);//240 twips
|
||||
m_oBcw.m_oStream.WriteDouble(dLineMm / oTmp.ToMm());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_oBcw.m_oStream.WriteDouble(dLineMm);
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_LineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oLine->ToTwips());
|
||||
//Write LineRule
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_LineRule);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
@ -1138,9 +1091,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(false != Spacing.m_oBefore.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_Before);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Spacing.m_oBefore.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_BeforeTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oBefore.get().ToTwips());
|
||||
}
|
||||
//After
|
||||
if(Spacing.m_oAfterAutospacing.IsInit())
|
||||
@ -1151,9 +1104,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(false != Spacing.m_oAfter.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_After);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Spacing.m_oAfter.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_AfterTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oAfter.get().ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteTabs(const OOX::Logic::CTabs& Tab, const nullable<ComplexTypes::Word::CInd>& oInd)
|
||||
@ -1197,9 +1150,9 @@ namespace BinDocxRW
|
||||
//pos
|
||||
if(false != TabItem.m_oPos.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Tab_Item_Pos);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(TabItem.m_oPos.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Tab_Item_PosTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(TabItem.m_oPos.get().ToTwips());
|
||||
}
|
||||
if(false != TabItem.m_oLeader.IsInit())
|
||||
{
|
||||
@ -1425,93 +1378,78 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePageSize(OOX::Logic::CSectionProperty* pSectPr)
|
||||
{
|
||||
double W = Page_Width;
|
||||
double H = Page_Height;
|
||||
BYTE Orientation = orientation_Portrait;
|
||||
if(NULL != pSectPr && pSectPr->m_oPgSz.IsInit())
|
||||
{
|
||||
const ComplexTypes::Word::CPageSz& pSz = pSectPr->m_oPgSz.get();
|
||||
if(pSz.m_oW.IsInit())
|
||||
W = pSz.m_oW.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::WTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pSz.m_oW->ToTwips());
|
||||
}
|
||||
if(pSz.m_oH.IsInit())
|
||||
H = pSz.m_oH.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::HTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pSz.m_oH->ToTwips());
|
||||
}
|
||||
if(pSz.m_oOrient.IsInit())
|
||||
{
|
||||
BYTE Orientation = orientation_Portrait;
|
||||
switch(pSz.m_oOrient.get().GetValue())
|
||||
{
|
||||
case SimpleTypes::pageorientPortrait: Orientation = orientation_Portrait;break;
|
||||
case SimpleTypes::pageorientLandscape: Orientation = orientation_Landscape;break;
|
||||
default: break;
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::Orientation);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(Orientation);
|
||||
}
|
||||
}
|
||||
//W
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::W);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(W);
|
||||
//H
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::H);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(H);
|
||||
//Orientation
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::Orientation);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(Orientation);
|
||||
}
|
||||
void WritePageMargin(OOX::Logic::CSectionProperty* pSectPr)
|
||||
{
|
||||
double H = Page_Height;
|
||||
double L = X_Left_Margin;
|
||||
double T = Y_Top_Margin;
|
||||
double R = X_Right_Margin;
|
||||
double B = Y_Bottom_Margin;
|
||||
double Header = Y_Default_Header;
|
||||
double Footer = Y_Default_Footer;
|
||||
|
||||
if(NULL != pSectPr && pSectPr->m_oPgSz.IsInit() && pSectPr->m_oPgMar.IsInit())
|
||||
{
|
||||
const ComplexTypes::Word::CPageSz& pSz = pSectPr->m_oPgSz.get();
|
||||
if(pSz.m_oH.IsInit())
|
||||
H = pSz.m_oH.get().ToMm();
|
||||
|
||||
const ComplexTypes::Word::CPageMar& pMar = pSectPr->m_oPgMar.get();
|
||||
if(pMar.m_oLeft.IsInit())
|
||||
L = pMar.m_oLeft.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::LeftTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oLeft->ToTwips());
|
||||
}
|
||||
if(pMar.m_oTop.IsInit())
|
||||
T = pMar.m_oTop.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::TopTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oTop->ToTwips());
|
||||
}
|
||||
if(pMar.m_oRight.IsInit())
|
||||
R = pMar.m_oRight.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::RightTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oRight->ToTwips());
|
||||
}
|
||||
if(pMar.m_oBottom.IsInit())
|
||||
B = pMar.m_oBottom.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::BottomTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oBottom->ToTwips());
|
||||
}
|
||||
if(pMar.m_oHeader.IsInit())
|
||||
Header = pMar.m_oHeader.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::HeaderTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oHeader->ToTwips());
|
||||
}
|
||||
if(pMar.m_oFooter.IsInit())
|
||||
Footer = pMar.m_oFooter.get().ToMm();
|
||||
}
|
||||
//Left
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(L);
|
||||
//Top
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Top);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(T);
|
||||
//Right
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(R);
|
||||
//Bottom
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Bottom);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(B);
|
||||
//Header
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Header);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Header);
|
||||
//Footer
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Footer);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Footer);
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::FooterTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oFooter->ToTwips());
|
||||
}
|
||||
}
|
||||
}
|
||||
void WriteHeaderFooter(OOX::Logic::CSectionProperty* pSectPr, std::vector<ComplexTypes::Word::CHdrFtrRef*>& aRefs, bool bHdr)
|
||||
{
|
||||
@ -1816,11 +1754,8 @@ namespace BinDocxRW
|
||||
if(tblPr.m_oTblInd->m_oW.IsInit() && false == tblPr.m_oTblInd->m_oW->IsPercent() &&
|
||||
tblPr.m_oTblInd->m_oType.IsInit() && SimpleTypes::tblwidthDxa == tblPr.m_oTblInd->m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(tblPr.m_oTblInd->m_oW->GetValue());
|
||||
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableInd);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm());
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableIndTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(tblPr.m_oTblInd->m_oW->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -1886,11 +1821,8 @@ namespace BinDocxRW
|
||||
if(cs.m_oW.IsInit() && false == cs.m_oW->IsPercent() &&
|
||||
cs.m_oType.IsInit() && SimpleTypes::tblwidthDxa == cs.m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(cs.m_oW->GetValue());
|
||||
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableCellSpacing);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm() * 2);//Умножаем на 2 из-за разного понимания cellSpacing
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableCellSpacingTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(cs.m_oW->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -1948,9 +1880,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pr.m_oTblpX.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpX);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pr.m_oTblpX->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpXTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pr.m_oTblpX->ToTwips());
|
||||
}
|
||||
if(pr.m_oTblpXSpec.IsInit())
|
||||
{
|
||||
@ -1966,9 +1898,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pr.m_oTblpY.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpY);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pr.m_oTblpY->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpYTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pr.m_oTblpY->ToTwips());
|
||||
}
|
||||
if(pr.m_oTblpYSpec.IsInit())
|
||||
{
|
||||
@ -2035,12 +1967,9 @@ namespace BinDocxRW
|
||||
if(cs.m_oW.IsInit() && false == cs.m_oW->IsPercent() &&
|
||||
cs.m_oType.IsInit() && SimpleTypes::tblwidthDxa == cs.m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(cs.m_oW->GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::TableCellSpacing);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm() * 2);//Умножаем на 2 из-за разного понимания cellSpacing
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::TableCellSpacingTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(cs.m_oW->GetValue());
|
||||
}
|
||||
}
|
||||
//Height
|
||||
@ -2133,9 +2062,9 @@ namespace BinDocxRW
|
||||
|
||||
|
||||
//Value
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_Value);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rowHeight.m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_ValueTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rowHeight.m_oVal->ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteW(int nType, const ComplexTypes::Word::CTblWidth& tableW, bool bWrite2 = false)
|
||||
@ -4337,10 +4266,10 @@ namespace BinDocxRW
|
||||
|
||||
if ( pSSub->m_oSSubPr.IsInit() )
|
||||
WriteMathSSubPr(pSSub->m_oSSubPr.get());
|
||||
if ( pSSub->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSub->m_oSub.get());
|
||||
if ( pSSub->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSub->m_oElement.get());
|
||||
if ( pSSub->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSub->m_oSub.get());
|
||||
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -4352,12 +4281,12 @@ namespace BinDocxRW
|
||||
|
||||
if ( pSSubSup->m_oSSubSupPr.IsInit() )
|
||||
WriteMathSSubSupPr(pSSubSup->m_oSSubSupPr.get());
|
||||
if ( pSSubSup->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSubSup->m_oElement.get());
|
||||
if ( pSSubSup->m_oSub.IsInit() )
|
||||
WriteMathSub(pSSubSup->m_oSub.get());
|
||||
if ( pSSubSup->m_oSup.IsInit() )
|
||||
WriteMathSup(pSSubSup->m_oSup.get());
|
||||
if ( pSSubSup->m_oElement.IsInit() )
|
||||
WriteMathElement(pSSubSup->m_oElement.get());
|
||||
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -6141,27 +6070,28 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pAnchor.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistL->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistT->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistT->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistR->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistB->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oHidden.IsInit())
|
||||
{
|
||||
@ -6380,34 +6310,39 @@ namespace BinDocxRW
|
||||
}
|
||||
void WriteEffectExtent(const OOX::Drawing::CEffectExtent& oEffectExtent)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oL.ToMm());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::LeftEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oL.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Top);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oT.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::TopEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oT.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oR.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::RightEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oR.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Bottom);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oB.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::BottomEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oB.ToEmu());
|
||||
}
|
||||
void WriteExtent(const ComplexTypes::Drawing::CPositiveSize2D& oExtent)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::Cx);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oExtent.m_oCx.ToMM());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::CxEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oExtent.m_oCx.GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::Cy);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oExtent.m_oCy.ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::CyEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oExtent.m_oCy.GetValue());
|
||||
}
|
||||
void WritePositionH(const OOX::Drawing::CPosH& oPosH)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oPosH.m_oRelativeFrom.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::RelativeFrom);
|
||||
@ -6422,9 +6357,10 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oPosH.m_oPosOffset.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffset);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPosH.m_oPosOffset->ToMM());
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffsetEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPosH.m_oPosOffset->GetValue());
|
||||
}
|
||||
if(oPosH.m_oPctOffset.IsInit())
|
||||
{
|
||||
@ -6435,6 +6371,7 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePositionV(const OOX::Drawing::CPosV& oPosV)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oPosV.m_oRelativeFrom.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::RelativeFrom);
|
||||
@ -6449,9 +6386,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oPosV.m_oPosOffset.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffset);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPosV.m_oPosOffset->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffsetEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPosV.m_oPosOffset->GetValue());
|
||||
}
|
||||
if(oPosV.m_oPctOffset.IsInit())
|
||||
{
|
||||
@ -6492,40 +6429,43 @@ namespace BinDocxRW
|
||||
}
|
||||
void WriteSimplePos(const ComplexTypes::Drawing::CPoint2D& oSimplePos)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::X);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oSimplePos.m_oX.ToMm());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::XEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oSimplePos.m_oX.GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::Y);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oSimplePos.m_oY.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::YEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oSimplePos.m_oY.GetValue());
|
||||
}
|
||||
void WriteWrapSquare(const OOX::Drawing::CWrapSquare& oWrapSquare)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oWrapSquare.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistT->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistT->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistB->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6548,15 +6488,16 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapThrough.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapThrough.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapThrough.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapThrough.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapThrough.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapThrough.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapThrough.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6579,15 +6520,16 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapTight.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTight.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTight.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapTight.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTight.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTight.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapTight.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6610,23 +6552,23 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapTopBottom.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTopBottom.m_oDistT->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTopBottom.m_oDistT->GetValue());
|
||||
}
|
||||
if(oWrapTopBottom.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTopBottom.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTopBottom.m_oDistB->GetValue());
|
||||
}
|
||||
if(oWrapTopBottom.m_oEffectExtent.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::EffectExtent);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
|
||||
nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
WriteEffectExtent(oWrapTopBottom.m_oEffectExtent.get());
|
||||
WriteEffectExtent(oWrapTopBottom.m_oEffectExtent.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -6643,9 +6585,8 @@ namespace BinDocxRW
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapPolygon::Start);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
|
||||
nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
WritePoint2D(oWrapPath.m_oStart.get());
|
||||
WritePoint2D(oWrapPath.m_oStart.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if(oWrapPath.m_arrLineTo.size() > 0)
|
||||
@ -6672,14 +6613,15 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePoint2D(const ComplexTypes::Drawing::CPoint2D& oPoint2D)
|
||||
{
|
||||
//document is corrupted if the value is greater INT32
|
||||
int nCurPos = 0;
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::X);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint2D.m_oX.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::XEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPoint2D.m_oX.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::Y);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint2D.m_oY.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::YEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPoint2D.m_oY.ToEmu());
|
||||
}
|
||||
void WriteDocTable(OOX::Logic::CTbl* tbl)
|
||||
{
|
||||
@ -6880,9 +6822,9 @@ namespace BinDocxRW
|
||||
const ComplexTypes::Word::CTblGridCol& item = *grid.m_arrGridCol[i];
|
||||
if(item.m_oW.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerDocTableType::tblGrid_Item);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(item.m_oW->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerDocTableType::tblGrid_ItemTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(item.m_oW->ToTwips());
|
||||
}
|
||||
}
|
||||
if(grid.m_oTblGridChange.IsInit())
|
||||
@ -7557,8 +7499,8 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oSettings.m_oDefaultTabStop.IsInit() && oSettings.m_oDefaultTabStop->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DefaultTabStop);
|
||||
m_oBcw.m_oStream.WriteDouble(oSettings.m_oDefaultTabStop->m_oVal->ToMm());
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DefaultTabStopTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(oSettings.m_oDefaultTabStop->m_oVal->ToTwips());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oMathPr.IsInit())
|
||||
@ -7593,6 +7535,18 @@ namespace BinDocxRW
|
||||
WriteCompat(oSettings.m_oCompat.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oDecimalSymbol.IsInit() && oSettings.m_oDecimalSymbol->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DecimalSymbol);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSettings.m_oDecimalSymbol->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oListSeparator.IsInit() && oSettings.m_oListSeparator->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::ListSeparator);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSettings.m_oListSeparator->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettingsCustom.m_oSdtGlobalColor.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::SdtGlobalColor);
|
||||
@ -7675,9 +7629,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::InterSp);
|
||||
if (pInterSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pInterSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pInterSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7701,9 +7655,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::IntraSp);
|
||||
if (pIntraSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pIntraSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pIntraSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7714,9 +7668,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::LMargin);
|
||||
if (pLMargin->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pLMargin->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pLMargin->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7753,9 +7707,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::PostSp);
|
||||
if (pPostSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pPostSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pPostSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7766,9 +7720,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::PreSp);
|
||||
if (pPreSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pPreSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pPreSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7779,9 +7733,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::RMargin);
|
||||
if (pRMargin->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pRMargin->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pRMargin->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7805,9 +7759,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::WrapIndent);
|
||||
if (pWrapIndent->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pWrapIndent->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pWrapIndent->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -8021,38 +7975,6 @@ namespace BinDocxRW
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
};
|
||||
class BinaryAppTableWriter
|
||||
{
|
||||
BinaryCommonWriter m_oBcw;
|
||||
ParamsWriter& m_oParamsWriter;
|
||||
public:
|
||||
BinaryAppTableWriter(ParamsWriter& oParamsWriter):
|
||||
m_oBcw(oParamsWriter),m_oParamsWriter(oParamsWriter)
|
||||
{
|
||||
}
|
||||
void Write(OOX::CApp& oApp)
|
||||
{
|
||||
int nStart = m_oBcw.WriteItemWithLengthStart();
|
||||
WriteProperties(oApp);
|
||||
m_oBcw.WriteItemWithLengthEnd(nStart);
|
||||
}
|
||||
void WriteProperties(OOX::CApp& oApp)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if (oApp.m_sApplication.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerApp::Application);
|
||||
m_oBcw.m_oStream.WriteStringW3(oApp.m_sApplication.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oApp.m_sAppVersion.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerApp::AppVersion);
|
||||
m_oBcw.m_oStream.WriteStringW3(oApp.m_sAppVersion.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
};
|
||||
class BinaryFileWriter
|
||||
{
|
||||
BinaryCommonWriter m_oBcw;
|
||||
@ -8171,6 +8093,13 @@ namespace BinDocxRW
|
||||
oBinaryCommentsTableWriter.Write(*oDocx.m_pComments, oDocx.m_pCommentsExt, oDocx.m_pPeople, m_oParamsWriter.m_mapIgnoreComments);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
if(NULL != oDocx.m_pDocumentComments)
|
||||
{
|
||||
BinDocxRW::BinaryCommentsTableWriter oBinaryCommentsTableWriter(m_oParamsWriter);
|
||||
int nCurPos = this->WriteTableStart(BinDocxRW::c_oSerTableTypes::DocumentComments);
|
||||
oBinaryCommentsTableWriter.Write(*oDocx.m_pDocumentComments, oDocx.m_pDocumentCommentsExt, oDocx.m_pDocumentPeople, m_oParamsWriter.m_mapIgnoreComments);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
|
||||
//Write StyleTable
|
||||
BinDocxRW::BinaryStyleTableWriter oBinaryStyleTableWriter(m_oParamsWriter);
|
||||
@ -8208,9 +8137,15 @@ namespace BinDocxRW
|
||||
//Write App
|
||||
if(NULL != oDocx.m_pApp)
|
||||
{
|
||||
BinDocxRW::BinaryAppTableWriter oBinaryAppWriter(m_oParamsWriter);
|
||||
nCurPos = this->WriteTableStart(BinDocxRW::c_oSerTableTypes::App);
|
||||
oBinaryAppWriter.Write(*oDocx.m_pApp);
|
||||
oDocx.m_pApp->ToPptxApp()->toPPTY(&oBufferedStream);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
|
||||
if(NULL != oDocx.m_pCore)
|
||||
{
|
||||
nCurPos = this->WriteTableStart(BinDocxRW::c_oSerTableTypes::Core);
|
||||
oDocx.m_pCore->ToPptxCore()->toPPTY(&oBufferedStream);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
|
||||
|
||||
@ -260,8 +260,7 @@ namespace BinXlsxRW{
|
||||
{
|
||||
OOX::Spreadsheet::CTableFile* pTable = new OOX::Spreadsheet::CTableFile(NULL);
|
||||
pTable->m_oTable.Init();
|
||||
pTable->m_oTable->m_oDisplayName.Init();
|
||||
pTable->m_oTable->m_oDisplayName->append(L"Table1");
|
||||
pTable->m_oTable->m_oDisplayName = L"Table1";
|
||||
pTable->m_oTable->m_oRef.Init();
|
||||
pTable->m_oTable->m_oRef->SetValue(OOX::Spreadsheet::CCell::combineRef(m_nRow1 - 1, m_nCol1 - 1) + L":" + OOX::Spreadsheet::CCell::combineRef(m_nRow2 - 1, m_nCol2 - 1));
|
||||
pTable->m_oTable->m_oTotalsRowCount.Init();
|
||||
|
||||
@ -296,33 +296,28 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const std::wstring& sSrcFileName,
|
||||
|
||||
OOX::CPath DocProps = std::wstring(_T("docProps"));
|
||||
|
||||
OOX::CApp* pApp = new OOX::CApp(NULL);
|
||||
if (pApp)
|
||||
if (NULL != m_pCurFileWriter->m_pApp)
|
||||
{
|
||||
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
|
||||
if (sApplication.empty())
|
||||
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
|
||||
pApp->SetApplication(sApplication);
|
||||
#if defined(INTVER)
|
||||
pApp->SetAppVersion(VALUE2STR(INTVER));
|
||||
#endif
|
||||
pApp->SetDocSecurity(0);
|
||||
pApp->SetScaleCrop(false);
|
||||
pApp->SetLinksUpToDate(false);
|
||||
pApp->SetSharedDoc(false);
|
||||
pApp->SetHyperlinksChanged(false);
|
||||
|
||||
pApp->write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, *pContentTypes);
|
||||
delete pApp;
|
||||
}
|
||||
OOX::CCore* pCore = new OOX::CCore(NULL);
|
||||
if (pCore)
|
||||
m_pCurFileWriter->m_pApp->write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, *pContentTypes);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCore->SetCreator(_T(""));
|
||||
pCore->SetLastModifiedBy(_T(""));
|
||||
pCore->write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, *pContentTypes);
|
||||
delete pCore;
|
||||
}
|
||||
OOX::CApp pApp(NULL);
|
||||
pApp.SetDefaults();
|
||||
pApp.write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, *pContentTypes);
|
||||
}
|
||||
|
||||
if (NULL != m_pCurFileWriter->m_pCore)
|
||||
{
|
||||
m_pCurFileWriter->m_pCore->write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, *pContentTypes);
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::CCore pCore(NULL);
|
||||
pCore.SetDefaults();
|
||||
pCore.write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, *pContentTypes);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
m_pCurFileWriter->Write();
|
||||
pContentTypes->Write(sDstPath);
|
||||
|
||||
@ -150,28 +150,32 @@ namespace BinXlsxRW{
|
||||
m_pExternalDrawingConverter->SetDstContentRels();
|
||||
|
||||
//получаем sThemePath из bsFilename предполагая что папка theme находится на уровень выше bsFilename
|
||||
std::wstring sDrawingsPath;
|
||||
std::wstring sThemePath;
|
||||
std::wstring sEmbedingPath;
|
||||
std::wstring sContentTypePath;
|
||||
|
||||
int nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR);
|
||||
size_t nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR);
|
||||
nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR, nIndex - 1);
|
||||
if(-1 != nIndex)
|
||||
|
||||
if(std::wstring::npos != nIndex)
|
||||
{
|
||||
std::wstring sFilepathLeft = sFilepath.substr(0, nIndex + 1);
|
||||
|
||||
sThemePath = sFilepathLeft + L"theme";
|
||||
sEmbedingPath = sFilepathLeft + L"embeddings";
|
||||
sDrawingsPath = sFilepathLeft + L"drawings";
|
||||
}
|
||||
if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_DOCX) sContentTypePath = L"/word/charts/";
|
||||
else if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_XLSX) sContentTypePath = L"/xl/charts/";
|
||||
else sContentTypePath = L"/ppt/charts/";
|
||||
|
||||
//todo theme path
|
||||
BinXlsxRW::SaveParams oSaveParams(sThemePath, m_pExternalDrawingConverter->GetContentTypes());
|
||||
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sThemePath, m_pExternalDrawingConverter->GetContentTypes());
|
||||
OOX::Spreadsheet::CChartSpace oChartSpace(NULL);
|
||||
BinXlsxRW::BinaryChartReader oBinaryChartReader(*pReader, oSaveParams, m_pExternalDrawingConverter);
|
||||
|
||||
oBinaryChartReader.ReadCT_ChartSpace(lLength, &oChartSpace.m_oChartSpace);
|
||||
oBinaryChartReader.ReadCT_ChartSpace(lLength, &oChartSpace);
|
||||
|
||||
if(oChartSpace.isValid())
|
||||
{
|
||||
@ -207,13 +211,11 @@ namespace BinXlsxRW{
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(pathRelsDir.GetPath());
|
||||
|
||||
oChartSpace.write2(sFilepath);
|
||||
oChartSpace.write(sFilepath, sContentTypePath, *pReader->m_pRels->m_pManager->m_pContentTypes);
|
||||
|
||||
OOX::CPath pathRelsFile = pathRelsDir + FILE_SEPARATOR_STR + strFilename + _T(".rels");
|
||||
m_pExternalDrawingConverter->SaveDstContentRels(pathRelsFile.GetPath());
|
||||
|
||||
pReader->m_pRels->m_pManager->m_pContentTypes->Registration(L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", sContentTypePath, strFilename);
|
||||
|
||||
bRes = true;
|
||||
}
|
||||
return bRes;
|
||||
@ -265,4 +267,11 @@ namespace BinXlsxRW{
|
||||
NSDirectory::DeleteDirectory(sTempDir);
|
||||
return res;
|
||||
}
|
||||
bool CXlsxSerializer::hasPivot(const std::wstring& sSrcPath)
|
||||
{
|
||||
//todo CXlsx
|
||||
std::wstring sData;
|
||||
NSFile::CFileBinary::ReadAllTextUtf8(sSrcPath + FILE_SEPARATOR_STR + L"[Content_Types].xml", sData);
|
||||
return std::wstring::npos != sData.find(OOX::Spreadsheet::FileTypes::PivotTable.OverrideType());
|
||||
}
|
||||
};
|
||||
|
||||
@ -74,6 +74,7 @@ namespace BinXlsxRW {
|
||||
void setIsNoBase64 (bool bIsNoBase64);
|
||||
|
||||
bool writeChartXlsx (const std::wstring& sDstFile ,const OOX::Spreadsheet::CChartSpace& oChart);
|
||||
bool hasPivot (const std::wstring& sSrcPath);
|
||||
};
|
||||
}
|
||||
#endif // #ifndef XLSX_SERIALIZER
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
69F181AF1C77274E00B2952B /* FileDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F181AD1C77274E00B2952B /* FileDownloader.h */; };
|
||||
8A404FD3208A01AF00F2D5CF /* FileDownloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A404FD2208A01AF00F2D5CF /* FileDownloader.cpp */; };
|
||||
8A404FD5208A01CE00F2D5CF /* FileDownloader_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A404FD4208A01CE00F2D5CF /* FileDownloader_private.h */; };
|
||||
8AB24BFD213004E400E80DDD /* CustormXmlWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */; };
|
||||
8AB24BFE213004E400E80DDD /* CustormXmlWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -103,6 +105,8 @@
|
||||
69F181AD1C77274E00B2952B /* FileDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDownloader.h; path = ../../../Common/FileDownloader/FileDownloader.h; sourceTree = "<group>"; };
|
||||
8A404FD2208A01AF00F2D5CF /* FileDownloader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDownloader.cpp; path = ../../../Common/FileDownloader/FileDownloader.cpp; sourceTree = "<group>"; };
|
||||
8A404FD4208A01CE00F2D5CF /* FileDownloader_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDownloader_private.h; path = ../../../Common/FileDownloader/FileDownloader_private.h; sourceTree = "<group>"; };
|
||||
8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustormXmlWriter.cpp; sourceTree = "<group>"; };
|
||||
8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustormXmlWriter.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -149,6 +153,8 @@
|
||||
children = (
|
||||
17E17EEB1AC4544900BEA2EA /* ChartWriter.h */,
|
||||
17E17EEC1AC4544900BEA2EA /* CommentsWriter.h */,
|
||||
8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */,
|
||||
8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */,
|
||||
17A765271B0F3DC30046BC0B /* DefaultThemeWriter.h */,
|
||||
17E17EF01AC4544900BEA2EA /* DocumentRelsWriter.h */,
|
||||
17E17EF11AC4544900BEA2EA /* DocumentWriter.h */,
|
||||
@ -292,6 +298,7 @@
|
||||
17C1FEBC1ACC42C4006B99B3 /* DocxSerializer.h in Headers */,
|
||||
17C1FEBD1ACC42C4006B99B3 /* FileWriter.h in Headers */,
|
||||
17C1FEBE1ACC42C4006B99B3 /* CSVWriter.h in Headers */,
|
||||
8AB24BFE213004E400E80DDD /* CustormXmlWriter.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -346,6 +353,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8AB24BFD213004E400E80DDD /* CustormXmlWriter.cpp in Sources */,
|
||||
17C1FE961ACC42C4006B99B3 /* Common.cpp in Sources */,
|
||||
17C1FE971ACC42C4006B99B3 /* ChartFromToBinary.cpp in Sources */,
|
||||
17C1FE981ACC42C4006B99B3 /* CSVReader.cpp in Sources */,
|
||||
@ -375,18 +383,12 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
NODOCX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
USE_ATL_CSTRING,
|
||||
USE_AVSOFFICESTUDIO_XMLUTILS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
SOLUTION_ASCOFFICEDOCXFILE2,
|
||||
_USE_LIBXML2_READER_,
|
||||
LIBXML_READER_ENABLED,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
@ -414,18 +416,12 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
NODOCX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
USE_ATL_CSTRING,
|
||||
USE_AVSOFFICESTUDIO_XMLUTILS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
SOLUTION_ASCOFFICEDOCXFILE2,
|
||||
_USE_LIBXML2_READER_,
|
||||
LIBXML_READER_ENABLED,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@ -105,7 +105,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
}
|
||||
_CP_LOG << L"[info] " << srcFileName << std::endl;
|
||||
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"password", NULL);
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"", NULL);
|
||||
|
||||
if (srcTempPath != srcFileName)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:ASCOfficeOdfFile.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1 @@
|
||||
DO NOT REMOVE FOLDER FOR XCODE
|
||||
@ -852,9 +852,12 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring StyleDisplayName(const std::wstring & Name, odf_types::style_family::type Type)
|
||||
std::wstring StyleDisplayName(const std::wstring & Name, const std::wstring & DisplayName, odf_types::style_family::type Type)
|
||||
{
|
||||
if (!Name.empty())
|
||||
if (!DisplayName.empty())
|
||||
return DisplayName;
|
||||
|
||||
if (!Name.empty())
|
||||
return Name;
|
||||
else
|
||||
{
|
||||
@ -930,8 +933,8 @@ mc:Ignorable=\"w14 wp14\">";
|
||||
|
||||
for (size_t i = 0; i < numIds.size(); i++)
|
||||
{
|
||||
strm << L"<w:num w:numId=\"" << numIds[i] << L"\" >";
|
||||
strm << L"<w:abstractNumId w:val=\"" << numIds[i] << "\" />";
|
||||
strm << L"<w:num w:numId=\"" << numIds[i] << L"\">";
|
||||
strm << L"<w:abstractNumId w:val=\"" << numIds[i] << "\"/>";
|
||||
strm << L"</w:num>";
|
||||
}
|
||||
|
||||
@ -957,19 +960,19 @@ void docx_conversion_context::process_fonts()
|
||||
if (!arFonts[i]) continue;
|
||||
if (arFonts[i]->name().empty()) continue;
|
||||
|
||||
strm << L"<w:font w:name=\"" << arFonts[i]->name() << L"\" >";
|
||||
strm << L"<w:font w:name=\"" << arFonts[i]->name() << L"\">";
|
||||
|
||||
if (!arFonts[i]->charset().empty())
|
||||
strm << L"<w:charset w:val=\"" << arFonts[i]->charset() <<"\" />";
|
||||
strm << L"<w:charset w:val=\"" << arFonts[i]->charset() <<"\"/>";
|
||||
|
||||
if (!arFonts[i]->family().empty())
|
||||
strm << L"<w:family w:val=\"" << arFonts[i]->family() << "\" />";
|
||||
strm << L"<w:family w:val=\"" << arFonts[i]->family() << "\"/>";
|
||||
|
||||
if (!arFonts[i]->pitch().empty())
|
||||
strm << L"<w:pitch w:val=\"" << arFonts[i]->pitch() << "\" />";
|
||||
strm << L"<w:pitch w:val=\"" << arFonts[i]->pitch() << "\"/>";
|
||||
|
||||
if (!arFonts[i]->alt_name().empty())
|
||||
strm << L"<w:altName w:val=\"" << arFonts[i]->alt_name() << "\" />";
|
||||
strm << L"<w:altName w:val=\"" << arFonts[i]->alt_name() << "\"/>";
|
||||
|
||||
strm << L"</w:font>";
|
||||
}
|
||||
@ -992,7 +995,7 @@ void docx_conversion_context::process_styles()
|
||||
_Wostream << L"xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" ";
|
||||
_Wostream << L"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" ";
|
||||
_Wostream << L"xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" ";
|
||||
_Wostream << L"mc:Ignorable=\"w14\"> ";
|
||||
_Wostream << L"mc:Ignorable=\"w14\">";
|
||||
|
||||
if (odf_reader::odf_document * doc = root())
|
||||
{
|
||||
@ -1062,30 +1065,34 @@ void docx_conversion_context::process_styles()
|
||||
}
|
||||
_Wostream << L">";
|
||||
|
||||
const std::wstring displayName = StyleDisplayName(arStyles[i]->name(), arStyles[i]->type());
|
||||
const std::wstring displayName = StyleDisplayName(arStyles[i]->name(), arStyles[i]->display_name(), arStyles[i]->type());
|
||||
|
||||
_Wostream << L"<w:name w:val=\"" << displayName << L"\" />";
|
||||
_Wostream << L"<w:name w:val=\"" << displayName << L"\"/>";
|
||||
|
||||
if (odf_reader::style_instance * baseOn = arStyles[i]->parent())
|
||||
{
|
||||
const std::wstring basedOnId = styles_map_.get(baseOn->name(), baseOn->type());
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\" />";
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\"/>";
|
||||
}
|
||||
else if (!arStyles[i]->is_default() && styles_map_.check(L"", arStyles[i]->type()))
|
||||
{
|
||||
const std::wstring basedOnId = styles_map_.get(L"", arStyles[i]->type());
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\" />";
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\"/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
_Wostream << L"<w:qFormat/>";
|
||||
}
|
||||
|
||||
if (odf_reader::style_instance * next = arStyles[i]->next())
|
||||
{
|
||||
const std::wstring nextId = styles_map_.get(next->name(), next->type());
|
||||
_Wostream << L"<w:next w:val=\"" << nextId << "\" />";
|
||||
_Wostream << L"<w:next w:val=\"" << nextId << "\"/>";
|
||||
}
|
||||
else if (arStyles[i]->is_default())
|
||||
{
|
||||
// self
|
||||
_Wostream << L"<w:next w:val=\"" << id << "\" />";
|
||||
_Wostream << L"<w:next w:val=\"" << id << "\"/>";
|
||||
}
|
||||
|
||||
if (odf_reader::style_content * content = arStyles[i]->content())
|
||||
@ -1555,7 +1562,8 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
)
|
||||
{
|
||||
process_page_break_after(styleInst);
|
||||
if (styleInst->is_automatic())
|
||||
|
||||
if (styleInst->is_automatic())
|
||||
{
|
||||
if (odf_reader::style_content * styleContent = styleInst->content())
|
||||
{
|
||||
@ -1593,9 +1601,13 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
}
|
||||
}
|
||||
set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt) : 0);
|
||||
|
||||
|
||||
styleContent->docx_convert(*this);
|
||||
|
||||
if ((Attr->outline_level_) && (*Attr->outline_level_ > 0))
|
||||
{
|
||||
std::wstringstream & _pPr = get_styles_context().paragraph_nodes();
|
||||
_pPr << L"<w:outlineLvl w:val=\"" << *Attr->outline_level_ - 1 << L"\"/>";
|
||||
}
|
||||
end_automatic_style();
|
||||
|
||||
push_text_properties(styleContent->get_style_text_properties());
|
||||
@ -1632,12 +1644,6 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
output_stream() << L"</w:pPr>";
|
||||
}
|
||||
}
|
||||
else if ((Attr->outline_level_) && (*Attr->outline_level_ > 0))
|
||||
{
|
||||
output_stream() << L"<w:pPr>";
|
||||
output_stream() << L"<w:outlineLvl w:val=\"" << *Attr->outline_level_ - 1 << L"\"/>";
|
||||
output_stream() << L"</w:pPr>";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,16 +123,17 @@ public:
|
||||
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"avi") return typeVideo;
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"wma") return typeAudio;
|
||||
if (sExt == L"wav") return typeAudio;
|
||||
|
||||
if (sExt == L"mp3") return typeAudio;
|
||||
if (sExt == L"m4a") return typeAudio;
|
||||
if (sExt == L"m4v") return typeVideo;
|
||||
if (sExt == L"mp4") return typeVideo;
|
||||
if (sExt == L"mov") return typeVideo;
|
||||
if (sExt == L"mkv") return typeVideo;
|
||||
if (sExt == L"webm") return typeVideo;
|
||||
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"wma") return typeAudio;
|
||||
if (sExt == L"wav") return typeAudio;
|
||||
if (sExt == L"mp3") return typeAudio;
|
||||
if (sExt == L"m4a") return typeAudio;
|
||||
|
||||
return typeMedia;
|
||||
}
|
||||
|
||||
@ -375,10 +375,9 @@ void _oox_drawing::serialize_bodyPr(std::wostream & strm, const std::wstring & n
|
||||
{
|
||||
CP_XML_NODE(L"a:spAutoFit");
|
||||
}
|
||||
else if ((bFitToSize) && (*bFitToSize))
|
||||
if ((bFitToSize) && (*bFitToSize))
|
||||
{
|
||||
CP_XML_NODE(L"a:noAutofit");
|
||||
//CP_XML_NODE(L"a:spAutoFit")
|
||||
CP_XML_NODE(L"a:normAutofit");
|
||||
//{
|
||||
// CP_XML_ATTR(L"lnSpcReduction", 10000);
|
||||
//}
|
||||
|
||||
@ -42,11 +42,11 @@ namespace odf_reader {
|
||||
const wchar_t * abstract_xml::ns = L"";
|
||||
const wchar_t * abstract_xml::name = L"abstract-xml";
|
||||
|
||||
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < xml_content_.size(); i++)
|
||||
{
|
||||
xml_content_[i]->text_to_stream(_Wostream);
|
||||
xml_content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const;
|
||||
|
||||
public:
|
||||
|
||||
@ -34,6 +34,8 @@
|
||||
|
||||
#include "serialize_elements.h"
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
#include "../formulasconvert/formulasconvert.h"
|
||||
|
||||
#include "style_graphic_properties.h"
|
||||
@ -735,7 +737,7 @@ void process_build_object::visit(chart_title& val)
|
||||
if (val.text_p_)
|
||||
{
|
||||
std::wstringstream v;
|
||||
val.text_p_->text_to_stream(v);
|
||||
val.text_p_->text_to_stream(v, false);
|
||||
t.content_ = v.str();
|
||||
}
|
||||
ApplyTextProperties(val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), t.text_properties_);
|
||||
@ -762,7 +764,7 @@ void process_build_object::visit(chart_subtitle & val)
|
||||
{
|
||||
title t;
|
||||
std::wstringstream v;
|
||||
val.text_p_->text_to_stream(v);
|
||||
val.text_p_->text_to_stream(v, false);
|
||||
t.content_ = v.str();
|
||||
|
||||
if (val.attlist_.common_draw_position_attlist_.svg_x_)
|
||||
@ -1036,7 +1038,8 @@ void process_build_object::visit(table_table_cell& val)
|
||||
for (size_t i = 0 ; i < val.content_.elements_.size(); i++)
|
||||
{
|
||||
std::wstringstream wstream_temp;
|
||||
val.content_.elements_[i]->text_to_stream(wstream_temp);
|
||||
val.content_.elements_[i]->text_to_stream(wstream_temp, false);
|
||||
|
||||
if (val.content_.elements_[i]->get_type() == typeTextP)
|
||||
{
|
||||
cell_cash += wstream_temp.str();
|
||||
|
||||
@ -106,7 +106,7 @@ void draw_image::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
//CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
}
|
||||
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -115,7 +115,7 @@ std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
|
||||
const wchar_t * draw_chart::ns = L"draw";
|
||||
const wchar_t * draw_chart::name = L"chart";
|
||||
|
||||
std::wostream & draw_chart::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_chart::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -225,9 +225,9 @@ void draw_g::add_child_element( xml::sax * Reader, const std::wstring & Ns, cons
|
||||
}
|
||||
}
|
||||
|
||||
std::wostream & draw_g::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_g::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -236,9 +236,9 @@ std::wostream & draw_g::text_to_stream(std::wostream & _Wostream) const
|
||||
const wchar_t * draw_frame::ns = L"draw";
|
||||
const wchar_t * draw_frame::name = L"frame";
|
||||
|
||||
std::wostream & draw_frame::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_frame::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -308,9 +308,9 @@ void draw_text_box_attlist::add_attributes( const xml::attributes_wc_ptr & Attri
|
||||
const wchar_t * draw_text_box::ns = L"draw";
|
||||
const wchar_t * draw_text_box::name = L"text-box";
|
||||
|
||||
std::wostream & draw_text_box::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & draw_text_box::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ public:
|
||||
static const ElementType type = typeDrawImage;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -114,7 +114,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
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);
|
||||
@ -160,7 +160,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
virtual void pptx_convert_placeHolder(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
int idx_in_owner ;
|
||||
|
||||
@ -211,7 +211,7 @@ public:
|
||||
|
||||
draw_g() : position_child_x1(0x7fffffff), position_child_y1(0x7fffffff), position_child_x2(0x7fffffff), position_child_y2(0x7fffffff) {}
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -263,7 +263,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
draw_text_box_attlist draw_text_box_attlist_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -145,8 +145,11 @@ void draw_frame::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
style_instance * defaultStyle = Context.root()->odf_context().styleContainer().style_default_by_type(odf_types::style_family::Presentation);
|
||||
if (defaultStyle)instances.push_back(defaultStyle);
|
||||
|
||||
instances.push_back(baseStyleInst);
|
||||
instances.push_back(baseStyleInst);
|
||||
}
|
||||
else if (common_presentation_attlist_.presentation_class_)
|
||||
{
|
||||
instances.push_back(baseStyleInst);
|
||||
}
|
||||
if (grStyleInst)//обычная векторная фигура
|
||||
{
|
||||
|
||||
@ -44,7 +44,7 @@ namespace odf_reader {
|
||||
const wchar_t * svg_desc::ns = L"svg";
|
||||
const wchar_t * svg_desc::name = L"desc";
|
||||
|
||||
std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << text_ ;
|
||||
return _Wostream;
|
||||
@ -60,7 +60,7 @@ void svg_desc::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_uri::ns = L"svg";
|
||||
const wchar_t * svg_font_face_uri::name = L"font-face-uri";
|
||||
|
||||
std::wostream & svg_font_face_uri::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_uri::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -88,7 +88,7 @@ void svg_font_face_uri::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_format::ns = L"svg";
|
||||
const wchar_t * svg_font_face_format::name = L"font-face-format";
|
||||
|
||||
std::wostream & svg_font_face_format::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_format::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -111,7 +111,7 @@ void svg_font_face_format::add_text(const std::wstring & Text)
|
||||
const wchar_t * svg_font_face_name::ns = L"svg";
|
||||
const wchar_t * svg_font_face_name::name = L"font-face-name";
|
||||
|
||||
std::wostream & svg_font_face_name::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & svg_font_face_name::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
common_svg_font_face_xlink_attlist common_svg_font_face_xlink_attlist_;
|
||||
office_element_ptr_array svg_font_face_format_;
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring text_;
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
optional<std::wstring>::Type svg_string_;
|
||||
|
||||
@ -136,7 +136,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
optional<std::wstring>::Type name_;
|
||||
|
||||
private:
|
||||
|
||||
@ -87,9 +87,9 @@ void common_style_header_footer_attlist::add_attributes( const xml::attributes_w
|
||||
}
|
||||
|
||||
// header-footer-content
|
||||
std::wostream & header_footer_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & header_footer_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
serialize_elements_text(_Wostream, content_);
|
||||
serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ private:
|
||||
class header_footer_content
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
office_element_ptr tracked_changes_;
|
||||
|
||||
@ -48,9 +48,9 @@ namespace text {
|
||||
const wchar_t * number::ns = L"text";
|
||||
const wchar_t * number::name = L"number";
|
||||
|
||||
std::wostream & number::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & number::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_xml_to_text( string_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_xml_to_text( string_ ) : string_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -64,11 +64,11 @@ void number::add_text(const std::wstring & Text)
|
||||
const wchar_t * list_item::ns = L"text";
|
||||
const wchar_t * list_item::name = L"list-item";
|
||||
|
||||
std::wostream & list_item::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list_item::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -161,11 +161,11 @@ void list_header::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
|
||||
|
||||
std::wostream & list_header::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list_header::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
number() {}
|
||||
@ -90,7 +90,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
public:
|
||||
list_item() {}
|
||||
|
||||
@ -128,7 +128,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
list_header() {}
|
||||
|
||||
@ -65,7 +65,7 @@ void math_mi::add_text(const std::wstring & Text)
|
||||
text_ = Text;
|
||||
}
|
||||
|
||||
std::wostream & math_mi::text_to_stream(std::wostream & _strm) const
|
||||
std::wostream & math_mi::text_to_stream(std::wostream & _strm, bool bXmlEncode) const
|
||||
{
|
||||
if (text_)
|
||||
_strm << *text_;
|
||||
@ -143,7 +143,7 @@ void math_mo::add_text(const std::wstring & Text)
|
||||
text_ = Text;
|
||||
}
|
||||
|
||||
std::wostream & math_mo::text_to_stream(std::wostream & _strm) const
|
||||
std::wostream & math_mo::text_to_stream(std::wostream & _strm, bool bXmlEncode) const
|
||||
{
|
||||
if (text_)
|
||||
_strm << *text_;
|
||||
|
||||
@ -48,7 +48,7 @@ public:
|
||||
|
||||
virtual void oox_convert(oox::math_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
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);
|
||||
@ -73,7 +73,7 @@ public:
|
||||
|
||||
virtual void oox_convert(oox::math_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(bool) fence_;
|
||||
_CP_OPT(bool) stretchy_;
|
||||
|
||||
@ -48,14 +48,14 @@ namespace text {
|
||||
const wchar_t * note_citation::ns = L"text";
|
||||
const wchar_t * note_citation::name = L"note-citation";
|
||||
|
||||
std::wostream & note_citation::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note_citation::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (!text_label_.empty())
|
||||
_Wostream << text_label_;
|
||||
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -89,11 +89,11 @@ void note_citation::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * note_body::ns = L"text";
|
||||
const wchar_t * note_body::name = L"note-body";
|
||||
|
||||
std::wostream & note_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
note_citation() {}
|
||||
@ -84,7 +84,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context) ;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
public:
|
||||
note_body() {}
|
||||
|
||||
|
||||
@ -57,6 +57,7 @@ namespace odf_reader {
|
||||
style_instance::style_instance(
|
||||
styles_container *Container,
|
||||
const std::wstring &Name,
|
||||
const std::wstring &DisplayName,
|
||||
style_family::type Type,
|
||||
style_content *Content,
|
||||
bool IsAutomatic,
|
||||
@ -68,6 +69,7 @@ style_instance::style_instance(
|
||||
) :
|
||||
container_ (Container),
|
||||
name_ (Name),
|
||||
display_name_ (DisplayName),
|
||||
style_type_ (Type),
|
||||
content_ (Content),
|
||||
is_automatic_ (IsAutomatic),
|
||||
@ -110,7 +112,7 @@ void styles_container::add_style( const std::wstring & Name,
|
||||
{
|
||||
ParentStyleName = L"";//иначе в коде возможно зацикливание.
|
||||
}
|
||||
style_instance_ptr newStyle = style_instance_ptr( new style_instance(this, Name, Type, Content, IsAutomatic, IsDefault,
|
||||
style_instance_ptr newStyle = style_instance_ptr( new style_instance(this, Name, DisplayName, Type, Content, IsAutomatic, IsDefault,
|
||||
ParentStyleName, NextStyleName, DataStyleName, StyleClass));
|
||||
|
||||
instances_.push_back(newStyle);
|
||||
@ -143,7 +145,10 @@ const std::wstring & style_instance::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
const std::wstring & style_instance::display_name() const
|
||||
{
|
||||
return display_name_;
|
||||
}
|
||||
style_family::type style_instance::type() const
|
||||
{
|
||||
return style_type_;
|
||||
|
||||
@ -61,6 +61,7 @@ public:
|
||||
style_instance(
|
||||
styles_container * Container,
|
||||
const std::wstring & Name,
|
||||
const std::wstring & DisplayName,
|
||||
odf_types::style_family::type Type,
|
||||
style_content * Content,
|
||||
bool IsAutomatic,
|
||||
@ -71,8 +72,8 @@ public:
|
||||
const std::wstring & StyleClass
|
||||
);
|
||||
|
||||
|
||||
const std::wstring & name() const;
|
||||
const std::wstring & display_name()const;
|
||||
const std::wstring & name() const;
|
||||
odf_types::style_family::type type() const;
|
||||
style_content * content() const;
|
||||
style_instance * parent() const;
|
||||
@ -88,7 +89,10 @@ public:
|
||||
|
||||
private:
|
||||
styles_container * container_;
|
||||
|
||||
std::wstring name_;
|
||||
std::wstring display_name_;
|
||||
|
||||
odf_types::style_family::type style_type_;
|
||||
style_content * content_;
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ namespace odf_reader {
|
||||
const wchar_t * office_binary_data::ns = L"office";
|
||||
const wchar_t * office_binary_data::name = L"binary-data";
|
||||
|
||||
std::wostream & office_binary_data::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_binary_data::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring write_to(const std::wstring & path);
|
||||
private:
|
||||
|
||||
@ -55,10 +55,10 @@ namespace odf_reader {
|
||||
const wchar_t * office_body::ns = L"office";
|
||||
const wchar_t * office_body::name = L"body";
|
||||
|
||||
std::wostream & office_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (content_)
|
||||
content_->text_to_stream(_Wostream);
|
||||
content_->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
office_body();
|
||||
|
||||
@ -43,9 +43,9 @@ namespace odf_reader {
|
||||
|
||||
|
||||
|
||||
std::wostream & office_document_base::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_document_base::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
office_body_->text_to_stream(_Wostream);
|
||||
office_body_->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ namespace odf_reader {
|
||||
class office_document_base : public office_element
|
||||
{
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
_CP_OPT(std::wstring) element_style_name;
|
||||
_CP_OPT(std::wstring) next_element_style_name; //for master page
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const
|
||||
{
|
||||
_CP_LOG << L"[warning] use base text_to_stream\n";
|
||||
return _Wostream;
|
||||
|
||||
@ -120,9 +120,9 @@ void paragraph_content_element<ElementT>::docx_serialize_run(office_element_ptr
|
||||
const wchar_t * text::ns = L"";
|
||||
const wchar_t * text::name = L"";
|
||||
|
||||
std::wostream & text::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_, true );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_, true ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ office_element_ptr text::create(const std::wstring & Text)
|
||||
const wchar_t * s::ns = L"text";
|
||||
const wchar_t * s::name = L"s";
|
||||
|
||||
std::wostream & s::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & s::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_c_)
|
||||
{
|
||||
@ -259,7 +259,7 @@ void s::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * tab::ns = L"text";
|
||||
const wchar_t * tab::name = L"tab";
|
||||
|
||||
std::wostream & tab::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & tab::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << std::wstring(L"\t");
|
||||
return _Wostream;
|
||||
@ -291,7 +291,7 @@ void tab::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * line_break::ns = L"text";
|
||||
const wchar_t * line_break::name = L"line-break";
|
||||
|
||||
std::wostream & line_break::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & line_break::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << std::wstring(L"\r\n");
|
||||
return _Wostream;
|
||||
@ -332,7 +332,7 @@ void bookmark::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"text:name", text_name_, std::wstring(L""));
|
||||
}
|
||||
std::wostream & bookmark::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -348,7 +348,7 @@ void bookmark_start::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.start_bookmark(name_);
|
||||
}
|
||||
std::wostream & bookmark_start::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark_start::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -364,7 +364,7 @@ void bookmark_end::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.end_bookmark(name_);
|
||||
}
|
||||
std::wostream & bookmark_end::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bookmark_end::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -461,11 +461,11 @@ void hidden_text::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * span::ns = L"text";
|
||||
const wchar_t * span::name = L"span";
|
||||
|
||||
std::wostream & span::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & span::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -574,11 +574,11 @@ void span::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * a::ns = L"text";
|
||||
const wchar_t * a::name = L"a";
|
||||
|
||||
std::wostream & a::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & a::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->text_to_stream(_Wostream);
|
||||
content_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -712,13 +712,13 @@ const wchar_t * note::name = L"note";
|
||||
note::note()
|
||||
{}
|
||||
|
||||
std::wostream & note::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & note::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_note_citation_)
|
||||
text_note_citation_->text_to_stream(_Wostream);
|
||||
text_note_citation_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
if (text_note_body_)
|
||||
text_note_body_->text_to_stream(_Wostream);
|
||||
text_note_body_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
return _Wostream;
|
||||
}
|
||||
@ -806,13 +806,13 @@ void note::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * ruby::ns = L"text";
|
||||
const wchar_t * ruby::name = L"ruby";
|
||||
|
||||
std::wostream & ruby::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (text_ruby_base_)
|
||||
text_ruby_base_->text_to_stream(_Wostream);
|
||||
text_ruby_base_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
if (text_ruby_text_)
|
||||
text_ruby_text_->text_to_stream(_Wostream);
|
||||
text_ruby_text_->text_to_stream(_Wostream, bXmlEncode);
|
||||
|
||||
return _Wostream;
|
||||
}
|
||||
@ -846,9 +846,9 @@ void ruby::add_text(const std::wstring & Text)
|
||||
const wchar_t * title::ns = L"text";
|
||||
const wchar_t * title::name = L"title";
|
||||
|
||||
std::wostream & title::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & title::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -883,9 +883,9 @@ void title::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * subject::ns = L"text";
|
||||
const wchar_t * subject::name = L"subject";
|
||||
|
||||
std::wostream & subject::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & subject::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -919,9 +919,9 @@ void subject::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * chapter::ns = L"text";
|
||||
const wchar_t * chapter::name = L"chapter";
|
||||
|
||||
std::wostream & chapter::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & chapter::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -955,9 +955,9 @@ void chapter::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_placeholder::ns = L"text";
|
||||
const wchar_t * text_placeholder::name = L"placeholder";
|
||||
|
||||
std::wostream & text_placeholder::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_placeholder::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -986,9 +986,9 @@ void text_placeholder::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_page_number::ns = L"text";
|
||||
const wchar_t * text_page_number::name = L"page-number";
|
||||
|
||||
std::wostream & text_page_number::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_page_number::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1024,9 +1024,9 @@ void text_page_number::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_page_count::ns = L"text";
|
||||
const wchar_t * text_page_count::name = L"page-count";
|
||||
|
||||
std::wostream & text_page_count::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_page_count::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1059,9 +1059,9 @@ void text_page_count::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * text_date::ns = L"text";
|
||||
const wchar_t * text_date::name = L"date";
|
||||
|
||||
std::wostream & text_date::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_date::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1120,9 +1120,9 @@ void text_modification_date::pptx_convert(oox::pptx_conversion_context & Context
|
||||
const wchar_t * text_time::ns = L"text";
|
||||
const wchar_t * text_time::name = L"time";
|
||||
|
||||
std::wostream & text_time::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_time::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1180,9 +1180,9 @@ void text_modification_time::pptx_convert(oox::pptx_conversion_context & Context
|
||||
const wchar_t * text_file_name::ns = L"text";
|
||||
const wchar_t * text_file_name::name = L"file-name";
|
||||
|
||||
std::wostream & text_file_name::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_file_name::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void text_file_name::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1245,9 +1245,9 @@ void sequence::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:ref-name", ref_name_);
|
||||
CP_APPLY_ATTR(L"text:name", name_);
|
||||
}
|
||||
std::wostream & sequence::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & sequence::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void sequence::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
|
||||
@ -1332,9 +1332,9 @@ void expression::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:formula", text_formula_);
|
||||
|
||||
}
|
||||
std::wostream & expression::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & expression::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
void expression::add_text(const std::wstring & Text)
|
||||
@ -1361,9 +1361,9 @@ void text_input::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"text:description", text_description_);
|
||||
|
||||
}
|
||||
std::wostream & text_input::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_input::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
void text_input::add_text(const std::wstring & Text)
|
||||
@ -1405,9 +1405,9 @@ void text_drop_down::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_ = Text;
|
||||
}
|
||||
std::wostream & text_drop_down::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & text_drop_down::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << (bXmlEncode ? xml::utils::replace_text_to_xml( text_ ) : text_);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1570,9 +1570,9 @@ void sender_company::docx_convert(oox::docx_conversion_context & Context)
|
||||
const wchar_t * sender_postal_code::ns = L"text";
|
||||
const wchar_t * sender_postal_code::name = L"sender-postal-code";
|
||||
|
||||
std::wostream & sender_postal_code::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & sender_postal_code::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1722,9 +1722,9 @@ void bibliography_mark::add_text(const std::wstring & Text)
|
||||
text_ = text::create(Text) ;
|
||||
}
|
||||
|
||||
std::wostream & bibliography_mark::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bibliography_mark::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(text_);
|
||||
CP_SERIALIZE_TEXT(text_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void bibliography_mark::serialize(std::wostream & strm)
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
bool preserve_;
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
s(unsigned int c) : text_c_(c) {};
|
||||
s() {};
|
||||
@ -146,7 +146,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(unsigned int) text_tab_ref_;
|
||||
|
||||
@ -174,7 +174,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) {}
|
||||
@ -196,7 +196,7 @@ public:
|
||||
static const ElementType type = typeTextBookmark;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring text_name_;
|
||||
|
||||
@ -220,7 +220,7 @@ public:
|
||||
static const ElementType type = typeTextBookmarkStart;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
std::wstring name_;
|
||||
@ -244,7 +244,7 @@ public:
|
||||
static const ElementType type = typeTextBookmarkEnd;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
std::wstring name_;
|
||||
@ -382,7 +382,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
span() {}
|
||||
|
||||
@ -414,7 +414,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
a() {}
|
||||
|
||||
@ -450,7 +450,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
note();
|
||||
|
||||
private:
|
||||
@ -477,7 +477,7 @@ public:
|
||||
static const ElementType type = typeTextRuby;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -502,7 +502,7 @@ public:
|
||||
static const ElementType type = typeTextTitle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
@ -530,7 +530,7 @@ public:
|
||||
static const ElementType type = typeTextChapter;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
@ -556,7 +556,7 @@ public:
|
||||
static const ElementType type = typeTextSubject;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
@ -584,7 +584,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) text_description_;
|
||||
_CP_OPT(std::wstring) text_placeholder_type_;
|
||||
@ -611,7 +611,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -643,7 +643,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(odf_types::style_numformat) style_num_format_;
|
||||
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
|
||||
@ -672,7 +672,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(odf_types::Bool) text_fixed_;
|
||||
@ -727,7 +727,7 @@ public:
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(odf_types::Bool)text_fixed_;
|
||||
@ -782,7 +782,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -858,7 +858,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(odf_types::style_numformat) style_num_format_;
|
||||
_CP_OPT(std::wstring) style_num_letter_sync_;
|
||||
@ -888,7 +888,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_data_style_name_;
|
||||
_CP_OPT(std::wstring) text_display_;
|
||||
@ -916,7 +916,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) text_description_;
|
||||
std::wstring text_;
|
||||
@ -965,7 +965,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -1099,7 +1099,7 @@ public:
|
||||
static const ElementType type = typeTextSenderPostalCode;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void docx_convert(oox::docx_conversion_context & Context);
|
||||
private:
|
||||
@ -1316,7 +1316,7 @@ public:
|
||||
|
||||
void serialize(std::wostream & strm);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring identifier_;
|
||||
odf_types::bibliography bibliography_type_;
|
||||
|
||||
@ -50,9 +50,9 @@ namespace text {
|
||||
const wchar_t * ruby_base::ns = L"text";
|
||||
const wchar_t * ruby_base::name = L"ruby-base";
|
||||
|
||||
std::wostream & ruby_base::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby_base::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
serialize_elements_text(_Wostream, content_);
|
||||
serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@ void ruby_base::add_text(const std::wstring & Text)
|
||||
const wchar_t * ruby_text::ns = L"text";
|
||||
const wchar_t * ruby_text::name = L"ruby-text";
|
||||
|
||||
std::wostream & ruby_text::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & ruby_text::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -53,9 +53,7 @@ public:
|
||||
static const ElementType type = typeTextRubyBase;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
ruby_base() {}
|
||||
|
||||
private:
|
||||
@ -63,7 +61,6 @@ private:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
office_element_ptr_array content_;
|
||||
|
||||
};
|
||||
@ -82,10 +79,8 @@ public:
|
||||
static const ElementType type = typeTextRubyText;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
public:
|
||||
ruby_text() {}
|
||||
|
||||
private:
|
||||
@ -93,7 +88,6 @@ private:
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
private:
|
||||
odf_types::style_ref text_style_name_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
|
||||
@ -36,40 +36,23 @@
|
||||
namespace cpdoccore {
|
||||
namespace odf_reader {
|
||||
|
||||
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr & elm)
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr & elm, bool bXmlEncode = true)
|
||||
{
|
||||
if (elm)
|
||||
elm->xml_to_stream(_Wostream);
|
||||
elm->text_to_stream(_Wostream, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements(std::wostream & _Wostream, const office_element_ptr_array & elms)
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr_array & elms, bool bXmlEncode = true)
|
||||
{
|
||||
for (size_t i = 0; i < elms.size(); i++)
|
||||
{
|
||||
serialize_elements(_Wostream, elms[i]);
|
||||
serialize_elements_text(_Wostream, elms[i], bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr & elm)
|
||||
{
|
||||
if (elm)
|
||||
elm->text_to_stream(_Wostream);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
inline std::wostream & serialize_elements_text(std::wostream & _Wostream, const office_element_ptr_array & elms)
|
||||
{
|
||||
for (size_t i = 0; i < elms.size(); i++)
|
||||
{
|
||||
serialize_elements_text(_Wostream, elms[i]);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
#define CP_SERIALIZE_XML(ELEMENT) serialize_elements(_Wostream, (ELEMENT))
|
||||
#define CP_SERIALIZE_TEXT(ELEMENT) serialize_elements_text(_Wostream, (ELEMENT))
|
||||
#define CP_SERIALIZE_TEXT(ELEMENT, bXmlEncode) serialize_elements_text(_Wostream, (ELEMENT), bXmlEncode)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -55,6 +55,8 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
|
||||
CP_APPLY_ATTR(L"draw:auto-grow-width", draw_auto_grow_width_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-size", draw_fit_to_size_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-contour", draw_fit_to_contour_);
|
||||
CP_APPLY_ATTR(L"style:shrink-to-fit", style_shrink_to_fit_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-size", draw_fit_to_size_str_);
|
||||
|
||||
CP_APPLY_ATTR(L"draw:stroke", draw_stroke_);
|
||||
CP_APPLY_ATTR(L"draw:stroke-dash", draw_stroke_dash_);
|
||||
@ -99,7 +101,12 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
|
||||
common_padding_attlist_.add_attributes(Attributes);
|
||||
common_shadow_attlist_.add_attributes(Attributes);
|
||||
common_background_color_attlist_.add_attributes(Attributes);
|
||||
|
||||
|
||||
if (draw_fit_to_size_str_ && !style_shrink_to_fit_)
|
||||
{//https://bugs.documentfoundation.org/show_bug.cgi?id=97630
|
||||
if (*draw_fit_to_size_str_ == L"shrink-to-fit")
|
||||
style_shrink_to_fit_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void graphic_format_properties::apply_to(std::vector<_property> & properties)
|
||||
@ -134,8 +141,10 @@ void graphic_format_properties::apply_to(std::vector<_property> & properties)
|
||||
|
||||
if (draw_auto_grow_height_) properties.push_back(_property(L"auto-grow-height", *draw_auto_grow_height_));
|
||||
if (draw_auto_grow_width_) properties.push_back(_property(L"auto-grow-width", *draw_auto_grow_width_));
|
||||
if (draw_fit_to_size_) properties.push_back(_property(L"fit-to-size", *draw_fit_to_size_));
|
||||
if (draw_fit_to_contour_) properties.push_back(_property(L"fit-to-contour", *draw_fit_to_contour_));
|
||||
|
||||
if (style_shrink_to_fit_) properties.push_back(_property(L"fit-to-size", true));
|
||||
else if (draw_fit_to_size_) properties.push_back(_property(L"fit-to-size", *draw_fit_to_size_));
|
||||
|
||||
if (common_draw_fill_attlist_.draw_color_mode_)
|
||||
{
|
||||
@ -183,6 +192,7 @@ void graphic_format_properties::apply_from(const graphic_format_properties * Oth
|
||||
_CP_APPLY_PROP3(draw_auto_grow_width_);
|
||||
_CP_APPLY_PROP3(draw_fit_to_size_);
|
||||
_CP_APPLY_PROP3(draw_fit_to_contour_);
|
||||
_CP_APPLY_PROP3(style_shrink_to_fit_);
|
||||
|
||||
_CP_APPLY_PROP3(svg_stroke_color_);
|
||||
_CP_APPLY_PROP3(svg_stroke_width_);
|
||||
|
||||
@ -94,7 +94,9 @@ public:
|
||||
_CP_OPT(bool) draw_auto_grow_height_;
|
||||
_CP_OPT(bool) draw_auto_grow_width_;
|
||||
|
||||
_CP_OPT(bool) draw_fit_to_size_;
|
||||
_CP_OPT(bool) style_shrink_to_fit_;
|
||||
_CP_OPT(std::wstring) draw_fit_to_size_str_;
|
||||
_CP_OPT(bool) draw_fit_to_size_; // draw:fit-to-size="shrink-to-fit" style:shrink-to-fit="true" - cebre_1.odp
|
||||
_CP_OPT(bool) draw_fit_to_contour_;
|
||||
_CP_OPT(std::wstring) draw_wrap_influence_on_position_;
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ namespace odf_reader {
|
||||
const wchar_t * style_tab_stop::ns = L"style";
|
||||
const wchar_t * style_tab_stop::name = L"tab-stop";
|
||||
|
||||
std::wostream & style_tab_stop::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_tab_stop::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -84,7 +84,7 @@ void style_tab_stop::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_tab_stops::ns = L"style";
|
||||
const wchar_t * style_tab_stops::name = L"tab-stops";
|
||||
|
||||
std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -104,7 +104,7 @@ void style_tab_stops::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * style_drop_cap::ns = L"style";
|
||||
const wchar_t * style_drop_cap::name = L"drop-cap";
|
||||
|
||||
std::wostream & style_drop_cap::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_drop_cap::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -129,7 +129,7 @@ void style_drop_cap::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_background_image::ns = L"style";
|
||||
const wchar_t * style_background_image::name = L"background-image";
|
||||
|
||||
std::wostream & style_background_image::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_background_image::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -267,7 +267,7 @@ bool paragraph_format_properties::add_child_element( xml::sax * Reader, const st
|
||||
const wchar_t * style_paragraph_properties::ns = L"style";
|
||||
const wchar_t * style_paragraph_properties::name = L"paragraph-properties";
|
||||
|
||||
std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
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);
|
||||
@ -129,7 +129,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr_array content_;
|
||||
private:
|
||||
@ -152,7 +152,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
odf_types::drop_cap_length style_length_;
|
||||
unsigned int style_lines_;
|
||||
@ -179,7 +179,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
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);
|
||||
@ -294,7 +294,7 @@ public:
|
||||
paragraph_format_properties content_;
|
||||
|
||||
public:
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
|
||||
@ -296,7 +296,7 @@ void style_content::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
const wchar_t * default_style::ns = L"style";
|
||||
const wchar_t * default_style::name = L"default-style";
|
||||
|
||||
std::wostream & default_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & default_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -440,7 +440,7 @@ void draw_opacity::add_child_element( xml::sax * Reader, const std::wstring & Ns
|
||||
const wchar_t * style::ns = L"style";
|
||||
const wchar_t * style::name = L"style";
|
||||
|
||||
std::wostream & style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -559,7 +559,7 @@ void draw_styles::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
const wchar_t * office_automatic_styles::ns = L"office";
|
||||
const wchar_t * office_automatic_styles::name = L"automatic-styles";
|
||||
|
||||
std::wostream & office_automatic_styles::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_automatic_styles::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -587,7 +587,7 @@ void office_automatic_styles::add_text(const std::wstring & Text)
|
||||
const wchar_t * office_master_styles::ns = L"office";
|
||||
const wchar_t * office_master_styles::name = L"master-styles";
|
||||
|
||||
std::wostream & office_master_styles::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & office_master_styles::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -849,7 +849,7 @@ void style_section_properties::add_child_element( xml::sax * Reader, const std::
|
||||
const wchar_t * style_header_style::ns = L"style";
|
||||
const wchar_t * style_header_style::name = L"header-style";
|
||||
|
||||
std::wostream & style_header_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_header_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -874,7 +874,7 @@ void style_header_style::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
const wchar_t * style_footer_style::ns = L"style";
|
||||
const wchar_t * style_footer_style::name = L"footer-style";
|
||||
|
||||
std::wostream & style_footer_style::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_footer_style::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -900,7 +900,7 @@ void style_footer_style::add_child_element( xml::sax * Reader, const std::wstrin
|
||||
const wchar_t * style_page_layout::ns = L"style";
|
||||
const wchar_t * style_page_layout::name = L"page-layout";
|
||||
|
||||
std::wostream & style_page_layout::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_page_layout::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -1529,7 +1529,7 @@ void style_master_page_attlist::add_attributes( const xml::attributes_wc_ptr & A
|
||||
const wchar_t * style_master_page::ns = L"style";
|
||||
const wchar_t * style_master_page::name = L"master-page";
|
||||
|
||||
std::wostream & style_master_page::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_master_page::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
@ -1786,7 +1786,7 @@ void text_notes_configuration::add_text(const std::wstring & Text)
|
||||
const wchar_t * style_presentation_page_layout::ns = L"style";
|
||||
const wchar_t * style_presentation_page_layout::name = L"presentation-page-layout";
|
||||
|
||||
std::wostream & style_presentation_page_layout::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & style_presentation_page_layout::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
static const ElementType type = typeStyleDefaultStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
default_style() {};
|
||||
|
||||
@ -350,7 +350,7 @@ public:
|
||||
static const ElementType type = typeStyleStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
style() : style_auto_update_(false) { }
|
||||
|
||||
@ -442,7 +442,7 @@ public:
|
||||
static const ElementType type = typeOfficeAutomaticStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
styles styles_; ///< styles
|
||||
office_element_ptr_array style_page_layout_;
|
||||
@ -467,7 +467,7 @@ public:
|
||||
static const ElementType type = typeOfficeMasterStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr_array style_master_page_; // разметки тем
|
||||
office_element_ptr style_handout_master_; // разметки для принтера - .. второстепенно
|
||||
@ -512,7 +512,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -843,7 +843,7 @@ public:
|
||||
static const ElementType type = typeStyleHeaderStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr style_header_footer_properties_;
|
||||
|
||||
@ -864,7 +864,7 @@ public:
|
||||
static const ElementType type = typeStyleFooterStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr style_header_footer_properties_;
|
||||
|
||||
@ -885,7 +885,7 @@ public:
|
||||
static const ElementType type = typeStylePageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
std::wstring style_name_;
|
||||
odf_types::page_usage style_page_usage_; // default All
|
||||
@ -1082,7 +1082,7 @@ public:
|
||||
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
_CP_OPT(std::wstring) style_name_;
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -369,9 +369,9 @@ void table_columns_and_groups::add_child_element( xml::sax * Reader, const std::
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::wostream & table_table_cell_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_cell_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(elements_);
|
||||
return CP_SERIALIZE_TEXT(elements_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_cell_content::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
|
||||
@ -384,9 +384,9 @@ void table_table_cell_content::add_child_element( xml::sax * Reader, const std::
|
||||
const wchar_t * table_table_cell::ns = L"table";
|
||||
const wchar_t * table_table_cell::name = L"table-cell";
|
||||
|
||||
std::wostream & table_table_cell::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_cell::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return content_.text_to_stream(_Wostream);
|
||||
return content_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_cell::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -420,9 +420,9 @@ bool table_table_cell::empty(bool bWithStyle)
|
||||
const wchar_t * table_covered_table_cell::ns = L"table";
|
||||
const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
|
||||
|
||||
std::wostream & table_covered_table_cell::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_covered_table_cell::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return content_.text_to_stream(_Wostream);
|
||||
return content_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_covered_table_cell::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -451,9 +451,9 @@ bool table_covered_table_cell::empty()
|
||||
const wchar_t * table_table_row::ns = L"table";
|
||||
const wchar_t * table_table_row::name = L"table-row";
|
||||
|
||||
std::wostream & table_table_row::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_row::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(content_);
|
||||
return CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_row::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -508,9 +508,9 @@ bool table_table_row::empty_content_cells(bool bWithCellStyle)
|
||||
const wchar_t * table_table_rows::ns = L"table";
|
||||
const wchar_t * table_table_rows::name = L"table-rows";
|
||||
|
||||
std::wostream & table_table_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return CP_SERIALIZE_TEXT(table_table_row_);
|
||||
return CP_SERIALIZE_TEXT(table_table_row_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_rows::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -527,9 +527,9 @@ void table_table_rows::add_child_element( xml::sax * Reader, const std::wstring
|
||||
const wchar_t * table_table_header_rows::ns = L"table";
|
||||
const wchar_t * table_table_header_rows::name = L"table-header-rows";
|
||||
|
||||
std::wostream & table_table_header_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_header_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return serialize_elements_text(_Wostream, table_table_row_);
|
||||
return serialize_elements_text(_Wostream, table_table_row_, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_header_rows::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -552,12 +552,12 @@ void table_table_header_rows::add_text(const std::wstring & Text)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// table:rows
|
||||
std::wostream & table_rows::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
if (table_table_rows_)
|
||||
CP_SERIALIZE_TEXT(table_table_rows_);
|
||||
CP_SERIALIZE_TEXT(table_table_rows_, bXmlEncode);
|
||||
else
|
||||
CP_SERIALIZE_TEXT(table_table_row_);
|
||||
CP_SERIALIZE_TEXT(table_table_row_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -628,10 +628,10 @@ table_rows_no_group::table_rows_no_group() : was_header_(false)
|
||||
{
|
||||
};
|
||||
|
||||
std::wostream & table_rows_no_group::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows_no_group::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
table_rows_1_.text_to_stream(_Wostream);
|
||||
CP_SERIALIZE_TEXT(table_table_header_rows_);
|
||||
CP_SERIALIZE_TEXT(table_table_header_rows_, bXmlEncode);
|
||||
table_rows_2_.text_to_stream(_Wostream);
|
||||
return _Wostream;
|
||||
}
|
||||
@ -663,9 +663,9 @@ table_rows_and_groups::table_rows_and_groups()
|
||||
{
|
||||
}
|
||||
|
||||
std::wostream & table_rows_and_groups::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_rows_and_groups::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -706,9 +706,9 @@ void table_rows_and_groups::add_child_element( xml::sax * Reader, const std::wst
|
||||
const wchar_t * table_table_row_group::ns = L"table";
|
||||
const wchar_t * table_table_row_group::name = L"table-row-group";
|
||||
|
||||
std::wostream & table_table_row_group::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_table_row_group::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return table_rows_and_groups_.text_to_stream(_Wostream);
|
||||
return table_rows_and_groups_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void table_table_row_group::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
|
||||
@ -356,7 +356,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -375,7 +375,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_row);
|
||||
class table_table_cell_content
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context) ;
|
||||
@ -404,7 +404,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -439,7 +439,7 @@ public:
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -475,7 +475,7 @@ public:
|
||||
table_table_rows()
|
||||
{
|
||||
}
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -501,7 +501,7 @@ public:
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -517,7 +517,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_rows);
|
||||
class table_rows
|
||||
{
|
||||
public:
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
@ -549,7 +549,7 @@ public:
|
||||
|
||||
table_rows_no_group();
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
@ -568,7 +568,7 @@ class table_rows_and_groups
|
||||
{
|
||||
public:
|
||||
table_rows_and_groups();
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
|
||||
@ -606,7 +606,7 @@ public:
|
||||
{
|
||||
}
|
||||
virtual void xlsx_convert(oox::xlsx_conversion_context & Context) ;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
|
||||
@ -122,9 +122,9 @@ void process_paragraph_index(const paragraph_attrs & Attr, oox::docx_conversion_
|
||||
|
||||
}
|
||||
|
||||
std::wostream & paragraph::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & paragraph::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
//_Wostream << L"\n";
|
||||
return _Wostream;
|
||||
}
|
||||
@ -255,7 +255,7 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
|
||||
if (sequence_)
|
||||
{
|
||||
std::wstringstream _Wostream;
|
||||
CP_SERIALIZE_TEXT(content_);///todooo
|
||||
CP_SERIALIZE_TEXT(content_, true);///todooo
|
||||
|
||||
Context.get_drawing_context().set_next_object_caption(_Wostream.str());
|
||||
}
|
||||
@ -431,9 +431,9 @@ void soft_page_break::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
||||
std::wostream & h::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & h::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return paragraph_.text_to_stream(_Wostream);
|
||||
return paragraph_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void h::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -485,9 +485,9 @@ void h::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * p::ns = L"text";
|
||||
const wchar_t * p::name = L"p";
|
||||
|
||||
std::wostream & p::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & p::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return paragraph_.text_to_stream(_Wostream);
|
||||
return paragraph_.text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
|
||||
void p::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -531,11 +531,11 @@ void p::afterReadContent()
|
||||
const wchar_t * list::ns = L"text";
|
||||
const wchar_t * list::name = L"list";
|
||||
|
||||
std::wostream & list::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & list::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
for (size_t i = 0; i < list_items_.size(); i++)
|
||||
{
|
||||
list_items_[i]->text_to_stream(_Wostream);
|
||||
list_items_[i]->text_to_stream(_Wostream, bXmlEncode);
|
||||
}
|
||||
return _Wostream;
|
||||
}
|
||||
@ -599,7 +599,7 @@ void list::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const wchar_t * soft_page_break::ns = L"text";
|
||||
const wchar_t * soft_page_break::name = L"soft-page-break";
|
||||
|
||||
std::wostream & soft_page_break::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & soft_page_break::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << L"\n";
|
||||
return _Wostream;
|
||||
@ -618,9 +618,9 @@ void soft_page_break::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * section::ns = L"text";
|
||||
const wchar_t * section::name = L"section";
|
||||
|
||||
std::wostream & section::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & section::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
return serialize_elements_text(_Wostream, content_);
|
||||
return serialize_elements_text(_Wostream, content_, bXmlEncode);
|
||||
}
|
||||
|
||||
void section::afterCreate()
|
||||
@ -768,9 +768,9 @@ void section_source::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
const wchar_t * index_body::ns = L"text";
|
||||
const wchar_t * index_body::name = L"index-body";
|
||||
|
||||
std::wostream & index_body::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & index_body::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -829,9 +829,9 @@ void index_title::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
}
|
||||
std::wostream & index_title::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & index_title::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(content_);
|
||||
CP_SERIALIZE_TEXT(content_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -914,9 +914,9 @@ void table_of_content::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
|
||||
|
||||
std::wostream & table_of_content::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_of_content::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
// text:table-of-content-source
|
||||
@ -1032,9 +1032,9 @@ void table_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & table_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & table_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void table_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1155,9 +1155,9 @@ void illustration_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
|
||||
std::wostream & illustration_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & illustration_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1307,9 +1307,9 @@ void alphabetical_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & alphabetical_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & alphabetical_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -1418,9 +1418,9 @@ void object_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & object_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & object_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void object_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1531,9 +1531,9 @@ void user_index::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
if (index_body_)
|
||||
index_body_->pptx_convert(Context);
|
||||
}
|
||||
std::wostream & user_index::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & user_index::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
void user_index::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
@ -1692,9 +1692,9 @@ void bibliography::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
}
|
||||
}
|
||||
|
||||
std::wostream & bibliography::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & bibliography::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
CP_SERIALIZE_TEXT(index_body_);
|
||||
CP_SERIALIZE_TEXT(index_body_, bXmlEncode);
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
@ -1949,9 +1949,9 @@ void variable_input::add_text(const std::wstring & Text)
|
||||
{
|
||||
text_ = Text;
|
||||
}
|
||||
std::wostream & variable_input::text_to_stream(std::wostream & _Wostream) const
|
||||
std::wostream & variable_input::text_to_stream(std::wostream & _Wostream, bool bXmlEncode) const
|
||||
{
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_ );
|
||||
_Wostream << xml::utils::replace_text_to_xml( text_, bXmlEncode );
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ class paragraph
|
||||
public:
|
||||
paragraph() : next_section_(false), next_end_section_(false), is_header_(false) {}
|
||||
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
void add_attributes ( const xml::attributes_wc_ptr & Attributes );
|
||||
void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context);
|
||||
@ -110,7 +110,7 @@ public:
|
||||
|
||||
virtual void afterReadContent();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
paragraph paragraph_;
|
||||
|
||||
@ -146,7 +146,7 @@ public:
|
||||
|
||||
virtual void afterReadContent();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
p(){};
|
||||
paragraph paragraph_;
|
||||
@ -169,7 +169,7 @@ public:
|
||||
static const ElementType type = typeTextList;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
list(){};
|
||||
|
||||
@ -200,7 +200,7 @@ public:
|
||||
static const ElementType type = typeTextSoftPageBreak;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
private:
|
||||
@ -222,7 +222,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
virtual void afterCreate();
|
||||
virtual void afterReadContent();
|
||||
@ -306,7 +306,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -336,7 +336,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -368,7 +368,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -400,7 +400,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -432,7 +432,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -464,7 +464,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -496,7 +496,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -565,7 +565,7 @@ public:
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
office_element_ptr index_title_;
|
||||
office_element_ptr_array content_;
|
||||
@ -588,7 +588,7 @@ public:
|
||||
void pptx_convert(oox::pptx_conversion_context & Context) ;
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
@ -814,7 +814,7 @@ public:
|
||||
|
||||
void docx_convert(oox::docx_conversion_context & Context);
|
||||
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
|
||||
virtual std::wostream & text_to_stream(std::wostream & _Wostream, bool bXmlEncode = true) const;
|
||||
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){}
|
||||
|
||||
@ -306,38 +306,18 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\attributes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\nodetype.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\sax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\simple_xml_writer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\xmlchar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\xmlelement.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\src\xml\attributes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\attributes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\nodetype.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\sax.cpp"
|
||||
>
|
||||
@ -350,6 +330,14 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\sax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\simple_xml_writer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\utils.cpp"
|
||||
>
|
||||
@ -363,13 +351,21 @@
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\cpdoccore\xml\utils.h"
|
||||
RelativePath="..\include\xml\utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\xml\xmlchar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\xmlchar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\xml\xmlelement.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@ -65,18 +65,28 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
|
||||
std::wstring dstPath = srcFileName;// + ....
|
||||
|
||||
bool bTemplate = false;
|
||||
|
||||
std::wstring type;
|
||||
switch(fileChecker.nFileType)
|
||||
{
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX:
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM: dstPath += L"-my.odt"; type = L"text"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTX:
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTM: dstPath += L"-my.ott"; type = L"text"; bTemplate = true; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX:
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM: dstPath += L"-my.ods"; type = L"spreadsheet"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX:
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTM: dstPath += L"-my.ots"; type = L"spreadsheet"; bTemplate = true; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX:
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTM: dstPath += L"-my.odp"; type = L"presentation"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_POTX:
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_POTM: dstPath += L"-my.otp"; type = L"presentation"; bTemplate = true; break;
|
||||
default:
|
||||
return S_FALSE;
|
||||
}
|
||||
@ -94,7 +104,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
if (S_OK != oCOfficeUtils.ExtractToDirectory(srcFileName.c_str(), srcTempPath.c_str(), NULL, 0))
|
||||
return S_FALSE;
|
||||
|
||||
Oox2Odf::Converter converter(srcTempPath, type, L"C:\\Windows\\Fonts", NULL);
|
||||
Oox2Odf::Converter converter(srcTempPath, type, L"C:\\Windows\\Fonts", bTemplate);
|
||||
|
||||
std::wstring sPassword;// = L"password";
|
||||
|
||||
|
||||
@ -0,0 +1,841 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8AF8AAF522048F9F004BDAC2 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA4622048F9E004BDAC2 /* utils.cpp */; };
|
||||
8AF8AAF622048F9F004BDAC2 /* text_elements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA4822048F9E004BDAC2 /* text_elements.cpp */; };
|
||||
8AF8AAF722048F9F004BDAC2 /* office_annotation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA4922048F9E004BDAC2 /* office_annotation.cpp */; };
|
||||
8AF8AAF822048F9F004BDAC2 /* style_table_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5022048F9E004BDAC2 /* style_table_properties.cpp */; };
|
||||
8AF8AAF922048F9F004BDAC2 /* svg_creator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5122048F9E004BDAC2 /* svg_creator.cpp */; };
|
||||
8AF8AAFA22048F9F004BDAC2 /* ods_table_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5322048F9E004BDAC2 /* ods_table_state.cpp */; };
|
||||
8AF8AAFB22048F9F004BDAC2 /* style_chart_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5522048F9E004BDAC2 /* style_chart_properties.cpp */; };
|
||||
8AF8AAFC22048F9F004BDAC2 /* oox_shape_defines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5622048F9E004BDAC2 /* oox_shape_defines.cpp */; };
|
||||
8AF8AAFD22048F9F004BDAC2 /* odf_chart_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5822048F9E004BDAC2 /* odf_chart_context.cpp */; };
|
||||
8AF8AAFE22048F9F004BDAC2 /* style_text_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5A22048F9E004BDAC2 /* style_text_properties.cpp */; };
|
||||
8AF8AAFF22048F9F004BDAC2 /* logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA5C22048F9E004BDAC2 /* logging.cpp */; };
|
||||
8AF8AB0022048F9F004BDAC2 /* table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6122048F9E004BDAC2 /* table.cpp */; };
|
||||
8AF8AB0122048F9F004BDAC2 /* office_chart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6222048F9E004BDAC2 /* office_chart.cpp */; };
|
||||
8AF8AB0222048F9F004BDAC2 /* odf_table_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6322048F9E004BDAC2 /* odf_table_context.cpp */; };
|
||||
8AF8AB0322048F9F004BDAC2 /* style_map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6522048F9E004BDAC2 /* style_map.cpp */; };
|
||||
8AF8AB0422048F9F004BDAC2 /* office_scripts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6822048F9E004BDAC2 /* office_scripts.cpp */; };
|
||||
8AF8AB0522048F9F004BDAC2 /* styles_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6922048F9E004BDAC2 /* styles_list.cpp */; };
|
||||
8AF8AB0622048F9F004BDAC2 /* styles_lite_container.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6C22048F9E004BDAC2 /* styles_lite_container.cpp */; };
|
||||
8AF8AB0722048F9F004BDAC2 /* style_paragraph_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA6E22048F9E004BDAC2 /* style_paragraph_properties.cpp */; };
|
||||
8AF8AB0822048F9F004BDAC2 /* office_document.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7022048F9E004BDAC2 /* office_document.cpp */; };
|
||||
8AF8AB0922048F9F004BDAC2 /* anim_elements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7122048F9E004BDAC2 /* anim_elements.cpp */; };
|
||||
8AF8AB0A22048F9F004BDAC2 /* odf_rels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7422048F9E004BDAC2 /* odf_rels.cpp */; };
|
||||
8AF8AB0B22048F9F004BDAC2 /* style_section_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7522048F9E004BDAC2 /* style_section_properties.cpp */; };
|
||||
8AF8AB0C22048F9F004BDAC2 /* office_elements_create.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7622048F9E004BDAC2 /* office_elements_create.cpp */; };
|
||||
8AF8AB0D22048F9F004BDAC2 /* odf_conversion_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA7822048F9E004BDAC2 /* odf_conversion_context.cpp */; };
|
||||
8AF8AB0E22048F9F004BDAC2 /* odf_text_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA8F22048F9F004BDAC2 /* odf_text_context.cpp */; };
|
||||
8AF8AB0F22048F9F004BDAC2 /* mediaitems.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9122048F9F004BDAC2 /* mediaitems.cpp */; };
|
||||
8AF8AB1022048F9F004BDAC2 /* office_settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9322048F9F004BDAC2 /* office_settings.cpp */; };
|
||||
8AF8AB1122048F9F004BDAC2 /* style_presentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9422048F9F004BDAC2 /* style_presentation.cpp */; };
|
||||
8AF8AB1222048F9F004BDAC2 /* office_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9722048F9F004BDAC2 /* office_text.cpp */; };
|
||||
8AF8AB1322048F9F004BDAC2 /* odp_page_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9B22048F9F004BDAC2 /* odp_page_state.cpp */; };
|
||||
8AF8AB1422048F9F004BDAC2 /* ods_table_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9C22048F9F004BDAC2 /* ods_table_context.cpp */; };
|
||||
8AF8AB1522048F9F004BDAC2 /* calcext_elements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AA9F22048F9F004BDAC2 /* calcext_elements.cpp */; };
|
||||
8AF8AB1622048F9F004BDAC2 /* odf_page_layout_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA122048F9F004BDAC2 /* odf_page_layout_state.cpp */; };
|
||||
8AF8AB1722048F9F004BDAC2 /* odf_settings_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA222048F9F004BDAC2 /* odf_settings_context.cpp */; };
|
||||
8AF8AB1822048F9F004BDAC2 /* style_page_layout_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA322048F9F004BDAC2 /* style_page_layout_properties.cpp */; };
|
||||
8AF8AB1922048F9F004BDAC2 /* odf_page_layout_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA522048F9F004BDAC2 /* odf_page_layout_context.cpp */; };
|
||||
8AF8AB1A22048F9F004BDAC2 /* abstract_xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA622048F9F004BDAC2 /* abstract_xml.cpp */; };
|
||||
8AF8AB1B22048F9F004BDAC2 /* table_named_expressions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA722048F9F004BDAC2 /* table_named_expressions.cpp */; };
|
||||
8AF8AB1C22048F9F004BDAC2 /* odf_notes_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAA822048F9F004BDAC2 /* odf_notes_context.cpp */; };
|
||||
8AF8AB1D22048F9F004BDAC2 /* draw_page.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAAB22048F9F004BDAC2 /* draw_page.cpp */; };
|
||||
8AF8AB1E22048F9F004BDAC2 /* number_style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAAC22048F9F004BDAC2 /* number_style.cpp */; };
|
||||
8AF8AB1F22048F9F004BDAC2 /* odp_conversion_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAAE22048F9F004BDAC2 /* odp_conversion_context.cpp */; };
|
||||
8AF8AB2022048F9F004BDAC2 /* odf_drawing_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAAF22048F9F004BDAC2 /* odf_drawing_context.cpp */; };
|
||||
8AF8AB2122048F9F004BDAC2 /* odf_comment_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB122048F9F004BDAC2 /* odf_comment_context.cpp */; };
|
||||
8AF8AB2222048F9F004BDAC2 /* list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB222048F9F004BDAC2 /* list.cpp */; };
|
||||
8AF8AB2322048F9F004BDAC2 /* odf_style_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB322048F9F004BDAC2 /* odf_style_context.cpp */; };
|
||||
8AF8AB2422048F9F004BDAC2 /* ods_conversion_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB522048F9F004BDAC2 /* ods_conversion_context.cpp */; };
|
||||
8AF8AB2522048F9F004BDAC2 /* styles.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB622048F9F004BDAC2 /* styles.cpp */; };
|
||||
8AF8AB2622048F9F004BDAC2 /* office_presentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB822048F9F004BDAC2 /* office_presentation.cpp */; };
|
||||
8AF8AB2722048F9F004BDAC2 /* odf_table_styles_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAB922048F9F004BDAC2 /* odf_table_styles_context.cpp */; };
|
||||
8AF8AB2822048F9F004BDAC2 /* odt_conversion_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AABA22048F9F004BDAC2 /* odt_conversion_context.cpp */; };
|
||||
8AF8AB2922048F9F004BDAC2 /* odp_slide_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AABC22048F9F004BDAC2 /* odp_slide_context.cpp */; };
|
||||
8AF8AB2A22048F9F004BDAC2 /* paragraph_elements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AABD22048F9F004BDAC2 /* paragraph_elements.cpp */; };
|
||||
8AF8AB2B22048F9F004BDAC2 /* draw_frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AABF22048F9F004BDAC2 /* draw_frame.cpp */; };
|
||||
8AF8AB2C22048F9F004BDAC2 /* object_package.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAC722048F9F004BDAC2 /* object_package.cpp */; };
|
||||
8AF8AB2D22048F9F004BDAC2 /* odf_number_styles_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAC822048F9F004BDAC2 /* odf_number_styles_context.cpp */; };
|
||||
8AF8AB2E22048F9F004BDAC2 /* office_body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AACA22048F9F004BDAC2 /* office_body.cpp */; };
|
||||
8AF8AB2F22048F9F004BDAC2 /* header_footer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AACD22048F9F004BDAC2 /* header_footer.cpp */; };
|
||||
8AF8AB3022048F9F004BDAC2 /* office_event_listeners.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD022048F9F004BDAC2 /* office_event_listeners.cpp */; };
|
||||
8AF8AB3122048F9F004BDAC2 /* draw_shapes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD122048F9F004BDAC2 /* draw_shapes.cpp */; };
|
||||
8AF8AB3222048F9F004BDAC2 /* odf_lists_styles_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD222048F9F004BDAC2 /* odf_lists_styles_context.cpp */; };
|
||||
8AF8AB3322048F9F004BDAC2 /* style_graphic_properties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD322048F9F004BDAC2 /* style_graphic_properties.cpp */; };
|
||||
8AF8AB3422048F9F004BDAC2 /* office_spreadsheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD622048F9F004BDAC2 /* office_spreadsheet.cpp */; };
|
||||
8AF8AB3522048F9F004BDAC2 /* mediaitems_utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAD922048F9F004BDAC2 /* mediaitems_utils.cpp */; };
|
||||
8AF8AB3622048F9F004BDAC2 /* draw_base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AADA22048F9F004BDAC2 /* draw_base.cpp */; };
|
||||
8AF8AB3722048F9F004BDAC2 /* table_database_ranges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AADD22048F9F004BDAC2 /* table_database_ranges.cpp */; };
|
||||
8AF8AB3822048F9F004BDAC2 /* odf_style_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAE022048F9F004BDAC2 /* odf_style_state.cpp */; };
|
||||
8AF8AB3922048F9F004BDAC2 /* Converter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAE422048F9F004BDAC2 /* Converter.cpp */; };
|
||||
8AF8AB3A22048F9F004BDAC2 /* ConverterChart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAE522048F9F004BDAC2 /* ConverterChart.cpp */; };
|
||||
8AF8AB3B22048F9F004BDAC2 /* XlsxConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAE722048F9F004BDAC2 /* XlsxConverter.cpp */; };
|
||||
8AF8AB3C22048F9F004BDAC2 /* DocxConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAE922048F9F004BDAC2 /* DocxConverter.cpp */; };
|
||||
8AF8AB3D22048F9F004BDAC2 /* PptxConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAEA22048F9F004BDAC2 /* PptxConverter.cpp */; };
|
||||
8AF8AB3E22048F9F004BDAC2 /* ConvertVml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAEC22048F9F004BDAC2 /* ConvertVml.cpp */; };
|
||||
8AF8AB3F22048F9F004BDAC2 /* ConvertDrawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF8AAEE22048F9F004BDAC2 /* ConvertDrawing.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8AF8AA3622048F12004BDAC2 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8AC4E6EC220587220044119A /* regex.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = regex.hpp; path = ../../../../Common/3dParty/boost/boost_1_58_0/boost/regex.hpp; sourceTree = "<group>"; };
|
||||
8AC4E6ED220587530044119A /* regex.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = regex.hpp; path = ../../../../Common/3dParty/boost/boost_1_58_0/boost/regex/v4/regex.hpp; sourceTree = "<group>"; };
|
||||
8AF8AA3822048F12004BDAC2 /* libASCOfficeOdfFileW.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libASCOfficeOdfFileW.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8AF8AA4522048F9E004BDAC2 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
|
||||
8AF8AA4622048F9E004BDAC2 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utils.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA4822048F9E004BDAC2 /* text_elements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = text_elements.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA4922048F9E004BDAC2 /* office_annotation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_annotation.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA4A22048F9E004BDAC2 /* draw_frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw_frame.h; sourceTree = "<group>"; };
|
||||
8AF8AA4B22048F9E004BDAC2 /* styles_lite_container.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = styles_lite_container.h; sourceTree = "<group>"; };
|
||||
8AF8AA4C22048F9E004BDAC2 /* ods_conversion_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ods_conversion_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA4D22048F9E004BDAC2 /* office_scripts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_scripts.h; sourceTree = "<group>"; };
|
||||
8AF8AA4E22048F9E004BDAC2 /* draw_page.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw_page.h; sourceTree = "<group>"; };
|
||||
8AF8AA4F22048F9E004BDAC2 /* anim_elements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = anim_elements.h; sourceTree = "<group>"; };
|
||||
8AF8AA5022048F9E004BDAC2 /* style_table_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_table_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5122048F9E004BDAC2 /* svg_creator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = svg_creator.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5222048F9E004BDAC2 /* style_page_layout_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_page_layout_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AA5322048F9E004BDAC2 /* ods_table_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ods_table_state.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5422048F9E004BDAC2 /* ods_table_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ods_table_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA5522048F9E004BDAC2 /* style_chart_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_chart_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5622048F9E004BDAC2 /* oox_shape_defines.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oox_shape_defines.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5722048F9E004BDAC2 /* oox_shape_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shape_defines.h; sourceTree = "<group>"; };
|
||||
8AF8AA5822048F9E004BDAC2 /* odf_chart_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_chart_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5922048F9E004BDAC2 /* style_section_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_section_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AA5A22048F9E004BDAC2 /* style_text_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_text_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5B22048F9E004BDAC2 /* odf_table_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_table_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA5C22048F9E004BDAC2 /* logging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = logging.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA5D22048F9E004BDAC2 /* calcext_elements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = calcext_elements.h; sourceTree = "<group>"; };
|
||||
8AF8AA5E22048F9E004BDAC2 /* office_elements_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_elements_type.h; sourceTree = "<group>"; };
|
||||
8AF8AA5F22048F9E004BDAC2 /* odf_style_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_style_state.h; sourceTree = "<group>"; };
|
||||
8AF8AA6022048F9E004BDAC2 /* odf_rels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_rels.h; sourceTree = "<group>"; };
|
||||
8AF8AA6122048F9E004BDAC2 /* table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = table.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6222048F9E004BDAC2 /* office_chart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_chart.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6322048F9E004BDAC2 /* odf_table_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_table_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6422048F9E004BDAC2 /* odp_slide_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odp_slide_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA6522048F9E004BDAC2 /* style_map.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_map.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6622048F9E004BDAC2 /* style_paragraph_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_paragraph_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AA6722048F9E004BDAC2 /* table_database_ranges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = table_database_ranges.h; sourceTree = "<group>"; };
|
||||
8AF8AA6822048F9E004BDAC2 /* office_scripts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_scripts.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6922048F9E004BDAC2 /* styles_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = styles_list.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6A22048F9E004BDAC2 /* odf_text_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_text_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA6B22048F9E004BDAC2 /* odf_notes_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_notes_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA6C22048F9E004BDAC2 /* styles_lite_container.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = styles_lite_container.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6D22048F9E004BDAC2 /* office_annotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_annotation.h; sourceTree = "<group>"; };
|
||||
8AF8AA6E22048F9E004BDAC2 /* style_paragraph_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_paragraph_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA6F22048F9E004BDAC2 /* office_chart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_chart.h; sourceTree = "<group>"; };
|
||||
8AF8AA7022048F9E004BDAC2 /* office_document.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_document.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7122048F9E004BDAC2 /* anim_elements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = anim_elements.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7222048F9E004BDAC2 /* office_event_listeners.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_event_listeners.h; sourceTree = "<group>"; };
|
||||
8AF8AA7322048F9E004BDAC2 /* style_table_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_table_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AA7422048F9E004BDAC2 /* odf_rels.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_rels.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7522048F9E004BDAC2 /* style_section_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_section_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7622048F9E004BDAC2 /* office_elements_create.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_elements_create.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7722048F9E004BDAC2 /* office_elements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_elements.h; sourceTree = "<group>"; };
|
||||
8AF8AA7822048F9E004BDAC2 /* odf_conversion_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_conversion_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA7922048F9E004BDAC2 /* office_settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_settings.h; sourceTree = "<group>"; };
|
||||
8AF8AA7B22048F9E004BDAC2 /* oox_shapePrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapePrimitives.h; sourceTree = "<group>"; };
|
||||
8AF8AA7C22048F9E004BDAC2 /* oox_shapeBents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeBents.h; sourceTree = "<group>"; };
|
||||
8AF8AA7D22048F9E004BDAC2 /* oox_shapeConnectors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeConnectors.h; sourceTree = "<group>"; };
|
||||
8AF8AA7E22048F9E004BDAC2 /* oox_shapeCallouts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeCallouts.h; sourceTree = "<group>"; };
|
||||
8AF8AA7F22048F9E004BDAC2 /* oox_shapeCharts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeCharts.h; sourceTree = "<group>"; };
|
||||
8AF8AA8022048F9E004BDAC2 /* oox_shapeArrows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeArrows.h; sourceTree = "<group>"; };
|
||||
8AF8AA8122048F9E004BDAC2 /* oox_shapeWordArt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeWordArt.h; sourceTree = "<group>"; };
|
||||
8AF8AA8222048F9E004BDAC2 /* oox_shapeCurvedArrows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeCurvedArrows.h; sourceTree = "<group>"; };
|
||||
8AF8AA8322048F9E004BDAC2 /* oox_shapeStars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeStars.h; sourceTree = "<group>"; };
|
||||
8AF8AA8422048F9F004BDAC2 /* oox_shapeActionButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeActionButtons.h; sourceTree = "<group>"; };
|
||||
8AF8AA8522048F9F004BDAC2 /* oox_shapeCustoms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeCustoms.h; sourceTree = "<group>"; };
|
||||
8AF8AA8622048F9F004BDAC2 /* oox_shapeSnipRoundRects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeSnipRoundRects.h; sourceTree = "<group>"; };
|
||||
8AF8AA8722048F9F004BDAC2 /* odf_shape_mapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_shape_mapping.h; sourceTree = "<group>"; };
|
||||
8AF8AA8822048F9F004BDAC2 /* oox_shapeCurvedConnectors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeCurvedConnectors.h; sourceTree = "<group>"; };
|
||||
8AF8AA8922048F9F004BDAC2 /* oox_shapeMaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeMaths.h; sourceTree = "<group>"; };
|
||||
8AF8AA8A22048F9F004BDAC2 /* oox_shapeRibbons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeRibbons.h; sourceTree = "<group>"; };
|
||||
8AF8AA8B22048F9F004BDAC2 /* oox_shapeAccentCallouts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oox_shapeAccentCallouts.h; sourceTree = "<group>"; };
|
||||
8AF8AA8C22048F9F004BDAC2 /* mediaitems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mediaitems.h; sourceTree = "<group>"; };
|
||||
8AF8AA8D22048F9F004BDAC2 /* style_presentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_presentation.h; sourceTree = "<group>"; };
|
||||
8AF8AA8E22048F9F004BDAC2 /* style_graphic_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_graphic_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AA8F22048F9F004BDAC2 /* odf_text_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_text_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9022048F9F004BDAC2 /* draw_shapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw_shapes.h; sourceTree = "<group>"; };
|
||||
8AF8AA9122048F9F004BDAC2 /* mediaitems.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mediaitems.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9222048F9F004BDAC2 /* odf_conversion_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_conversion_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA9322048F9F004BDAC2 /* office_settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_settings.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9422048F9F004BDAC2 /* style_presentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_presentation.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9522048F9F004BDAC2 /* visitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = visitor.h; sourceTree = "<group>"; };
|
||||
8AF8AA9622048F9F004BDAC2 /* styles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = styles.h; sourceTree = "<group>"; };
|
||||
8AF8AA9722048F9F004BDAC2 /* office_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_text.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9822048F9F004BDAC2 /* odf_comment_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_comment_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA9922048F9F004BDAC2 /* odf_page_layout_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_page_layout_state.h; sourceTree = "<group>"; };
|
||||
8AF8AA9A22048F9F004BDAC2 /* style_map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_map.h; sourceTree = "<group>"; };
|
||||
8AF8AA9B22048F9F004BDAC2 /* odp_page_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odp_page_state.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9C22048F9F004BDAC2 /* ods_table_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ods_table_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AA9D22048F9F004BDAC2 /* mediaitems_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mediaitems_utils.h; sourceTree = "<group>"; };
|
||||
8AF8AA9E22048F9F004BDAC2 /* odf_chart_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_chart_context.h; sourceTree = "<group>"; };
|
||||
8AF8AA9F22048F9F004BDAC2 /* calcext_elements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = calcext_elements.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA022048F9F004BDAC2 /* odf_page_layout_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_page_layout_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAA122048F9F004BDAC2 /* odf_page_layout_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_page_layout_state.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA222048F9F004BDAC2 /* odf_settings_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_settings_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA322048F9F004BDAC2 /* style_page_layout_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_page_layout_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA422048F9F004BDAC2 /* list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = "<group>"; };
|
||||
8AF8AAA522048F9F004BDAC2 /* odf_page_layout_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_page_layout_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA622048F9F004BDAC2 /* abstract_xml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_xml.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA722048F9F004BDAC2 /* table_named_expressions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = table_named_expressions.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA822048F9F004BDAC2 /* odf_notes_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_notes_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAA922048F9F004BDAC2 /* style_chart_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_chart_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AAAA22048F9F004BDAC2 /* styles_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = styles_list.h; sourceTree = "<group>"; };
|
||||
8AF8AAAB22048F9F004BDAC2 /* draw_page.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = draw_page.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAAC22048F9F004BDAC2 /* number_style.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = number_style.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAAD22048F9F004BDAC2 /* office_elements_create.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_elements_create.h; sourceTree = "<group>"; };
|
||||
8AF8AAAE22048F9F004BDAC2 /* odp_conversion_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odp_conversion_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAAF22048F9F004BDAC2 /* odf_drawing_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_drawing_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB022048F9F004BDAC2 /* abstract_xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_xml.h; sourceTree = "<group>"; };
|
||||
8AF8AAB122048F9F004BDAC2 /* odf_comment_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_comment_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB222048F9F004BDAC2 /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = list.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB322048F9F004BDAC2 /* odf_style_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_style_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB422048F9F004BDAC2 /* odt_conversion_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odt_conversion_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAB522048F9F004BDAC2 /* ods_conversion_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ods_conversion_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB622048F9F004BDAC2 /* styles.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = styles.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB722048F9F004BDAC2 /* office_body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_body.h; sourceTree = "<group>"; };
|
||||
8AF8AAB822048F9F004BDAC2 /* office_presentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_presentation.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAB922048F9F004BDAC2 /* odf_table_styles_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_table_styles_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AABA22048F9F004BDAC2 /* odt_conversion_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odt_conversion_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AABB22048F9F004BDAC2 /* office_spreadsheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_spreadsheet.h; sourceTree = "<group>"; };
|
||||
8AF8AABC22048F9F004BDAC2 /* odp_slide_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odp_slide_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AABD22048F9F004BDAC2 /* paragraph_elements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = paragraph_elements.cpp; sourceTree = "<group>"; };
|
||||
8AF8AABE22048F9F004BDAC2 /* table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = table.h; sourceTree = "<group>"; };
|
||||
8AF8AABF22048F9F004BDAC2 /* draw_frame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = draw_frame.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAC022048F9F004BDAC2 /* style_text_properties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = style_text_properties.h; sourceTree = "<group>"; };
|
||||
8AF8AAC122048F9F004BDAC2 /* header_footer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = header_footer.h; sourceTree = "<group>"; };
|
||||
8AF8AAC222048F9F004BDAC2 /* paragraph_elements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = paragraph_elements.h; sourceTree = "<group>"; };
|
||||
8AF8AAC322048F9F004BDAC2 /* text_elements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = text_elements.h; sourceTree = "<group>"; };
|
||||
8AF8AAC422048F9F004BDAC2 /* ods_table_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ods_table_state.h; sourceTree = "<group>"; };
|
||||
8AF8AAC522048F9F004BDAC2 /* odf_number_styles_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_number_styles_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAC622048F9F004BDAC2 /* office_text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_text.h; sourceTree = "<group>"; };
|
||||
8AF8AAC722048F9F004BDAC2 /* object_package.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object_package.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAC822048F9F004BDAC2 /* odf_number_styles_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_number_styles_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAC922048F9F004BDAC2 /* number_style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = number_style.h; sourceTree = "<group>"; };
|
||||
8AF8AACA22048F9F004BDAC2 /* office_body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_body.cpp; sourceTree = "<group>"; };
|
||||
8AF8AACB22048F9F004BDAC2 /* table_named_expressions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = table_named_expressions.h; sourceTree = "<group>"; };
|
||||
8AF8AACC22048F9F004BDAC2 /* odf_drawing_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_drawing_context.h; sourceTree = "<group>"; };
|
||||
8AF8AACD22048F9F004BDAC2 /* header_footer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = header_footer.cpp; sourceTree = "<group>"; };
|
||||
8AF8AACE22048F9F004BDAC2 /* object_package.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object_package.h; sourceTree = "<group>"; };
|
||||
8AF8AACF22048F9F004BDAC2 /* svg_creator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = svg_creator.h; sourceTree = "<group>"; };
|
||||
8AF8AAD022048F9F004BDAC2 /* office_event_listeners.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_event_listeners.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAD122048F9F004BDAC2 /* draw_shapes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = draw_shapes.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAD222048F9F004BDAC2 /* odf_lists_styles_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_lists_styles_context.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAD322048F9F004BDAC2 /* style_graphic_properties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = style_graphic_properties.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAD422048F9F004BDAC2 /* odf_settings_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_settings_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAD522048F9F004BDAC2 /* odp_page_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odp_page_state.h; sourceTree = "<group>"; };
|
||||
8AF8AAD622048F9F004BDAC2 /* office_spreadsheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = office_spreadsheet.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAD722048F9F004BDAC2 /* office_document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_document.h; sourceTree = "<group>"; };
|
||||
8AF8AAD822048F9F004BDAC2 /* odf_lists_styles_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_lists_styles_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAD922048F9F004BDAC2 /* mediaitems_utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mediaitems_utils.cpp; sourceTree = "<group>"; };
|
||||
8AF8AADA22048F9F004BDAC2 /* draw_base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = draw_base.cpp; sourceTree = "<group>"; };
|
||||
8AF8AADB22048F9F004BDAC2 /* odf_table_styles_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_table_styles_context.h; sourceTree = "<group>"; };
|
||||
8AF8AADC22048F9F004BDAC2 /* odp_conversion_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odp_conversion_context.h; sourceTree = "<group>"; };
|
||||
8AF8AADD22048F9F004BDAC2 /* table_database_ranges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = table_database_ranges.cpp; sourceTree = "<group>"; };
|
||||
8AF8AADE22048F9F004BDAC2 /* office_presentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = office_presentation.h; sourceTree = "<group>"; };
|
||||
8AF8AADF22048F9F004BDAC2 /* odf_style_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odf_style_context.h; sourceTree = "<group>"; };
|
||||
8AF8AAE022048F9F004BDAC2 /* odf_style_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = odf_style_state.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAE122048F9F004BDAC2 /* draw_base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw_base.h; sourceTree = "<group>"; };
|
||||
8AF8AAE322048F9F004BDAC2 /* DocxConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocxConverter.h; sourceTree = "<group>"; };
|
||||
8AF8AAE422048F9F004BDAC2 /* Converter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Converter.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAE522048F9F004BDAC2 /* ConverterChart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConverterChart.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAE622048F9F004BDAC2 /* Converter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Converter.h; sourceTree = "<group>"; };
|
||||
8AF8AAE722048F9F004BDAC2 /* XlsxConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XlsxConverter.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAE822048F9F004BDAC2 /* PptxConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PptxConverter.h; sourceTree = "<group>"; };
|
||||
8AF8AAE922048F9F004BDAC2 /* DocxConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocxConverter.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAEA22048F9F004BDAC2 /* PptxConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PptxConverter.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAEB22048F9F004BDAC2 /* VmlShapeTypes2Oox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VmlShapeTypes2Oox.h; sourceTree = "<group>"; };
|
||||
8AF8AAEC22048F9F004BDAC2 /* ConvertVml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertVml.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAED22048F9F004BDAC2 /* Oox2OdfConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Oox2OdfConverter.h; sourceTree = "<group>"; };
|
||||
8AF8AAEE22048F9F004BDAC2 /* ConvertDrawing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertDrawing.cpp; sourceTree = "<group>"; };
|
||||
8AF8AAEF22048F9F004BDAC2 /* XlsxConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XlsxConverter.h; sourceTree = "<group>"; };
|
||||
8AF8AAF022048F9F004BDAC2 /* progressCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progressCallback.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8AF8AA3522048F12004BDAC2 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
8AF8AA2F22048F12004BDAC2 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AA3A22048F12004BDAC2 /* ASCOfficeOdfFileW */,
|
||||
8AF8AA3922048F12004BDAC2 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AA3922048F12004BDAC2 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AA3822048F12004BDAC2 /* libASCOfficeOdfFileW.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AA3A22048F12004BDAC2 /* ASCOfficeOdfFileW */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AC4E6EC220587220044119A /* regex.hpp */,
|
||||
8AC4E6ED220587530044119A /* regex.hpp */,
|
||||
8AF8AA4422048F9E004BDAC2 /* source */,
|
||||
);
|
||||
path = ASCOfficeOdfFileW;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AA4422048F9E004BDAC2 /* source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AA4522048F9E004BDAC2 /* utils.h */,
|
||||
8AF8AA4622048F9E004BDAC2 /* utils.cpp */,
|
||||
8AF8AA4722048F9E004BDAC2 /* OdfFormat */,
|
||||
8AF8AAE222048F9F004BDAC2 /* Oox2OdfConverter */,
|
||||
8AF8AAF022048F9F004BDAC2 /* progressCallback.h */,
|
||||
);
|
||||
name = source;
|
||||
path = ../../../source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AA4722048F9E004BDAC2 /* OdfFormat */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AA4822048F9E004BDAC2 /* text_elements.cpp */,
|
||||
8AF8AA4922048F9E004BDAC2 /* office_annotation.cpp */,
|
||||
8AF8AA4A22048F9E004BDAC2 /* draw_frame.h */,
|
||||
8AF8AA4B22048F9E004BDAC2 /* styles_lite_container.h */,
|
||||
8AF8AA4C22048F9E004BDAC2 /* ods_conversion_context.h */,
|
||||
8AF8AA4D22048F9E004BDAC2 /* office_scripts.h */,
|
||||
8AF8AA4E22048F9E004BDAC2 /* draw_page.h */,
|
||||
8AF8AA4F22048F9E004BDAC2 /* anim_elements.h */,
|
||||
8AF8AA5022048F9E004BDAC2 /* style_table_properties.cpp */,
|
||||
8AF8AA5122048F9E004BDAC2 /* svg_creator.cpp */,
|
||||
8AF8AA5222048F9E004BDAC2 /* style_page_layout_properties.h */,
|
||||
8AF8AA5322048F9E004BDAC2 /* ods_table_state.cpp */,
|
||||
8AF8AA5422048F9E004BDAC2 /* ods_table_context.h */,
|
||||
8AF8AA5522048F9E004BDAC2 /* style_chart_properties.cpp */,
|
||||
8AF8AA5622048F9E004BDAC2 /* oox_shape_defines.cpp */,
|
||||
8AF8AA5722048F9E004BDAC2 /* oox_shape_defines.h */,
|
||||
8AF8AA5822048F9E004BDAC2 /* odf_chart_context.cpp */,
|
||||
8AF8AA5922048F9E004BDAC2 /* style_section_properties.h */,
|
||||
8AF8AA5A22048F9E004BDAC2 /* style_text_properties.cpp */,
|
||||
8AF8AA5B22048F9E004BDAC2 /* odf_table_context.h */,
|
||||
8AF8AA5C22048F9E004BDAC2 /* logging.cpp */,
|
||||
8AF8AA5D22048F9E004BDAC2 /* calcext_elements.h */,
|
||||
8AF8AA5E22048F9E004BDAC2 /* office_elements_type.h */,
|
||||
8AF8AA5F22048F9E004BDAC2 /* odf_style_state.h */,
|
||||
8AF8AA6022048F9E004BDAC2 /* odf_rels.h */,
|
||||
8AF8AA6122048F9E004BDAC2 /* table.cpp */,
|
||||
8AF8AA6222048F9E004BDAC2 /* office_chart.cpp */,
|
||||
8AF8AA6322048F9E004BDAC2 /* odf_table_context.cpp */,
|
||||
8AF8AA6422048F9E004BDAC2 /* odp_slide_context.h */,
|
||||
8AF8AA6522048F9E004BDAC2 /* style_map.cpp */,
|
||||
8AF8AA6622048F9E004BDAC2 /* style_paragraph_properties.h */,
|
||||
8AF8AA6722048F9E004BDAC2 /* table_database_ranges.h */,
|
||||
8AF8AA6822048F9E004BDAC2 /* office_scripts.cpp */,
|
||||
8AF8AA6922048F9E004BDAC2 /* styles_list.cpp */,
|
||||
8AF8AA6A22048F9E004BDAC2 /* odf_text_context.h */,
|
||||
8AF8AA6B22048F9E004BDAC2 /* odf_notes_context.h */,
|
||||
8AF8AA6C22048F9E004BDAC2 /* styles_lite_container.cpp */,
|
||||
8AF8AA6D22048F9E004BDAC2 /* office_annotation.h */,
|
||||
8AF8AA6E22048F9E004BDAC2 /* style_paragraph_properties.cpp */,
|
||||
8AF8AA6F22048F9E004BDAC2 /* office_chart.h */,
|
||||
8AF8AA7022048F9E004BDAC2 /* office_document.cpp */,
|
||||
8AF8AA7122048F9E004BDAC2 /* anim_elements.cpp */,
|
||||
8AF8AA7222048F9E004BDAC2 /* office_event_listeners.h */,
|
||||
8AF8AA7322048F9E004BDAC2 /* style_table_properties.h */,
|
||||
8AF8AA7422048F9E004BDAC2 /* odf_rels.cpp */,
|
||||
8AF8AA7522048F9E004BDAC2 /* style_section_properties.cpp */,
|
||||
8AF8AA7622048F9E004BDAC2 /* office_elements_create.cpp */,
|
||||
8AF8AA7722048F9E004BDAC2 /* office_elements.h */,
|
||||
8AF8AA7822048F9E004BDAC2 /* odf_conversion_context.cpp */,
|
||||
8AF8AA7922048F9E004BDAC2 /* office_settings.h */,
|
||||
8AF8AA7A22048F9E004BDAC2 /* Shapes */,
|
||||
8AF8AA8C22048F9F004BDAC2 /* mediaitems.h */,
|
||||
8AF8AA8D22048F9F004BDAC2 /* style_presentation.h */,
|
||||
8AF8AA8E22048F9F004BDAC2 /* style_graphic_properties.h */,
|
||||
8AF8AA8F22048F9F004BDAC2 /* odf_text_context.cpp */,
|
||||
8AF8AA9022048F9F004BDAC2 /* draw_shapes.h */,
|
||||
8AF8AA9122048F9F004BDAC2 /* mediaitems.cpp */,
|
||||
8AF8AA9222048F9F004BDAC2 /* odf_conversion_context.h */,
|
||||
8AF8AA9322048F9F004BDAC2 /* office_settings.cpp */,
|
||||
8AF8AA9422048F9F004BDAC2 /* style_presentation.cpp */,
|
||||
8AF8AA9522048F9F004BDAC2 /* visitor.h */,
|
||||
8AF8AA9622048F9F004BDAC2 /* styles.h */,
|
||||
8AF8AA9722048F9F004BDAC2 /* office_text.cpp */,
|
||||
8AF8AA9822048F9F004BDAC2 /* odf_comment_context.h */,
|
||||
8AF8AA9922048F9F004BDAC2 /* odf_page_layout_state.h */,
|
||||
8AF8AA9A22048F9F004BDAC2 /* style_map.h */,
|
||||
8AF8AA9B22048F9F004BDAC2 /* odp_page_state.cpp */,
|
||||
8AF8AA9C22048F9F004BDAC2 /* ods_table_context.cpp */,
|
||||
8AF8AA9D22048F9F004BDAC2 /* mediaitems_utils.h */,
|
||||
8AF8AA9E22048F9F004BDAC2 /* odf_chart_context.h */,
|
||||
8AF8AA9F22048F9F004BDAC2 /* calcext_elements.cpp */,
|
||||
8AF8AAA022048F9F004BDAC2 /* odf_page_layout_context.h */,
|
||||
8AF8AAA122048F9F004BDAC2 /* odf_page_layout_state.cpp */,
|
||||
8AF8AAA222048F9F004BDAC2 /* odf_settings_context.cpp */,
|
||||
8AF8AAA322048F9F004BDAC2 /* style_page_layout_properties.cpp */,
|
||||
8AF8AAA422048F9F004BDAC2 /* list.h */,
|
||||
8AF8AAA522048F9F004BDAC2 /* odf_page_layout_context.cpp */,
|
||||
8AF8AAA622048F9F004BDAC2 /* abstract_xml.cpp */,
|
||||
8AF8AAA722048F9F004BDAC2 /* table_named_expressions.cpp */,
|
||||
8AF8AAA822048F9F004BDAC2 /* odf_notes_context.cpp */,
|
||||
8AF8AAA922048F9F004BDAC2 /* style_chart_properties.h */,
|
||||
8AF8AAAA22048F9F004BDAC2 /* styles_list.h */,
|
||||
8AF8AAAB22048F9F004BDAC2 /* draw_page.cpp */,
|
||||
8AF8AAAC22048F9F004BDAC2 /* number_style.cpp */,
|
||||
8AF8AAAD22048F9F004BDAC2 /* office_elements_create.h */,
|
||||
8AF8AAAE22048F9F004BDAC2 /* odp_conversion_context.cpp */,
|
||||
8AF8AAAF22048F9F004BDAC2 /* odf_drawing_context.cpp */,
|
||||
8AF8AAB022048F9F004BDAC2 /* abstract_xml.h */,
|
||||
8AF8AAB122048F9F004BDAC2 /* odf_comment_context.cpp */,
|
||||
8AF8AAB222048F9F004BDAC2 /* list.cpp */,
|
||||
8AF8AAB322048F9F004BDAC2 /* odf_style_context.cpp */,
|
||||
8AF8AAB422048F9F004BDAC2 /* odt_conversion_context.h */,
|
||||
8AF8AAB522048F9F004BDAC2 /* ods_conversion_context.cpp */,
|
||||
8AF8AAB622048F9F004BDAC2 /* styles.cpp */,
|
||||
8AF8AAB722048F9F004BDAC2 /* office_body.h */,
|
||||
8AF8AAB822048F9F004BDAC2 /* office_presentation.cpp */,
|
||||
8AF8AAB922048F9F004BDAC2 /* odf_table_styles_context.cpp */,
|
||||
8AF8AABA22048F9F004BDAC2 /* odt_conversion_context.cpp */,
|
||||
8AF8AABB22048F9F004BDAC2 /* office_spreadsheet.h */,
|
||||
8AF8AABC22048F9F004BDAC2 /* odp_slide_context.cpp */,
|
||||
8AF8AABD22048F9F004BDAC2 /* paragraph_elements.cpp */,
|
||||
8AF8AABE22048F9F004BDAC2 /* table.h */,
|
||||
8AF8AABF22048F9F004BDAC2 /* draw_frame.cpp */,
|
||||
8AF8AAC022048F9F004BDAC2 /* style_text_properties.h */,
|
||||
8AF8AAC122048F9F004BDAC2 /* header_footer.h */,
|
||||
8AF8AAC222048F9F004BDAC2 /* paragraph_elements.h */,
|
||||
8AF8AAC322048F9F004BDAC2 /* text_elements.h */,
|
||||
8AF8AAC422048F9F004BDAC2 /* ods_table_state.h */,
|
||||
8AF8AAC522048F9F004BDAC2 /* odf_number_styles_context.h */,
|
||||
8AF8AAC622048F9F004BDAC2 /* office_text.h */,
|
||||
8AF8AAC722048F9F004BDAC2 /* object_package.cpp */,
|
||||
8AF8AAC822048F9F004BDAC2 /* odf_number_styles_context.cpp */,
|
||||
8AF8AAC922048F9F004BDAC2 /* number_style.h */,
|
||||
8AF8AACA22048F9F004BDAC2 /* office_body.cpp */,
|
||||
8AF8AACB22048F9F004BDAC2 /* table_named_expressions.h */,
|
||||
8AF8AACC22048F9F004BDAC2 /* odf_drawing_context.h */,
|
||||
8AF8AACD22048F9F004BDAC2 /* header_footer.cpp */,
|
||||
8AF8AACE22048F9F004BDAC2 /* object_package.h */,
|
||||
8AF8AACF22048F9F004BDAC2 /* svg_creator.h */,
|
||||
8AF8AAD022048F9F004BDAC2 /* office_event_listeners.cpp */,
|
||||
8AF8AAD122048F9F004BDAC2 /* draw_shapes.cpp */,
|
||||
8AF8AAD222048F9F004BDAC2 /* odf_lists_styles_context.cpp */,
|
||||
8AF8AAD322048F9F004BDAC2 /* style_graphic_properties.cpp */,
|
||||
8AF8AAD422048F9F004BDAC2 /* odf_settings_context.h */,
|
||||
8AF8AAD522048F9F004BDAC2 /* odp_page_state.h */,
|
||||
8AF8AAD622048F9F004BDAC2 /* office_spreadsheet.cpp */,
|
||||
8AF8AAD722048F9F004BDAC2 /* office_document.h */,
|
||||
8AF8AAD822048F9F004BDAC2 /* odf_lists_styles_context.h */,
|
||||
8AF8AAD922048F9F004BDAC2 /* mediaitems_utils.cpp */,
|
||||
8AF8AADA22048F9F004BDAC2 /* draw_base.cpp */,
|
||||
8AF8AADB22048F9F004BDAC2 /* odf_table_styles_context.h */,
|
||||
8AF8AADC22048F9F004BDAC2 /* odp_conversion_context.h */,
|
||||
8AF8AADD22048F9F004BDAC2 /* table_database_ranges.cpp */,
|
||||
8AF8AADE22048F9F004BDAC2 /* office_presentation.h */,
|
||||
8AF8AADF22048F9F004BDAC2 /* odf_style_context.h */,
|
||||
8AF8AAE022048F9F004BDAC2 /* odf_style_state.cpp */,
|
||||
8AF8AAE122048F9F004BDAC2 /* draw_base.h */,
|
||||
);
|
||||
path = OdfFormat;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AA7A22048F9E004BDAC2 /* Shapes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AA7B22048F9E004BDAC2 /* oox_shapePrimitives.h */,
|
||||
8AF8AA7C22048F9E004BDAC2 /* oox_shapeBents.h */,
|
||||
8AF8AA7D22048F9E004BDAC2 /* oox_shapeConnectors.h */,
|
||||
8AF8AA7E22048F9E004BDAC2 /* oox_shapeCallouts.h */,
|
||||
8AF8AA7F22048F9E004BDAC2 /* oox_shapeCharts.h */,
|
||||
8AF8AA8022048F9E004BDAC2 /* oox_shapeArrows.h */,
|
||||
8AF8AA8122048F9E004BDAC2 /* oox_shapeWordArt.h */,
|
||||
8AF8AA8222048F9E004BDAC2 /* oox_shapeCurvedArrows.h */,
|
||||
8AF8AA8322048F9E004BDAC2 /* oox_shapeStars.h */,
|
||||
8AF8AA8422048F9F004BDAC2 /* oox_shapeActionButtons.h */,
|
||||
8AF8AA8522048F9F004BDAC2 /* oox_shapeCustoms.h */,
|
||||
8AF8AA8622048F9F004BDAC2 /* oox_shapeSnipRoundRects.h */,
|
||||
8AF8AA8722048F9F004BDAC2 /* odf_shape_mapping.h */,
|
||||
8AF8AA8822048F9F004BDAC2 /* oox_shapeCurvedConnectors.h */,
|
||||
8AF8AA8922048F9F004BDAC2 /* oox_shapeMaths.h */,
|
||||
8AF8AA8A22048F9F004BDAC2 /* oox_shapeRibbons.h */,
|
||||
8AF8AA8B22048F9F004BDAC2 /* oox_shapeAccentCallouts.h */,
|
||||
);
|
||||
path = Shapes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AF8AAE222048F9F004BDAC2 /* Oox2OdfConverter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AF8AAE322048F9F004BDAC2 /* DocxConverter.h */,
|
||||
8AF8AAE422048F9F004BDAC2 /* Converter.cpp */,
|
||||
8AF8AAE522048F9F004BDAC2 /* ConverterChart.cpp */,
|
||||
8AF8AAE622048F9F004BDAC2 /* Converter.h */,
|
||||
8AF8AAE722048F9F004BDAC2 /* XlsxConverter.cpp */,
|
||||
8AF8AAE822048F9F004BDAC2 /* PptxConverter.h */,
|
||||
8AF8AAE922048F9F004BDAC2 /* DocxConverter.cpp */,
|
||||
8AF8AAEA22048F9F004BDAC2 /* PptxConverter.cpp */,
|
||||
8AF8AAEB22048F9F004BDAC2 /* VmlShapeTypes2Oox.h */,
|
||||
8AF8AAEC22048F9F004BDAC2 /* ConvertVml.cpp */,
|
||||
8AF8AAED22048F9F004BDAC2 /* Oox2OdfConverter.h */,
|
||||
8AF8AAEE22048F9F004BDAC2 /* ConvertDrawing.cpp */,
|
||||
8AF8AAEF22048F9F004BDAC2 /* XlsxConverter.h */,
|
||||
);
|
||||
path = Oox2OdfConverter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8AF8AA3722048F12004BDAC2 /* ASCOfficeOdfFileW */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 8AF8AA4122048F12004BDAC2 /* Build configuration list for PBXNativeTarget "ASCOfficeOdfFileW" */;
|
||||
buildPhases = (
|
||||
8AF8AA3422048F12004BDAC2 /* Sources */,
|
||||
8AF8AA3522048F12004BDAC2 /* Frameworks */,
|
||||
8AF8AA3622048F12004BDAC2 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ASCOfficeOdfFileW;
|
||||
productName = ASCOfficeOdfFileW;
|
||||
productReference = 8AF8AA3822048F12004BDAC2 /* libASCOfficeOdfFileW.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
8AF8AA3022048F12004BDAC2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Alexey Musinov";
|
||||
TargetAttributes = {
|
||||
8AF8AA3722048F12004BDAC2 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 8AF8AA3322048F12004BDAC2 /* Build configuration list for PBXProject "ASCOfficeOdfFileW" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 8AF8AA2F22048F12004BDAC2;
|
||||
productRefGroup = 8AF8AA3922048F12004BDAC2 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8AF8AA3722048F12004BDAC2 /* ASCOfficeOdfFileW */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8AF8AA3422048F12004BDAC2 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8AF8AB3C22048F9F004BDAC2 /* DocxConverter.cpp in Sources */,
|
||||
8AF8AAF522048F9F004BDAC2 /* utils.cpp in Sources */,
|
||||
8AF8AB2522048F9F004BDAC2 /* styles.cpp in Sources */,
|
||||
8AF8AB0B22048F9F004BDAC2 /* style_section_properties.cpp in Sources */,
|
||||
8AF8AAFD22048F9F004BDAC2 /* odf_chart_context.cpp in Sources */,
|
||||
8AF8AB2222048F9F004BDAC2 /* list.cpp in Sources */,
|
||||
8AF8AB1C22048F9F004BDAC2 /* odf_notes_context.cpp in Sources */,
|
||||
8AF8AB3622048F9F004BDAC2 /* draw_base.cpp in Sources */,
|
||||
8AF8AB0022048F9F004BDAC2 /* table.cpp in Sources */,
|
||||
8AF8AB1022048F9F004BDAC2 /* office_settings.cpp in Sources */,
|
||||
8AF8AB0E22048F9F004BDAC2 /* odf_text_context.cpp in Sources */,
|
||||
8AF8AB2922048F9F004BDAC2 /* odp_slide_context.cpp in Sources */,
|
||||
8AF8AAFC22048F9F004BDAC2 /* oox_shape_defines.cpp in Sources */,
|
||||
8AF8AB1322048F9F004BDAC2 /* odp_page_state.cpp in Sources */,
|
||||
8AF8AB2B22048F9F004BDAC2 /* draw_frame.cpp in Sources */,
|
||||
8AF8AB3F22048F9F004BDAC2 /* ConvertDrawing.cpp in Sources */,
|
||||
8AF8AB0222048F9F004BDAC2 /* odf_table_context.cpp in Sources */,
|
||||
8AF8AB3122048F9F004BDAC2 /* draw_shapes.cpp in Sources */,
|
||||
8AF8AB3922048F9F004BDAC2 /* Converter.cpp in Sources */,
|
||||
8AF8AB1B22048F9F004BDAC2 /* table_named_expressions.cpp in Sources */,
|
||||
8AF8AAFE22048F9F004BDAC2 /* style_text_properties.cpp in Sources */,
|
||||
8AF8AB3222048F9F004BDAC2 /* odf_lists_styles_context.cpp in Sources */,
|
||||
8AF8AB0722048F9F004BDAC2 /* style_paragraph_properties.cpp in Sources */,
|
||||
8AF8AB1922048F9F004BDAC2 /* odf_page_layout_context.cpp in Sources */,
|
||||
8AF8AB0422048F9F004BDAC2 /* office_scripts.cpp in Sources */,
|
||||
8AF8AB0622048F9F004BDAC2 /* styles_lite_container.cpp in Sources */,
|
||||
8AF8AAF722048F9F004BDAC2 /* office_annotation.cpp in Sources */,
|
||||
8AF8AB0822048F9F004BDAC2 /* office_document.cpp in Sources */,
|
||||
8AF8AB3B22048F9F004BDAC2 /* XlsxConverter.cpp in Sources */,
|
||||
8AF8AB2722048F9F004BDAC2 /* odf_table_styles_context.cpp in Sources */,
|
||||
8AF8AB0322048F9F004BDAC2 /* style_map.cpp in Sources */,
|
||||
8AF8AB3D22048F9F004BDAC2 /* PptxConverter.cpp in Sources */,
|
||||
8AF8AB3022048F9F004BDAC2 /* office_event_listeners.cpp in Sources */,
|
||||
8AF8AB1F22048F9F004BDAC2 /* odp_conversion_context.cpp in Sources */,
|
||||
8AF8AB2322048F9F004BDAC2 /* odf_style_context.cpp in Sources */,
|
||||
8AF8AAF622048F9F004BDAC2 /* text_elements.cpp in Sources */,
|
||||
8AF8AB0D22048F9F004BDAC2 /* odf_conversion_context.cpp in Sources */,
|
||||
8AF8AB1522048F9F004BDAC2 /* calcext_elements.cpp in Sources */,
|
||||
8AF8AB2C22048F9F004BDAC2 /* object_package.cpp in Sources */,
|
||||
8AF8AAFA22048F9F004BDAC2 /* ods_table_state.cpp in Sources */,
|
||||
8AF8AB2F22048F9F004BDAC2 /* header_footer.cpp in Sources */,
|
||||
8AF8AB3522048F9F004BDAC2 /* mediaitems_utils.cpp in Sources */,
|
||||
8AF8AB3822048F9F004BDAC2 /* odf_style_state.cpp in Sources */,
|
||||
8AF8AB2422048F9F004BDAC2 /* ods_conversion_context.cpp in Sources */,
|
||||
8AF8AB3722048F9F004BDAC2 /* table_database_ranges.cpp in Sources */,
|
||||
8AF8AB2D22048F9F004BDAC2 /* odf_number_styles_context.cpp in Sources */,
|
||||
8AF8AB2022048F9F004BDAC2 /* odf_drawing_context.cpp in Sources */,
|
||||
8AF8AB1622048F9F004BDAC2 /* odf_page_layout_state.cpp in Sources */,
|
||||
8AF8AB3322048F9F004BDAC2 /* style_graphic_properties.cpp in Sources */,
|
||||
8AF8AB3A22048F9F004BDAC2 /* ConverterChart.cpp in Sources */,
|
||||
8AF8AB3E22048F9F004BDAC2 /* ConvertVml.cpp in Sources */,
|
||||
8AF8AAF922048F9F004BDAC2 /* svg_creator.cpp in Sources */,
|
||||
8AF8AB1D22048F9F004BDAC2 /* draw_page.cpp in Sources */,
|
||||
8AF8AB3422048F9F004BDAC2 /* office_spreadsheet.cpp in Sources */,
|
||||
8AF8AB2122048F9F004BDAC2 /* odf_comment_context.cpp in Sources */,
|
||||
8AF8AB1E22048F9F004BDAC2 /* number_style.cpp in Sources */,
|
||||
8AF8AB2E22048F9F004BDAC2 /* office_body.cpp in Sources */,
|
||||
8AF8AAFB22048F9F004BDAC2 /* style_chart_properties.cpp in Sources */,
|
||||
8AF8AAFF22048F9F004BDAC2 /* logging.cpp in Sources */,
|
||||
8AF8AB0122048F9F004BDAC2 /* office_chart.cpp in Sources */,
|
||||
8AF8AB1422048F9F004BDAC2 /* ods_table_context.cpp in Sources */,
|
||||
8AF8AB1A22048F9F004BDAC2 /* abstract_xml.cpp in Sources */,
|
||||
8AF8AB2A22048F9F004BDAC2 /* paragraph_elements.cpp in Sources */,
|
||||
8AF8AB1822048F9F004BDAC2 /* style_page_layout_properties.cpp in Sources */,
|
||||
8AF8AAF822048F9F004BDAC2 /* style_table_properties.cpp in Sources */,
|
||||
8AF8AB1122048F9F004BDAC2 /* style_presentation.cpp in Sources */,
|
||||
8AF8AB2822048F9F004BDAC2 /* odt_conversion_context.cpp in Sources */,
|
||||
8AF8AB0F22048F9F004BDAC2 /* mediaitems.cpp in Sources */,
|
||||
8AF8AB0522048F9F004BDAC2 /* styles_list.cpp in Sources */,
|
||||
8AF8AB0922048F9F004BDAC2 /* anim_elements.cpp in Sources */,
|
||||
8AF8AB1722048F9F004BDAC2 /* odf_settings_context.cpp in Sources */,
|
||||
8AF8AB0C22048F9F004BDAC2 /* office_elements_create.cpp in Sources */,
|
||||
8AF8AB2622048F9F004BDAC2 /* office_presentation.cpp in Sources */,
|
||||
8AF8AB1222048F9F004BDAC2 /* office_text.cpp in Sources */,
|
||||
8AF8AB0A22048F9F004BDAC2 /* odf_rels.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
8AF8AA3F22048F12004BDAC2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8AF8AA4022048F12004BDAC2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8AF8AA4222048F12004BDAC2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
_XCODE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../ASCOfficeOdfFile/include",
|
||||
"$(PROJECT_DIR)/../../../ASCOfficeOdfFile/src/odf/datatypes",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8AF8AA4322048F12004BDAC2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
_XCODE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../ASCOfficeOdfFile/include",
|
||||
"$(PROJECT_DIR)/../../../ASCOfficeOdfFile/src/odf/datatypes",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
8AF8AA3322048F12004BDAC2 /* Build configuration list for PBXProject "ASCOfficeOdfFileW" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8AF8AA3F22048F12004BDAC2 /* Debug */,
|
||||
8AF8AA4022048F12004BDAC2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8AF8AA4122048F12004BDAC2 /* Build configuration list for PBXNativeTarget "ASCOfficeOdfFileW" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8AF8AA4222048F12004BDAC2 /* Debug */,
|
||||
8AF8AA4322048F12004BDAC2 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 8AF8AA3022048F12004BDAC2 /* Project object */;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:ASCOfficeOdfFileW.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1 @@
|
||||
DO NOT REMOVE FOLDER FOR XCODE
|
||||
@ -123,9 +123,9 @@ namespace odf_writer
|
||||
rels_.add(r.relationships_[i]);
|
||||
}
|
||||
}
|
||||
manifect_file::manifect_file(std::wstring t)
|
||||
manifect_file::manifect_file(const std::wstring & type)
|
||||
{
|
||||
type_ = t;
|
||||
type_ = type;
|
||||
}
|
||||
binary_file::binary_file(const std::wstring &file_name, const std::string &value)
|
||||
{
|
||||
@ -137,9 +137,9 @@ namespace odf_writer
|
||||
simple_element elm(file_name_, value_);
|
||||
elm.write(RootPath, false);
|
||||
}
|
||||
mimetype_file::mimetype_file(std::wstring t)
|
||||
mimetype_file::mimetype_file(const std::wstring & type)
|
||||
{
|
||||
type_ = t;
|
||||
type_ = type;
|
||||
}
|
||||
void mimetype_file::write(const std::wstring & RootPath, bool add_padding)
|
||||
{
|
||||
@ -316,11 +316,17 @@ namespace odf_writer
|
||||
set_rels(rels_);
|
||||
}
|
||||
|
||||
odf_document::odf_document(std::wstring type)
|
||||
odf_document::odf_document(std::wstring type, bool bTemplate)
|
||||
{
|
||||
manifest_ = element_ptr(new manifect_file(type));
|
||||
mimetype_ = element_ptr(new mimetype_file(type));
|
||||
manifest_ = element_ptr(new manifect_file(type + (bTemplate ? L"-template" : L"")));
|
||||
mimetype_ = element_ptr(new mimetype_file(type + (bTemplate ? L"-template" : L"")));
|
||||
}
|
||||
|
||||
std::wstring odf_document::get_type()
|
||||
{
|
||||
return dynamic_cast<manifect_file*>(manifest_.get())->get_type();
|
||||
}
|
||||
|
||||
void odf_document::write_manifest(const std::wstring & RootPath)
|
||||
{
|
||||
if (mimetype_)
|
||||
|
||||
@ -91,8 +91,6 @@ namespace odf_writer
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false) = 0;
|
||||
std::wstring local_path;
|
||||
private:
|
||||
element * element_;
|
||||
};
|
||||
|
||||
inline element::~element()
|
||||
@ -151,11 +149,13 @@ namespace odf_writer
|
||||
class manifect_file : public element
|
||||
{
|
||||
public:
|
||||
manifect_file(std::wstring type);
|
||||
manifect_file(const std::wstring & type);
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
void add_rels(rels & r);
|
||||
|
||||
std::wstring get_type() {return type_;}
|
||||
|
||||
rels *get_rels() {return &rels_;}
|
||||
|
||||
private:
|
||||
@ -178,7 +178,7 @@ namespace odf_writer
|
||||
class mimetype_file : public element
|
||||
{
|
||||
public:
|
||||
mimetype_file(std::wstring type);
|
||||
mimetype_file(const std::wstring & type);
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
|
||||
@ -201,7 +201,7 @@ namespace odf_writer
|
||||
class object_files : public element
|
||||
{
|
||||
public:
|
||||
object_files(){}
|
||||
object_files() {}
|
||||
|
||||
void set_content (content_content_ptr & _content);
|
||||
|
||||
@ -227,14 +227,16 @@ namespace odf_writer
|
||||
class odf_document : public element
|
||||
{
|
||||
public:
|
||||
odf_document(std::wstring type);
|
||||
odf_document(std::wstring type, bool bTemplate);
|
||||
|
||||
void add_object(element_ptr _object,bool root = false);
|
||||
void add_binary(const std::wstring &file_name, const std::string &value);
|
||||
|
||||
void set_rels(rels & r);
|
||||
|
||||
std::wstring get_type();
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding);
|
||||
void write_manifest(const std::wstring & RootPath);
|
||||
|
||||
manifect_file* get_manifest() {return dynamic_cast<manifect_file*>(manifest_.get());}
|
||||
|
||||
@ -163,8 +163,15 @@ void odf_conversion_context::end_document()
|
||||
rels_.add(relationship(std::wstring(L"text/xml"), object_files->local_path + L"meta.xml"));
|
||||
rels_.add(relationship(std::wstring(L"text/xml"), object_files->local_path + L"settings.xml"));
|
||||
|
||||
if (isRoot)object_files->local_path = L"/";
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
|
||||
if (isRoot)
|
||||
{
|
||||
object_files->local_path = L"/";
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + output_document_->get_type(), object_files->local_path));
|
||||
}
|
||||
else
|
||||
{
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
|
||||
}
|
||||
|
||||
output_document_->add_object(package::element_ptr(object_files), isRoot);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ void odf_table_context::start_table(office_element_ptr &elm, bool styled)
|
||||
state.table.style_elm = style_state->get_office_element();
|
||||
state.table.style_name = style_state->get_name();
|
||||
|
||||
table->table_table_attlist_.table_style_name_ = state.table.style_name;
|
||||
table->attlist_.table_style_name_ = state.table.style_name;
|
||||
}
|
||||
}
|
||||
impl_->default_cell_properties = L"";
|
||||
@ -233,11 +233,11 @@ void odf_table_context::start_row(office_element_ptr &elm, bool styled)
|
||||
state.style_elm = style_state->get_office_element();
|
||||
state.style_name = style_state->get_name();
|
||||
|
||||
row->table_table_row_attlist_.table_style_name_ = state.style_name;
|
||||
row->attlist_.table_style_name_ = state.style_name;
|
||||
}
|
||||
}
|
||||
if (!impl_->current_table().default_cell_properties.empty())
|
||||
row->table_table_row_attlist_.table_default_cell_style_name_ = impl_->current_table().default_cell_properties;
|
||||
row->attlist_.table_default_cell_style_name_ = impl_->current_table().default_cell_properties;
|
||||
|
||||
|
||||
impl_->current_table().rows.push_back(state);
|
||||
@ -284,7 +284,7 @@ void odf_table_context::add_column(office_element_ptr &elm, bool styled)
|
||||
{
|
||||
state.style_elm = style_state->get_office_element();
|
||||
state.style_name = style_state->get_name();
|
||||
column->table_table_column_attlist_.table_style_name_ = state.style_name;
|
||||
column->attlist_.table_style_name_ = state.style_name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -511,7 +511,7 @@ void odf_table_context::start_cell(office_element_ptr &elm, bool styled)
|
||||
state.style_elm = style_state->get_office_element();
|
||||
state.style_name = style_state->get_name();
|
||||
|
||||
cell->table_table_cell_attlist_.table_style_name_ = state.style_name;
|
||||
cell->attlist_.table_style_name_ = state.style_name;
|
||||
}
|
||||
|
||||
if (!impl_->current_table().default_cell_properties.empty())
|
||||
@ -543,7 +543,7 @@ void odf_table_context::start_cell(office_element_ptr &elm, bool styled)
|
||||
table_table_cell * cell = dynamic_cast<table_table_cell *>(state_row.spanned_column_cell[0].get());
|
||||
if (!cell)return;
|
||||
|
||||
cell->table_table_cell_attlist_extra_.table_number_columns_spanned_ = (unsigned int)state_row.spanned_column_cell.size();
|
||||
cell->attlist_extra_.table_number_columns_spanned_ = (unsigned int)state_row.spanned_column_cell.size();
|
||||
state_row.spanned_column_cell.clear();
|
||||
}
|
||||
|
||||
@ -562,7 +562,7 @@ void odf_table_context::set_cell_column_span_restart()
|
||||
table_table_cell * cell = dynamic_cast<table_table_cell *>(state.spanned_column_cell[0].get());
|
||||
if (!cell)return;
|
||||
|
||||
cell->table_table_cell_attlist_extra_.table_number_columns_spanned_ = sz;
|
||||
cell->attlist_extra_.table_number_columns_spanned_ = sz;
|
||||
}
|
||||
state.spanned_column_cell.clear();
|
||||
}
|
||||
@ -575,7 +575,7 @@ void odf_table_context::set_cell_column_span(int spanned)
|
||||
{
|
||||
table_table_cell * cell = dynamic_cast<table_table_cell *>(impl_->current_table().cells.back().elm.get());
|
||||
if (cell)
|
||||
cell->table_table_cell_attlist_extra_.table_number_columns_spanned_ = spanned;
|
||||
cell->attlist_extra_.table_number_columns_spanned_ = spanned;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -596,7 +596,7 @@ void odf_table_context::set_cell_row_span(int spanned)
|
||||
{
|
||||
table_table_cell * cell = dynamic_cast<table_table_cell *>(impl_->current_table().cells.back().elm.get());
|
||||
if (cell)
|
||||
cell->table_table_cell_attlist_extra_.table_number_rows_spanned_ = spanned;
|
||||
cell->attlist_extra_.table_number_rows_spanned_ = spanned;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -619,7 +619,7 @@ void odf_table_context::set_cell_row_span_restart()
|
||||
table_table_cell * cell = dynamic_cast<table_table_cell *>(state.spanned_row_cell[0].get());
|
||||
if (!cell)return;
|
||||
|
||||
cell->table_table_cell_attlist_extra_.table_number_rows_spanned_ = sz;
|
||||
cell->attlist_extra_.table_number_rows_spanned_ = sz;
|
||||
}
|
||||
state.spanned_row_cell.clear();
|
||||
|
||||
|
||||
@ -292,25 +292,25 @@ void ods_conversion_context::set_comment_rect(double l, double t, double w, doub
|
||||
current_table().set_comment_rect(l,t,w,h);
|
||||
}
|
||||
/////////////////////////////
|
||||
void ods_conversion_context::add_hyperlink(std::wstring & ref, std::wstring & link, std::wstring & display)
|
||||
void ods_conversion_context::add_hyperlink(const std::wstring & ref, const std::wstring & link, const std::wstring & display, bool bLocation)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////
|
||||
std::vector<std::wstring> ref_cells;
|
||||
boost::algorithm::split(ref_cells,ref, boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
|
||||
if (ref_cells.size()>1)
|
||||
boost::algorithm::split(ref_cells, ref, boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
|
||||
if (ref_cells.size() > 1)
|
||||
{
|
||||
//в ооx можно воткнуть на диапазон одну ссылку, в оо нельзя - ссылку вствляем, текст не меням
|
||||
int start_col = -1, start_row = -1;
|
||||
int end_col = -1, end_row = -1;
|
||||
|
||||
utils::parsing_ref (ref_cells[0], start_col, start_row);
|
||||
utils::parsing_ref (ref_cells[1], end_col, end_row);
|
||||
utils::parsing_ref (ref_cells[1], end_col, end_row);
|
||||
|
||||
for (long col = start_col; col <= end_col; col++)
|
||||
{
|
||||
for (long row = start_row; row <= end_row; row++)
|
||||
{
|
||||
current_table().add_hyperlink(ref,col,row,link);
|
||||
current_table().add_hyperlink(ref, col, row, link, bLocation);
|
||||
//ссылка одна, а вот отображаемый текст - разный
|
||||
}
|
||||
}
|
||||
@ -319,7 +319,7 @@ void ods_conversion_context::add_hyperlink(std::wstring & ref, std::wstring & li
|
||||
{
|
||||
int col = -1, row = -1;
|
||||
utils::parsing_ref (ref_cells[0], col, row);
|
||||
current_table().add_hyperlink(ref,col,row,link);
|
||||
current_table().add_hyperlink(ref, col, row, link, bLocation);
|
||||
}
|
||||
}
|
||||
|
||||
@ -585,7 +585,13 @@ void ods_conversion_context::end_drawings()
|
||||
{
|
||||
current_table().drawing_context()->clear();
|
||||
}
|
||||
void ods_conversion_context::add_external_reference(const std::wstring & ref)
|
||||
{
|
||||
ods_external_state external;
|
||||
|
||||
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.;
|
||||
|
||||
@ -53,6 +53,11 @@ struct _font_metrix
|
||||
double approx_symbol_size;//in pt
|
||||
};
|
||||
|
||||
struct ods_external_state
|
||||
{
|
||||
std::wstring ref;
|
||||
};
|
||||
|
||||
class ods_conversion_context : public odf_conversion_context
|
||||
{
|
||||
public:
|
||||
@ -85,8 +90,10 @@ public:
|
||||
void add_text_content(const std::wstring & text);
|
||||
void end_cell_text();
|
||||
|
||||
void add_external_reference(const std::wstring & ref);
|
||||
|
||||
void add_merge_cells(const std::wstring & ref);
|
||||
void add_hyperlink(std::wstring & ref, std::wstring & link, std::wstring & display);
|
||||
void add_hyperlink(const std::wstring & ref, const std::wstring & link, const std::wstring & display, bool external = true);
|
||||
|
||||
void start_comment (int col, int row, std::wstring & author);
|
||||
void set_comment_rect (double l, double t, double w, double h);
|
||||
@ -120,16 +127,13 @@ public:
|
||||
void start_table_view(int view_id);
|
||||
void end_table_view();
|
||||
|
||||
std::vector<ods_external_state> externals_;
|
||||
private:
|
||||
_font_metrix font_metrix_;
|
||||
ods_table_context table_context_;
|
||||
|
||||
odf_text_context* current_text_context_;
|
||||
office_spreadsheet* root_spreadsheet_;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -73,8 +73,6 @@ void ods_table_context::start_table_part(std::wstring name, std::wstring ref)
|
||||
ref = table_state_list_.back().office_table_name_ + L"!" + ref;
|
||||
}
|
||||
std::wstring odf_range = formulas_converter.convert_named_ref(ref);
|
||||
XmlUtils::replace_all( odf_range, L"[", L"");
|
||||
XmlUtils::replace_all( odf_range, L"]", L"");
|
||||
|
||||
d_range->table_target_range_address_ = odf_range;
|
||||
d_range->table_name_ = name;
|
||||
@ -141,8 +139,6 @@ void ods_table_context::add_autofilter(std::wstring ref)
|
||||
formulasconvert::oox2odf_converter formulas_converter;
|
||||
|
||||
std::wstring odf_range = formulas_converter.convert_named_ref(ref);
|
||||
XmlUtils::replace_all( odf_range, L"[", L"");
|
||||
XmlUtils::replace_all( odf_range, L"]", L"");
|
||||
|
||||
d_range->table_target_range_address_ = odf_range;
|
||||
d_range->table_display_filter_buttons_= true;
|
||||
@ -167,8 +163,6 @@ void ods_table_context::add_defined_range(const std::wstring & name, const std::
|
||||
formulasconvert::oox2odf_converter formulas_converter;
|
||||
|
||||
std::wstring odf_range = formulas_converter.convert_named_ref(cell_range);//todo - разделить конвертацию диапазонов/рэнжей на c [] и без
|
||||
XmlUtils::replace_all( odf_range, L"[", L"");
|
||||
XmlUtils::replace_all( odf_range, L"]", L"");
|
||||
|
||||
std::wstring odf_base_cell = formulas_converter.get_table_name() + L".$A$1";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user