Compare commits

...

165 Commits

Author SHA1 Message Date
4b727edde8 . 2017-03-09 16:05:45 +03:00
9d10c4ddce Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2017-03-07 12:19:08 +03:00
d5026d014d . 2017-03-06 17:24:29 +03:00
ac0b7e4e22 fix bug 34019 2017-03-06 15:45:43 +03:00
623fe25415 fix 34229 2017-03-06 15:30:54 +03:00
c4c9d50aae fix bug 34222 2017-03-06 14:29:15 +03:00
5d8dda02ec pptx extended reading fix 2017-03-04 16:01:15 +03:00
bc3461147d fix pptx note slide default 2017-03-03 14:29:18 +03:00
80d4e6057b .. 2017-03-03 13:35:37 +03:00
2dc5c2916a .. 2017-03-03 13:28:16 +03:00
5f9631a3c5 .. 2017-03-02 13:14:27 +03:00
ef7df69036 linux build fix 2017-03-01 20:06:37 +03:00
b3961994d2 Pptx .. 2017-03-01 19:40:40 +03:00
927a847607 . 2017-03-01 18:14:33 +03:00
674cc6c1a2 fix doct->docx background page settings 2017-03-01 14:18:35 +03:00
5d77cf9473 add ../ path for dll path 2017-03-01 13:23:11 +03:00
512dad1d24 fix double write attribute in background 2017-02-28 20:02:54 +03:00
3d684934f1 fix ppt background
fix bug 34177
read attributes (from line props, shape props , effects, 3D) without namespace
2017-02-28 19:03:04 +03:00
dd6ac185fb fix - remove tmp pptx folder 2017-02-28 18:27:00 +03:00
9825b6e32e Error writing xlsx (wrong ConditionalFormatting place) 2017-02-27 20:27:31 +03:00
653008ebfc XlsxFormat (graphicFrame) 2017-02-27 18:26:50 +03:00
236e93aa9c add GlobalVariable 2017-02-27 16:46:17 +03:00
164c7faf94 ..fix previus 2017-02-27 12:35:49 +03:00
4c07ddbcc7 . 2017-02-26 22:22:46 +03:00
7be543c3a6 pptx format .. extended reading xml 2017-02-26 18:57:48 +03:00
ccb47b0bda . 2017-02-23 15:20:20 +03:00
8aefacd411 new chart witout office_drawing(faster...) 2017-02-22 19:57:15 +03:00
6cd5fbcaca . 2017-02-21 23:38:23 +03:00
7c964b3f9c .. 2017-02-21 19:17:24 +03:00
8c43c781bd fix build 2017-02-21 18:00:39 +03:00
7496de06f0 . 2017-02-21 13:19:21 +03:00
fdd443a2d7 . 2017-02-21 13:18:29 +03:00
037c4046eb PptxFormat - extending reading xml; sppr, txpr in chart without DrawingConverter 2017-02-21 11:32:31 +03:00
4e5ac14ca9 errors for builder (open/save) 2017-02-18 14:17:42 +03:00
dedf74b366 fix for build 2017-02-18 11:02:42 +03:00
6f2eef1137 .. 2017-02-17 16:42:49 +03:00
9a8d3edbef . 2017-02-17 16:33:19 +03:00
305ebda78d OfficeUtils - add sort for compress 2017-02-17 16:28:00 +03:00
114050c23e fix bug #33849 2017-02-16 19:26:50 +03:00
7eee0755bf RtfFormatReader - generate replacement text hyperlink if absent 2017-02-16 16:23:21 +03:00
c329f29e9a RtfFormatReader - fix hyperlink text 2017-02-16 15:49:08 +03:00
0f3a02ca7c . 2017-02-16 15:20:53 +03:00
62d4860873 pptx - extending reading xml 2017-02-16 15:08:53 +03:00
21666ee309 x2t verion up 2.0.3.440 2017-02-16 11:38:20 +03:00
47ff766e4e . 2017-02-15 11:36:04 +03:00
50cbc671b3 RtfFormatWriter - text in drawing shapes, ... 2017-02-13 20:11:52 +03:00
f2d3390bd4 RtfFormatWriter - fix custom shape path 2017-02-13 14:23:38 +03:00
fb5af12d7a OdfFormat - refactroing svg; RtfFormatWriter - add custom shapes 2017-02-12 15:38:51 +03:00
63655a97e9 .. 2017-02-11 15:32:29 +03:00
fdf032d9f8 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  RtfFormat - add office digital signatures
  bug with some jpeg
  x2t version up 2.0.3.438
  RtfFormat - fix croping image, ...
  RtfFormat - extended drawing
  fix bug #34016
  fix bug #34018
  fix bug 34011
  fix bug #33752 after refactoring
  fix convert oox group shape to vml group shape
  RtfFormatWriter - fix table cell width (auto)
  OdfFormat - Reader/Writer - background page (image, pattern, gradient)
  fix bug #33918
2017-02-10 18:16:27 +03:00
3b85b58558 up 2017-02-10 18:16:18 +03:00
00f1f40a1e RtfFormat - add office digital signatures 2017-02-10 18:09:48 +03:00
46c05a4c27 bug with some jpeg 2017-02-10 17:14:53 +03:00
f3a510bd58 x2t version up 2.0.3.438 2017-02-10 15:49:17 +03:00
45231b822c RtfFormat - fix croping image, ... 2017-02-10 15:02:00 +03:00
e0591675d2 RtfFormat - extended drawing 2017-02-09 17:20:02 +03:00
67a849f110 fix bug #34016 2017-02-09 14:24:31 +03:00
15800296f7 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2017-02-08 20:04:33 +03:00
52fe741f9a fix bug #34018 2017-02-08 20:03:38 +03:00
b3ee693890 fix bug 34011 2017-02-08 19:35:45 +03:00
8c2e1738ea fix bug #33752 after refactoring 2017-02-07 12:42:46 +03:00
bf33aed853 fix convert oox group shape to vml group shape 2017-02-06 20:07:58 +03:00
5869c7a02e RtfFormatWriter - fix table cell width (auto) 2017-02-06 13:55:01 +03:00
bbd429a994 OdfFormat - Reader/Writer - background page (image, pattern, gradient) 2017-02-05 15:57:17 +03:00
f4d636539e Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2017-02-03 18:34:43 +03:00
92e02257d7 fix bug #33918 2017-02-03 18:33:50 +03:00
d2046d7ccb add missed include 2017-02-03 18:15:57 +03:00
7bc35a157a Implemented case when the size of the masked image doesn't match to the size of the mask. 2017-02-03 18:02:28 +03:00
903245e8a7 fixed converter for iOS 2017-02-03 17:33:48 +03:00
25ee9c3c1c Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  x2t vesion up  2.0.3.435
  PDFReader: text clip
  .
  fix...
  .
  x2t version up
  DocxFormat - fix vml single geom position RtfFormat - read/write background page (solid, pattern, gradient, image)
2017-02-03 16:28:47 +03:00
9ead40d279 up header 2017-02-03 16:28:42 +03:00
e097379c21 x2t vesion up 2.0.3.435 2017-02-03 15:27:12 +03:00
f86579d601 PDFReader: text clip 2017-02-03 13:02:26 +03:00
de7511f243 . 2017-02-03 12:42:06 +03:00
9a68a75f70 fix... 2017-02-02 18:43:38 +03:00
e04388aa32 . 2017-02-02 16:53:20 +03:00
cee61e7a92 x2t version up 2017-02-02 16:31:02 +03:00
48185ed4e9 DocxFormat - fix vml single geom position
RtfFormat - read/write background page (solid, pattern, gradient, image)
2017-02-02 15:44:03 +03:00
7bea086784 Fixed bugs with reading pdf files. 2017-02-02 14:53:01 +03:00
774f9c42cb PDF bugs 2017-02-01 19:20:12 +03:00
10964d32e6 ... 2017-02-01 17:10:19 +03:00
da2493ed3b OdfFormatReader - fix math matrix 2017-02-01 16:15:32 +03:00
0a183f3505 fix bug #33886 2017-02-01 15:59:28 +03:00
ac6cc1ec24 pptx file with wrong rels 2017-02-01 15:05:08 +03:00
a1846da0da Merge tag 'v4.2.7' into develop
v4.2.7 v4.2.7
2017-02-01 12:49:34 +03:00
0bd10c28ac Merge branch 'hotfix/v4.2.7' 2017-02-01 12:49:29 +03:00
2367cee329 PptxFormat - fix user file with wrong rels 2017-01-31 19:59:20 +03:00
288d89301a fix bug 33801 2017-01-31 17:16:28 +03:00
4d519e8f26 x2t - version up, .. 2017-01-31 15:02:34 +03:00
1bd2c0b852 Merge branch 'hotfix/v4.2.7' into develop
fix bug 33867
2017-01-31 13:57:55 +03:00
82b0f4bce8 DiagramDrawing losing images 2017-01-31 13:50:16 +03:00
5635239274 fix crash on windows 2017-01-31 13:12:43 +03:00
1f979fc4cc . 2017-01-31 12:05:32 +03:00
80c4a65147 PptxFormat- fix convert oox drawing to vml drawing
RtfFormatWriter - convert oox drawing, convert smart art objects
2017-01-31 11:58:09 +03:00
4fda6101eb OdfFormatWriter - convert smart art 2017-01-28 18:38:46 +03:00
99822fb597 x2t ... fix after testing 2017-01-27 19:12:35 +03:00
f1d9c12f07 change encoding to utf8 2017-01-27 18:31:50 +03:00
30ef5a9de4 fix build converter 2017-01-27 17:54:00 +03:00
765ca861fb fix bug 33842 (corrupted xlsx->csv convertion) 2017-01-27 15:22:14 +03:00
99570b3b86 . 2017-01-26 19:51:12 +03:00
d9c6759108 OdfFormatWriter - convert smart art in spreadsheets, ... 2017-01-26 19:40:42 +03:00
b82a8c6b9b developing... 2017-01-26 15:20:54 +03:00
d76b1897aa save conditionalFormating to xlsx 2017-01-25 20:27:25 +03:00
857b79ee23 x2t - fix smart art 2017-01-25 19:51:47 +03:00
ecba12b29f x2t - delete unused files 2017-01-25 15:43:27 +03:00
efc48ab44c . 2017-01-25 13:04:02 +03:00
5f0620ed90 x2t - delete unused files 2017-01-25 13:01:18 +03:00
150ff1fae2 . 2017-01-24 23:01:52 +03:00
dd1b9ca9be ... 2017-01-24 18:44:46 +03:00
c6ed59a742 EmfFile - fix emf from users file xlsx 2017-01-24 18:34:04 +03:00
1d3315711e Merge branch 'hotfix/v.4.2.6' into develop 2017-01-24 11:56:02 +03:00
46ddcff040 .. 2017-01-24 11:10:53 +03:00
a044b262e4 . 2017-01-24 11:05:21 +03:00
51b0e715a1 . 2017-01-24 10:00:01 +03:00
1cdeefb576 restore file 2017-01-23 18:08:38 +03:00
db9aeb40bb .. 2017-01-23 17:33:55 +03:00
8a41f0c716 ............ 2017-01-23 17:32:29 +03:00
4be5a491da . 2017-01-23 00:49:58 +03:00
4b4d4ebc54 x2t checker - fix users file with crypt 2017-01-22 18:07:26 +03:00
b132ea266a .. 2017-01-22 17:48:55 +03:00
e20e061330 ... 2017-01-21 17:24:24 +03:00
fc97b32d18 x2t - smart art objects (move in pptx drawing); fix users file pptx with smart art 2017-01-20 20:08:06 +03:00
a63aa93092 XlsxFormat - fix users file with shape in VmlDrawing 2017-01-20 20:05:40 +03:00
91cb5e895b no message 2017-01-20 16:50:51 +03:00
16d233da47 no message 2017-01-20 16:49:43 +03:00
69e8a6501e open/save docx tblCaption,tblDescription and xlsx altText, altTextSummary 2017-01-20 13:49:03 +03:00
dac6ae2e48 x2t - PPTX format - refactoring 2017-01-19 18:22:13 +03:00
9f145333f8 x2t - remove libxml2 from DocxFormat 2017-01-19 15:40:02 +03:00
c8c5b82924 cashed scripts data scheme (may be disable) 2017-01-19 15:29:41 +03:00
2e99efeeb6 .. 2017-01-19 15:19:58 +03:00
c4492f2cd2 fix bug #33796 2017-01-19 14:04:54 +03:00
41da15d8cf .. 2017-01-19 12:10:21 +03:00
ea3db6936c . 2017-01-19 12:01:20 +03:00
0928e7d787 . 2017-01-19 11:30:58 +03:00
2d3040aba2 x2t - pptx format(refactoring common docxFormat), bug 33782(prepare) 2017-01-19 11:26:33 +03:00
ce590a4a61 fixed converter for iOS 2017-01-18 18:06:56 +03:00
e899647453 Recovered file 2017-01-17 18:43:52 +03:00
fe1553f8da Repared the removed file 2017-01-17 18:20:05 +03:00
04d197375c change license to 2017 2017-01-17 18:17:26 +03:00
d2f1022b5a fix defines 2017-01-17 13:25:27 +03:00
0265162cb9 . 2017-01-16 19:33:02 +03:00
9be4d6ca0e x2t linux build 2017-01-16 18:33:01 +03:00
9e9da20450 reset commit - remove bin2image 2017-01-16 17:41:40 +03:00
082fd814af . 2017-01-16 17:33:08 +03:00
39cd23d7c0 . 2017-01-16 17:30:05 +03:00
78b051c999 ... 2017-01-16 17:21:35 +03:00
2836fee493 Update ASCConverters.cpp
add bin2imageBase64 to generate thumbnail from pdf command in base64 format
2017-01-16 17:03:37 +03:00
6e409d2f7e images bug 2017-01-16 15:08:21 +03:00
3e698b8579 Merge tag 'v4.2.5' into develop
v4.2.5 v4.2.5
2017-01-16 14:59:44 +03:00
95e32f00d0 Merge branch 'hotfix/v4.2.5' 2017-01-16 14:59:40 +03:00
61c632ce55 Revert "add bin2image"
This reverts commit a97518359a.
2017-01-16 14:55:16 +03:00
a0b93fd1b2 . 2017-01-16 14:52:43 +03:00
0b096a4c46 add bin2image 2017-01-16 14:50:20 +03:00
a97518359a add bin2image 2017-01-16 14:28:38 +03:00
96cea25bca x2t version up 2017-01-16 11:09:55 +03:00
1a57f62773 x2t refactoring (delete AscString, ...) 2017-01-16 10:30:00 +03:00
9d1f83b1ce Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  miss dashDotDot in xlsx border style
2017-01-13 15:47:58 +03:00
6653e8ef82 fixed deployment target 2017-01-13 15:47:48 +03:00
fd121841a9 miss dashDotDot in xlsx border style 2017-01-13 15:40:47 +03:00
00255297c8 stable iOS converter 2017-01-13 12:15:39 +03:00
74a0fd2928 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  NSString: + stringWithUtf8Buffer method
2017-01-12 16:25:56 +03:00
ce7487a14d RtfFormatLib for iOS 2017-01-12 16:25:50 +03:00
95d9d8bc8e NSString: + stringWithUtf8Buffer method 2017-01-12 15:39:02 +03:00
dce0b43c11 HtmlFile for iOS 2017-01-12 14:47:42 +03:00
d7a981a84e PPTFileLib & TxtxXmlFileLib for iOS 2017-01-12 14:33:57 +03:00
9186 changed files with 90698 additions and 948942 deletions

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -505,6 +505,7 @@ namespace DocFormatUtils
{
STLCollection->push_back(result[i]);
}
return true;
}
template<class T> static bool GetSTLCollectionFromUtf8( T *STLCollection, unsigned char *bytes, int size)
@ -770,6 +771,7 @@ namespace DocFormatUtils
{
return (std::to_wstring(value));
}
static inline std::wstring DoubleToWideString(double value)
{
std::wstringstream src;

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -406,34 +406,12 @@ namespace XMLTools
void WriteInteger(int Value, int Base = 10)
{
#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[33] ={};
_itow(Value, buff, Base);
m_str += std::wstring(buff);
#else
m_str += std::to_wstring(Value);
#endif
}
void WriteDouble(double Value)
{
#if defined(_WIN32) || defined (_WIN64)
int *dec = NULL, *sign = NULL;
char *str = _fcvt( Value , 4, dec, sign);
if (str)
{
std::string sA(str);
delete []str;
m_str += std::wstring(sA.begin(), sA.end());
}
else
{
m_str += L"0";
}
#else
m_str += std::to_wstring(Value);
#endif
}
void WriteBoolean(bool Value)
{

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -38,7 +38,7 @@ namespace DocFileFormat
: PropertiesMapping( writer ), _isRunStyleNeeded(isRunStyleNeeded), _isOwnRPr(true), _isRTL(false)
{
_doc = doc;
_rPr = new XMLTools::XMLElement( _T( "w:rPr" ) );
_rPr = new XMLTools::XMLElement( L"w:rPr");
_revisionData = rev;
_currentPapx = currentPapx;
_styleChpx = styleChpx;
@ -77,7 +77,7 @@ namespace DocFileFormat
// apend revision changes
if (_revisionData->Type == Changed)
{
XMLTools::XMLElement rPrChange( _T( "w:rPrChange" ) );
XMLTools::XMLElement rPrChange( L"w:rPrChange");
//todooo date - _revisionData->Dttm.Convert( new DateMapping( rPrChange ) );
@ -85,7 +85,7 @@ namespace DocFileFormat
if (author_str)
{
XMLTools::XMLAttribute author( _T( "w:author" ), FormatUtils::XmlEncode(*author_str));
XMLTools::XMLAttribute author( L"w:author", FormatUtils::XmlEncode(*author_str));
rPrChange.AppendAttribute( author );
}
@ -108,7 +108,7 @@ namespace DocFileFormat
{
//Todo сделать определение симольного шрифта через fontManager
//Заглушка под Google Docs, они пишут bullet в Arial
if (-1 != m_sAsciiFont.find (_T("Arial")) && -1 != m_sEastAsiaFont.find (_T("Arial")) && -1 != m_shAnsiFont.find (_T("Arial")))
if (-1 != m_sAsciiFont.find (L"Arial") && -1 != m_sEastAsiaFont.find (L"Arial") && -1 != m_shAnsiFont.find (L"Arial"))
return false;
return true;
@ -118,14 +118,14 @@ namespace DocFileFormat
void CharacterPropertiesMapping::convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement* parent )
{
XMLTools::XMLElement * rFonts = new XMLTools::XMLElement ( _T( "w:rFonts" ) );
XMLTools::XMLElement * color = new XMLTools::XMLElement ( _T( "w:color" ) );
XMLTools::XMLAttribute * colorVal = new XMLTools::XMLAttribute ( _T( "w:val" ) );
XMLTools::XMLElement * lang = new XMLTools::XMLElement ( _T( "w:lang" ) );
XMLTools::XMLElement * rFonts = new XMLTools::XMLElement ( L"w:rFonts" );
XMLTools::XMLElement * color = new XMLTools::XMLElement ( L"w:color" );
XMLTools::XMLAttribute * colorVal = new XMLTools::XMLAttribute ( L"w:val" );
XMLTools::XMLElement * lang = new XMLTools::XMLElement ( L"w:lang" );
if (_webHidden)
{
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( _T( "w:webHidden" ) );
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( L"w:webHidden" );
parent->AppendChild( *webHidden );
RELEASEOBJECT( webHidden );
}
@ -144,95 +144,96 @@ namespace DocFileFormat
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if (_currentIstd < _doc->Styles->Styles->size())
{
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
appendValueElement( parent, L"rStyle", StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
}
}
}break;
case sprmCFBiDi :
appendFlagElement( parent, *iter, _T( "rtl" ), true );
appendFlagElement( parent, *iter, L"rtl", true );
_isRTL = true;
break;
case sprmOldCFBold :
case sprmCFBold :
appendFlagElement( parent, *iter, _T( "b" ), true );
appendFlagElement( parent, *iter, L"b", true );
break;
case sprmCFBoldBi :
appendFlagElement( parent, *iter, _T( "bCs" ), true );
appendFlagElement( parent, *iter, L"bCs", true );
break;
case sprmOldCFCaps :
case sprmCFCaps :
appendFlagElement( parent, *iter, _T( "caps" ), true );
appendFlagElement( parent, *iter, L"caps", true );
break;
case sprmCFComplexScripts :
appendFlagElement( parent, *iter, _T( "cs" ), true );
appendFlagElement( parent, *iter, L"cs", true );
break;
case sprmCFDStrike :
appendFlagElement( parent, *iter, _T( "dstrike" ), true );
appendFlagElement( parent, *iter, L"dstrike", true );
break;
case sprmCFEmboss :
appendFlagElement( parent, *iter, _T( "emboss" ), true );
appendFlagElement( parent, *iter, L"emboss", true );
break;
case sprmCFImprint :
appendFlagElement( parent, *iter, _T( "imprint" ), true );
appendFlagElement( parent, *iter, L"imprint", true );
break;
case sprmOldCFItalic :
case sprmCFItalic :
appendFlagElement( parent, *iter, _T( "i" ), true );
appendFlagElement( parent, *iter, L"i", true );
break;
case sprmCFItalicBi:
appendFlagElement( parent, *iter, _T( "iCs" ), true );
appendFlagElement( parent, *iter, L"iCs", true );
break;
case 0x0875:
appendFlagElement( parent, *iter, _T( "noProof" ), true );
appendFlagElement( parent, *iter, L"noProof", true );
break;
case sprmOldCFOutline:
case sprmCFOutline:
appendFlagElement( parent, *iter, _T( "outline" ), true );
appendFlagElement( parent, *iter, L"outline", true );
break;
case sprmOldCFShadow:
case sprmCFShadow:
appendFlagElement( parent, *iter, _T( "shadow" ), true );
appendFlagElement( parent, *iter, L"shadow", true );
break;
case sprmOldCFSmallCaps:
case sprmCFSmallCaps:
appendFlagElement( parent, *iter, _T( "smallCaps" ), true );
appendFlagElement( parent, *iter, L"smallCaps", true );
break;
case sprmCFSpecVanish:
appendFlagElement( parent, *iter, _T( "specVanish" ), true );
appendFlagElement( parent, *iter, L"specVanish", true );
break;
case sprmOldCFStrike:
case sprmCFStrike:
appendFlagElement( parent, *iter, _T( "strike" ), true );
appendFlagElement( parent, *iter, L"strike", true );
break;
case sprmOldCFVanish:
case sprmCFVanish:
appendFlagElement( parent, *iter, _T( "vanish" ), true );
appendFlagElement( parent, *iter, L"vanish", true );
break;
case 0x0811:
appendFlagElement( parent, *iter, _T( "webHidden" ), true );
appendFlagElement( parent, *iter, L"webHidden", true );
break;
case sprmOldCIss:
case sprmCIss:
appendValueElement( parent, _T( "vertAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
if (iter->argumentsSize > 0 && iter->Arguments[0] < 3) //Metaevan.doc
appendValueElement( parent, L"vertAlign", FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
break;
case sprmCRgLid0_80:
@ -274,7 +275,7 @@ namespace DocFileFormat
case sprmCBrc80:
case sprmCBrc:
{ //borders
XMLTools::XMLElement bdr( _T( "w:bdr" ) );
XMLTools::XMLElement bdr( L"w:bdr" );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &bdr );
parent->AppendChild( bdr );
@ -305,17 +306,17 @@ namespace DocFileFormat
case sprmCOldHighlight:
{
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
}break;
case sprmCHighlight:
{
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
}break;
case sprmOldCDxaSpace:
case sprmCDxaSpace:
{
appendValueElement( parent, _T( "spacing" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
appendValueElement( parent, L"spacing", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCFtcBi :
@ -331,20 +332,20 @@ namespace DocFileFormat
case sprmCHpsBi :
{
appendValueElement( parent, _T( "szCs" ),
appendValueElement( parent, L"szCs",
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}
break;
// Font Size in points (2~3276) default 20-half-points
case sprmOldCHps :
{
appendValueElement (parent, _T( "sz" ),
appendValueElement (parent, L"sz",
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
true );
}break;
case sprmCHps :
{
appendValueElement (parent, _T( "sz" ),
appendValueElement (parent, L"sz",
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
}break;
@ -355,18 +356,18 @@ namespace DocFileFormat
case sprmOldCHpsPos:
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
short nVertPos = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
appendValueElement (parent, _T("position"), nVertPos, true);
appendValueElement (parent, L"position", nVertPos, true);
}break;
case sprmCHpsPos:
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
short nVertPos = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
appendValueElement (parent, _T("position"), nVertPos, true);
appendValueElement (parent, L"position", nVertPos, true);
}break;
case sprmOldCHpsKern:
case sprmCHpsKern:
{
appendValueElement( parent, _T( "kern" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
appendValueElement( parent, L"kern", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmOldCFtc:
@ -376,7 +377,7 @@ namespace DocFileFormat
if( nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_sAsciiFont = ffn->xszFtn;
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont, true));
@ -390,7 +391,7 @@ namespace DocFileFormat
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( _T( "w:eastAsia" ) );
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( L"w:eastAsia" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_sEastAsiaFont = ffn->xszFtn;
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont));
@ -405,7 +406,7 @@ namespace DocFileFormat
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
{
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( _T( "w:hAnsi" ) );
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( L"w:hAnsi" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
m_shAnsiFont = ffn->xszFtn;
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont));
@ -417,18 +418,18 @@ namespace DocFileFormat
case sprmOldCKul:
case sprmCKul:
{ //Underlining
appendValueElement( parent, _T( "u" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
appendValueElement( parent, L"u", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
}
break;
case sprmCCharScale:
{ //char width
appendValueElement( parent, _T( "w" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
appendValueElement( parent, L"w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCSfxText:
{ //animation
appendValueElement( parent, _T( "effect" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
appendValueElement( parent, L"effect", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
}break;
case sprmCIdctHint:
@ -482,7 +483,7 @@ namespace DocFileFormat
if (!m_sDefaultFont.empty() && m_sAsciiFont.empty() && m_sEastAsiaFont.empty() && m_shAnsiFont.empty())
{//????
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
ascii->SetValue( FormatUtils::XmlEncode(m_sDefaultFont));
//rFonts->AppendAttribute( *ascii );
RELEASEOBJECT( ascii );
@ -501,7 +502,7 @@ namespace DocFileFormat
}
//append color
if ( colorVal->GetValue() != _T( "" ) )
if ( colorVal->GetValue() != L"")
{
color->AppendAttribute( *colorVal );
parent->AppendChild( *color );
@ -523,8 +524,8 @@ namespace DocFileFormat
if( flag != 128 )
{
XMLTools::XMLElement* ele = new XMLTools::XMLElement( _T( "w" ), elementName );
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( _T( "w:val" ) );
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w", elementName );
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val" );
if ( unique )
{
@ -533,7 +534,7 @@ namespace DocFileFormat
if ( flag == 0 )
{
val->SetValue( _T( "false" ) );
val->SetValue( L"false" );
ele->AppendAttribute( *val );
node->AppendChild( *ele );
}
@ -576,7 +577,7 @@ namespace DocFileFormat
//invert it
if ( stylesVal )
{
val->SetValue( _T( "false" ) );
val->SetValue( L"false" );
ele->AppendAttribute( *val );
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -54,16 +54,16 @@ namespace DocFileFormat
int index = 0;
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:comments" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:comments", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
int cp = m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr;
@ -72,11 +72,11 @@ namespace DocFileFormat
{
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
m_pXmlWriter->WriteNodeBegin( _T( "w:comment" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( index ));
m_pXmlWriter->WriteAttribute( _T( "w:author" ),
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index ));
m_pXmlWriter->WriteAttribute( L"w:author",
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ));
m_pXmlWriter->WriteAttribute( _T( "w:initials" ), atrdPre10->GetUserInitials());
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
//!!!TODO!!!
/*//ATRDpost10 is optional and not saved in all files
@ -87,7 +87,7 @@ namespace DocFileFormat
atrdPost10.Date.Convert(new DateMapping(_writer));
}*/
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
while ( ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpHdr ) < (*m_document->IndividualCommentsPlex)[index + 1] )
{
@ -111,12 +111,12 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd(_T( "w:comment" ));
m_pXmlWriter->WriteNodeEnd(L"w:comment" );
++index;
}
m_pXmlWriter->WriteNodeEnd( _T( "w:comments" ) );
m_pXmlWriter->WriteNodeEnd( L"w:comments" );
m_context->_docx->CommentsXML = std::wstring(m_pXmlWriter->GetXmlString());
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -40,129 +40,129 @@
namespace OpenXmlContentTypes
{
// default content types
static const TCHAR* Xml = _T("application/xml");
static const wchar_t* Xml = L"application/xml";
// package content types
static const TCHAR* Relationships = _T("application/vnd.openxmlformats-package.relationships+xml");
static const wchar_t* Relationships = L"application/vnd.openxmlformats-package.relationships+xml";
static const TCHAR* CoreProperties = _T("application/vnd.openxmlformats-package.core-properties+xml");
static const wchar_t* CoreProperties = L"application/vnd.openxmlformats-package.core-properties+xml";
// general office document content types
static const TCHAR* ExtendedProperties = _T("application/vnd.openxmlformats-officedocument.extended-properties+xml");
static const TCHAR* Theme = _T("application/vnd.openxmlformats-officedocument.theme+xml");
static const wchar_t* ExtendedProperties = L"application/vnd.openxmlformats-officedocument.extended-properties+xml";
static const wchar_t* Theme = L"application/vnd.openxmlformats-officedocument.theme+xml";
static const TCHAR* CustomXmlProperties = _T("application/vnd.openxmlformats-officedocument.customXmlProperties+xml");
static const wchar_t* CustomXmlProperties = L"application/vnd.openxmlformats-officedocument.customXmlProperties+xml";
static const TCHAR* OleObject = _T("application/vnd.openxmlformats-officedocument.oleObject");
static const TCHAR* Vml = _T("application/vnd.openxmlformats-officedocument.vmlDrawing");
static const TCHAR* Drawing = _T("application/vnd.openxmlformats-officedocument.drawing+xml");
static const wchar_t* OleObject = L"application/vnd.openxmlformats-officedocument.oleObject";
static const wchar_t* Vml = L"application/vnd.openxmlformats-officedocument.vmlDrawing";
static const wchar_t* Drawing = L"application/vnd.openxmlformats-officedocument.drawing+xml";
static const TCHAR* MSWordDocx = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
static const wchar_t* MSWordDocx = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
static const TCHAR* MSExcel = _T("application/vnd.ms-excel");
static const TCHAR* MSWord = _T("application/msword");
static const TCHAR* MSPowerpoint = _T("application/vnd.ms-powerpoint");
static const wchar_t* MSExcel = L"application/vnd.ms-excel";
static const wchar_t* MSWord = L"application/msword";
static const wchar_t* MSPowerpoint = L"application/vnd.ms-powerpoint";
static const TCHAR* Emf = _T("image/x-emf");
static const TCHAR* Jpeg = _T("image/jpeg");
static const TCHAR* Png = _T("image/png");
static const TCHAR* Tiff = _T("image/tiff");
static const TCHAR* Wmf = _T("image/x-wmf");
static const TCHAR* Bmp = _T("image/bmp");
static const wchar_t* Emf = L"image/x-emf";
static const wchar_t* Jpeg = L"image/jpeg";
static const wchar_t* Png = L"image/png";
static const wchar_t* Tiff = L"image/tiff";
static const wchar_t* Wmf = L"image/x-wmf";
static const wchar_t* Bmp = L"image/bmp";
}
namespace WordprocessingMLContentTypes
{
// WordprocessingML content types
static const TCHAR* MainDocument = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
static const TCHAR* MainDocumentMacro = _T("application/vnd.ms-word.document.macroEnabled.main+xml");
static const TCHAR* MainDocumentTemplate = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml");
static const TCHAR* MainDocumentMacroTemplate = _T("application/vnd.ms-word.template.macroEnabledTemplate.main+xml");
static const wchar_t* MainDocument = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
static const wchar_t* MainDocumentMacro = L"application/vnd.ms-word.document.macroEnabled.main+xml";
static const wchar_t* MainDocumentTemplate = L"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml";
static const wchar_t* MainDocumentMacroTemplate = L"application/vnd.ms-word.template.macroEnabledTemplate.main+xml";
static const TCHAR* Styles = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml");
static const TCHAR* Numbering = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml");
static const TCHAR* FontTable = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml");
static const TCHAR* WebSettings = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml");
static const TCHAR* Settings = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml");
static const wchar_t* Styles = L"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
static const wchar_t* Numbering = L"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml";
static const wchar_t* FontTable = L"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml";
static const wchar_t* WebSettings = L"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml";
static const wchar_t* Settings = L"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml";
static const TCHAR* Comments = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");
static const wchar_t* Comments = L"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml";
static const TCHAR* Footnotes = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml");
static const TCHAR* Endnotes = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml");
static const wchar_t* Footnotes = L"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml";
static const wchar_t* Endnotes = L"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml";
static const TCHAR* Header = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml");
static const TCHAR* Footer = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml");
static const wchar_t* Header = L"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml";
static const wchar_t* Footer = L"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
static const TCHAR* Glossary = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml");
static const wchar_t* Glossary = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml";
}
namespace MicrosoftWordContentTypes
{
static const TCHAR* KeyMapCustomization = _T("application/vnd.ms-word.keyMapCustomizations+xml");
static const TCHAR* VbaProject = _T("application/vnd.ms-office.vbaProject");
static const TCHAR* VbaData = _T("application/vnd.ms-word.vbaData+xml");
static const TCHAR* Toolbars = _T("application/vnd.ms-word.attachedToolbars");
static const wchar_t* KeyMapCustomization = L"application/vnd.ms-word.keyMapCustomizations+xml";
static const wchar_t* VbaProject = L"application/vnd.ms-office.vbaProject";
static const wchar_t* VbaData = L"application/vnd.ms-word.vbaData+xml";
static const wchar_t* Toolbars = L"application/vnd.ms-word.attachedToolbars";
}
namespace OpenXmlNamespaces
{
// package namespaces
static const TCHAR* ContentTypes = _T("http://schemas.openxmlformats.org/package/2006/content-types");
static const TCHAR* RelationshipsPackage = _T("http://schemas.openxmlformats.org/package/2006/relationships");
static const TCHAR* Relationships = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
static const wchar_t* ContentTypes = L"http://schemas.openxmlformats.org/package/2006/content-types";
static const wchar_t* RelationshipsPackage = L"http://schemas.openxmlformats.org/package/2006/relationships";
static const wchar_t* Relationships = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships";
// Drawing ML namespaces
static const TCHAR* DrawingML = _T("http://schemas.openxmlformats.org/drawingml/2006/main");
static const TCHAR* DrawingMLPicture = _T("http://schemas.openxmlformats.org/drawingml/2006/picture");
static const wchar_t* DrawingML = L"http://schemas.openxmlformats.org/drawingml/2006/main";
static const wchar_t* DrawingMLPicture = L"http://schemas.openxmlformats.org/drawingml/2006/picture";
// WordprocessingML namespaces
static const TCHAR* WordprocessingML = _T("http://schemas.openxmlformats.org/wordprocessingml/2006/main");
static const TCHAR* WordprocessingDrawingML = _T("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
static const TCHAR* VectorML = _T("urn:schemas-microsoft-com:vml");
static const TCHAR* MicrosoftWordML = _T("http://schemas.microsoft.com/office/word/2006/wordml");
static const wchar_t* WordprocessingML = L"http://schemas.openxmlformats.org/wordprocessingml/2006/main";
static const wchar_t* WordprocessingDrawingML = L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
static const wchar_t* VectorML = L"urn:schemas-microsoft-com:vml";
static const wchar_t* MicrosoftWordML = L"http://schemas.microsoft.com/office/word/2006/wordml";
// PresentationML namespaces
static const TCHAR* PresentationML = _T("http://schemas.openxmlformats.org/presentationml/2006/main");
static const wchar_t* PresentationML = L"http://schemas.openxmlformats.org/presentationml/2006/main";
// SpreadsheetML Namespaces
static const TCHAR* SharedStringML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
static const TCHAR* WorkBookML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
static const TCHAR* StylesML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
static const wchar_t* SharedStringML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
static const wchar_t* WorkBookML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
static const wchar_t* StylesML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
//Office
static const TCHAR* Office = _T("urn:schemas-microsoft-com:office:office");
static const TCHAR* OfficeWord = _T("urn:schemas-microsoft-com:office:word");
static const wchar_t* Office = L"urn:schemas-microsoft-com:office:office";
static const wchar_t* OfficeWord = L"urn:schemas-microsoft-com:office:word";
}
namespace OpenXmlRelationshipTypes
{
static const TCHAR* CoreProperties = _T("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
static const TCHAR* ExtendedProperties = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties");
static const wchar_t* CoreProperties = L"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
static const wchar_t* ExtendedProperties = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";
static const TCHAR* Theme = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme");
static const TCHAR* OfficeDocument = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
static const TCHAR* Styles = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
static const TCHAR* FontTable = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
static const TCHAR* Numbering = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering");
static const TCHAR* WebSettings = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
static const TCHAR* Settings = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
static const TCHAR* CustomXml = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml");
static const TCHAR* CustomXmlProperties = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps");
static const TCHAR* Comments = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments");
static const TCHAR* Footnotes = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes");
static const TCHAR* Endnotes = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes");
static const TCHAR* Header = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
static const TCHAR* Footer = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
static const TCHAR* Image = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image");
static const TCHAR* OleObject = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
static const TCHAR* GlossaryDocument = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument");
static const TCHAR* Package = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
static const wchar_t* Theme = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
static const wchar_t* OfficeDocument = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
static const wchar_t* Styles = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
static const wchar_t* FontTable = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
static const wchar_t* Numbering = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
static const wchar_t* WebSettings = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";
static const wchar_t* Settings = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";
static const wchar_t* CustomXml = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
static const wchar_t* CustomXmlProperties = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
static const wchar_t* Comments = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
static const wchar_t* Footnotes = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes";
static const wchar_t* Endnotes = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes";
static const wchar_t* Header = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
static const wchar_t* Footer = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
static const wchar_t* Image = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
static const wchar_t* OleObject = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
static const wchar_t* GlossaryDocument = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
static const wchar_t* Package = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
}
namespace MicrosoftWordRelationshipTypes
{
static const TCHAR* KeyMapCustomizations = _T("http://schemas.microsoft.com/office/2006/relationships/keyMapCustomizations");
static const TCHAR* VbaProject = _T("http://schemas.microsoft.com/office/2006/relationships/vbaProject");
static const TCHAR* VbaData = _T("http://schemas.microsoft.com/office/2006/relationships/wordVbaData");
static const TCHAR* Toolbars = _T("http://schemas.microsoft.com/office/2006/relationships/attachedToolbars");
static const wchar_t* KeyMapCustomizations = L"http://schemas.microsoft.com/office/2006/relationships/keyMapCustomizations";
static const wchar_t* VbaProject = L"http://schemas.microsoft.com/office/2006/relationships/vbaProject";
static const wchar_t* VbaData = L"http://schemas.microsoft.com/office/2006/relationships/wordVbaData";
static const wchar_t* Toolbars = L"http://schemas.microsoft.com/office/2006/relationships/attachedToolbars";
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -212,7 +212,7 @@ namespace DocFileFormat
// start paragraph
m_pXmlWriter->WriteNodeBegin(_T("w:p"), true);
m_pXmlWriter->WriteNodeBegin(L"w:p", true);
writeParagraphRsid(papx);
// ----------- check for section properties
@ -320,12 +320,12 @@ namespace DocFileFormat
}
//end paragraph
m_pXmlWriter->WriteNodeEnd(_T("w:p"));
m_pXmlWriter->WriteNodeEnd(L"w:p");
}
else
{
//end paragraph
m_pXmlWriter->WriteNodeEnd(_T("w:p"));
m_pXmlWriter->WriteNodeEnd(L"w:p");
}
RELEASEOBJECT(chpxFcs);
@ -344,16 +344,16 @@ namespace DocFileFormat
if (DocFileFormat::sprmPRsid == iter->OpCode)
{
std::wstring id = FormatUtils::IntToFormattedWideString(FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize), _T("%08x"));
std::wstring id = FormatUtils::IntToFormattedWideString(FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize), L"%08x");
m_context->AddRsid(id);
m_pXmlWriter->WriteAttribute(_T("w:rsidP"), id);
m_pXmlWriter->WriteAttribute(L"w:rsidP", id);
break;
}
}
}
m_pXmlWriter->WriteNodeEnd(_T(""), true, false);
m_pXmlWriter->WriteNodeEnd(L"", true, false);
}
// Writes a run with the given characters and CHPX
@ -370,47 +370,47 @@ namespace DocFileFormat
if (Deleted == rev.Type)
{
//If it's a deleted run
m_pXmlWriter->WriteNodeBegin(_T("w:del"), true);
m_pXmlWriter->WriteAttribute(_T("w:author"), _T("[b2x: could not retrieve author]"));
m_pXmlWriter->WriteAttribute(_T("w:date"), _T("[b2x: could not retrieve date]"));
m_pXmlWriter->WriteNodeEnd(_T(""), true, false);
m_pXmlWriter->WriteNodeBegin(L"w:del", true);
m_pXmlWriter->WriteAttribute(L"w:author", L"[b2x: could not retrieve author]");
m_pXmlWriter->WriteAttribute(L"w:date", L"[b2x: could not retrieve date]");
m_pXmlWriter->WriteNodeEnd(L"", true, false);
}
else if ( rev.Type == Inserted )
{
WideString* author = dynamic_cast<WideString*>(m_document->RevisionAuthorTable->operator[](rev.Isbt));
//if it's a inserted run
m_pXmlWriter->WriteNodeBegin(_T("w:ins"), true);
m_pXmlWriter->WriteAttribute(_T("w:author"), FormatUtils::XmlEncode(*author));
m_pXmlWriter->WriteNodeEnd(_T(""), true, false);
m_pXmlWriter->WriteNodeBegin(L"w:ins", true);
m_pXmlWriter->WriteAttribute(L"w:author", FormatUtils::XmlEncode(*author));
m_pXmlWriter->WriteNodeEnd(L"", true, false);
//rev.Dttm.Convert(new DateMapping(m_pXmlWriter));
}
//start run
m_pXmlWriter->WriteNodeBegin(_T("w:r"), true);
m_pXmlWriter->WriteNodeBegin(L"w:r", true);
//append rsids
if (0 != rev.Rsid)
{
std::wstring rsid = FormatUtils::IntToFormattedWideString(rev.Rsid, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidR"), rsid);
std::wstring rsid = FormatUtils::IntToFormattedWideString(rev.Rsid, L"%08x");
m_pXmlWriter->WriteAttribute(L"w:rsidR", rsid);
m_context->AddRsid(rsid);
}
if (0 != rev.RsidDel)
{
std::wstring rsidDel = FormatUtils::IntToFormattedWideString(rev.RsidDel, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidDel"), rsidDel);
std::wstring rsidDel = FormatUtils::IntToFormattedWideString(rev.RsidDel, L"%08x");
m_pXmlWriter->WriteAttribute(L"w:rsidDel", rsidDel);
m_context->AddRsid(rsidDel);
}
if (0 != rev.RsidProp)
{
std::wstring rsidProp = FormatUtils::IntToFormattedWideString(rev.RsidProp, _T("%08x"));
m_pXmlWriter->WriteAttribute(_T("w:rsidRPr"), rsidProp);
std::wstring rsidProp = FormatUtils::IntToFormattedWideString(rev.RsidProp, L"%08x");
m_pXmlWriter->WriteAttribute(L"w:rsidRPr", rsidProp);
m_context->AddRsid(rsidProp);
}
m_pXmlWriter->WriteNodeEnd(_T(""), true, false);
m_pXmlWriter->WriteNodeEnd(L"", true, false);
/// <w:rPr>
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, &rev, _lastValidPapx, false);
@ -434,15 +434,15 @@ namespace DocFileFormat
}
//end run
m_pXmlWriter->WriteNodeEnd(_T("w:r"));
m_pXmlWriter->WriteNodeEnd(L"w:r");
if (Deleted == rev.Type)
{
m_pXmlWriter->WriteNodeEnd(_T("w:del"));
m_pXmlWriter->WriteNodeEnd(L"w:del");
}
else if (Inserted == rev.Type)
{
m_pXmlWriter->WriteNodeEnd(_T("w:ins"));
m_pXmlWriter->WriteNodeEnd(L"w:ins");
}
if (!_writeAfterRun.empty())
@ -468,16 +468,16 @@ namespace DocFileFormat
//detect text type
std::wstring textType = _T( "t" );
std::wstring textType = L"t";
std::wstring text;
if (writeDeletedText)
{
textType = std::wstring(_T("delText"));
textType = std::wstring(L"delText");
}
else if (_writeInstrText)
{
textType = std::wstring(_T("instrText"));
textType = std::wstring(L"instrText");
}
//write text
@ -491,7 +491,7 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement elem(_T("w:tab"));
XMLTools::XMLElement elem(L"w:tab");
m_pXmlWriter->WriteString(elem.GetXMLString());
}
@ -501,9 +501,9 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("textWrapping"));
elem.AppendAttribute(_T("w:clear"), _T("all"));
XMLTools::XMLElement elem(L"w:br");
elem.AppendAttribute(L"w:type", L"textWrapping");
elem.AppendAttribute(L"w:clear", L"all");
m_pXmlWriter->WriteString(elem.GetXMLString());
}
@ -520,8 +520,8 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("page"));
XMLTools::XMLElement elem(L"w:br");
elem.AppendAttribute(L"w:type", L"page");
m_pXmlWriter->WriteString(elem.GetXMLString());
}
@ -532,8 +532,8 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement elem(_T("w:br"));
elem.AppendAttribute(_T("w:type"), _T("column"));
XMLTools::XMLElement elem(L"w:br");
elem.AppendAttribute(L"w:type", L"column");
m_pXmlWriter->WriteString(elem.GetXMLString());
}
@ -546,21 +546,21 @@ namespace DocFileFormat
if (cpFieldEnd < m_document->Text->size())
f = std::wstring( ( m_document->Text->begin() + cpFieldStart ), ( m_document->Text->begin() + cpFieldEnd + 1 ) );
std::wstring EMBED ( _T( " EMBED" ) );
std::wstring LINK ( _T( " LINK" ) );
std::wstring FORM ( _T( " FORM" ) );
std::wstring Excel ( _T( " Excel" ) );
std::wstring Word ( _T( " Word" ) );
std::wstring opendocument(_T( " opendocument" ) );
std::wstring Equation ( _T( " Equation" ) ) ;
std::wstring MERGEFORMAT( _T( " MERGEFORMAT" ) );
std::wstring QUOTE ( _T( " QUOTE" ) );
std::wstring chart ( _T( "Chart" ) );
std::wstring PBrush ( _T( " PBrush" ) );
std::wstring TOC ( _T( " TOC" ) );
std::wstring HYPERLINK ( _T( " HYPERLINK" ) );
std::wstring PAGEREF ( _T( " PAGEREF" ) );
std::wstring PAGE ( _T( "PAGE" ) );
std::wstring EMBED ( L" EMBED" );
std::wstring LINK ( L" LINK" );
std::wstring FORM ( L" FORM" );
std::wstring Excel ( L" Excel" );
std::wstring Word ( L" Word" );
std::wstring opendocument(L" opendocument" );
std::wstring Equation ( L" Equation" );
std::wstring MERGEFORMAT( L" MERGEFORMAT" );
std::wstring QUOTE ( L" QUOTE" );
std::wstring chart ( L"Chart" );
std::wstring PBrush ( L" PBrush" );
std::wstring TOC ( L" TOC" );
std::wstring HYPERLINK ( L" HYPERLINK" );
std::wstring PAGEREF ( L" PAGEREF" );
std::wstring PAGE ( L"PAGE" );
bool bChart = search( f.begin(), f.end(), chart.begin(), chart.end()) != f.end();
bool bEMBED = search( f.begin(), f.end(), EMBED.begin(), EMBED.end()) != f.end();
@ -578,9 +578,9 @@ namespace DocFileFormat
if ( bFORM )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "begin" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true, false );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar" , true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType" , L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
int cpPic = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::Picture );
@ -593,7 +593,7 @@ namespace DocFileFormat
ffdata.Convert(new FormFieldDataMapping(m_pXmlWriter));
}*/
m_pXmlWriter->WriteNodeEnd( _T( "w:fldChar" ) );
m_pXmlWriter->WriteNodeEnd( L"w:fldChar" );
_writeInstrText = true;
@ -603,13 +603,13 @@ namespace DocFileFormat
&&
( ( bEMBED || bLINK ) && bChart) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "begin" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true, false );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
int cpPic = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::Picture );
m_pXmlWriter->WriteNodeEnd( _T( "w:fldChar" ) );
m_pXmlWriter->WriteNodeEnd( L"w:fldChar" );
_writeInstrText = true;
@ -622,9 +622,9 @@ namespace DocFileFormat
if ((search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end()) || bPAGE)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "begin" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_writeInstrText = true;
_fldCharCounter++;
@ -643,18 +643,18 @@ namespace DocFileFormat
_writeWebHidden = true;
std::wstring _writeTocLink =f1.substr(d + 9);
d = _writeTocLink.find(_T(" "));
d = _writeTocLink.find(L" ");
_writeTocLink = _writeTocLink.substr(0, d);
_writeAfterRun = std::wstring (_T("<w:hyperlink w:anchor = \""));
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun += _writeTocLink;
_writeAfterRun += std::wstring (_T("\" w:history=\"1\">"));
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
//if (_writeInstrText == true)
//{
// m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), true );
// m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "separate" ) );
// m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
// m_pXmlWriter->WriteNodeBegin( L"w:fldChar" ), true );
// m_pXmlWriter->WriteAttribute( L"w:fldCharType" ), L"separate" );
// m_pXmlWriter->WriteNodeEnd( L"" ), true );
//}
_writeInstrText = false;
@ -697,10 +697,10 @@ namespace DocFileFormat
{
OleObject ole ( chpxObj, m_document->GetStorage(), m_document->bOlderVersion);
oleWriter.WriteNodeBegin (_T( "w:object" ), true);
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dxaGoal + ole.pictureDesciptor.dxaOrigin ) ));
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( ole.pictureDesciptor.dyaGoal + ole.pictureDesciptor.dyaOrigin ) ));
oleWriter.WriteNodeEnd( _T( "" ), true, false );
oleWriter.WriteNodeBegin (L"w:object", true);
oleWriter.WriteAttribute( L"w:dxaOrig", FormatUtils::IntToWideString( ( ole.pictureDesciptor.dxaGoal + ole.pictureDesciptor.dxaOrigin ) ));
oleWriter.WriteAttribute( L"w:dyaOrig", FormatUtils::IntToWideString( ( ole.pictureDesciptor.dyaGoal + ole.pictureDesciptor.dyaOrigin ) ));
oleWriter.WriteNodeEnd( L"", true, false );
ole.pictureDesciptor.Convert(&oVmlMapper);
OleObjectMapping oleObjectMapping( &oleObjectWriter, m_context, &ole.pictureDesciptor, _caller, oVmlMapper.m_shapeId);
@ -713,10 +713,10 @@ namespace DocFileFormat
{
PictureDescriptor pic(chpxObj, m_document->DataStream, 0x7fffffff, m_document->bOlderVersion);
oleWriter.WriteNodeBegin (_T( "w:object" ), true);
oleWriter.WriteAttribute( _T( "w:dxaOrig" ), FormatUtils::IntToWideString( ( pic.dxaGoal + pic.dxaOrigin ) ) );
oleWriter.WriteAttribute( _T( "w:dyaOrig" ), FormatUtils::IntToWideString( ( pic.dyaGoal + pic.dyaOrigin ) ) );
oleWriter.WriteNodeEnd( _T( "" ), true, false );
oleWriter.WriteNodeBegin (L"w:object", true);
oleWriter.WriteAttribute( L"w:dxaOrig", FormatUtils::IntToWideString( ( pic.dxaGoal + pic.dxaOrigin ) ) );
oleWriter.WriteAttribute( L"w:dyaOrig", FormatUtils::IntToWideString( ( pic.dyaGoal + pic.dyaOrigin ) ) );
oleWriter.WriteNodeEnd( L"", true, false );
pic.Convert(&oVmlMapper);
RELEASEOBJECT(chpxs);
@ -746,7 +746,7 @@ namespace DocFileFormat
}
}
oleWriter.WriteString( _lastOLEObject );
oleWriter.WriteNodeEnd( _T( "w:object" ) );
oleWriter.WriteNodeEnd( L"w:object" );
if (!oVmlMapper.m_isEmbedded && oVmlMapper.m_isEquation)
{
@ -765,9 +765,9 @@ namespace DocFileFormat
}
else
{
m_pXmlWriter->WriteNodeBegin( _T( "w:fldChar" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:fldCharType" ), _T( "begin" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_writeInstrText = true;
_fldCharCounter++;
@ -777,8 +777,8 @@ namespace DocFileFormat
{
if (_fldCharCounter > 0)
{
XMLTools::XMLElement elem( _T( "w:fldChar" ) );
elem.AppendAttribute( _T( "w:fldCharType" ), _T( "separate" ) );
XMLTools::XMLElement elem( L"w:fldChar" );
elem.AppendAttribute( L"w:fldCharType", L"separate" );
m_pXmlWriter->WriteString( elem.GetXMLString() );
}
@ -788,8 +788,8 @@ namespace DocFileFormat
{
if (_fldCharCounter > 0)
{
XMLTools::XMLElement elem( _T( "w:fldChar" ) );
elem.AppendAttribute( _T( "w:fldCharType" ), _T( "end" ) );
XMLTools::XMLElement elem( L"w:fldChar" );
elem.AppendAttribute( L"w:fldCharType", L"end" );
m_pXmlWriter->WriteString( elem.GetXMLString());
@ -797,7 +797,7 @@ namespace DocFileFormat
}
if (_writeWebHidden)
{
_writeAfterRun = std::wstring (_T("</w:hyperlink>"));
_writeAfterRun = std::wstring (L"</w:hyperlink>");
}
_writeWebHidden = false;
@ -811,10 +811,10 @@ namespace DocFileFormat
{
Symbol s = getSymbol( chpx );
m_pXmlWriter->WriteNodeBegin(_T("w:sym"), true);
m_pXmlWriter->WriteAttribute(_T("w:font"), FormatUtils::XmlEncode(s.FontName));
m_pXmlWriter->WriteAttribute(_T("w:char"), FormatUtils::XmlEncode(s.HexValue));
m_pXmlWriter->WriteNodeEnd(_T(""), true);
m_pXmlWriter->WriteNodeBegin(L"w:sym", true);
m_pXmlWriter->WriteAttribute(L"w:font", FormatUtils::XmlEncode(s.FontName));
m_pXmlWriter->WriteAttribute(L"w:char", FormatUtils::XmlEncode(s.HexValue));
m_pXmlWriter->WriteNodeEnd(L"", true);
}
else if ((TextMark::DrawnObject == code) && fSpec)
{
@ -846,10 +846,10 @@ namespace DocFileFormat
if (!pSpa->primitives.empty())
{
m_pXmlWriter->WriteNodeBegin (_T("w:pict"));
m_pXmlWriter->WriteNodeBegin (L"w:pict");
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, pSpa, &pictDiscr, _caller);
pSpa->primitives.Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (_T("w:pict"));
m_pXmlWriter->WriteNodeEnd (L"w:pict");
}
}
}
@ -861,19 +861,19 @@ namespace DocFileFormat
if (oPicture.embeddedData && oPicture.embeddedDataSize > 0)
{
m_pXmlWriter->WriteNodeBegin (_T("w:pict"));
m_pXmlWriter->WriteNodeBegin (L"w:pict");
VMLPictureMapping oVmlMapper(m_context, m_pXmlWriter, false, _caller, isInline);
oPicture.Convert (&oVmlMapper);
m_pXmlWriter->WriteNodeEnd (_T("w:pict"));
m_pXmlWriter->WriteNodeEnd (L"w:pict");
}
else if ((oPicture.mfp.mm > 98) && (NULL != oPicture.shapeContainer))
{
bool bFormula = false;
XMLTools::CStringXmlWriter pictWriter;
pictWriter.WriteNodeBegin (_T("w:pict"));
pictWriter.WriteNodeBegin (L"w:pict");
bool picture = true;
@ -913,7 +913,7 @@ namespace DocFileFormat
oPicture.shapeContainer->Convert(&oVmlMapper);
}
pictWriter.WriteNodeEnd (_T("w:pict"));
pictWriter.WriteNodeEnd (L"w:pict");
if (!bFormula)
m_pXmlWriter->WriteString(pictWriter.GetXmlString());
@ -924,40 +924,40 @@ namespace DocFileFormat
{
if ((m_document->FootnoteReferenceCharactersPlex != NULL) && (m_document->FootnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:footnoteReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_footnoteNr++ ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:footnoteReference", true );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString(_footnoteNr++ ) );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
else if ((m_document->IndividualFootnotesPlex != NULL) && (m_document->IndividualFootnotesPlex->IsCpExists(cp - m_document->FIB->m_RgLw97.ccpText)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:footnoteRef" ), true );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:footnoteRef", true );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
else if ((m_document->EndnoteReferenceCharactersPlex != NULL) && (m_document->EndnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:endnoteReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString(_endnoteNr++ ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:endnoteReference", true );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString(_endnoteNr++ ));
m_pXmlWriter->WriteNodeEnd( L"", true );
}
else if ((m_document->IndividualEndnotesPlex != NULL) &&
(m_document->IndividualEndnotesPlex->IsCpExists(cp - m_document->FIB->m_RgLw97.ccpAtn - m_document->FIB->m_RgLw97.ccpHdr - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpText)))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:endnoteRef" ), true );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:endnoteRef", true );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
}
else if (TextMark::AnnotationReference == code)
{
if (typeid(*this) != typeid(CommentsMapping))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:commentReference" ), true );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( _commentNr ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:commentReference", true );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( _commentNr ));
m_pXmlWriter->WriteNodeEnd( L"", true );
}
else
{
m_pXmlWriter->WriteNodeBegin( _T( "w:annotationRef" ), true );
m_pXmlWriter->WriteNodeEnd( _T( "" ), true );
m_pXmlWriter->WriteNodeBegin( L"w:annotationRef", true );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
_commentNr++;
@ -972,7 +972,7 @@ namespace DocFileFormat
if (!text.empty())
{
//bool preserve_space = (text.find(_T("\x20")) != text.npos) ? true : false;
//bool preserve_space = (text.find(L"\x20")) != text.npos) ? true : false;
writeTextStart(textType, true/*preserve_space*/);
@ -987,8 +987,8 @@ namespace DocFileFormat
{
if ( !text.empty() )
{
bool preserve_space = true;//(text.find(_T("\x20")) != text.npos) ? true : false;
if (textType == _T("instrText"))
bool preserve_space = true;//(text.find(L"\x20")) != text.npos) ? true : false;
if (textType == L"instrText")
preserve_space = false;
writeTextStart( textType, preserve_space );
@ -1001,19 +1001,19 @@ namespace DocFileFormat
void DocumentMapping::writeTextStart(const std::wstring& textType, bool preserve_space)
{
std::wstring str = ( std::wstring( _T( "w:" ) ) + textType );
std::wstring str = ( L"w:" + textType );
m_pXmlWriter->WriteNodeBegin( str, true );
if (preserve_space)
{
m_pXmlWriter->WriteAttribute( _T( "xml:space" ), _T( "preserve" ) );
m_pXmlWriter->WriteAttribute( L"xml:space", L"preserve" );
}
m_pXmlWriter->WriteNodeEnd( _T( "" ), true, false );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
}
void DocumentMapping::writeTextEnd(const std::wstring& textType)
{
std::wstring str = ( std::wstring( _T( "w:" ) ) + textType );
std::wstring str = ( std::wstring( L"w:" ) + textType );
m_pXmlWriter->WriteNodeEnd( str );
}
@ -1141,7 +1141,7 @@ namespace DocFileFormat
TablePropertyExceptions row1Tapx( findValidPapx( fcRowEnd ), m_document->DataStream, m_document->bOlderVersion);
//start table
m_pXmlWriter->WriteNodeBegin( _T( "w:tbl" ) );
m_pXmlWriter->WriteNodeBegin( L"w:tbl" );
//Convert it
TablePropertiesMapping *tpMapping = new TablePropertiesMapping( m_pXmlWriter, m_document->Styles, grid );
@ -1179,7 +1179,7 @@ namespace DocFileFormat
}
//close w:tbl
m_pXmlWriter->WriteNodeEnd( _T( "w:tbl" ) );
m_pXmlWriter->WriteNodeEnd( L"w:tbl" );
RELEASEOBJECT( grid );
@ -1384,7 +1384,7 @@ namespace DocFileFormat
TableInfo tai( papx );
//start w:tr
m_pXmlWriter->WriteNodeBegin( _T( "w:tr" ) );
m_pXmlWriter->WriteNodeBegin( L"w:tr" );
//convert the properties
int fcRowEnd = findRowEndFc( cp, nestingLevel );
@ -1434,7 +1434,7 @@ namespace DocFileFormat
}
//end w:tr
m_pXmlWriter->WriteNodeEnd( _T( "w:tr" ) );
m_pXmlWriter->WriteNodeEnd( L"w:tr" );
//skip the row end mark
cp++;
@ -1450,7 +1450,7 @@ namespace DocFileFormat
int cp = initialCp;
//start w:tc
m_pXmlWriter->WriteNodeBegin( _T( "w:tc" ) );
m_pXmlWriter->WriteNodeBegin( L"w:tc" );
//find cell end
int cpCellEnd = findCellEndCp( initialCp, nestingLevel );
@ -1487,8 +1487,8 @@ namespace DocFileFormat
//after a inner table must be at least one paragraph
/*if ( cp >= cpCellEnd )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:p" ) );
m_pXmlWriter->WriteNodeEnd( _T( "w:p" ) );
m_pXmlWriter->WriteNodeBegin( L"w:p" );
m_pXmlWriter->WriteNodeEnd( L"w:p" );
}*/
}
else
@ -1499,7 +1499,7 @@ namespace DocFileFormat
}
//end w:tc
m_pXmlWriter->WriteNodeEnd( _T( "w:tc" ) );
m_pXmlWriter->WriteNodeEnd( L"w:tc" );
return cp;
}
@ -1568,12 +1568,12 @@ namespace DocFileFormat
WideString* bookmarkName = static_cast<WideString*>(m_document->BookmarkNames->operator [](id));
if ((bookmarkName != NULL) && (*bookmarkName != _T("_PictureBullets")))
if ((bookmarkName != NULL) && (*bookmarkName != L"_PictureBullets"))
{
XMLTools::XMLElement bookmarkElem(_T("w:bookmarkStart"));
XMLTools::XMLElement bookmarkElem(L"w:bookmarkStart");
bookmarkElem.AppendAttribute(_T("w:id"), FormatUtils::IntToWideString(id));
bookmarkElem.AppendAttribute(_T("w:name"), *bookmarkName);
bookmarkElem.AppendAttribute(L"w:id", FormatUtils::IntToWideString(id));
bookmarkElem.AppendAttribute(L"w:name", *bookmarkName);
m_pXmlWriter->WriteString(bookmarkElem.GetXMLString());
@ -1589,11 +1589,11 @@ namespace DocFileFormat
WideString* bookmarkName = static_cast<WideString*>( m_document->BookmarkNames->operator [] ( id ) );
if ( ( bookmarkName != NULL ) && ( *bookmarkName != _T( "_PictureBullets" ) ) )
if ( ( bookmarkName != NULL ) && ( *bookmarkName != L"_PictureBullets" ) )
{
XMLTools::XMLElement bookmarkElem( _T( "w:bookmarkEnd" ) );
XMLTools::XMLElement bookmarkElem( L"w:bookmarkEnd" );
bookmarkElem.AppendAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
bookmarkElem.AppendAttribute( L"w:id", FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteString( bookmarkElem.GetXMLString());
@ -1650,7 +1650,7 @@ namespace DocFileFormat
FontFamilyName* ffn = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( fontIndex ) );
ret.FontName = ffn->xszFtn;
ret.HexValue = FormatUtils::IntToFormattedWideString( code, _T( "%04x" ) );
ret.HexValue = FormatUtils::IntToFormattedWideString( code, L"%04x" );
break;
}
@ -1663,7 +1663,7 @@ namespace DocFileFormat
FontFamilyName* ffn = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( fontIndex ) );
ret.FontName = ffn->xszFtn;
ret.HexValue = L"f0" + FormatUtils::IntToFormattedWideString( code, _T( "%02x" ) );
ret.HexValue = L"f0" + FormatUtils::IntToFormattedWideString( code, L"%02x" );
break;
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -54,24 +54,24 @@ namespace DocFileFormat
int id = 0;
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:endnotes" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:endnotes", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
int cp = ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr + m_document->FIB->m_RgLw97.ccpAtn );
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr + m_document->FIB->m_RgLw97.ccpAtn + m_document->FIB->m_RgLw97.ccpEdn - 2 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:endnote" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:endnote", TRUE );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
while ( ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpHdr - m_document->FIB->m_RgLw97.ccpAtn ) < (*m_document->IndividualEndnotesPlex)[id + 1] )
{
@ -95,14 +95,14 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "w:endnote" ) );
m_pXmlWriter->WriteNodeEnd( L"w:endnote");
id++;
}
m_pXmlWriter->WriteNodeEnd( _T( "w:endnotes" ) );
m_pXmlWriter->WriteNodeEnd( L"w:endnotes");
m_context->_docx->EndnotesXML = std::wstring( m_pXmlWriter->GetXmlString() );
}
}
};
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -54,10 +54,10 @@ namespace DocFileFormat
this->_ctx->_docx->RegisterFontTable();
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:fonts" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:fonts", TRUE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
int sz_fonts = table->Data.size();
int users_fonts = 0;
@ -66,80 +66,80 @@ namespace DocFileFormat
{
FontFamilyName* font = dynamic_cast<FontFamilyName*>( *iter );
m_pXmlWriter->WriteNodeBegin( _T( "w:font" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:font", TRUE );
std::wstring name_ = FormatUtils::XmlEncode(font->xszFtn, true);
if (name_.empty())
name_ = L"UserFont_" + std::to_wstring(++users_fonts);
m_pXmlWriter->WriteAttribute( _T( "w:name" ), name_);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"w:name", name_);
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//alternative name
if ( ( font->xszAlt != std::wstring( _T( "" ) ) ) && ( font->xszAlt.length() > 0 ) )
if ( ( font->xszAlt != std::wstring( L"" ) ) && ( font->xszAlt.length() > 0 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:altName" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(font->xszAlt, true));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:altName" ) );
m_pXmlWriter->WriteNodeBegin( L"w:altName", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(font->xszAlt, true));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:altName" );
}
//charset
m_pXmlWriter->WriteNodeBegin( _T("w:charset" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( font->chs, _T( "%02x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:charset" ) );
m_pXmlWriter->WriteNodeBegin( L"w:charset", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( font->chs, L"%02x" ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:charset" );
//font family
m_pXmlWriter->WriteNodeBegin( _T("w:family"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:family" ) );
m_pXmlWriter->WriteNodeBegin( L"w:family", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:family" );
//panose
m_pXmlWriter->WriteNodeBegin( _T("w:panose1"), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:panose1", TRUE );
std::wstring wstr( _T( "" ) );
std::wstring wstr( L"" );
for ( unsigned int i = 0; i < font->panoseSize; i++ )
{
wstr += FormatUtils::IntToFormattedWideString( font->panose[i], _T( "%02x" ) );
wstr += FormatUtils::IntToFormattedWideString( font->panose[i], L"%02x" );
}
m_pXmlWriter->WriteAttribute( _T( "w:val" ), wstr);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:panose1" ) );
m_pXmlWriter->WriteAttribute( L"w:val", wstr);
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:panose1" );
//pitch
m_pXmlWriter->WriteNodeBegin( _T("w:pitch"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:pitch" ) );
m_pXmlWriter->WriteNodeBegin( L"w:pitch", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:pitch" );
//truetype
if ( !font->fTrueType )
{
m_pXmlWriter->WriteNodeBegin( _T("w:notTrueType"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "true" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:notTrueType" ) );
m_pXmlWriter->WriteNodeBegin( L"w:notTrueType", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", L"true" );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:notTrueType" );
}
//font signature
m_pXmlWriter->WriteNodeBegin( _T("w:sig"), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:usb0" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb1" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb2" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:usb3" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:csb0" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, _T( "%08x" ) ));
m_pXmlWriter->WriteAttribute( _T( "w:csb1" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T( "w:sig" ) );
m_pXmlWriter->WriteNodeBegin( L"w:sig", TRUE );
m_pXmlWriter->WriteAttribute( L"w:usb0", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:usb1", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:usb2", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:usb3", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:csb0", FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:csb1", FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, L"%08x" ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"w:sig" );
m_pXmlWriter->WriteNodeEnd( _T( "w:font" ) );
m_pXmlWriter->WriteNodeEnd( L"w:font" );
}
m_pXmlWriter->WriteNodeEnd( _T("w:fonts") );
m_pXmlWriter->WriteNodeEnd( L"w:fonts");
this->_ctx->_docx->FontTableXML = std::wstring( m_pXmlWriter->GetXmlString() );
}
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -42,19 +42,19 @@ namespace DocFileFormat
{
static const wchar_t FontFamily[6][11] =
{
_T( "auto" ),
_T( "roman" ),
_T( "swiss" ),
_T( "modern" ),
_T( "script" ),
_T( "decorative" )
L"auto",
L"roman",
L"swiss",
L"modern",
L"script",
L"decorative"
};
static const wchar_t FontPitch[3][9] =
{
_T( "default" ),
_T( "fixed" ),
_T( "variable" )
L"default",
L"fixed",
L"variable"
};
class FontTableMapping: public AbstractOpenXmlMapping, public IMapping

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -45,16 +45,16 @@ namespace DocFileFormat
m_document = static_cast<WordDocument*>( visited );
//start the document
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:ftr" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:ftr", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//convert the footer text
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
@ -93,8 +93,8 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "w:ftr" ) );
m_pXmlWriter->WriteNodeEnd( L"w:ftr" );
m_context->_docx->FooterXMLList.push_back( std::wstring( m_pXmlWriter->GetXmlString() ) );
}
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -54,24 +54,24 @@ namespace DocFileFormat
int id = 0;
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:footnotes" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:footnotes", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
int cp = m_document->FIB->m_RgLw97.ccpText;
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn - 2 ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:footnote" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:footnote", TRUE );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( id ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
while ( ( cp - m_document->FIB->m_RgLw97.ccpText ) < (*m_document->IndividualFootnotesPlex)[id + 1] )
{
@ -95,14 +95,14 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "w:footnote" ) );
m_pXmlWriter->WriteNodeEnd( L"w:footnote");
id++;
}
m_pXmlWriter->WriteNodeEnd( _T( "w:footnotes" ) );
m_pXmlWriter->WriteNodeEnd( L"w:footnotes");
m_context->_docx->FootnotesXML = std::wstring(m_pXmlWriter->GetXmlString());
}
}
};
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -45,16 +45,16 @@ namespace DocFileFormat
m_document = static_cast<WordDocument*>( visited );
//start the document
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:hdr" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:hdr", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//convert the header text
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
@ -88,8 +88,8 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "w:hdr" ) );
m_pXmlWriter->WriteNodeEnd( L"w:hdr");
m_context->_docx->HeaderXMLList.push_back( std::wstring( m_pXmlWriter->GetXmlString() ) );
}
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -63,17 +63,17 @@ namespace DocFileFormat
m_xmldocument->RegisterNumbering();
//start the document
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_pXmlWriter->WriteNodeBegin( _T( "w:numbering" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:numbering", TRUE );
//write namespaces
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
PictureBulletsMapping();
@ -82,37 +82,37 @@ namespace DocFileFormat
for (std::list<ListData*>::iterator iter = rglst->listData.begin(); iter != rglst->listData.end(); ++iter, ++i)
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//nsid
m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//multiLevelType
m_pXmlWriter->WriteNodeBegin( _T( "w:multiLevelType" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:multiLevelType", TRUE );
if ( (*iter)->fHybrid )
{
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "hybridMultilevel" ) );
m_pXmlWriter->WriteAttribute( L"w:val", L"hybridMultilevel" );
}
else if ( (*iter)->fSimpleList )
{
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "singleLevel" ) );
m_pXmlWriter->WriteAttribute( L"w:val", L"singleLevel" );
}
else
{
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "multilevel" ) );
m_pXmlWriter->WriteAttribute( L"w:val", L"multilevel" );
}
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//template
m_pXmlWriter->WriteNodeBegin( _T( "w:tmpl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->tplc, _T( "%08x" ) ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:tmpl", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->tplc, L"%08x"));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// writes the levels
size_t length = (*iter)->rglvl->size();
@ -124,33 +124,33 @@ namespace DocFileFormat
}
//end abstractNum
m_pXmlWriter->WriteNodeEnd( _T( "w:abstractNum" ) );
m_pXmlWriter->WriteNodeEnd( L"w:abstractNum" );
}
//write old style numbering (сложносоставных не сущестует)
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
////nsid
//m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
//m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
//m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
//m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
//m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ) ));
//m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//multiLevelType
m_pXmlWriter->WriteNodeBegin( _T( "w:multiLevelType" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:multiLevelType", TRUE );
{
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "singleLevel" ) );
m_pXmlWriter->WriteAttribute( L"w:val", L"singleLevel" );
}
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
LevelMapping(*iter, 0);
//end abstractNum
m_pXmlWriter->WriteNodeEnd( _T( "w:abstractNum" ) );
m_pXmlWriter->WriteNodeEnd( L"w:abstractNum" );
}
//write the overrides
@ -159,36 +159,36 @@ namespace DocFileFormat
ListFormatOverride* lfo = m_document->listFormatOverrideTable->at(i);
//start num
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i + 1));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:num", TRUE );
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(i + 1));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
int index = FindIndexbyId( rglst->listData, lfo->lsid );
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( index ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:abstractNumId", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( index ) );
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
for (std::vector<ListFormatOverrideLevel*>::const_iterator iter = lfo->rgLfoLvl.begin(); iter != lfo->rgLfoLvl.end(); ++iter)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlOverride" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:lvlOverride", TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString( (*iter)->ilvl ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString( (*iter)->ilvl ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
if ( ( (*iter)->fStartAt ) && ( !(*iter)->fFormatting ) )
{
m_pXmlWriter->WriteNodeBegin( _T( "w:startOverride" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( (*iter)->iStartAt ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:startOverride", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( (*iter)->iStartAt ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
LevelMapping((*iter)->lvl, 0, ListData::ISTD_NIL);
m_pXmlWriter->WriteNodeEnd(_T("w:lvlOverride"));
m_pXmlWriter->WriteNodeEnd(L"w:lvlOverride");
}
m_pXmlWriter->WriteNodeEnd(_T( "w:num"));
m_pXmlWriter->WriteNodeEnd(L"w:num");
}
if (m_document->listFormatOverrideTable->empty() && !rglst->listNumbering.empty())
@ -196,20 +196,20 @@ namespace DocFileFormat
i = 0;
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i+1));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:num", TRUE );
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(i+1));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:abstractNumId", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeEnd(_T( "w:num"));
m_pXmlWriter->WriteNodeEnd(L"w:num");
}
}
m_pXmlWriter->WriteNodeEnd(_T("w:numbering"));
m_pXmlWriter->WriteNodeEnd(L"w:numbering");
m_xmldocument->NumberingXML = std::wstring(m_pXmlWriter->GetXmlString());
}
@ -277,7 +277,7 @@ namespace DocFileFormat
{
newResult = find_if((result + 1), lvl->xst.end(), &NumberingMapping::IsPlaceholder);
ret += _T( "%" );
ret += L"%";
ret += FormatUtils::IntToWideString(*result + 1);
ret += std::wstring((result + 1), newResult);
result = newResult;
@ -307,13 +307,11 @@ namespace DocFileFormat
if (!FormatUtils::IsControlSymbol(xchBullet))
{
ret.push_back(lvl.xst[0]);
ret.push_back(L'\0');
}
}
else
{
ret.push_back(L'\xF0B7');
ret.push_back(L'\0');
}
}
else
@ -321,7 +319,7 @@ namespace DocFileFormat
std::wstring strBefore = lvl.xst.substr(0, Before);
std::wstring strAfter = lvl.xst.substr(Before, After);
ret = strBefore + _T( "%1" ) + strAfter ;
ret = strBefore + L"%1" + strAfter ;
}
return ret;
@ -344,134 +342,134 @@ namespace DocFileFormat
{
if (bOlderVersion && nfc > 5)
{
if (nfc == 0xff) return std::wstring( _T( "bullet" ) );
else return std::wstring( _T( "none" ) );
if (nfc == 0xff) return std::wstring( L"bullet");
else return std::wstring( L"none");
}
switch ( nfc )
{
case 0:
return std::wstring( _T( "decimal" ) );
return std::wstring( L"decimal" );
case 1:
return std::wstring( _T( "upperRoman" ) );
return std::wstring( L"upperRoman" );
case 2:
return std::wstring( _T( "lowerRoman" ) );
return std::wstring( L"lowerRoman" );
case 3:
return std::wstring( _T( "upperLetter" ) );
return std::wstring( L"upperLetter");
case 4:
return std::wstring( _T( "lowerLetter" ) );
return std::wstring( L"lowerLetter");
case 5:
return std::wstring( _T( "ordinal" ) );
return std::wstring( L"ordinal" );
case 6:
return std::wstring( _T( "cardinalText" ) );
return std::wstring( L"cardinalText" );
case 7:
return std::wstring( _T( "ordinalText" ) );
return std::wstring( L"ordinalText" );
case 8:
return std::wstring( _T( "hex" ) );
return std::wstring( L"hex" );
case 9:
return std::wstring( _T( "chicago" ) );
return std::wstring( L"chicago" );
case 10:
return std::wstring( _T( "ideographDigital" ) );
return std::wstring( L"ideographDigital" );
case 11:
return std::wstring( _T( "japaneseCounting" ) );
return std::wstring( L"japaneseCounting" );
case 12:
return std::wstring( _T( "aiueo" ) );
return std::wstring( L"aiueo" );
case 13:
return std::wstring( _T( "iroha" ) );
return std::wstring( L"iroha" );
case 14:
return std::wstring( _T( "decimalFullWidth" ) );
return std::wstring( L"decimalFullWidth" );
case 15:
return std::wstring( _T( "decimalHalfWidth" ) );
return std::wstring( L"decimalHalfWidth" );
case 16:
return std::wstring( _T( "japaneseLegal" ) );
return std::wstring( L"japaneseLegal" );
case 17:
return std::wstring( _T( "japaneseDigitalTenThousand" ) );
return std::wstring( L"japaneseDigitalTenThousand" );
case 18:
return std::wstring( _T( "decimalEnclosedCircle" ) );
return std::wstring( L"decimalEnclosedCircle" );
case 19:
return std::wstring( _T( "decimalFullWidth2" ) );
return std::wstring( L"decimalFullWidth2" );
case 20:
return std::wstring( _T( "aiueoFullWidth" ) );
return std::wstring( L"aiueoFullWidth" );
case 21:
return std::wstring( _T( "irohaFullWidth" ) );
return std::wstring( L"irohaFullWidth" );
case 22:
return std::wstring( _T( "decimalZero" ) );
return std::wstring( L"decimalZero" );
case 23:
return std::wstring( _T( "bullet" ) );
return std::wstring( L"bullet" );
case 24:
return std::wstring( _T( "ganada" ) );
return std::wstring( L"ganada" );
case 25:
return std::wstring( _T( "chosung" ) );
return std::wstring( L"chosung" );
case 26:
return std::wstring( _T( "decimalEnclosedFullstop" ) );
return std::wstring( L"decimalEnclosedFullstop" );
case 27:
return std::wstring( _T( "decimalEnclosedParen" ) );
return std::wstring( L"decimalEnclosedParen" );
case 28:
return std::wstring( _T( "decimalEnclosedCircleChinese" ) );
return std::wstring( L"decimalEnclosedCircleChinese" );
case 29:
return std::wstring( _T( "ideographEnclosedCircle" ) );
return std::wstring( L"ideographEnclosedCircle" );
case 30:
return std::wstring( _T( "ideographTraditional" ) );
return std::wstring( L"ideographTraditional" );
case 31:
return std::wstring( _T( "ideographZodiac" ) );
return std::wstring( L"ideographZodiac" );
case 32:
return std::wstring( _T( "ideographZodiacTraditional" ) );
return std::wstring( L"ideographZodiacTraditional" );
case 33:
return std::wstring( _T( "taiwaneseCounting" ) );
return std::wstring( L"taiwaneseCounting" );
case 34:
return std::wstring( _T( "ideographLegalTraditional" ) );
return std::wstring( L"ideographLegalTraditional" );
case 35:
return std::wstring( _T( "taiwaneseCountingThousand" ) );
return std::wstring( L"taiwaneseCountingThousand" );
case 36:
return std::wstring( _T( "taiwaneseDigital" ) );
return std::wstring( L"taiwaneseDigital" );
case 37:
return std::wstring( _T( "chineseCounting" ) );
return std::wstring( L"chineseCounting" );
case 38:
return std::wstring( _T( "chineseLegalSimplified" ) );
return std::wstring( L"chineseLegalSimplified" );
case 39:
return std::wstring( _T( "chineseCountingThousand" ) );
return std::wstring( L"chineseCountingThousand" );
case 40:
return std::wstring( _T( "koreanDigital" ) );
return std::wstring( L"koreanDigital" );
case 41:
return std::wstring( _T( "koreanCounting" ) );
return std::wstring( L"koreanCounting" );
case 42:
return std::wstring( _T( "koreanLegal" ) );
return std::wstring( L"koreanLegal" );
case 43:
return std::wstring( _T( "koreanDigital2" ) );
return std::wstring( L"koreanDigital2" );
case 44:
return std::wstring( _T( "vietnameseCounting" ) );
return std::wstring( L"vietnameseCounting" );
case 45:
return std::wstring( _T( "russianLower" ) );
return std::wstring( L"russianLower" );
case 46:
return std::wstring( _T( "russianUpper" ) );
return std::wstring( L"russianUpper" );
case 47:
return std::wstring( _T( "none" ) );
return std::wstring( L"none" );
case 48:
return std::wstring( _T( "numberInDash" ) );
return std::wstring( L"numberInDash" );
case 49:
return std::wstring( _T( "hebrew1" ) );
return std::wstring( L"hebrew1" );
case 50:
return std::wstring( _T( "hebrew2" ) );
return std::wstring( L"hebrew2" );
case 51:
return std::wstring( _T( "arabicAlpha" ) );
return std::wstring( L"arabicAlpha" );
case 52:
return std::wstring( _T( "arabicAbjad" ) );
return std::wstring( L"arabicAbjad" );
case 53:
return std::wstring( _T( "hindiVowels" ) );
return std::wstring( L"hindiVowels" );
case 54:
return std::wstring( _T( "hindiConsonants" ) );
return std::wstring( L"hindiConsonants" );
case 55:
return std::wstring( _T( "hindiNumbers" ) );
return std::wstring( L"hindiNumbers" );
case 56:
return std::wstring( _T( "hindiCounting" ) );
return std::wstring( L"hindiCounting" );
case 57:
return std::wstring( _T( "thaiLetters" ) );
return std::wstring( L"thaiLetters" );
case 58:
return std::wstring( _T( "thaiNumbers" ) );
return std::wstring( L"thaiNumbers" );
case 59:
return std::wstring( _T( "thaiCounting" ) );
return std::wstring( L"thaiCounting" );
default:
return std::wstring( _T( "decimal" ) );
return std::wstring( L"decimal" );
}
}
@ -488,22 +486,22 @@ namespace DocFileFormat
}
//--------------------------------------------------------------------------------
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:lvl", TRUE );
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl.iStartAt));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:start", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl.iStartAt));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl.nfc, true));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:numFmt", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl.nfc, true));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//// suffix
// m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
// m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
// m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
// m_pXmlWriter->WriteNodeBegin( L"w:suff", TRUE );
// m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
// m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// Number level text
std::wstring lvlText = GetLvlText(lvl, isSymbol, lvl.cbTextBefore, lvl.cbTextAfter);
@ -517,33 +515,33 @@ namespace DocFileFormat
//}
if (!lvlText.empty())
{
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), lvlText);
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
m_pXmlWriter->WriteNodeBegin(L"w:lvlText",TRUE);
m_pXmlWriter->WriteAttribute(L"w:val",lvlText);
m_pXmlWriter->WriteNodeEnd(L"", TRUE);
}
// jc
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:lvlJc", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// pPr
m_pXmlWriter->WriteNodeBegin( _T( "w:pPr" ), FALSE );
m_pXmlWriter->WriteNodeEnd(_T("w:pPr"));
m_pXmlWriter->WriteNodeBegin( L"w:pPr", FALSE );
m_pXmlWriter->WriteNodeEnd(L"w:pPr");
// rPr
m_pXmlWriter->WriteNodeBegin( _T( "w:rPr" ), FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:rPr", FALSE );
if (!fontFamily.empty())
{
m_pXmlWriter->WriteNodeBegin( _T( "w:rFonts" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:rFonts", TRUE );
// w:hint="default"
m_pXmlWriter->WriteAttribute(_T("w:hAnsi"), fontFamily);
m_pXmlWriter->WriteAttribute(_T("w:ascii"), fontFamily);
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteAttribute(L"w:hAnsi",fontFamily);
m_pXmlWriter->WriteAttribute(L"w:ascii",fontFamily);
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
m_pXmlWriter->WriteNodeEnd(_T("w:rPr"));
m_pXmlWriter->WriteNodeEnd(L"w:rPr");
m_pXmlWriter->WriteNodeEnd(_T("w:lvl"));
m_pXmlWriter->WriteNodeEnd(L"w:lvl");
}
void NumberingMapping::LevelMapping(const ListLevel* lvl, unsigned int level, short styleIndex)
@ -558,27 +556,27 @@ namespace DocFileFormat
// Проверяем шрифт
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:lvl", TRUE );
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString(level));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
// starts at
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl->iStartAt));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:start", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl->iStartAt));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// number format
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl->nfc));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:numFmt", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl->nfc));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// suffix
m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:suff", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// style
// The style id is used for a reverse reference.
@ -586,30 +584,30 @@ namespace DocFileFormat
if (styleIndex != ListData::ISTD_NIL)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:pStyle" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
// Number level text
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), GetLvlText(lvl, cpMapping.CheckIsSymbolFont()));
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
m_pXmlWriter->WriteNodeBegin(L"w:lvlText",TRUE);
m_pXmlWriter->WriteAttribute(L"w:val",GetLvlText(lvl, cpMapping.CheckIsSymbolFont()));
m_pXmlWriter->WriteNodeEnd(L"",TRUE);
WriteLevelPictureBullet(lvl->grpprlChpx);
// legacy
if (lvl->fWord6)
{
m_pXmlWriter->WriteNodeBegin( _T( "w:legacy" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:legacy" ), _T( "1" ) );
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:legacy", TRUE );
m_pXmlWriter->WriteAttribute( L"w:legacy", L"1" );
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
// jc
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:lvlJc", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// pPr
bool isBidi = false;
ParagraphPropertiesMapping oppMapping(m_pXmlWriter, m_context, m_document, NULL, isBidi);
@ -619,7 +617,7 @@ namespace DocFileFormat
m_pXmlWriter->WriteString(oWriterTemp.GetXmlString());
m_pXmlWriter->WriteNodeEnd(_T("w:lvl"));
m_pXmlWriter->WriteNodeEnd(L"w:lvl");
}
void NumberingMapping::PictureBulletsMapping()
@ -639,10 +637,10 @@ namespace DocFileFormat
if ((pict.mfp.mm > 98) && (pict.shapeContainer != NULL))
{
m_pXmlWriter->WriteNodeBegin( _T( "w:numPicBullet" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "w:numPicBulletId" ), FormatUtils::IntToWideString( iter->first ));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T( "w:pict" ) );
m_pXmlWriter->WriteNodeBegin( L"w:numPicBullet", TRUE );
m_pXmlWriter->WriteAttribute( L"w:numPicBulletId", FormatUtils::IntToWideString( iter->first ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:pict" );
//inline picture + bullete props
if (pict.blipStoreEntry != NULL)
@ -659,8 +657,8 @@ namespace DocFileFormat
pict.shapeContainer->Convert(&oShape);
}
m_pXmlWriter->WriteNodeEnd(_T("w:pict"));
m_pXmlWriter->WriteNodeEnd(_T("w:numPicBullet"));
m_pXmlWriter->WriteNodeEnd(L"w:pict");
m_pXmlWriter->WriteNodeEnd(L"w:numPicBullet");
}
}
@ -693,10 +691,10 @@ namespace DocFileFormat
if (isPictureBullet)
{
m_pXmlWriter->WriteNodeBegin(_T("w:lvlPicBulletId"), TRUE);
m_pXmlWriter->WriteAttribute(_T("w:val"), FormatUtils::IntToWideString(index));
m_pXmlWriter->WriteNodeEnd(_T(""), TRUE);
m_pXmlWriter->WriteNodeBegin(L"w:lvlPicBulletId",TRUE);
m_pXmlWriter->WriteAttribute(L"w:val",FormatUtils::IntToWideString(index));
m_pXmlWriter->WriteNodeEnd(L"",TRUE);
}
}
}
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -52,9 +52,9 @@ namespace DocFileFormat
static const wchar_t LevelJustificationMap[3][7] =
{
_T("left"),
_T("center"),
_T("right")
L"left",
L"center",
L"right"
};
class NumberingMapping: public AbstractOpenXmlMapping, public IMapping
@ -89,4 +89,4 @@ namespace DocFileFormat
WordDocument* m_document;
WordprocessingDocument* m_xmldocument;
};
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2016
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)

Some files were not shown because too many files have changed in this diff Show More