Compare commits

...

403 Commits

Author SHA1 Message Date
c0c6baf636 XlsxFormat - read/write iconSet ext 2019-02-18 19:24:00 +03:00
ccbc044f11 . 2019-02-18 17:38:05 +03:00
a8668df5fd XlsxFormat - read/write dataBar ext 2019-02-18 12:52:55 +03:00
cc228f3393 XlsxFormat - read/write ext conditional formating 2019-02-18 11:25:09 +03:00
19904acd30 XlsFormat - fix bug #40601 2019-02-15 18:02:02 +03:00
30d175144a . 2019-02-15 11:14:23 +03:00
acf15abe41 XlsxFormat - add threaded comments 2019-02-13 18:38:25 +03:00
5a7fc7f548 Skip build error for tests 2019-02-13 16:11:50 +03:00
e7326556e0 PptFormat - fix bug #40393 2019-02-13 14:29:21 +03:00
c589d8fe8a [ios][x2t] up formats 2019-02-13 13:59:04 +03:00
a28e8f1357 [ios][x2t] up formats 2019-02-13 13:48:07 +03:00
8b7bb944bc Rework GM_Compatible mode, fix bug with flipped images, fix bug with storing matrix transform for the clip 2019-02-12 17:51:05 +03:00
14ee946069 . 2019-02-12 17:30:58 +03:00
7aebdd8ec5 . 2019-02-12 17:15:07 +03:00
977baafc03 x2t - fix bug #40531 2019-02-12 16:22:41 +03:00
31b854bc70 [x2t] Add decimalSymbol, listSeparator to Editor.bin 2019-02-12 12:20:47 +03:00
e274dc50d7 [x2t] Save comment to document and to text into different files(docx) 2019-02-11 20:11:50 +03:00
d153db627b [ios][x2t] up formats 2019-02-11 19:09:33 +03:00
9cc6bc14c5 [ios][x2t] up formats 2019-02-11 18:36:35 +03:00
775c57be5d . 2019-02-11 17:26:05 +03:00
da37aeb039 . 2019-02-11 17:13:19 +03:00
751c6647a2 OdfFormatWrite - write templates 2019-02-11 15:05:44 +03:00
ec2344ccd5 OdfFormat - fix bug #40149 2019-02-10 16:02:20 +03:00
0494882541 Fix previous commit 2019-02-08 18:41:05 +03:00
07b0ba71d9 Add WriteData method & add feature to send js variables to builder native methods 2019-02-08 17:14:23 +03:00
299ef4873f XlsFormat - .. 2019-02-08 14:58:52 +03:00
93c7819106 OdfFormat - .. 2019-02-08 14:56:15 +03:00
16c3f81dee OdfFormat - fix bug #40505 2019-02-08 14:20:28 +03:00
7fc67bdadf DocxFormat - fix bug #40505 2019-02-08 13:30:17 +03:00
31deb60343 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2019-02-07 19:30:26 +03:00
7e83e168db PptFormat - fix bug #40114 2019-02-07 19:29:51 +03:00
a4c0fbe4ea Fix bug #40340
Add support of a GM_COMPATIBLE mode for a text. Also fixed the problem with clipping by the path with specified a world-transform
2019-02-07 19:05:00 +03:00
ae0f5867dd [ios][x2t] up formats 2019-02-07 18:44:52 +03:00
0dd4fc9c14 x2t - doc/ppt/xls format - small refactoring (rename namespaces) 2019-02-07 18:23:41 +03:00
3a92ef2395 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2019-02-06 18:11:35 +03:00
23c9a65fcb PptFormat - fix bug #40482 2019-02-06 18:10:39 +03:00
ba55f1436d [ios][x2t] up formats 2019-02-06 18:02:00 +03:00
f1c1d62a4d [x2t] Fix writing corrupted pptx 2019-02-06 13:03:11 +03:00
c2bdec6bde Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2019-02-05 20:39:34 +03:00
93d0ebfa09 . 2019-02-05 20:39:24 +03:00
6f881e2066 XlsFormat - fix bugs #40461, #40459 2019-02-05 20:36:11 +03:00
8be0d7f2b3 [x2t] Add "created", "MODIFIED" environments to rev:8f332c3c09437f0d89b8d0a843655b6b02eb1329 2019-02-05 15:45:18 +03:00
cbbb4c19de . 2019-02-05 12:23:10 +03:00
f4e0ce53b4 [x2t] For linux build 8f332c3c09 2019-02-05 11:24:36 +03:00
8f332c3c09 [x2t] Add app.xml, core.xml to Editor.bin 2019-02-04 20:04:37 +03:00
4721a4a96b [ios][x2t] up 2019-02-04 15:43:57 +03:00
44a0c65637 [ios][x2t] boost.framework build and odf_file projects 2019-02-02 15:05:44 +03:00
4de7090c78 [x2t] Fix writing corrupted xlsx
Change firstHeader firstFooter order
2019-01-31 13:47:34 +03:00
6f09ec71f9 . 2019-01-30 12:18:25 +03:00
b122d75f34 DocFormat - fix bug #40363 2019-01-29 19:58:40 +03:00
ed613f7ec1 x2t - fix bug #39977 2019-01-25 15:12:38 +03:00
e0bc06d3db OdfFormatReader - ... 2019-01-25 14:29:47 +03:00
366f16aa4f Merge remote-tracking branch 'origin/hotfix/v5.2.8' into develop 2019-01-25 13:35:27 +03:00
662c687520 . 2019-01-25 13:33:35 +03:00
efc70421e2 [ios] up 2019-01-25 11:05:14 +03:00
7522ad9167 Fix bug 40283 2019-01-25 10:28:43 +03:00
f7922fcea8 . 2019-01-24 19:32:23 +03:00
19dabff8e6 Refactoring 2019-01-24 16:19:42 +03:00
84bd16951f Fix bug #39966
Fix the problem with embedding non-bolded fonts. Improve check whether the font is bold
2019-01-24 15:39:42 +03:00
4e4e1e4ba5 PptFormat - fix bug #40262 2019-01-24 11:49:22 +03:00
8996935a10 XlsFormat - fix bug #40178 2019-01-23 18:47:25 +03:00
87c999474d XlsFormat - write default theme 2019-01-23 17:16:42 +03:00
7959642072 OdfFormatWriter - convert user shapes from chart 2019-01-23 14:00:52 +03:00
815f96a50a Merge remote-tracking branch 'origin/hotfix/v5.2.8' into develop 2019-01-22 15:04:53 +03:00
80f8876231 x2t - fix after testing 2019-01-22 13:54:29 +03:00
ec90b53756 x2t - fix after testing 2019-01-21 20:08:38 +03:00
eb493b4f11 . 2019-01-21 15:19:47 +03:00
4ec7d3b063 x2t - fix same files 2019-01-18 19:25:38 +03:00
64702e3797 x2t - write/read userShapes for chart from/to binary 2019-01-18 18:16:00 +03:00
97818245dc . 2019-01-17 18:37:31 +03:00
3821c60576 x2t - write userShapes for chart 2019-01-17 17:31:42 +03:00
792a0b35e1 [copyright] For bug 39644
Change address Latvian office.
2019-01-17 17:03:31 +03:00
288d208da3 [copyright] Update Copyright
2018 -> 2019
2019-01-17 16:44:11 +03:00
ec39df3ae8 . 2019-01-17 15:26:20 +03:00
cc06effd5e Merge remote-tracking branch 'origin/hotfix/v5.2.8' into develop 2019-01-16 16:48:51 +03:00
abd50ecec6 . 2019-01-16 16:08:17 +03:00
36faf5f2fd x2t - fix build 2019-01-16 15:48:55 +03:00
9168dbf06c x2t - version up. 2.4.562 2019-01-16 13:57:19 +03:00
94beedb1ec Merge remote-tracking branch 'origin/hotfix/v5.2.8' into develop 2019-01-16 13:42:46 +03:00
10f8c60ea1 x2t - fix bug #40124 2019-01-16 13:29:44 +03:00
8b5baeb929 x2t - fix same user files 2019-01-16 13:06:02 +03:00
864dac5eec XlsFormatReader - fix bug #40178 2019-01-16 13:05:22 +03:00
a2d085a191 v5.2.7 2019-01-15 14:46:05 +03:00
102db77f55 [ios][x2t] fixed build 2019-01-11 14:50:28 +03:00
0181cf493f Merge remote-tracking branch 'origin/hotfix/v5.2.5' into develop 2019-01-09 15:22:40 +03:00
25f20877df OdfFormat - fix users file (add new text field) 2019-01-09 15:20:08 +03:00
37889217cd Add v8 files to .gitignore 2019-01-09 14:10:25 +03:00
89d6a7ec7e Makefile refactoring 2019-01-09 14:09:16 +03:00
310b8605f0 . 2019-01-09 13:01:11 +03:00
c515c2bf00 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2019-01-09 11:37:53 +03:00
bea475a3cd . 2019-01-09 11:36:57 +03:00
a2454e78d4 [android][x2t] fix build script 2019-01-09 10:31:17 +03:00
c0bb704ed9 [x2t] Fix for 1b49f53f03 2018-12-27 15:37:34 +03:00
1b49f53f03 [x2t] For bug 40124 2018-12-27 12:50:48 +03:00
abbbda090d Merge remote-tracking branch 'origin/hotfix/v5.2.5' into develop 2018-12-26 14:30:50 +03:00
38e82f0414 PptFormatReader - fix bug #40116 2018-12-25 17:49:46 +03:00
25574aff48 PptFormatReader - fix bug #40115 2018-12-25 16:21:44 +03:00
f4d9901576 [ios] Math in menu 2018-12-25 15:48:54 +03:00
ebaa8b9769 add rpath to x2t 2018-12-24 12:59:48 +03:00
855442c1c9 . 2018-12-23 15:38:42 +03:00
30008873fe OdfFormatReader - fix after testing 2018-12-22 19:22:55 +03:00
8d247dfb6e OdfFormatReader - fix bug #40106, ... 2018-12-22 15:21:34 +03:00
a9f32fd7d0 Remove v8 object files from core.zip 2018-12-21 14:29:50 +03:00
c727f0cba8 Merge remote-tracking branch 'origin/hotfix/v5.2.5' into develop 2018-12-21 13:08:59 +03:00
181f613893 OdfFormatReader - fix bug #39979 2018-12-20 19:30:45 +03:00
8c4d1cde6c . 2018-12-20 15:18:14 +03:00
6e515a1ee5 . 2018-12-19 19:19:17 +03:00
3532d4088d OdfFormat - fix after testing 2018-12-19 18:03:24 +03:00
eec7ab20fd XlsFormat - fix bug #40065 2018-12-19 18:02:40 +03:00
8b568ddefb Merge remote-tracking branch 'origin/hotfix/v5.2.5' into develop 2018-12-19 13:24:09 +03:00
708c07c072 x2t - version upt - 2.4.560 2018-12-19 13:21:34 +03:00
c7524a2509 OdfFormatReader - fix after testing 2018-12-19 13:09:08 +03:00
90240caa0b Download correct (MacOS) 2018-12-19 10:19:15 +03:00
f8098f1237 No latin symbols in url 2018-12-18 18:52:08 +03:00
760dfbf0d7 OdfFormatReader - fix after testing 2018-12-18 14:25:33 +03:00
784f57dea4 Revert "Merge branch 'hotfix/v5.2.5' of https://github.com/ONLYOFFICE/core into hotfix/v5.2.5"
This reverts commit e280dcbb27, reversing
changes made to 097559c25e.
2018-12-17 12:33:52 +03:00
e280dcbb27 Merge branch 'hotfix/v5.2.5' of https://github.com/ONLYOFFICE/core into hotfix/v5.2.5 2018-12-17 12:31:52 +03:00
3953fd1add [ios][x2t] fixed build 2018-12-14 14:43:05 +03:00
30986e3c36 Fix buld crash 2018-12-14 14:09:43 +03:00
6eb596080c x2t - verison up - 2.4.558 2018-12-14 14:09:32 +03:00
b45d705e2b OdfFormatReader - fix #39976 2018-12-14 14:09:22 +03:00
21dffa628d OdfFormatReader - fix bug #39976 2018-12-14 14:09:12 +03:00
1b949a978b OdfFormatReader - fix bug #39983 2018-12-14 14:09:03 +03:00
17e140debf XlsFormatReader - fix bug #39961 2018-12-14 14:08:54 +03:00
6452e9956e OdfFormat - fix users files 2018-12-14 14:08:45 +03:00
f8ad532f77 Merge pull request #129 from ONLYOFFICE/feature/pdfUtfBOM
Feature/pdf utf bom
2018-12-14 14:06:56 +03:00
e05551e679 x2t - DocxFormat - fix bug #39935 2018-12-14 14:02:22 +03:00
850959f791 PptFormatReader -fix bug #39929 2018-12-14 14:02:06 +03:00
d0661e871d Merge pull request #128 from ONLYOFFICE/hotfix/v5.2.5
Hotfix/v5.2.5
2018-12-14 13:40:59 +03:00
ec173776ea Merge branch 'develop' into hotfix/v5.2.5 2018-12-14 13:40:47 +03:00
0a3b9fb8e9 Fix buld crash 2018-12-14 12:34:41 +03:00
097559c25e x2t - verison up - 2.4.558 2018-12-13 18:58:00 +03:00
6a571ba1c9 OdfFormatReader - fix #39976 2018-12-13 14:09:17 +03:00
c4a46114a2 Merge remote-tracking branch 'origin/hotfix/v5.2.5' into develop 2018-12-13 12:15:05 +03:00
724335bdda OdfFormatReader - fix bug #39976 2018-12-12 18:12:14 +03:00
7e85df3cc5 OdfFormatReader - fix bug #39983 2018-12-12 17:32:39 +03:00
326cfbde93 XlsFormatReader - fix bug #39961 2018-12-12 15:18:57 +03:00
5df8901b59 OdfFormat - fix users files 2018-12-11 20:03:56 +03:00
9c24fa2ff1 Merge pull request #127 from ONLYOFFICE/feature/pdfUtfBOM
Feature/pdf utf bom
2018-12-11 18:26:56 +03:00
82dca18ebc Correct coding to Utf16 2018-12-11 18:08:25 +03:00
86d97d050d x2t - DocxFormat - fix bug #39935 2018-12-11 18:03:16 +03:00
a6ab10d585 PptFormatReader -fix bug #39929 2018-12-11 18:00:32 +03:00
2b8efdd9b1 v5.2.4 2018-12-11 16:07:08 +03:00
1022754391 clang build fix 2018-12-11 15:38:29 +03:00
2c10457a63 . 2018-12-08 17:22:58 +03:00
e0630979c5 . 2018-12-06 13:09:12 +03:00
8bc8b7cf58 . 2018-12-05 15:43:01 +03:00
14f4364962 . 2018-12-05 14:38:22 +03:00
9de3cb016f . 2018-12-03 16:56:41 +03:00
f12cd8ff8f [ios][x2t] fixed build 2018-12-03 16:25:12 +03:00
436015b5d2 DocFormatReader - write strict writeProtection; DocxFormatReader - read ecma & strict writeProtection 2018-12-03 16:05:36 +03:00
c078df93c9 . 2018-12-03 13:17:35 +03:00
e5e8e01490 Xls/XlsxFormat - protection verify 2018-12-02 14:19:47 +03:00
4fcc3b4f41 DocFormatReader - convert writeProtect 2018-12-02 12:57:41 +03:00
ce44e50d0e OdfFormatReader - protection sheets 2018-11-29 19:01:54 +03:00
143590f17b XlsxFormat - sheet protection, ... 2018-11-29 11:25:22 +03:00
abb7a85337 [android][x2t] fix build script 2018-11-28 15:37:24 +03:00
f0fe00aa3e Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-27 15:27:12 +03:00
98a568177d . 2018-11-27 15:26:08 +03:00
e58f1929e1 x2t - version up - 2.5.556 2018-11-27 14:57:53 +03:00
2143869e69 OdfFormatReader - .. 2018-11-27 14:28:21 +03:00
ac6a1a19da Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-26 14:43:12 +03:00
fb574f1994 [android][pe] utils 2018-11-23 17:50:54 +03:00
f9af786d5a . 2018-11-23 12:19:38 +03:00
3cde3a4444 OdfFormatReader - fix after testing 2018-11-22 19:27:58 +03:00
eb2221f006 Fix previous commit 2018-11-22 11:30:02 +03:00
394d1e7b38 Remove preload libcef library 2018-11-22 11:24:18 +03:00
d9d1473fd0 Add support of RLE8 compression for Wmf/Emf 2018-11-21 18:17:58 +03:00
45ba99b9bf Up cef version on linux 2018-11-21 16:20:33 +03:00
9576ce5f28 OdfFormatReader - convert ms ole objects in open office 2018-11-20 15:42:00 +03:00
7092922d1b DocFormatReader - parsing extra property draw - blob 2018-11-20 11:19:43 +03:00
e112c63f12 OdfFormatReader - external links in formulas and defineds 2018-11-20 11:13:33 +03:00
ae9ec197f1 Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-16 18:29:14 +03:00
af7640e736 DocFormat - fix after testing 2018-11-16 18:28:34 +03:00
f467912988 Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-16 15:53:13 +03:00
292781e6fb DocFormat - fix after testing
x2t version up - 2.4.556
2018-11-16 15:50:05 +03:00
9cd97d48b8 MetaFile - fix bugs #39745, #39747 2018-11-16 14:10:37 +03:00
579b441edc . 2018-11-16 12:05:22 +03:00
63b71d256b Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-15 19:51:18 +03:00
90f1aa055c OdfFormatReader - fix after testing 2018-11-15 19:49:54 +03:00
d75352f1f2 x2t - fix convert vml -> drawing_ml 2018-11-13 14:29:19 +03:00
51cbcfa9f2 Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-12 18:37:55 +03:00
eef66b3498 OdfFormat - fix convert same autoshapes 2018-11-12 18:37:19 +03:00
945d43997a Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-12 15:47:51 +03:00
b41170a233 Update .gitignore 2018-11-12 15:17:34 +03:00
b64541e6bd fix String<->StringExt 2018-11-12 12:41:27 +03:00
5626963bdf Fix build 2018-11-12 12:16:04 +03:00
5b7d637c78 Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-12 11:53:39 +03:00
643f117a92 . 2018-11-12 11:53:01 +03:00
f6d38c1f1b Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-10 19:05:45 +03:00
dd24ca837f x2t - version up. 2.4.555. 2018-11-10 19:04:30 +03:00
f555e3f821 OdfFormat - refactoring same auto shapes 2018-11-10 19:03:18 +03:00
503e87077b [x2t] xlsx_dir2xlst_bin: copy Editor.xlsx only if xlsx has pivot table 2018-11-09 19:38:24 +03:00
07a07a1abd PdfWriter - fix encrypt 2018-11-09 19:18:09 +03:00
30473ee9b7 MacOS build (clang) 2018-11-09 15:38:15 +03:00
73ef4140a2 [x2t] rename String.h -> StringExt.h 2018-11-09 14:33:25 +03:00
8b6e5f17c8 MacOS 2018-11-09 14:06:51 +03:00
fcede43d99 [android][xt2] fix for build 2018-11-08 12:07:06 +03:00
c37f011d6d OdfFormatWriter - convert externalLinks 2018-11-07 17:55:25 +03:00
52ec27a679 [android][xt2] fix for build 2018-11-07 16:39:13 +03:00
a687e49a6a [android][x2t] fix for build 2018-11-07 14:04:27 +03:00
4d0e44c8b6 Fix PRODUCT_VERSION substitution 2018-11-07 11:39:03 +03:00
4dddc6d9bc Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-06 19:18:30 +03:00
b6b79576a1 Update base.pri 2018-11-06 14:25:39 +03:00
1c1223b148 Fix misprint 2018-11-06 14:22:40 +03:00
9947f058a9 XlsFormat - fix bug #39541 2018-11-06 13:17:16 +03:00
54f55ad2ac Fix build without PRODUCT_VERSION env 2018-11-06 12:22:40 +03:00
e4edb9cca4 Fix current year substitution into copyright on windows 2018-11-02 18:18:18 +03:00
8bb23e9ce1 [ios][x2t] fix build 2018-11-02 17:45:12 +03:00
aacea2f015 Fix year in copyright on windows 2018-11-02 17:14:31 +03:00
1475b2fef9 Fix misprint 2018-11-02 16:31:01 +03:00
8e58975095 Add publisher name and version env param 2018-11-02 16:25:26 +03:00
04550f06ad Fix bug with metadata in UTF16 format 2018-11-02 15:20:36 +03:00
d2b6444730 Fix bug with metadata in UTF16 format 2018-11-02 15:19:11 +03:00
08738092c6 [ios][pe] events 2018-11-02 11:31:59 +03:00
8e220427eb Merge remote-tracking branch 'origin/hotfix/v5.2.4' into develop 2018-11-01 14:25:05 +03:00
962c31dc2a [x2t] To Revision: d12cc81745 2018-11-01 11:45:52 +03:00
d12cc81745 [x2t] Add app/core.xml to Editor.bin 2018-10-31 20:27:03 +03:00
988423f6e0 OdfFormatReader - write part tables
x2t version 2.4..554
2018-10-31 18:12:11 +03:00
2b096f0977 Wmf meta file - fix bug #39533 2018-10-31 18:03:19 +03:00
7c0962f834 Fix multi-thread build crash 2018-10-31 14:45:25 +03:00
17423cdcdb Merge pull request #123 from ONLYOFFICE/feature/qt_word
Feature/qt word
2018-10-30 19:05:23 +03:00
5dc512dc3b Merge pull request #122 from ONLYOFFICE/feature/Bug_builder
Fix builder bug
2018-10-30 19:03:48 +03:00
1393073694 Merge branch 'feature/fix2_v5.2.3' into hotfix/v5.2.4 2018-10-30 17:43:06 +03:00
7da761a009 Standart Tester epsilon for pixel diffs 2018-10-30 16:45:19 +03:00
e21e0afb45 Fix bug with rendering some emf files 2018-10-30 15:01:34 +03:00
626eb87203 v5.2.3 2018-10-30 12:58:37 +03:00
5b0dad3d99 Standart Tester bugs (+ gamma for stroke functionality) 2018-10-29 19:31:27 +03:00
9d3b7b91af Fix builder bug 2018-10-29 15:40:29 +03:00
f40d82a097 Fix issue https://github.com/ONLYOFFICE/DocumentServer/issues/413 2018-10-29 15:20:48 +03:00
9112c87b1f Merge remote-tracking branch 'origin/feature/fix2_v5.2.3' into develop 2018-10-29 13:19:17 +03:00
01691950b9 . 2018-10-29 13:18:34 +03:00
78bbaecefe Merge remote-tracking branch 'origin/feature/fix2_v5.2.3' into develop 2018-10-29 11:39:01 +03:00
9e085c5ae8 OdfFormat - fix conditional formatting 2018-10-28 17:45:25 +03:00
f55cafa2af OdfFormat -fix after testing 2018-10-26 19:51:12 +03:00
17bc27199c OdfFormatWriter - fix bug#39467 2018-10-25 18:51:07 +03:00
ee4167ec8c Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-25 17:48:00 +03:00
e436c13fcc [x2t] Fix bug 39456 2018-10-25 17:45:03 +03:00
8e2c980152 OdfFormat - fix after testing (#118)
OdfFormat - fix after testing
2018-10-25 17:43:11 +03:00
658bfbc348 Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-23 13:35:31 +03:00
ff9ef8f941 PptFormatReader - fix users files 2018-10-23 13:19:30 +03:00
0a2401471e [x2t] Fix bug 39391
Fix writing only last ConditionalFormatting from Editor.bin
2018-10-23 11:37:06 +03:00
5ca5597c58 [ios][pe] translations 2018-10-22 16:22:53 +03:00
e55dc5ea75 . 2018-10-22 15:47:09 +03:00
e2db849b03 Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-22 12:01:03 +03:00
fef30772fd OdfFormatWriter - fix after testing 2018-10-21 18:10:29 +03:00
23ba8a23a4 Fix multi-thread build crash 2018-10-21 15:37:15 +03:00
866af012eb . 2018-10-19 17:55:39 +03:00
4df09fd25a Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-19 16:27:27 +03:00
8bae2e3255 . 2018-10-19 14:25:35 +03:00
6180fedb0b Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-19 13:05:15 +03:00
35113a76ca . 2018-10-19 12:10:06 +03:00
5895bc9641 Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-19 10:51:20 +03:00
a5a6686501 Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-19 10:50:49 +03:00
f776bb6c4e OdfFormatWriter - fix after testing 2018-10-19 10:36:02 +03:00
4c930e716b Merge remote-tracking branch 'origin/hotfix/v5.2.3' into develop 2018-10-17 15:38:13 +03:00
595ecae254 x2t - binary - native convert locked canvas - bix bug #28246 2018-10-17 13:29:55 +03:00
8d3e50f8c0 x2t - version up 2018-10-16 19:11:14 +03:00
2439106397 Fix crash on empty dash pen 2018-10-16 17:52:22 +03:00
8953b74579 Fix bug 39214 (text selection in pdf/xps) 2018-10-16 17:17:13 +03:00
bd7978e474 Correct test 2018-10-16 15:52:28 +03:00
95238af0f5 Merge branch 'hotfix/v5.2.3' of https://github.com/ONLYOFFICE/core into hotfix/v5.2.3 2018-10-15 14:02:06 +03:00
e83daf6c91 RtfFormatReader - fix bug #39315 2018-10-15 14:01:27 +03:00
a4cade5a58 Test for work with standart docs 2018-10-15 13:59:52 +03:00
4fb284ebee x2t - fix bug #39307 2018-10-15 13:12:27 +03:00
900ed115c7 Test for work with standart docs 2018-10-12 19:44:43 +03:00
d34b850c52 [ios][pe] events 2018-10-12 19:15:18 +03:00
cc31becec1 [x2t] Fix bug 39305
Fix String.ToString2 after f7a13e04d8
2018-10-12 16:39:01 +03:00
24332cca42 [ios][x2t] fixed build 2018-10-12 12:39:04 +03:00
9b5f052c97 OdfFormatWriter - fix after testing 2018-10-11 17:57:45 +03:00
2017a8c692 OdfFormat - fix after testing 2018-10-10 19:29:31 +03:00
55e7777abb [zlib] Remove zlib-1.2.3 2018-10-10 18:46:27 +03:00
b7c8bc2769 [zlib] Update zlib to 1.2.11
Fix opening of xlsx created by NPOI(bad-zip.xlsx)
2018-10-10 18:42:45 +03:00
13900daf08 [zlib] Repeat local changes from zlib-1.2.3 2018-10-10 18:39:00 +03:00
2feb1ac8e8 Add zlib-1.2.11 2018-10-10 17:52:04 +03:00
558c669fb6 Disable truetype fonts convertasion in html viewer 2018-10-10 15:58:26 +03:00
6268e8c3f3 PptxFormat - fix after testing 2018-10-10 11:27:39 +03:00
d872f4220c Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-10-09 18:14:42 +03:00
3c24392e16 PptxFormat - fix after testing 2018-10-09 18:13:57 +03:00
e859821647 Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-10-09 17:02:46 +03:00
5c1a2f11f9 XlsFormatReader - fix users file (external defined names) 2018-10-09 14:53:04 +03:00
f7a13e04d8 DocxFormat - fix read binary file - bug #39248 2018-10-09 14:02:15 +03:00
18cbd41c84 Add GetImage method to IImageCache 2018-10-08 18:16:06 +03:00
c6e47a7bcf DocxFormat - fix bug #39216 2018-10-08 13:08:17 +03:00
62d6581c43 DocFormatReader - fix bug #39236 2018-10-08 11:32:31 +03:00
2d0e5aefa0 Merge pull request #117 from ONLYOFFICE/feature/aspose-math
Feature/aspose math
2018-10-05 17:04:41 +03:00
78a5546d0a PptxFormat - fix binary convert mathType version over 3.0 2018-10-05 12:49:01 +03:00
8985395ef1 [x2t] Move from mm to twips in Editor.bin 2018-10-04 17:58:29 +03:00
f55a5418e9 x2t - fix pptx section list 2018-10-04 17:39:32 +03:00
9410862444 [x2t] Fix bin->docx default style falg 2018-10-04 15:08:14 +03:00
f4d72572c0 Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-10-04 13:04:52 +03:00
f078605031 x2t - select method encrypt files 2018-10-04 13:01:49 +03:00
9105894416 . 2018-10-04 11:32:05 +03:00
1102f7f9b0 OdfFormat - not strong encryption 2018-10-03 20:13:49 +03:00
9aad3d1adb x2t - ooxml - not strong encryption 2018-10-03 20:01:57 +03:00
bc319bddbf Gost algorithms 2018-10-03 19:18:01 +03:00
8d664c2a4f . 2018-10-03 17:22:33 +03:00
cbfa907451 graphics - metafile - fix convert to rastr on linux without set fonts 2018-10-03 15:02:29 +03:00
0712bcfd5c OdfFormatwriter - convert bookmarks 2018-10-02 19:16:14 +03:00
474873531d OdfFormatReader - fix bug #39192 2018-10-02 14:47:38 +03:00
8625e93ac5 [x2t] Rename READ2_DEF -> READ2_DEF_SPREADSHEET 2018-10-01 18:14:04 +03:00
fb79df8c6c . 2018-10-01 11:40:48 +03:00
071ad3f86e . 2018-09-30 17:21:48 +03:00
65bcdb3bea . 2018-09-30 17:08:42 +03:00
f9f26e84fd . 2018-09-30 14:35:49 +03:00
a3888a8186 . 2018-09-28 17:19:20 +03:00
1493e4a949 [ios][x2t] fixed build 2018-09-28 16:36:12 +03:00
85bf4b8fac Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-09-28 15:57:47 +03:00
94ec819e68 x2t clear compiling warnings 2018-09-28 15:56:59 +03:00
cb7c7cb4d5 . 2018-09-28 14:55:50 +03:00
b1b911b538 Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-09-28 14:51:13 +03:00
d94595f755 OdfFormat - refactoring convert word-arts from/to ooxml; convert form controls in spreadsheets 2018-09-28 14:50:09 +03:00
2192bff46b Merge remote-tracking branch 'origin/hotfix/v5.2.1' into develop 2018-09-28 14:39:43 +03:00
c7eb16fa64 x2t - clear compiling warnings 2018-09-28 14:30:27 +03:00
d9922e4782 x2t - binary file - add converting effects for drawings 2018-09-28 14:29:33 +03:00
6ee7d79cc4 RtfFormatReader - fix bug #39172 2018-09-28 14:25:18 +03:00
332348ef5b release/v5.2.0 2018-09-27 19:07:44 +03:00
e4e6acd1bc [android][x2t] added doctrenderer file stub 2018-09-27 15:03:47 +03:00
7418b2327a Merge remote-tracking branch 'origin/develop' into develop 2018-09-27 14:10:28 +03:00
18d610e3e0 [android][x2t] added example of converter 2018-09-27 14:09:12 +03:00
4e81420eed [ios][x2t] fixed build 2018-09-26 16:18:50 +03:00
e26f836da7 Merge commit '69d2b12f5315e96442fc5a0620d4f4c2070c4e77' into develop 2018-09-24 18:34:51 +03:00
69d2b12f53 . 2018-09-24 17:48:02 +03:00
f2260748c8 . 2018-09-24 17:48:02 +03:00
b59f84b262 . 2018-09-24 17:48:02 +03:00
3e5fed8482 x2t - fix return codes 2018-09-24 17:48:02 +03:00
538e477818 Revert "[test] Define AVS_ERROR_FIRST as 0 to avoid issues with assignment and comparison uint64, int64, int32"
This reverts commit 05694d13f3.
2018-09-24 13:19:18 +03:00
b212e878c6 Merge pull request #114 from ONLYOFFICE/release/v5.2.0
Release/v5.2.0
2018-09-24 01:13:01 +03:00
05694d13f3 [test] Define AVS_ERROR_FIRST as 0 to avoid issues with assignment and comparison uint64, int64, int32 2018-09-24 01:04:14 +03:00
1dd72c99a2 Remove define GetCharWidth 2018-09-21 16:43:39 +02:00
4b73e58693 [bug] Fix missing function name 2018-09-21 17:36:32 +03:00
bee4f57dd3 [bug] Fix opening encrypted odf files 2018-09-21 17:36:32 +03:00
dd40e3e53c Merge pull request #111 from ONLYOFFICE/feature/ComboFonts
Fix bug with squares in combobox fonts (& empty rects)
2018-09-21 14:54:43 +03:00
d657ece017 Fix bug with squares in combobox fonts (& empty rects) 2018-09-21 14:36:14 +03:00
b21b1b8aaf [bug] Fix missing function name 2018-09-21 13:02:23 +03:00
09fb980060 [bug] Fix opening encrypted odf files 2018-09-21 12:01:01 +03:00
142f9f57a3 OdfFormatReader&Writer - refactoring converting wordarts from/to ooxml 2018-09-20 18:59:51 +03:00
1955dc98df [x2t] Set default value for math nodes with val attribute and COnOff type 2018-09-20 17:38:30 +03:00
28346c4571 Fix bug with squares in combobox fonts (& empty rects) 2018-09-20 14:53:10 +03:00
9810087ee1 Merge pull request #108 from ONLYOFFICE/release/v5.2.0
Release/v5.2.0
2018-09-20 14:38:32 +03:00
2b8e1456c2 . 2018-09-20 11:41:42 +03:00
274c000ce7 fix PdfReader 2018-09-20 11:35:30 +03:00
9e6dd1fbb1 fix OdfReader 2018-09-20 11:35:30 +03:00
158692f824 [x2t] Fix opening docx with track changes and math created by aspose 2018-09-19 16:53:05 +03:00
49723e648a . 2018-09-19 11:29:43 +03:00
b0a2104b21 Merge commit 'de51052f6ae59ac36665fb3f85804081a888c7c5' into develop 2018-09-18 20:03:33 +03:00
e4986f4202 . 2018-09-18 19:35:06 +03:00
de51052f6a [bug] Fix file corruption after pasting picture with error 2018-09-18 18:47:12 +03:00
bd1dc5a7b6 . 2018-09-17 17:28:46 +03:00
1ccbe323f4 . 2018-09-14 19:21:12 +03:00
2c8efcb183 Merge pull request #106 from ONLYOFFICE/feature/provideARCtoKernel
send use ARC parameter to downloader
2018-09-14 18:46:40 +03:00
9c2a717870 send use ARC parameter to downloader 2018-09-14 17:03:12 +03:00
3811169415 Merge commit '185dc3064f731e4adb04040e116dc53110c6d866' into develop 2018-09-14 11:36:36 +03:00
2871769479 . 2018-09-14 11:34:07 +03:00
185dc3064f OdfFormat - fix comment in empty cell-row, fix default background color 2018-09-13 19:51:31 +03:00
c6f8a1cde8 [bug] Fix bug 38876 2018-09-13 16:47:50 +03:00
acdce1edb9 . 2018-09-12 17:53:40 +03:00
67a40a5fc4 Constructor of __ox_drawing doesn't receive parameters 2018-09-12 15:41:37 +03:00
67cd654785 OdfFormatReader - convert form controls in spreadsheets 2018-09-11 14:59:10 +03:00
3816162555 Merge commit '3fb166f99a211e85474c121009019d06710722f8' into develop 2018-09-10 18:43:15 +03:00
3fb166f99a OdfFormatWriter - fix repeated rows 2018-09-10 18:15:35 +03:00
d8121d1a12 [ios][x2t] fixed array check 2018-09-06 19:11:47 +03:00
a76bf57051 fix bug #38817 2018-09-06 13:46:47 +03:00
97b92cf75c . 2018-09-05 18:39:32 +03:00
506de8e9e1 fix bug #38678 2018-09-05 18:38:55 +03:00
fb34d57ee6 DocFormatReader - fix footnotes for doc1995; optimization convert 2018-09-05 14:45:24 +03:00
da2d997838 . 2018-09-03 19:50:02 +03:00
76d68fa70f Fix bug #38544
Fix the problem with calculating transformation matrix for the EMF. Add support of EMR_STRETCHBLT field.
2018-09-03 18:07:10 +03:00
677e3e49e0 . 2018-08-31 17:38:17 +03:00
02c84d107b Merge commit 'b59908e4c25b265641e77b2167826f236b3b9d64' into develop 2018-08-31 17:27:06 +03:00
b59908e4c2 OdfFormatWriter - add same preset ooxml shapes 2018-08-31 16:13:07 +03:00
04e6b642f4 OdfFormatWriter - fix bug #38720 2018-08-31 14:12:49 +03:00
49cd76d0f3 Ooxml encrypt files - add support compatibility with Office 2003-2007(+ add rc4 method to encrtypt); add des method in agile encryption 2018-08-30 17:47:17 +03:00
c9ddd5b7b5 [bug] Fix tmp file name if nedd download src file 2018-08-30 16:37:15 +03:00
53a75261e3 . 2018-08-29 19:05:30 +03:00
26f32dd511 [ios][pe] chart events 2018-08-29 18:25:08 +03:00
e1e788b768 [x2t] Add Compat settings to Editor.bin 2018-08-29 17:30:18 +03:00
a74c927e7e DocFormatReader - fix after testing 2018-08-28 15:13:41 +03:00
c94e1e3223 V8 windows xp support 2018-08-27 16:40:56 +03:00
395e54cf76 [ios][x2t] fixed build 2018-08-24 15:11:04 +03:00
40476e7555 [ios][x2t] use system libxml2 2018-08-24 14:59:54 +03:00
04f06c23a1 DocxFormat - extend shading pPr 2018-08-24 13:22:45 +03:00
a9a635747a [ios][x2t] fixed build 2018-08-24 12:50:05 +03:00
4afe985955 Fix building libicue on all glibc > 2.26 systems 2018-08-24 12:35:45 +03:00
4027a0de25 Merge commit 'a232fcd9e1042811d624ff8934dc689f57ac2f57' into develop 2018-08-24 11:10:03 +03:00
a232fcd9e1 DocFormatReader - fix bug #38524 2018-08-23 19:55:44 +03:00
5bc537749e Add date_time library 2018-08-22 19:41:12 +03:00
6e7f6cf204 . 2018-08-22 19:39:28 +03:00
b0c10403c5 OdfFormat - fix bug #38506; others from after testing 2018-08-22 15:42:26 +03:00
5f516f0c56 OdfFormatReader - fix after testing 2018-08-21 13:24:20 +03:00
bfe8abb847 XlsFormatReader - fix users file 2018-08-20 16:56:12 +03:00
d765a7590b DocxFormat - fix bug #38594 2018-08-20 14:11:58 +03:00
dac34c32c0 RtfFormat - fix fonts in meta files 2018-08-17 18:46:47 +03:00
599bf9654d x2t - fix bug #38432 2018-08-17 16:16:22 +03:00
fbd55ca485 OdfFormatReader - fix bugs #38485, #38507 2018-08-17 14:53:40 +03:00
68bb25301d [x2t] Add tcPr.hMerge to Editor.bin 2018-08-16 20:00:14 +03:00
2390e5bffe [x2t] Add custom docx properties SdtGlobalColor, SdtGlobalShowHighlight 2018-08-16 19:11:40 +03:00
01c9c018af [bug] Fix bug 38496 2018-08-16 18:44:50 +03:00
53ed94dbbe [x2t] Add w15:appearance and w15:color to sdtPr 2018-08-13 19:39:52 +03:00
e1fa9b5c46 Add /usr/local/share/fonts to search folders 2018-08-10 17:47:18 +03:00
6341cdbbdb [x2t] Write application and company name from environment variable 2018-08-09 19:35:51 +03:00
c93989767e raster pri fix 2018-08-09 17:02:41 +03:00
94548131a1 v5.1.5 2018-07-17 17:08:49 +03:00
5452 changed files with 115212 additions and 60120 deletions

7
.gitignore vendored
View File

@ -3,6 +3,8 @@ dictionaries/
LicenceManager/
Common/boost_1_58_0
Common/3dParty/boost/boost_1_58_0
Common/3dParty/boost/ios
Common/3dParty/boost/osx
Common/3dParty/icu/win_64
Common/3dParty/icu/win_32
Common/3dParty/icu/linux_64
@ -18,6 +20,9 @@ Common/3dParty/curl/win_32
Common/3dParty/curl/linux_64
Common/3dParty/curl/linux_32
Common/3dParty/curl/mac_64
Common/3dParty/v8/.cipd
Common/3dParty/v8/.gclient
Common/3dParty/v8/.gclient_entries
Common/3dParty/v8/v8
Common/3dParty/v8/depot_tools
Common/3dParty/v8/win_64
@ -47,6 +52,8 @@ ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2_p.c
ASCOfficeXlsFile2/win32/dlldata.c
OfficeUtils/win32/OfficeUtilsLib/OfficeUtilsLib/ReadMe.txt
X2tConverter/**/Makefile.*
X2tConverter/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile
X2tConverter/Common/DocxFormat/DocxFormatLib/Makefile
*.7z
*.obj
*.pdb

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -52,8 +52,10 @@
#include <string.h>
#endif
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
#include "../../DesktopEditor/common/Types.h"
#include "../../Common/DocxFormat/Source/Base/unicode_util.h"
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
#include "../../UnicodeConverter/UnicodeConverter.h"
#include <boost/format.hpp>

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -58,7 +58,8 @@ namespace DocFileFormat
}
else
{
short cch = reader->ReadInt16();
short cch = reader->ReadInt16();
unsigned char *chars = reader->ReadBytes(18, true);
@ -67,13 +68,34 @@ namespace DocFileFormat
newObject->m_AuthorIndex = reader->ReadUInt16();
//skip 4 bytes
reader->ReadBytes(4, false);
unsigned int skip = reader->ReadUInt32();
newObject->m_BookmarkId = reader->ReadInt32();
newObject->m_BookmarkId = reader->ReadInt32(); //-1 - comment is on a length zero text range in the Main Document
RELEASEARRAYOBJECTS(chars);
}
return static_cast<ByteStructure*>(newObject);
}
ByteStructure* AnnotationReferenceExDescriptor::ConstructObject(VirtualStreamReader* reader, int length)
{
AnnotationReferenceExDescriptor *newObject = new AnnotationReferenceExDescriptor();
if (reader->nWordVersion > 0)
{
}
else
{
m_nDTTM = reader->ReadUInt32();
reader->ReadUInt16(); //padding1
m_nDepth = reader->ReadUInt32();
m_nDiatrdParent = reader->ReadUInt32();
unsigned int flag = reader->ReadUInt32();
m_fInkAtn = GETBIT(flag, 1);
}
return static_cast<ByteStructure*>(newObject);
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -46,21 +46,6 @@ namespace DocFileFormat
return (nWordVersion > 0) ? STRUCTURE_SIZE_OLD : STRUCTURE_SIZE;
}
inline std::wstring GetUserInitials() const
{
return m_UserInitials;
}
inline unsigned short GetAuthorIndex() const
{
return m_AuthorIndex;
}
inline int GetBookmarkId() const
{
return m_BookmarkId;
}
AnnotationReferenceDescriptor() : m_AuthorIndex(0), m_BookmarkId(0)
{
}
@ -71,13 +56,35 @@ namespace DocFileFormat
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length );
private:
/// The initials of the user who left the annotation.
std::wstring m_UserInitials;
/// An index into the string table of comment author names.
unsigned short m_AuthorIndex;
/// Identifies a bookmark.
int m_BookmarkId;
};
class AnnotationReferenceExDescriptor: public ByteStructure
{
public:
static const int STRUCTURE_SIZE = 18;
static const int STRUCTURE_SIZE_OLD = 0;
static const int GetSize(int nWordVersion)
{
return (nWordVersion > 0) ? STRUCTURE_SIZE_OLD : STRUCTURE_SIZE;
}
AnnotationReferenceExDescriptor() : m_nDTTM(0), m_nDepth(0), m_nDiatrdParent(0), m_fInkAtn(false)
{
}
virtual ~AnnotationReferenceExDescriptor()
{
}
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length );
unsigned int m_nDTTM;
unsigned int m_nDepth;
unsigned int m_nDiatrdParent;
bool m_fInkAtn;
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -39,13 +39,8 @@ namespace DocFileFormat
class BookmarkFirst: public ByteStructure
{
private:
/// An unsigned integer that specifies a zero-based index into the PlcfBkl or PlcfBkld
/// that is paired with the PlcfBkf or PlcfBkfd containing this FBKF.
/// The entry found at said index specifies the location of the end of the bookmark associated with this FBKF.
/// Ibkl MUST be unique for all FBKFs inside a given PlcfBkf or PlcfBkfd.
short ibkl;
/// A BKC that specifies further information about the bookmark associated with this FBKF.
short bkc;
short ibkl;
short bkc;
public:
static const int STRUCTURE_SIZE = 4;
@ -78,4 +73,32 @@ namespace DocFileFormat
return static_cast<ByteStructure*>( newObject );
}
};
class AtnBookmarkFirst: public ByteStructure
{
public:
unsigned short bmc;
unsigned int lTag;
static const int STRUCTURE_SIZE = 10;
AtnBookmarkFirst()
{
}
virtual ~AtnBookmarkFirst()
{
}
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length )
{
AtnBookmarkFirst *newObject = new AtnBookmarkFirst();
newObject->bmc = reader->ReadUInt16(); //0x0100
newObject->lTag = reader->ReadUInt32();
unsigned int lTagOld = reader->ReadUInt32();
return static_cast<ByteStructure*>( newObject );
}
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -75,7 +75,7 @@ namespace DocFileFormat
convertSprms( dynamic_cast<CharacterPropertyExceptions*>( chpx )->grpprl, _rPr );
// apend revision changes
if (_revisionData->Type == Changed)
if ((_revisionData) && (_revisionData->Type == Changed))
{
XMLTools::XMLElement rPrChange( L"w:rPrChange");

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -52,8 +52,6 @@ namespace DocFileFormat
{
m_context->_docx->RegisterComments();
int index = 0;
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:comments", TRUE );
@ -63,33 +61,60 @@ namespace DocFileFormat
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->WriteAttribute( L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" );
m_pXmlWriter->WriteAttribute( L"xmlns:cx", L"http://schemas.microsoft.com/office/drawing/2014/chartex" );
m_pXmlWriter->WriteAttribute( L"xmlns:cx1", L"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" );
m_pXmlWriter->WriteAttribute( L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006" );
m_pXmlWriter->WriteAttribute( L"xmlns:m", L"http://schemas.openxmlformats.org/officeDocument/2006/math" );
m_pXmlWriter->WriteAttribute( L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" );
m_pXmlWriter->WriteAttribute( L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" );
m_pXmlWriter->WriteAttribute( L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:w15", L"http://schemas.microsoft.com/office/word/2012/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:w16se", L"http://schemas.microsoft.com/office/word/2015/wordml/symex" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk" );
m_pXmlWriter->WriteAttribute( L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape" );
m_pXmlWriter->WriteAttribute( L"mc:Ignorable", L"w14 w15 w16se wp14");
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;
size_t count = m_document->AnnotationsReferencePlex->Elements.size();
for (size_t i = 0; i < count; ++i)
for (size_t index = 0; index < count; ++index)
{
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
AnnotationReferenceExDescriptor* atrdPost10 = m_document->AnnotationsReferenceExPlex ? static_cast<AnnotationReferenceExDescriptor*>(m_document->AnnotationsReferenceExPlex->Elements[index]) : NULL;
unsigned short index_author = atrdPre10->GetAuthorIndex();
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 ));
if (index_author < m_document->AnnotationOwners->size()) //conv_253l2H1CehgKwsxCtNk__docx.doc
if (atrdPre10->m_BookmarkId < 0)
{
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 + count + 1024 ));
}
else
{
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 ));
}
if (atrdPost10)
{
//!!!TODO!!!
/*//ATRDpost10 is optional and not saved in all files
if (doc.AnnotationReferenceExtraTable != null &&
doc.AnnotationReferenceExtraTable.Count > index)
{
AnnotationReferenceDescriptorExtra atrdPost10 = doc.AnnotationReferenceExtraTable[index];
atrdPost10.Date.Convert(new DateMapping(_writer));
}*/
}
if (atrdPre10->m_AuthorIndex < m_document->AnnotationOwners->size()) //conv_253l2H1CehgKwsxCtNk__docx.doc
{
m_pXmlWriter->WriteAttribute( L"w:author",
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( index_author ) ));
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->m_AuthorIndex ) ));
}
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->m_UserInitials);
//!!!TODO!!!
/*//ATRDpost10 is optional and not saved in all files
if (doc.AnnotationReferenceExtraTable != null &&
doc.AnnotationReferenceExtraTable.Count > index)
{
AnnotationReferenceDescriptorExtra atrdPost10 = doc.AnnotationReferenceExtraTable[index];
atrdPost10.Date.Convert(new DateMapping(_writer));
}*/
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
@ -116,8 +141,6 @@ namespace DocFileFormat
}
m_pXmlWriter->WriteNodeEnd(L"w:comment" );
++index;
}
m_pXmlWriter->WriteNodeEnd( L"w:comments" );

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -61,7 +61,7 @@ namespace DocFileFormat
namespace DocFileFormat
{
long Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
_UINT32 Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
{
if (!doc || !docx) return S_FALSE;
@ -202,20 +202,18 @@ namespace DocFileFormat
return S_OK;
}
long Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
_UINT32 Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
{
long result = S_FALSE;
WordDocument doc(progress, m_sTempFolder);
WordprocessingDocument docx(strDstDirectory, &doc);
result = doc.LoadDocument(strSrcFile, password);
_UINT32 result = doc.LoadDocument(strSrcFile, password);
if (result == S_OK)
if (result == 0)
{
result = Convert(&doc, &docx, progress);
if (result == S_OK)
if (result == 0)
{
docx.SaveDocument(bMacros);

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -32,6 +32,7 @@
#pragma once
#include <string>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
struct ProgressCallback;
@ -48,9 +49,9 @@ namespace DocFileFormat
std::wstring m_sTempFolder;
long LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
_UINT32 LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
private:
long Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
_UINT32 Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -45,7 +45,7 @@ namespace DocFileFormat
{
DocumentMapping::DocumentMapping(ConversionContext* context, IMapping* caller) : _skipRuns(0), _lastValidPapx(NULL), _lastValidSepx(NULL),
AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() ), _sectionNr(0), _footnoteNr(0),
_endnoteNr(0), _commentNr(0), _caller(caller)
_endnoteNr(0), _commentNr(1), _caller(caller)
{
m_document = NULL;
m_context = context;
@ -484,6 +484,266 @@ namespace DocFileFormat
return result_cp;
}
void DocumentMapping::writeField(const std::wstring& sFieldString, int cpFieldStart, int cpFieldEnd)
{
_fieldLevels.push_back(fieldLevels());
std::vector<std::wstring> arField;
boost::algorithm::split(arField, sFieldString, boost::algorithm::is_any_of(L"\\"), boost::algorithm::token_compress_on);
std::wstring f;
std::wstring EMBED ( L"EMBED" );
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" );
std::wstring SHAPE ( L"SHAPE" );
if (arField.empty() == false)
f = arField[0];
else
f = sFieldString;
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() ||
search( f.begin(), f.end(), embed.begin(), embed.end()) != f.end();
bool bLINK = search( f.begin(), f.end(), LINK.begin(), LINK.end()) != f.end();
bool bOpendocument = search( f.begin(), f.end(), opendocument.begin(), opendocument.end()) != f.end();
bool bFORM = search( f.begin(), f.end(), FORM.begin(), FORM.end()) != f.end();
bool bMERGEFORMAT = search( f.begin(), f.end(), MERGEFORMAT.begin(), MERGEFORMAT.end()) != f.end();
bool bExcel = search( f.begin(), f.end(), Excel.begin(), Excel.end()) != f.end();
bool bWord = search( f.begin(), f.end(), Word.begin(), Word.end()) != f.end();
bool bHYPERLINK = search( f.begin(), f.end(), HYPERLINK.begin(), HYPERLINK.end()) != f.end();
bool bQUOTE = search( f.begin(), f.end(), QUOTE.begin(), QUOTE.end()) != f.end();
bool bEquation = search( f.begin(), f.end(), Equation.begin(), Equation.end()) != f.end();
bool bPAGE = search( f.begin(), f.end(), PAGE.begin(), PAGE.end()) != f.end();
bool bTOC = search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end();
bool bSHAPE = search( f.begin(), f.end(), SHAPE.begin(), SHAPE.end()) != f.end();
bool bPAGEREF = false;
if (bHYPERLINK && arField.size() > 1)
{
std::wstring f1 = arField[1];
bPAGEREF = search( f1.begin(), f1.end(), PAGEREF.begin(), PAGEREF.end()) != f1.end();
}
if (bTOC)
_bContentWrite = true;
if ( bFORM )
{
std::wstring FORMTEXT ( L" FORMTEXT" );
std::wstring FORMCHECKBOX ( L" FORMCHECKBOX" );
std::wstring FORMDROPDOWN ( L" FORMDROPDOWN" );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar" , true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType" , L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
bool bFORMTEXT = search( f.begin(), f.end(), FORMTEXT.begin(), FORMTEXT.end()) != f.end();
bool bFORMCHECKBOX = search( f.begin(), f.end(), FORMCHECKBOX.begin(), FORMCHECKBOX.end()) != f.end();
bool bFORMDROPDOWN = search( f.begin(), f.end(), FORMDROPDOWN.begin(), FORMDROPDOWN.end()) != f.end();
if (bFORMTEXT || bFORMCHECKBOX || bFORMDROPDOWN)
{
int cpPic = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::Picture );
if (cpPic < cpFieldEnd)
{
int fcPic = m_document->FindFileCharPos( cpPic );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions(fcPic, fcPic + 1);
if (chpxs)
{
CharacterPropertyExceptions* chpxSep = chpxs->front();
FormFieldData ffdata (2, chpxSep, m_document->DataStream, false);
FormFieldDataMapping data_mapping(m_pXmlWriter, m_context, _caller);
ffdata.Convert(&data_mapping);
RELEASEOBJECT( chpxs );
}
}
}
m_pXmlWriter->WriteNodeEnd( L"w:fldChar" );
_fieldLevels.back().bBegin = true;
}
else if ( ( bMERGEFORMAT || bExcel || bWord || bOpendocument )
&&
( ( bEMBED || bLINK ) && bChart) )
{
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( L"w:fldChar" );
_fieldLevels.back().bBegin = true;
}
else if (bHYPERLINK && bPAGEREF)
{
int cpFieldSep2 = cpFieldStart, cpFieldSep1 = cpFieldStart;
std::vector<std::wstring> toc;
if (arField.size() > 1)
f = arField[1];
if ( _bContentWrite )
{
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_fieldLevels.back().bBegin = true;
}
else
{
for (size_t i = 1; i < arField.size(); i++)
{
std::wstring f1 = arField[1];
int d = (int)f1.find(PAGEREF);
if (d > 0)
{
_writeWebHidden = true;
std::wstring _writeTocLink =f1.substr(d + 9);
d = (int)_writeTocLink.find(L" ");
_writeTocLink = _writeTocLink.substr(0, d);
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun += _writeTocLink;
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
break;
//cp = cpFieldSep1;
}
//cpFieldSep1 = cpFieldSep2;
}
_skipRuns = 5; //with separator
}
}
else if ( bEMBED || (bLINK && !bHYPERLINK)|| bQUOTE)
{
int cpPic = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::Picture);
int cpFieldSep = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::FieldSeparator);
if (cpPic < cpFieldEnd)
{
int fcPic = m_document->FindFileCharPos( cpPic );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions(fcPic, fcPic + 1);
CharacterPropertyExceptions* chpxObj = chpxs->front();
RevisionData oData = RevisionData(chpxObj);
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, &oData, _lastValidPapx, false);
if(rPr)
{
chpxObj->Convert(rPr);
RELEASEOBJECT(rPr);
}
XMLTools::CStringXmlWriter oleWriter;
XMLTools::CStringXmlWriter oleObjectWriter;
VMLPictureMapping oVmlMapper (m_context, &oleWriter, true, _caller);
if (!m_shapeIdOwner.empty()) //4571833.doc
oVmlMapper.m_shapeId = m_shapeIdOwner;
if (m_document->nWordVersion > 0)
{
OleObject ole ( chpxObj, m_document);
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);
ole.Convert( &oleObjectMapping );
_lastOLEObject = oleObjectWriter.GetXmlString();
}
else
{
PictureDescriptor pic(chpxObj, m_document->DataStream, 0x7fffffff, m_document->nWordVersion);
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);
if ( cpFieldSep < cpFieldEnd && m_document->m_PieceTable)
{
int fcFieldSep = m_document->m_PieceTable->FileCharacterPositions->operator []( cpFieldSep );
int fcFieldSep1 = m_document->FindFileCharPos( cpFieldSep );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions( fcFieldSep, ( fcFieldSep + 1 ) );
CharacterPropertyExceptions* chpxSep = chpxs->front();
OleObject ole ( chpxSep, m_document);
OleObjectMapping oleObjectMapping( &oleObjectWriter, m_context, &pic, _caller, oVmlMapper.m_shapeId );
if (oVmlMapper.m_isEmbedded)
{
ole.isEquation = oVmlMapper.m_isEquation;
ole.isEmbedded = oVmlMapper.m_isEmbedded;
ole.emeddedData = oVmlMapper.m_embeddedData;
}
ole.Convert( &oleObjectMapping );
_lastOLEObject = oleObjectWriter.GetXmlString();
RELEASEOBJECT( chpxs );
}
}
oleWriter.WriteString( _lastOLEObject );
oleWriter.WriteNodeEnd( L"w:object" );
if (!oVmlMapper.m_isEmbedded && oVmlMapper.m_isEquation)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
}
else
{
m_pXmlWriter->WriteString(oleWriter.GetXmlString());
}
}
_skipRuns = 3;
_embeddedObject = true;
}
else
{
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_fieldLevels.back().bBegin = true;
}
}
// Writes the given text to the document
int DocumentMapping::writeText(std::vector<wchar_t>* chars, int initialCp, CharacterPropertyExceptions* chpx, bool writeDeletedText)
{
@ -506,7 +766,7 @@ namespace DocFileFormat
}
//write text
for (unsigned int i = 0; i < chars->size(); ++i)
for (size_t i = 0; i < chars->size(); ++i)
{
wchar_t c = chars->at(i), code = c;
@ -526,7 +786,20 @@ namespace DocFileFormat
text.clear();
XMLTools::XMLElement elem(L"w:br");
if (textType == L"instrText")
{
m_pXmlWriter->WriteNodeEnd(L"w:r");
m_pXmlWriter->WriteNodeBegin(L"w:r");
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, NULL, _lastValidPapx, false);
if (rPr)
{
rPr->_webHidden = _writeWebHidden;
chpx->Convert(rPr);
RELEASEOBJECT(rPr);
}
}
XMLTools::XMLElement elem(L"w:br");
elem.AppendAttribute(L"w:type", L"textWrapping");
elem.AppendAttribute(L"w:clear", L"all");
@ -563,287 +836,15 @@ namespace DocFileFormat
}
else if (TextMark::FieldBeginMark == code)
{
_fieldLevels.push_back(fieldLevels());
int cpFieldStart = initialCp + i;
int cpFieldEnd = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::FieldEndMark );
std::wstring f, sFieldString;
std::wstring sFieldString;
if (cpFieldEnd < (int)m_document->Text->size())
sFieldString = std::wstring( ( m_document->Text->begin() + cpFieldStart ), ( m_document->Text->begin() + cpFieldEnd + 1 ) );
std::vector<std::wstring> arField;
boost::algorithm::split(arField, sFieldString, boost::algorithm::is_any_of(L"\\"), boost::algorithm::token_compress_on);
std::wstring EMBED ( L"EMBED" );
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" );
writeField(sFieldString, cpFieldStart, cpFieldEnd);
if (arField.empty() == false)
f = arField[0];
else
f = sFieldString;
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() ||
search( f.begin(), f.end(), embed.begin(), embed.end()) != f.end();
bool bLINK = search( f.begin(), f.end(), LINK.begin(), LINK.end()) != f.end();
bool bOpendocument = search( f.begin(), f.end(), opendocument.begin(), opendocument.end()) != f.end();
bool bFORM = search( f.begin(), f.end(), FORM.begin(), FORM.end()) != f.end();
bool bMERGEFORMAT = search( f.begin(), f.end(), MERGEFORMAT.begin(), MERGEFORMAT.end()) != f.end();
bool bExcel = search( f.begin(), f.end(), Excel.begin(), Excel.end()) != f.end();
bool bWord = search( f.begin(), f.end(), Word.begin(), Word.end()) != f.end();
bool bHYPERLINK = search( f.begin(), f.end(), HYPERLINK.begin(), HYPERLINK.end()) != f.end();
bool bQUOTE = search( f.begin(), f.end(), QUOTE.begin(), QUOTE.end()) != f.end();
bool bEquation = search( f.begin(), f.end(), Equation.begin(), Equation.end()) != f.end();
bool bPAGE = search( f.begin(), f.end(), PAGE.begin(), PAGE.end()) != f.end();
bool bTOC = search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end();
bool bPAGEREF = false;
if (bHYPERLINK && arField.size() > 1)
{
std::wstring f1 = arField[1];
bPAGEREF = search( f1.begin(), f1.end(), PAGEREF.begin(), PAGEREF.end()) != f1.end();
}
if (bTOC)
_bContentWrite = true;
if ( bFORM )
{
std::wstring FORMTEXT ( L" FORMTEXT" );
std::wstring FORMCHECKBOX ( L" FORMCHECKBOX" );
std::wstring FORMDROPDOWN ( L" FORMDROPDOWN" );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar" , true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType" , L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
bool bFORMTEXT = search( f.begin(), f.end(), FORMTEXT.begin(), FORMTEXT.end()) != f.end();
bool bFORMCHECKBOX = search( f.begin(), f.end(), FORMCHECKBOX.begin(), FORMCHECKBOX.end()) != f.end();
bool bFORMDROPDOWN = search( f.begin(), f.end(), FORMDROPDOWN.begin(), FORMDROPDOWN.end()) != f.end();
if (bFORMTEXT || bFORMCHECKBOX || bFORMDROPDOWN)
{
int cpPic = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::Picture );
if (cpPic < cpFieldEnd)
{
int fcPic = m_document->FindFileCharPos( cpPic );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions(fcPic, fcPic + 1);
if (chpxs)
{
CharacterPropertyExceptions* chpxSep = chpxs->front();
FormFieldData ffdata (2, chpxSep, m_document->DataStream, false);
FormFieldDataMapping data_mapping(m_pXmlWriter, m_context, _caller);
ffdata.Convert(&data_mapping);
RELEASEOBJECT( chpxs );
}
}
}
m_pXmlWriter->WriteNodeEnd( L"w:fldChar" );
_fieldLevels.back().bBegin = true;
}
else if ( ( bMERGEFORMAT || bExcel || bWord || bOpendocument )
&&
( ( bEMBED || bLINK ) && bChart) )
{
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( L"w:fldChar" );
_fieldLevels.back().bBegin = true;
}
else if (bHYPERLINK && bPAGEREF)
{
int cpFieldSep2 = cpFieldStart, cpFieldSep1 = cpFieldStart;
std::vector<std::wstring> toc;
if (arField.size() > 1)
f = arField[1];
if ( _bContentWrite )
{
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_fieldLevels.back().bBegin = true;
}
else
{
for (size_t i = 1; i < arField.size(); i++)
{
std::wstring f1 = arField[1];
int d = (int)f1.find(PAGEREF);
if (d > 0)
{
_writeWebHidden = true;
std::wstring _writeTocLink =f1.substr(d + 9);
d = (int)_writeTocLink.find(L" ");
_writeTocLink = _writeTocLink.substr(0, d);
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun += _writeTocLink;
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
break;
//cp = cpFieldSep1;
}
//cpFieldSep1 = cpFieldSep2;
}
_skipRuns = 5; //with separator
}
}
//else if ( bHYPERLINK )
//{//todooo - выделение гиперссылки отдельно
// std::vector<std::wstring> arRefs;
// boost::algorithm::split(arRefs, f, boost::algorithm::is_any_of(L" "), boost::algorithm::token_compress_on);
//
// std::wstring sLink = arRefs[2];
// m_pXmlWriter->WriteNodeBegin( L"w:hyperlink", true );
// int relID = m_context->_docx->RegisterHyperlink(_caller, sLink);
// m_pXmlWriter->WriteAttribute( L"r:id", L"rId"+ FormatUtils::IntToWideString( relID ) );
// m_pXmlWriter->WriteAttribute( L"w:history", 1 );
// m_pXmlWriter->WriteNodeEnd( L"", true, false );
// if (arRefs.size() > 2)
// {
// writeTextElement(arRefs[3].substr(1, arRefs[3].length() - 2), textType);
// }
// m_pXmlWriter->WriteNodeEnd( L"w:hyperlink", false, true );
// _skipRuns = 1;
//}
else if ( bEMBED || (bLINK && !bHYPERLINK)|| bQUOTE)
{
int cpPic = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::Picture);
int cpFieldSep = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::FieldSeparator);
if (cpPic < cpFieldEnd)
{
int fcPic = m_document->FindFileCharPos( cpPic );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions(fcPic, fcPic + 1);
CharacterPropertyExceptions* chpxObj = chpxs->front();
RevisionData oData = RevisionData(chpxObj);
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, &oData, _lastValidPapx, false);
if(rPr)
{
chpxObj->Convert(rPr);
RELEASEOBJECT(rPr);
}
XMLTools::CStringXmlWriter oleWriter;
XMLTools::CStringXmlWriter oleObjectWriter;
VMLPictureMapping oVmlMapper (m_context, &oleWriter, true, _caller);
if (!m_shapeIdOwner.empty()) //4571833.doc
oVmlMapper.m_shapeId = m_shapeIdOwner;
if (m_document->nWordVersion > 0)
{
OleObject ole ( chpxObj, m_document);
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);
ole.Convert( &oleObjectMapping );
_lastOLEObject = oleObjectWriter.GetXmlString();
}
else
{
PictureDescriptor pic(chpxObj, m_document->DataStream, 0x7fffffff, m_document->nWordVersion);
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);
if ( cpFieldSep < cpFieldEnd && m_document->m_PieceTable)
{
int fcFieldSep = m_document->m_PieceTable->FileCharacterPositions->operator []( cpFieldSep );
int fcFieldSep1 = m_document->FindFileCharPos( cpFieldSep );
std::list<CharacterPropertyExceptions*>* chpxs = m_document->GetCharacterPropertyExceptions( fcFieldSep, ( fcFieldSep + 1 ) );
CharacterPropertyExceptions* chpxSep = chpxs->front();
OleObject ole ( chpxSep, m_document);
OleObjectMapping oleObjectMapping( &oleObjectWriter, m_context, &pic, _caller, oVmlMapper.m_shapeId );
if (oVmlMapper.m_isEmbedded)
{
ole.isEquation = oVmlMapper.m_isEquation;
ole.isEmbedded = oVmlMapper.m_isEmbedded;
ole.emeddedData = oVmlMapper.m_embeddedData;
}
ole.Convert( &oleObjectMapping );
_lastOLEObject = oleObjectWriter.GetXmlString();
RELEASEOBJECT( chpxs );
}
}
oleWriter.WriteString( _lastOLEObject );
oleWriter.WriteNodeEnd( L"w:object" );
if (!oVmlMapper.m_isEmbedded && oVmlMapper.m_isEquation)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
}
else
{
m_pXmlWriter->WriteString(oleWriter.GetXmlString());
}
}
_skipRuns = 3;
_embeddedObject = true;
}
else
{
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_fieldLevels.back().bBegin = true;
}
}
else if (TextMark::FieldSeparator == code)
{
@ -916,7 +917,7 @@ namespace DocFileFormat
PictureDescriptor pictDiscr(chpx, m_document->WordDocumentStream, 0x7fffffff, m_document->nWordVersion);
ShapeContainer* pShape = m_document->GetOfficeArt()->GetShapeContainer(pSpa->GetShapeID());
if (pShape)
if ((pShape) /*&& (false == pShape->isLastIdentify())*/)
{
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, pSpa, &pictDiscr, _caller);
@ -950,55 +951,64 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeEnd (L"w:pict");
}
else if ((oPicture.mfp.mm > 98) && (NULL != oPicture.shapeContainer))
else if ((oPicture.mfp.mm > 98) && (NULL != oPicture.shapeContainer)/* && (false == oPicture.shapeContainer->isLastIdentify())*/)
{
bool bFormula = false;
XMLTools::CStringXmlWriter pictWriter;
pictWriter.WriteNodeBegin (L"w:pict");
bool picture = true;
bool bPicture = true;
bool m_bSkip = false;
if (oPicture.shapeContainer)
{
int shape_type = oPicture.shapeContainer->getShapeType();
if (oPicture.shapeContainer->m_nShapeType != msosptPictureFrame)
bPicture = false;//шаблон 1.doc картинка в колонтитуле
if (shape_type != msosptPictureFrame) picture = false;//шаблон 1.doc картинка в колонтитуле
m_bSkip = oPicture.shapeContainer->m_bSkip;
}
if (picture)
if (!m_bSkip)
{
VMLPictureMapping oVmlMapper(m_context, &pictWriter, false, _caller, isInline);
oPicture.Convert (&oVmlMapper);
if (oVmlMapper.m_isEmbedded)
bool bFormula = false;
XMLTools::CStringXmlWriter pictWriter;
pictWriter.WriteNodeBegin (L"w:pict");
if (bPicture)
{
OleObject ole ( chpx, m_document);
OleObjectMapping oleObjectMapping( &pictWriter, m_context, &oPicture, _caller, oVmlMapper.m_shapeId );
VMLPictureMapping oVmlMapper(m_context, &pictWriter, false, _caller, isInline);
oPicture.Convert (&oVmlMapper);
ole.isEquation = oVmlMapper.m_isEquation;
ole.isEmbedded = oVmlMapper.m_isEmbedded;
ole.emeddedData = oVmlMapper.m_embeddedData;
ole.Convert( &oleObjectMapping );
if (oVmlMapper.m_isEmbedded)
{
OleObject ole ( chpx, m_document);
OleObjectMapping oleObjectMapping( &pictWriter, m_context, &oPicture, _caller, oVmlMapper.m_shapeId );
ole.isEquation = oVmlMapper.m_isEquation;
ole.isEmbedded = oVmlMapper.m_isEmbedded;
ole.emeddedData = oVmlMapper.m_embeddedData;
ole.Convert( &oleObjectMapping );
}
else if (oVmlMapper.m_isEquation)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
bFormula = true;
}
else if (oVmlMapper.m_isBlob)
{
_writeAfterRun = oVmlMapper.m_blobXml;
bFormula = true;
}
}
else if (oVmlMapper.m_isEquation)
else
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
_writeAfterRun = oVmlMapper.m_equationXml;
bFormula = true;
VMLShapeMapping oVmlMapper(m_context, &pictWriter, NULL, &oPicture, _caller, isInline);
oPicture.shapeContainer->Convert(&oVmlMapper);
}
}else
{
VMLShapeMapping oVmlMapper(m_context, &pictWriter, NULL, &oPicture, _caller, isInline);
oPicture.shapeContainer->Convert(&oVmlMapper);
}
pictWriter.WriteNodeEnd (L"w:pict");
pictWriter.WriteNodeEnd (L"w:pict");
if (!bFormula)
m_pXmlWriter->WriteString(pictWriter.GetXmlString());
if (!bFormula)
m_pXmlWriter->WriteString(pictWriter.GetXmlString());
}
}
}
@ -1007,6 +1017,11 @@ namespace DocFileFormat
if ((m_document->FootnoteReferenceCharactersPlex != NULL) && (m_document->FootnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( L"w:footnoteReference", true );
FootnoteDescriptor* desc = dynamic_cast<FootnoteDescriptor*>(m_document->FootnoteReferenceCharactersPlex->Elements[_footnoteNr]);
if (desc && desc->aFtnIdx == 0)
{
m_pXmlWriter->WriteAttribute( L"w:customMarkFollows", L"1");
}
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString(_footnoteNr++ ) );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
@ -1018,6 +1033,11 @@ namespace DocFileFormat
else if ((m_document->EndnoteReferenceCharactersPlex != NULL) && (m_document->EndnoteReferenceCharactersPlex->IsCpExists(cp)))
{
m_pXmlWriter->WriteNodeBegin( L"w:endnoteReference", true );
EndnoteDescriptor* desc = dynamic_cast<EndnoteDescriptor*>(m_document->EndnoteReferenceCharactersPlex->Elements[_endnoteNr]);
if (desc && desc->aEndIdx == 0)
{
m_pXmlWriter->WriteAttribute( L"w:customMarkFollows", L"1");
}
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString(_endnoteNr++ ));
m_pXmlWriter->WriteNodeEnd( L"", true );
}
@ -1035,10 +1055,10 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeBegin( L"w:annotationRef", true );
m_pXmlWriter->WriteNodeEnd( L"", true );
}
else
else if ((m_document->AnnotationsReferencePlex) && (_commentNr <= m_document->AnnotationsReferencePlex->Elements.size()))
{
m_pXmlWriter->WriteNodeBegin( L"w:commentReference", true );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( _commentNr ));
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( _commentNr++ ));
m_pXmlWriter->WriteNodeEnd( L"", true );
}
}
@ -1049,7 +1069,21 @@ namespace DocFileFormat
cp++;
}
if (std::wstring::npos != text.find(L"EMBED"))
{//если есть мааркер конца поля и маркер замещающей картинки и нету маркера начала
//О реорганизации территориальных органов ПФР с 01.11.2018.doc
int cpFieldStart = initialCp;
int cpPic = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::Picture);
int cpFieldEnd = searchNextTextMark( m_document->Text, cpFieldStart, TextMark::FieldEndMark );
bool bStartField = _fieldLevels.empty() ? false : (_fieldLevels.back().bBegin && !_fieldLevels.back().bSeparate);
if (cpFieldStart < cpPic && cpPic < cpFieldEnd && !bStartField)
{
writeField(text, cpFieldStart, cpFieldEnd);
text.clear();
}
}
if (!text.empty())
{
//bool preserve_space = (text.find(L"\x20")) != text.npos) ? true : false;
@ -1190,7 +1224,7 @@ namespace DocFileFormat
// add the parts
for (unsigned int i = 0; i < splitIndices->size(); ++i)
for (size_t i = 0; i < splitIndices->size(); ++i)
{
int cch = splitIndices->at( i ) - startIndex;
@ -1319,6 +1353,8 @@ namespace DocFileFormat
{
iTap_current = FormatUtils::BytesToUInt32( iter->Arguments, 0, iter->argumentsSize );
}break;
default:
break;
}
}
if (nestingLevel == iTap_current)
@ -1348,6 +1384,8 @@ namespace DocFileFormat
AddBoundary(boundary2, max_boundary, boundaries);
}break;
default:
break;
}
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -85,21 +85,17 @@ namespace DocFileFormat
int getCurrentSection (int cp);
//---------------------------------
bool isSectionEnd ( int cp );
// Writes a Paragraph that starts at the given cp and
// ends at the next paragraph end mark or section end mark
int writeParagraph( int cp, int cpEnd );
// Writes a Paragraph that starts at the given cpStart and
// ends at the given cpEnd
int writeParagraph( int initialCp, int cpEnd, bool sectionEnd, bool lastBad = false );
// Writes a Paragraph RSID
void writeParagraphRsid( const ParagraphPropertyExceptions* papx );
// Writes a run with the given characters and CHPX
int writeRun( std::vector<wchar_t>* chars, CharacterPropertyExceptions* chpx, int initialCp );
// Writes the given text to the document
int writeText ( std::vector<wchar_t>* chars, int initialCp, CharacterPropertyExceptions* chpx, bool writeDeletedText );
int writeText ( std::vector<wchar_t>* chars, int initialCp, CharacterPropertyExceptions* chpx, bool writeDeletedText );
void writeParagraphRsid ( const ParagraphPropertyExceptions* papx );
void writeTextElement ( const std::wstring& text, const std::wstring& textType );
void writeTextStart ( const std::wstring& textType, bool preserve_space);
void writeTextEnd ( const std::wstring& textType );
void writeField (const std::wstring& sFieldString, int cpFieldStart, int cpFieldEnd);
std::vector<int> searchBookmarks( std::vector<wchar_t>* chars, int initialCp );
std::vector<int> searchAnnot(std::vector<wchar_t>* chars, int initialCp);

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -37,21 +37,14 @@ namespace DocFileFormat
{
class EndnoteDescriptor: public ByteStructure
{
private:
short aEndIdx;
public:
static const int STRUCTURE_SIZE = 2;
EndnoteDescriptor():
aEndIdx(0)
{
}
EndnoteDescriptor(): aEndIdx(0) {}
virtual ~EndnoteDescriptor()
{
}
}
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length )
{
EndnoteDescriptor *newObject = new EndnoteDescriptor();
@ -60,5 +53,7 @@ namespace DocFileFormat
return static_cast<ByteStructure*>( newObject );
}
short aEndIdx;
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -110,7 +110,7 @@ namespace DocFileFormat
typedef struct FibWord2
{
unsigned int Spare = 0;
unsigned char rgwSpare0[3];
unsigned short rgwSpare0[3];
unsigned int fcPlcMcr = 0;
unsigned int lcbPlcMcr = 0;
@ -560,8 +560,7 @@ namespace DocFileFormat
m_FibWord97.fcPlcffndRef = reader.ReadInt32();
m_FibWord97.lcbPlcffndRef = reader.ReadInt32();
m_FibWord97.lcbPlcfandTxt = reader.ReadInt32();//112
m_FibWord97.fcPlcffndTxt = reader.ReadInt32();//112
m_FibWord97.lcbPlcffndTxt = reader.ReadInt32();
m_FibWord97.fcPlcfandRef = reader.ReadInt32();
@ -1313,10 +1312,10 @@ namespace DocFileFormat
flag16 = reader.ReadUInt16(); //10
m_FibBase.fDot = (flag16 & 0x0001) >> 2;
m_FibBase.fGlsy = (flag16 & 0x0002) >> 1;
m_FibBase.fComplex = (flag16 & 0x0004) >> 2;
m_FibBase.fHasPic = (flag16 & 0x0008) >> 3;
m_FibBase.fDot = ((flag16 & 0x0001) >> 2) != 0;
m_FibBase.fGlsy = ((flag16 & 0x0002) >> 1) != 0;
m_FibBase.fComplex = ((flag16 & 0x0004) >> 2) != 0;
m_FibBase.fHasPic = ((flag16 & 0x0008) >> 3) != 0;
m_FibBase.cQuickSaves = (WORD)(((int)flag16 & 0x00F0) >> 4);
m_FibBase.fEncrypted = FormatUtils::BitmaskToBool((int)flag16, 0x0100);
m_FibBase.fWhichTblStm = FormatUtils::BitmaskToBool((int)flag16, 0x0200);

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -37,21 +37,15 @@ namespace DocFileFormat
{
class FootnoteDescriptor: public ByteStructure
{
private:
short aFtnIdx;
public:
static const int STRUCTURE_SIZE = 2;
FootnoteDescriptor():
aFtnIdx(0)
{
}
FootnoteDescriptor() : aFtnIdx(0) {}
virtual ~FootnoteDescriptor()
{
}
}
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length )
{
FootnoteDescriptor *newObject = new FootnoteDescriptor();
@ -60,5 +54,7 @@ namespace DocFileFormat
return static_cast<ByteStructure*>( newObject );
}
short aFtnIdx;
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -63,7 +63,35 @@ namespace DocFileFormat
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->WriteAttribute( L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" );
m_pXmlWriter->WriteAttribute( L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
m_pXmlWriter->WriteAttribute( L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute( L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute( L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk" );
m_pXmlWriter->WriteAttribute( L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape" );
m_pXmlWriter->WriteAttribute( L"xmlns:a", L"http://schemas.openxmlformats.org/drawingml/2006/main" );
m_pXmlWriter->WriteAttribute( L"xmlns:m", L"http://schemas.openxmlformats.org/officeDocument/2006/math" );
m_pXmlWriter->WriteAttribute( L"mc:Ignorable", L"w14 wp14" );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//m_pXmlWriter->WriteNodeBegin( L"w:footnote", TRUE );
//m_pXmlWriter->WriteAttribute( L"w:type", L"separator");
//m_pXmlWriter->WriteAttribute( L"w:id", L"-1");
//m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//m_pXmlWriter->WriteString(L"<w:p><w:pPr><w:spacing w:lineRule=\"auto\" w:line=\"240\" w:after=\"0\"/></w:pPr><w:r></w:r><w:r><w:separator/></w:r></w:p>");
//m_pXmlWriter->WriteNodeEnd( L"w:footnote");
//m_pXmlWriter->WriteNodeBegin( L"w:footnote", TRUE );
//m_pXmlWriter->WriteAttribute( L"w:type", L"continuationSeparator");
//m_pXmlWriter->WriteAttribute( L"w:id", L"0");
//m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//m_pXmlWriter->WriteString(L"<w:p><w:pPr><w:spacing w:lineRule=\"auto\" w:line=\"240\" w:after=\"0\"/></w:pPr><w:r></w:r><w:r><w:continuationSeparator/></w:r></w:p>");
//m_pXmlWriter->WriteNodeEnd( L"w:footnote");
int cp = m_document->FIB->m_RgLw97.ccpText;

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -46,7 +46,7 @@ std::wstring readXstz(VirtualStreamReader *reader)
std::wstring ret;
if (cch > 0)
if (cch > 0 && cch < 0x0fff)
{
std::shared_ptr<unsigned char>data = std::shared_ptr<unsigned char>(reader->ReadBytes(cch * 2, true));
#if defined(_WIN32) || defined(_WIN64)
@ -134,6 +134,8 @@ FormFieldData::FormFieldData( int type, const CharacterPropertyExceptions* chpx,
bNilPICFAndBinData = true; // or bPICFAndOfficeArtData - shape, pic, ole
}
break;
default:
break;
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -32,6 +32,8 @@
#include "ListData.h"
#include <boost/make_shared.hpp>
#include <algorithm>
#include <functional>
#include <cctype>
@ -46,6 +48,11 @@ namespace DocFileFormat
RELEASEOBJECT(rglvl);
}
ListDataPtr ListData::create(VirtualStreamReader* reader, int length)
{
return boost::make_shared<ListData>(reader, length);
}
// Parses the StreamReader to retrieve a ListData
ListData::ListData(VirtualStreamReader* reader, int length) : rglvl(NULL)
@ -80,9 +87,85 @@ namespace DocFileFormat
grfhic = reader->ReadByte();
}
NumberingDescriptorPtr NumberingDescriptor::create(unsigned char * data, int length)
{
return boost::make_shared<NumberingDescriptor>(data, length);
}
bool NumberingDescriptor::operator == (const NumberingDescriptor & val) const
{
const bool res =
nfc == val.nfc &&
cbTextBefore == val.cbTextBefore &&
cbTextAfter == val.cbTextAfter &&
jc == val.jc &&
fPrev == val.fPrev &&
fHang == val.fHang &&
fSetBold == val.fSetBold &&
fSetItalic == val.fSetItalic &&
fSetSmallCaps == val.fSetSmallCaps &&
fSetCaps == val.fSetCaps &&
fSetStrike == val.fSetStrike &&
fSetKul == val.fSetKul &&
fPrevSpace == val.fPrevSpace &&
fBold == val.fBold &&
fItalic == val.fItalic &&
fSmallCaps == val.fSmallCaps &&
fCaps == val.fCaps &&
fStrike == val.fStrike &&
kul == val.kul &&
ico == val.ico &&
ftc == val.ftc &&
hps == val.hps &&
iStartAt == val.iStartAt &&
dxaIndent == val.dxaIndent &&
dxaSpace == val.dxaSpace &&
fNumber1 == val.fNumber1 &&
fNumberAcross == val.fNumberAcross &&
fRestartHdn == val.fRestartHdn &&
fSpareX == val.fSpareX;
return res;
}
bool NumberingDescriptor::operator == (const NumberingDescriptorPtr & val) const
{
if (!val) return false;
const bool res =
nfc == val->nfc &&
cbTextBefore == val->cbTextBefore &&
cbTextAfter == val->cbTextAfter &&
jc == val->jc &&
fPrev == val->fPrev &&
fHang == val->fHang &&
fSetBold == val->fSetBold &&
fSetItalic == val->fSetItalic &&
fSetSmallCaps == val->fSetSmallCaps &&
fSetCaps == val->fSetCaps &&
fSetStrike == val->fSetStrike &&
fSetKul == val->fSetKul &&
fPrevSpace == val->fPrevSpace &&
fBold == val->fBold &&
fItalic == val->fItalic &&
fSmallCaps == val->fSmallCaps &&
fCaps == val->fCaps &&
fStrike == val->fStrike &&
kul == val->kul &&
ico == val->ico &&
ftc == val->ftc &&
hps == val->hps &&
iStartAt == val->iStartAt &&
dxaIndent == val->dxaIndent &&
dxaSpace == val->dxaSpace &&
fNumber1 == val->fNumber1 &&
fNumberAcross == val->fNumberAcross &&
fRestartHdn == val->fRestartHdn &&
fSpareX == val->fSpareX;
return res;
}
NumberingDescriptor::NumberingDescriptor( unsigned char * data, int length )
{
id = 0;
nfc = FormatUtils::BytesToUChar(data, 0, length);
cbTextBefore = FormatUtils::BytesToUChar(data, 1, length);
cbTextAfter = FormatUtils::BytesToUChar(data, 2, length);

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -36,6 +36,9 @@
namespace DocFileFormat
{
class ListData;
typedef class boost::shared_ptr<ListData> ListDataPtr;
class ListData
{
friend class ListTable;
@ -74,15 +77,20 @@ namespace DocFileFormat
virtual ~ListData();
ListData( VirtualStreamReader* reader, int length );
static ListDataPtr create(VirtualStreamReader* reader, int length);
};
class NumberingDescriptor;
typedef class boost::shared_ptr<NumberingDescriptor> NumberingDescriptorPtr;
class NumberingDescriptor : public IVisitable
{
friend class ListTable;
friend class NumberingMapping;
private:
size_t id;
unsigned char nfc;
unsigned char cbTextBefore;
unsigned char cbTextAfter;
@ -121,9 +129,15 @@ namespace DocFileFormat
std::wstring xst; //32 chars ansi
public:
bool operator == (const NumberingDescriptor & val) const;
bool operator == (const NumberingDescriptorPtr & val) const;
virtual ~NumberingDescriptor(){}
// Parses the given StreamReader to retrieve a ANLD struct
NumberingDescriptor( unsigned char * data, int length ); //cbANLD (count of bytes of ANLD) is 52
static NumberingDescriptorPtr create(unsigned char * data, int length);
};

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -38,7 +38,6 @@ namespace DocFileFormat
{
ListTable::~ListTable()
{
for_each( this->listData.begin(), this->listData.end(), DeleteDynamicObject() );
}
ListTable::ListTable( FileInformationBlock* fib, POLE::Stream* tableStream )
@ -59,23 +58,32 @@ namespace DocFileFormat
//read the LSTF structs
for ( int i = 0; i < count; i++ )
{
listData.push_back( new ListData( &reader, ListData::VARIABLE_LENGTH ) );
listData.push_back( ListData::create( &reader, ListData::VARIABLE_LENGTH ) );
}
//read the LVLF structs
for ( std::list<ListData*>::iterator iter = listData.begin(); iter != listData.end(); iter++ )
for ( size_t i = 0; i < listData.size(); ++i)
{
for ( unsigned int j = 0; j < (*iter)->rglvl->size(); j++ )
for ( size_t j = 0; j < listData[i]->rglvl->size(); j++ )
{
(*iter)->rglvl->operator []( j ) = new ListLevel( &reader, ListData::VARIABLE_LENGTH );
listData[i]->rglvl->operator []( j ) = new ListLevel( &reader, ListData::VARIABLE_LENGTH );
}
}
}
}
void ListTable::appendNumbering( const NumberingDescriptor & desc )
size_t ListTable::appendNumbering( NumberingDescriptorPtr &desc )
{
for (size_t i = 0; i < listNumbering.size(); ++i)
{
if (listNumbering[i]->operator==(desc))
{
return listNumbering[i]->id;
}
}
desc->id = listData.size() + listNumbering.size()/* + 1*/;
listNumbering.push_back(desc);
return desc->id;
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -41,12 +41,12 @@ namespace DocFileFormat
class ListTable: public IVisitable
{
public:
std::list<ListData*> listData;
std::list<NumberingDescriptor> listNumbering;
std::vector<ListDataPtr> listData;
std::vector<NumberingDescriptorPtr> listNumbering;
virtual ~ListTable();
ListTable( FileInformationBlock* fib, POLE::Stream* tableStream );
void appendNumbering( const NumberingDescriptor & desc );
size_t appendNumbering( NumberingDescriptorPtr &desc );
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -59,35 +59,52 @@ namespace DocFileFormat
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->WriteAttribute(L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute(L"xmlns:m", L"http://schemas.openxmlformats.org/officeDocument/2006/math");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
//m_pXmlWriter->WriteAttribute(L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
//m_pXmlWriter->WriteAttribute(L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
//m_pXmlWriter->WriteAttribute(L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
//m_pXmlWriter->WriteAttribute(L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
//m_pXmlWriter->WriteAttribute(L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml");
//m_pXmlWriter->WriteAttribute(L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
//m_pXmlWriter->WriteAttribute(L"mc:Ignorable", L"w14 wp14");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteAttribute(L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
m_pXmlWriter->WriteAttribute(L"xmlns:cx", L"http://schemas.microsoft.com/office/drawing/2014/chartex");
m_pXmlWriter->WriteAttribute(L"xmlns:cx1", L"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
m_pXmlWriter->WriteAttribute(L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
m_pXmlWriter->WriteAttribute(L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute(L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute(L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml");
m_pXmlWriter->WriteAttribute(L"xmlns:w15", L"http://schemas.microsoft.com/office/word/2012/wordml");
m_pXmlWriter->WriteAttribute(L"xmlns:w16se", L"http://schemas.microsoft.com/office/word/2015/wordml/symex");
m_pXmlWriter->WriteAttribute(L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
m_pXmlWriter->WriteAttribute(L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
m_pXmlWriter->WriteAttribute(L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml");
m_pXmlWriter->WriteAttribute(L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
m_pXmlWriter->WriteAttribute(L"mc:Ignorable", L"w14 w15 w16se wp14");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
if ((m_document->GetOfficeArt()) && (m_document->GetOfficeArt()->GetShapeBackgound()))
{
bool bFilled = true;
m_document->DocProperties->bDisplayBackgroundShape = true;
ShapeContainer* pShape = m_document->GetOfficeArt()->GetShapeBackgound();
m_pXmlWriter->WriteNodeBegin ( L"w:background", TRUE);
m_pXmlWriter->WriteAttribute ( L"w:color", L"FFFFFF");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, NULL, NULL, _caller);
pShape->Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (L"w:background");
ODRAW::OfficeArtFOPTEPtr boolFill = pShape->ExtractOption(fillStyleBooleanProperties);
ODRAW::FillStyleBooleanProperties* booleans = dynamic_cast<ODRAW::FillStyleBooleanProperties*>(boolFill.get());
if (booleans && (booleans->fUsefFilled && !booleans->fFilled))
{
bFilled = false;
}
if (bFilled)
{
m_pXmlWriter->WriteNodeBegin ( L"w:background", TRUE);
m_pXmlWriter->WriteAttribute ( L"w:color", L"FFFFFF");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, NULL, NULL, _caller);
pShape->Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (L"w:background");
}
}
m_pXmlWriter->WriteNodeBegin( L"w:body", FALSE );

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -78,7 +78,14 @@ public:
return rdUShort;
}
void WriteUInt16(unsigned short val)
{
if (m_Data)
{
((unsigned short *)(m_Data + m_Position))[0] = val;
m_Position += sizeof(unsigned short);
}
}
virtual short ReadInt16()
{
short rdShort = 0;
@ -104,7 +111,14 @@ public:
return rdInt;
}
void WriteInt32(_INT32 val)
{
if (m_Data)
{
((_INT32 *)(m_Data + m_Position))[0] = val;
m_Position += sizeof(_INT32);
}
}
virtual unsigned int ReadUInt32()
{
int rdUInt = 0;
@ -117,7 +131,22 @@ public:
return rdUInt;
}
void WriteByte(unsigned char val)
{
if (m_Data)
{
m_Data[m_Position] = val;
m_Position += 1;
}
}
void WriteUInt32(_UINT32 val)
{
if (m_Data)
{
((_UINT32 *)(m_Data + m_Position))[0] = val;
m_Position += sizeof(_UINT32);
}
}
virtual unsigned char ReadByte()
{
unsigned char rdByte = 0;
@ -159,6 +188,14 @@ public:
return pBytes;
}
void WriteBytes(unsigned char* pData, int size)
{
if (m_Data)
{
memcpy(m_Data + m_Position, pData, size);
m_Position += size;
}
}
virtual unsigned long GetPosition() const
{
@ -172,7 +209,7 @@ public:
virtual int Seek (int offset, int origin = 0/*STREAM_SEEK_SET*/)
{
if ( (m_Data != NULL) && (offset > 0) && ((unsigned int)offset < m_Size) )
if ( (m_Data != NULL) && (offset >= 0) && ((unsigned int)offset < m_Size) )
return m_Position = offset;
return 0;
@ -180,7 +217,7 @@ public:
private:
unsigned char* m_Data;
unsigned char* m_Data;
unsigned long m_Size;
unsigned long m_Position;
bool bMemoryCopy;

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -72,33 +72,42 @@ namespace DocFileFormat
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->WriteAttribute( L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" );
m_pXmlWriter->WriteAttribute( L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
m_pXmlWriter->WriteAttribute( L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute( L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
m_pXmlWriter->WriteAttribute( L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" );
m_pXmlWriter->WriteAttribute( L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk" );
m_pXmlWriter->WriteAttribute( L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml" );
m_pXmlWriter->WriteAttribute( L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape" );
m_pXmlWriter->WriteAttribute( L"xmlns:a", L"http://schemas.openxmlformats.org/drawingml/2006/main" );
m_pXmlWriter->WriteAttribute( L"xmlns:m", L"http://schemas.openxmlformats.org/officeDocument/2006/math" );
m_pXmlWriter->WriteAttribute( L"mc:Ignorable", L"w14 wp14" );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
PictureBulletsMapping();
int i = 0;
for (std::list<ListData*>::iterator iter = rglst->listData.begin(); iter != rglst->listData.end(); ++iter, ++i)
for (size_t i = 0; i < rglst->listData.size(); ++i)
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i /*+ 1 */));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
//nsid
m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ));
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( rglst->listData[i]->lsid, L"%08x" ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//multiLevelType
m_pXmlWriter->WriteNodeBegin( L"w:multiLevelType", TRUE );
if ( (*iter)->fHybrid )
if ( rglst->listData[i]->fHybrid )
{
m_pXmlWriter->WriteAttribute( L"w:val", L"hybridMultilevel" );
}
else if ( (*iter)->fSimpleList )
else if ( rglst->listData[i]->fSimpleList )
{
m_pXmlWriter->WriteAttribute( L"w:val", L"singleLevel" );
}
@ -111,32 +120,32 @@ namespace DocFileFormat
//template
m_pXmlWriter->WriteNodeBegin( L"w:tmpl", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->tplc, L"%08x"));
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( rglst->listData[i]->tplc, L"%08x"));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// writes the levels
size_t length = (*iter)->rglvl->size();
size_t length = rglst->listData[i]->rglvl->size();
for (size_t j = 0; j < length; ++j)
{
ListLevel* lvl = (*iter)->rglvl->at(j);
LevelMapping(lvl, j, (*iter)->rgistd[j]);
ListLevel* lvl = rglst->listData[i]->rglvl->at(j);
LevelMapping(lvl, j, rglst->listData[i]->rgistd[j]);
}
//end 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)
for (size_t i = 0; i < rglst->listNumbering.size(); ++i)
{
//start abstractNum
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( rglst->listNumbering[i]->id ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
////nsid
//m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
//m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ) ));
//m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( rglst->listNumbering[i]->lsid, L"%08x" ) ));
//m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//multiLevelType
@ -147,14 +156,14 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
LevelMapping(*iter, 0);
LevelMapping(rglst->listNumbering[i], 0);
//end abstractNum
m_pXmlWriter->WriteNodeEnd( L"w:abstractNum" );
}
//write the overrides
for (unsigned int i = 0; i < m_document->listFormatOverrideTable->size(); ++i)
for (size_t i = 0; i < m_document->listFormatOverrideTable->size(); ++i)
{
ListFormatOverride* lfo = m_document->listFormatOverrideTable->at(i);
@ -193,16 +202,15 @@ namespace DocFileFormat
if (m_document->listFormatOverrideTable->empty() && !rglst->listNumbering.empty())
{
i = 0;
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
for (size_t i = 0; i < rglst->listNumbering.size(); ++i)
{
m_pXmlWriter->WriteNodeBegin( L"w:num", TRUE );
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(i+1));
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(rglst->listNumbering[i]->id));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:abstractNumId", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( i ));
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( rglst->listNumbering[i]->id ));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeEnd(L"w:num");
@ -215,21 +223,20 @@ namespace DocFileFormat
}
}
int NumberingMapping::FindIndexbyId(const std::list<ListData*>& listData, int id)
int NumberingMapping::FindIndexbyId(std::vector<ListDataPtr>& listData, int lsid)
{
int ret = -1;
int i = 0;
for (std::list<ListData*>::const_iterator iter = listData.begin(); iter != listData.end(); ++iter, ++i)
for (size_t i = 0; i < listData.size(); ++i)
{
if ((*iter)->lsid == id)
if (listData[i]->lsid == lsid)
{
ret = i;
break;
return i;
}
}
return ret;
return -1;
}
// Converts the number text of the binary format to the number text of OOXML.
@ -288,15 +295,17 @@ namespace DocFileFormat
return ret;
}
std::wstring NumberingMapping::GetLvlText(const NumberingDescriptor& lvl, bool bIsSymbol, int Before, int After) const
std::wstring NumberingMapping::GetLvlText(NumberingDescriptorPtr& lvl, bool bIsSymbol, int Before, int After) const
{
if (!lvl)return L"";
std::wstring ret;
if (lvl.nfc == 0xff)
if (lvl->nfc == 0xff)
{
if (!lvl.xst.empty())
if (!lvl->xst.empty())
{
wchar_t xchBullet = lvl.xst[0];
wchar_t xchBullet = lvl->xst[0];
// В символьном шрифте обрезать надо, в других случаях - нет
if (bIsSymbol && (xchBullet & 0xF000) != 0)
@ -306,7 +315,7 @@ namespace DocFileFormat
if (!FormatUtils::IsControlSymbol(xchBullet))
{
ret.push_back(lvl.xst[0]);
ret.push_back(lvl->xst[0]);
}
}
else
@ -316,8 +325,8 @@ namespace DocFileFormat
}
else
{
std::wstring strBefore = lvl.xst.substr(0, Before);
std::wstring strAfter = lvl.xst.substr(Before, After);
std::wstring strBefore = lvl->xst.substr(0, Before);
std::wstring strAfter = lvl->xst.substr(Before, After);
ret = strBefore + L"%1" + strAfter ;
}
@ -473,14 +482,16 @@ namespace DocFileFormat
}
}
void NumberingMapping::LevelMapping(const NumberingDescriptor& lvl, unsigned int level)
void NumberingMapping::LevelMapping(NumberingDescriptorPtr & lvl, unsigned int level)
{
if (!lvl) return;
std::wstring fontFamily;
bool isSymbol = false;
if( lvl.ftc < m_document->FontTable->Data.size() )
if( lvl->ftc < m_document->FontTable->Data.size() )
{
FontFamilyName* ffn = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( lvl.ftc ) );
FontFamilyName* ffn = static_cast<FontFamilyName*>( m_document->FontTable->operator [] ( lvl->ftc ) );
isSymbol = (ffn->chs == 2);
fontFamily = FormatUtils::XmlEncode(ffn->xszFtn);
}
@ -491,22 +502,22 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( L"w:start", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl.iStartAt));
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl->iStartAt));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:numFmt", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl.nfc, true));
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl->nfc, true));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
//// suffix
// m_pXmlWriter->WriteNodeBegin( L"w:suff", TRUE );
// m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
// 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);
std::wstring lvlText = GetLvlText(lvl, isSymbol, lvl->cbTextBefore, lvl->cbTextAfter);
//if (lvlText.empty() && lvl.ftc == 0)//auto
//if (lvlText.empty() && lvl->ftc == 0)//auto
//{
// lvlText.push_back(L'\xF0B7');
// lvlText.push_back(L'\0');
@ -522,7 +533,7 @@ namespace DocFileFormat
// jc
m_pXmlWriter->WriteNodeBegin( L"w:lvlJc", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
// pPr
m_pXmlWriter->WriteNodeBegin( L"w:pPr", FALSE );
@ -686,6 +697,8 @@ namespace DocFileFormat
{
isPictureBullet = FormatUtils::BitmaskToBool(FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize), 0x1);
}break;
default:
break;
}
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -63,7 +63,7 @@ namespace DocFileFormat
NumberingMapping(ConversionContext* ctx);
void Apply(IVisitable* visited);
static int FindIndexbyId(const std::list<ListData*>& listData, int id);
static int FindIndexbyId(std::vector<ListDataPtr>& listData, int id);
/// Converts the number format code of the binary format.
static std::wstring GetNumberFormatWideString(int nfc, int nWordVersion = 0);
@ -73,12 +73,12 @@ namespace DocFileFormat
// Converts the number text of the binary format to the number text of OOXML.
// OOXML uses different placeholders for the numbers.
std::wstring GetLvlText(const ListLevel* lvl, bool bIsSymbol) const;
std::wstring GetLvlText(const NumberingDescriptor& lvl, bool bIsSymbol, int Before, int After) const;
std::wstring GetLvlText(NumberingDescriptorPtr& lvl, bool bIsSymbol, int Before, int After) const;
static bool IsPlaceholder(wchar_t symbol);
void LevelMapping(const ListLevel* lvl, unsigned int level, short styleIndex);
void LevelMapping(const NumberingDescriptor& lvl, unsigned int level);
void LevelMapping(NumberingDescriptorPtr & lvl, unsigned int level);
void PictureBulletsMapping();
void WriteLevelPictureBullet(const CharacterPropertyExceptions* grpprlChpx);

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -58,7 +58,7 @@ namespace DocFileFormat
public:
OfficeArtContent (const FileInformationBlock* pFIB, POLE::Stream* pStream): m_pDrawingGroupData(NULL), m_pBackgroud(NULL)
OfficeArtContent (const FileInformationBlock* pFIB, POLE::Stream* pStream): m_pDrawingGroupData(NULL), m_pBackgroud(NULL), m_uLastShapeId(1024)
{
VirtualStreamReader oStearmReader(pStream, 0 , pFIB->m_nWordVersion);
@ -79,14 +79,13 @@ namespace DocFileFormat
drawing.dgglbl = (DrawingType)oStearmReader.ReadByte();
drawing.container = static_cast<DrawingContainer*>(RecordFactory::ReadRecord (&oStearmReader, 0));
for (unsigned int i = 0; i < drawing.container->Children.size(); ++i)
for (size_t i = 0; i < drawing.container->Children.size(); ++i)
{
Record* groupChild = drawing.container->Children[i];
if (groupChild)
{
if (GroupContainer::TYPE_CODE_0xF003 == groupChild->TypeCode)
{
// the child is a subgroup
GroupContainer* group = static_cast<GroupContainer*>(groupChild);
if (group)
{
@ -95,17 +94,24 @@ namespace DocFileFormat
}
else if (ShapeContainer::TYPE_CODE_0xF004 == groupChild->TypeCode)
{
// the child is a shape
ShapeContainer* shape = static_cast<ShapeContainer*>(groupChild);
if (shape)
{
shape->Index = i;
if (shape->isBackground())
shape->m_nIndex = (int)i;
if (shape->m_bBackground)
{
m_pBackgroud = shape;
}
}
}
else if (DrawingRecord::TYPE_CODE_0xF008 == groupChild->TypeCode)
{
DrawingRecord* dr = static_cast<DrawingRecord*>(groupChild);
if (dr)
{
m_uLastShapeId = dr->spidCur;
}
}
}
}
@ -134,7 +140,7 @@ namespace DocFileFormat
GroupContainer* group = iter->container->FirstChildWithType<GroupContainer>();
if (group)
{
for (unsigned int i = 1; i < group->Children.size(); ++i)
for (size_t i = 1; i < group->Children.size(); ++i)
{
Record* groupChild = group->Children[i];
@ -183,7 +189,7 @@ namespace DocFileFormat
{
return m_pDrawingGroupData;
}
unsigned int m_uLastShapeId;
private:
ShapeContainer* m_pBackgroud;
DrawingGroup* m_pDrawingGroupData;

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
@ -40,13 +40,13 @@ namespace DocFileFormat
public:
static const unsigned short TYPE_CODE_0xF010 = 0xF010;
ClientAnchor() : Record(), clientanchor(0)
ClientAnchor() : Record(), value(0)
{
}
ClientAnchor (IBinaryReader* _reader, unsigned int size, unsigned int typeCode, unsigned int version, unsigned int instance) : Record (_reader, size, typeCode, version, instance), clientanchor(0)
ClientAnchor (IBinaryReader* _reader, unsigned int size, unsigned int typeCode, unsigned int version, unsigned int instance) : Record (_reader, size, typeCode, version, instance), value(0)
{
clientanchor = Reader->ReadInt32();
value = Reader->ReadInt32(); //index PlcfSpa
}
virtual ~ClientAnchor()
@ -58,8 +58,6 @@ namespace DocFileFormat
return new ClientAnchor (_reader, bodySize, typeCode, version, instance);
}
private:
int clientanchor;
unsigned int value;
};
}

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

View File

@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -12,8 +12,8 @@
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under

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