Compare commits

..

577 Commits

Author SHA1 Message Date
da3a6b3189 Fix bugs with cache 2022-11-18 12:20:05 +03:00
81e03f64db Add support print custom pages in pdf/xps/djvu 2022-11-17 19:24:11 +03:00
0aed94b748 Fix ios/android build 2022-11-17 10:19:34 +03:00
5af4ebba9e Fix bug with caches 2022-11-16 23:25:19 +03:00
a8f0c12d0f Merge pull request #1068 from ONLYOFFICE/feature/cacheJS
Feature/cache js
2022-11-16 20:46:01 +03:00
e5351899c5 Refactoring js cache directory 2022-11-16 18:58:48 +03:00
fa094e152c Create js caches for server 2022-11-16 17:34:45 +03:00
a69bff9e4e Merge branch hotfix/v7.2.1 into master 2022-10-20 13:06:36 +00:00
9b5fbdfa96 fix bug #59332 2022-10-17 18:39:01 +03:00
55f026bac4 Fix bug 59404 2022-10-17 16:04:22 +03:00
63b2ddfff3 fix build 2022-10-15 08:42:26 +03:00
0cad3436fd Merge pull request #1045 from ONLYOFFICE/fix/bug59199
Fix bug #59199
2022-10-14 12:53:10 +03:00
8aa54ed2e2 fix bug #59357 2022-10-14 12:48:47 +03:00
efb1511c59 Merge pull request #1048 from ONLYOFFICE/hotfix/v7.2.1-ppt
Hotfix/v7.2.1 ppt
2022-10-14 12:46:27 +03:00
34e9d98bee fix 59277 59281 59261 2022-10-14 12:08:05 +03:00
b25c3d3022 Switch to openssl 1.1.1i on android 2022-10-14 10:48:00 +03:00
2de73e8c02 fix part of 59276 2022-10-13 20:48:10 +03:00
fb04ac8a69 fiix bug #59353 2022-10-13 16:14:35 +03:00
a4b767303d small fixes. Audio inside animation problem 2022-10-12 18:55:09 +03:00
4b86a6384b fix bug #59329 2022-10-12 12:47:45 +03:00
889721fd7e fix part of 59276. correct tmAbs 2022-10-12 00:23:54 +03:00
1df71c6504 fix part of 59276. Added new animation 2022-10-11 14:35:59 +03:00
f354046cc5 fix bug #59322 2022-10-11 11:58:31 +03:00
b27a36246d fix include paths .. 2022-10-11 09:47:22 +03:00
74615f508e Merge branch 'hotfix/v7.2.1' of https://github.com/ONLYOFFICE/core into hotfix/v7.2.1 2022-10-11 09:46:27 +03:00
204696035d fix bug #59209 2022-10-11 09:46:21 +03:00
cbd5d75532 trying to fix 59276. Old animation problem 2022-10-11 00:30:38 +03:00
26be4d9b20 Crypto module 2022-10-10 18:40:58 +03:00
6c146707f0 [mobile] Add structure of page scroll info 2022-10-07 19:44:19 +03:00
cd0c129afb fix bug #59261 2022-10-07 14:32:06 +03:00
083304c9a3 Fix bug #58901
Implement save text field formats to PDF
2022-10-04 00:06:05 +03:00
89fac276c1 fix bug #59204 2022-09-30 18:37:02 +03:00
d322c08d98 Added temporary file deletion 2022-09-30 17:52:15 +03:00
e175b310f5 Fix bug #59199 2022-09-30 17:43:11 +03:00
fe5f52b7c2 fix bug #59221 2022-09-30 17:40:48 +03:00
7df8eacf0e fix bug #59220 2022-09-30 17:01:34 +03:00
3d71c4e609 Fix bug 59175 2022-09-29 19:50:17 +03:00
65a203838b fix buid 2022-09-28 14:21:14 +03:00
8301f402c5 Merge pull request #1042 from ONLYOFFICE/fix/bug59153
Fix bug 59153
2022-09-27 11:43:29 +03:00
caab9eae47 Fix bug 59119 2022-09-27 11:34:54 +03:00
f5282fdc98 Fix bug 59153 2022-09-27 10:10:00 +03:00
d560fcc0a8 fix buid 2022-09-27 09:51:49 +03:00
9ca7cc5008 Merge pull request #1041 from ONLYOFFICE/fix/v.7.2-fix-bugs
Fix/v.7.2 fix bugs
2022-09-26 16:08:37 +03:00
56c3301e54 for bug #59118 2022-09-23 17:57:49 +03:00
23bf5cb929 Merge branch 'feature/v7.2-controls' into fix/v.7.2-fix-bugs 2022-09-23 17:56:19 +03:00
0b1c7f2642 fix viewProps presentation 2022-09-22 15:22:58 +03:00
b0d0186dd4 Merge branch release/v7.2.0 into master 2022-09-22 12:17:40 +00:00
d72d114f19 fix bug #59118
refactoring
2022-09-22 00:43:51 +03:00
a0cf3f13c3 Merge remote-tracking branch 'origin/fix/v7.2.0-ppt-2' into fix/v.7.2-fix-bugs 2022-09-21 10:34:33 +03:00
d400135f60 Merge branch 'fix/v7.2.0-fix-bugs' into fix/v.7.2-fix-bugs 2022-09-21 10:33:22 +03:00
856933b884 fix bug #59108 2022-09-20 20:12:44 +03:00
eab909f76b fix bug #59106 2022-09-20 19:30:00 +03:00
30799c7b8c fix bug #59074 2022-09-20 17:00:33 +03:00
c3246cf089 fix charset == 128 2022-09-19 18:41:14 +03:00
8032ffa3fd fix bug #59071 2022-09-19 14:18:28 +03:00
a6e490f70a fix bug #59070 2022-09-19 14:18:28 +03:00
e72ad2def4 For bug 59079 2022-09-16 22:41:48 +03:00
cfce809885 For bug 58435 2022-09-16 21:35:03 +03:00
760242fa4d fix bug #58814 2022-09-16 08:46:57 +03:00
c257b901ac Fix bug 59046 2022-09-15 17:47:23 +03:00
1873515006 Fix bug 58096 2022-09-15 16:33:08 +03:00
cb76784260 fix bug #59002 2022-09-15 13:24:16 +03:00
4982e1e1ed Merge pull request #1036 from ONLYOFFICE/fix/bug59036
Fix bug 59036
2022-09-14 19:05:28 +03:00
c087e9e9e4 Fix bug 59036
fix string path offset
2022-09-14 18:40:23 +03:00
4dae14c0b0 Merge pull request #1034 from ONLYOFFICE/fix/meta2
Fix temp files
2022-09-14 15:51:10 +03:00
798c8ee702 Fix temp files 2022-09-14 15:04:31 +03:00
f6974d1064 Merge pull request #1033 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-09-14 10:35:38 +03:00
78289248c8 . 2022-09-14 10:25:32 +03:00
bdbe8e811c Merge remote-tracking branch 'origin/fix/v7.2.0-ppt-2' into fix/v7.2.0-fix-bugs 2022-09-14 10:22:26 +03:00
5a0c45a87d for bug #57526 2022-09-14 10:19:37 +03:00
13316ce210 fix bug #59012 2022-09-13 18:14:45 +03:00
fb5ae0133c fix bug #58967 2022-09-13 15:55:08 +03:00
3c7cf1b061 fix bug #58982
refactoring & fix other bugs spreadsheet 2003 xml
2022-09-13 11:25:15 +03:00
31064ad4f2 Merge pull request #1031 from ONLYOFFICE/fix/bug58612
Fix bug 58612
2022-09-12 17:13:19 +03:00
579ac545a2 Fix bug 58612 2022-09-12 17:07:28 +03:00
f5c983c280 Merge pull request #1027 from ONLYOFFICE/fix/bug56130
Fix bug 56130
2022-09-12 13:03:39 +03:00
39cedff4ef Fix build 2022-09-12 12:56:50 +03:00
d22975e7e6 Add file to js module 2022-09-12 12:41:14 +03:00
5dceb4b7db Refactoring 2022-09-12 12:38:00 +03:00
226a04adb6 Refacroting 2022-09-12 12:31:22 +03:00
8e055fba82 Gradient in svg as raster (x2t) 2022-09-12 10:03:42 +03:00
108ff55a61 fix pictureBrightness 2022-09-09 18:13:16 +03:00
eaa3aa0e96 fix bug #58841 2022-09-09 17:56:58 +03:00
42ce6f11a5 Merge pull request #1029 from ONLYOFFICE/fix/bug58397
Fix bug #58397
2022-09-09 16:59:58 +03:00
d1d2a13ea0 Add patch to harfbuzz 2022-09-09 16:15:15 +03:00
d82cca8f9f fix bug #58965 2022-09-09 15:35:52 +03:00
99c2f645f4 fix SetCMapMemory 2022-09-09 12:16:46 +03:00
c7d7063297 fix bug #58924 2022-09-09 12:16:08 +03:00
4ee24be05f fix 2022-09-09 11:40:31 +03:00
7c913592fd add GetBaseCidToUnicode 2022-09-09 11:37:16 +03:00
cf16340335 Fix build with vlc 2022-09-08 20:14:14 +03:00
ed30c40f93 Fix bug #58397 2022-09-08 19:49:46 +03:00
34b5b7c973 fix 2022-09-08 18:36:46 +03:00
5333ce006d Merge pull request #1026 from ONLYOFFICE/fix/bug58267
Fix bug #58267
2022-09-08 17:22:33 +03:00
438989724f Merge pull request #1025 from ONLYOFFICE/fix/CssScale
Fix bug #56078
2022-09-08 17:20:26 +03:00
b2c308fc71 Fix bug #58267 2022-09-08 17:07:55 +03:00
70f2a11c75 fix bug #58908 2022-09-08 16:24:11 +03:00
1475162206 controls(activeX) presentation 2022-09-08 13:49:47 +03:00
211ca6c9f7 fix drawingfile build 2022-09-07 18:41:01 +03:00
1b5ec0a65c fix bug #58918 2022-09-07 15:01:54 +03:00
c80406cee4 . 2022-09-07 14:29:08 +03:00
3a582632f2 fix bug #58766 2022-09-07 13:45:47 +03:00
0cadeb36da Merge pull request #1023 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-09-07 10:08:06 +03:00
594737c899 fix bug #58728 2022-09-07 10:07:17 +03:00
238fc8969d Fix hatches in svg (x2t: wmf/emf => svg) 2022-09-06 20:59:01 +03:00
1878b8fc33 add cidToUnicode files 2022-09-06 18:00:49 +03:00
e82fd3c949 Merge pull request #1022 from ONLYOFFICE/fix/metafile
Fix bug #55408
2022-09-06 16:22:37 +03:00
12b733c7ee Fix bug #55408 2022-09-06 16:19:29 +03:00
482a9565eb fix bug #58372 2022-09-06 13:32:59 +03:00
636389cf04 Merge pull request #1021 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-09-05 22:08:20 +03:00
05d0e8980f fix bug #58782 2022-09-05 22:07:50 +03:00
be0cbaf0a2 fix bug #58814 2022-09-05 21:24:37 +03:00
9a07b8d4b2 Merge pull request #1020 from ONLYOFFICE/fix/v7.2.0-fix-bugs
fix bug #57527
2022-09-05 18:40:23 +03:00
1fc91b3a3c fix bug #57527 2022-09-05 18:39:00 +03:00
ac3481ca16 For bug 26503 2022-09-05 18:31:37 +03:00
d4a6acac39 Merge pull request #1019 from ONLYOFFICE/fix/bug57713
Fixing bugs in metafile conversion
2022-09-05 17:29:59 +03:00
35c93fcbe9 Added a condition for the size of the embedded metafile 2022-09-05 17:03:13 +03:00
dfcacb08c7 Fixed a bug of incomplete reading of the embedded metafile 2022-09-05 16:31:38 +03:00
00b306a24c Fixed a bug with missing circles due to negative width/height 2022-09-02 19:36:03 +03:00
bb287c0ccc Fix bug #57713 2022-09-02 19:35:11 +03:00
e43158c3c7 Merge pull request #1016 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-09-02 17:33:22 +03:00
722e3d307c Added merging properties of the same object (drawPath). 2022-09-02 17:23:43 +03:00
c1bda3059d Merge pull request #1014 from ONLYOFFICE/fix/CFontManager-GetStringPath
fix offset in GetStringPath in fontengine
2022-09-02 17:09:54 +03:00
52269454c6 fix bug #58845 2022-09-02 17:06:08 +03:00
ee27029c26 Merge pull request #1015 from ONLYOFFICE/fix/bug58829
Fix bug 58829
2022-09-02 16:46:11 +03:00
c87c8f2b4f Fix bug 58829 2022-09-02 16:35:05 +03:00
3ed7ceb243 fix bug #58814 2022-09-02 16:22:49 +03:00
49e361476d Fix previous commit 2022-09-02 12:33:44 +03:00
029ea786ef Fix bug 58787 2022-09-02 12:31:26 +03:00
3159d88bca fix bug #58822 2022-09-02 10:37:59 +03:00
ac6c9e0d0b fix new chart 2022-09-02 09:14:22 +03:00
7c34ac7533 fix offset 2022-09-02 09:14:17 +03:00
928f64d821 Some optimizations... 2. 2022-09-02 08:59:26 +03:00
697c63f74e Fix bug #56078 2022-09-01 18:48:20 +03:00
fd8bc44647 fix bug #58768 2022-09-01 18:19:47 +03:00
1f61877c5f Merge pull request #1012 from ONLYOFFICE/feature/api-descriptions-updates
Api descriptions updates
2022-09-01 13:37:53 +03:00
9fbba9f2a8 small fix 2022-09-01 13:37:10 +03:00
1ef57ca394 fix offset in GetStringPath in fontengine 2022-09-01 13:13:27 +03:00
8c1853c65d updated the .Net wrapper api 2022-09-01 13:04:38 +03:00
165990c135 Fix work with uncontexted primitives 2022-09-01 11:51:44 +03:00
0fff666352 fix buid 2022-09-01 08:44:16 +03:00
7fc15de8ce Merge pull request #1011 from ONLYOFFICE/fix/metafile
Fixing bugs in metafile conversion
2022-09-01 00:11:57 +03:00
597326bddc Refactoring 2022-09-01 00:09:21 +03:00
4caed2c4cd Fix bug 58767 2022-08-31 21:51:39 +03:00
3025d2281e fix bug #58812 2022-08-31 21:27:53 +03:00
5176d58940 fix bug #58815 2022-08-31 20:47:31 +03:00
2f6aebcad5 fix bug #58676 2022-08-31 20:20:40 +03:00
f6b0d35e6e fiix bug #58777 2022-08-31 20:18:20 +03:00
c63c4ea729 For bug #58397 2022-08-31 18:29:58 +03:00
0df69b205a test pdf/Resources with external fonts 2022-08-31 17:59:31 +03:00
52621c8bc7 Add ASC_MENU_EVENT_TYPE_CHANGE_MOBILE_MODE 2022-08-31 14:07:38 +03:00
bafc91dd67 fix bug #58732 2022-08-31 13:22:43 +03:00
beaa3b4494 Some optimizations... 2022-08-30 23:30:28 +03:00
1c8f05e0ce Fix the problem with read/write format parameter for combo box 2022-08-30 23:10:11 +03:00
0dfbf40855 Move complexFormPr parameter to correct place
Fix the problem with reading text form format from binary, also implement read/write to binary complexFormPr
2022-08-30 22:59:25 +03:00
d596a09c3f updated the c++ builder wrapper api 2022-08-30 17:33:55 +03:00
27ea7c9ffc fix bug #58769 2022-08-30 13:17:47 +03:00
b5197ee222 Increased code security 2022-08-29 19:01:55 +03:00
457cfc29ed Fixed bug #58407 2022-08-29 19:00:09 +03:00
979f303d57 Merge branch 'release/v7.2.0' of https://github.com/ONLYOFFICE/core into release/v7.2.0 2022-08-29 16:44:06 +03:00
fd3bfc0f5d Refactoring 2022-08-29 16:41:35 +03:00
fe1e498125 Fix bug #47325 2022-08-29 15:54:20 +03:00
0c2b6c7ac9 Refactoring 2022-08-29 14:56:30 +03:00
0b510a8d93 Fix bug #58400 2022-08-29 14:56:08 +03:00
784fd18470 Fix bug #58365, #55408, #58166, #58150 2022-08-29 13:39:34 +03:00
c5bee8701d Add read/write symbols of text form format 2022-08-29 13:29:21 +03:00
b4e130c4d7 Fix constants and name of attributes 2022-08-29 11:55:05 +03:00
ecb60a3452 fix bug #58708 2022-08-29 11:52:39 +03:00
70cfa996d1 fix bug #58707 2022-08-26 21:11:27 +03:00
18289bfdb4 TextFormFormat->comboBox 2022-08-26 20:22:40 +03:00
43fcaadcb1 fix bug #58699 2022-08-26 20:22:01 +03:00
6b82644d77 Add support --x2t-debug mode 2022-08-26 13:23:27 +03:00
d3914f513b [x2t] Remove extra space 2022-08-26 00:00:19 +03:00
5c202eece6 Fix big metafiles 2022-08-25 15:53:33 +03:00
bd32484a1e Merge branch 'release/v7.2.0' of https://github.com/ONLYOFFICE/core into release/v7.2.0 2022-08-25 14:50:50 +03:00
b4ae30d5b2 Fix bug 58216 2022-08-25 14:47:28 +03:00
1ff71c824c TextFormPrComplex 2022-08-25 12:49:19 +03:00
7482463667 Fix compile module 2022-08-25 12:26:09 +03:00
d0cda627dd . 2022-08-25 11:13:29 +03:00
7df0bcea7f TextFormPrFormat 2022-08-25 10:55:06 +03:00
43429aa84b Fix xp build 2022-08-24 17:44:51 +03:00
b19bce8d30 Refactoring 2022-08-24 13:34:01 +03:00
be8771f21b Merge pull request #1001 from ONLYOFFICE/fix/bug36412
Fix bug 36412, 55591
2022-08-24 13:31:48 +03:00
91af8c2b62 fix bug #58677 2022-08-24 12:31:20 +03:00
9917f7907d fix bug #58613 2022-08-24 12:21:06 +03:00
65d6a6f56d fix bug #58624 2022-08-24 11:34:01 +03:00
7e79a38520 Merge pull request #1008 from ONLYOFFICE/fix/bug58584
Fix bug 58584
2022-08-24 11:09:30 +03:00
55eb92bfc1 Merge pull request #1009 from ONLYOFFICE/fix/bug58096
Fix bug 58096
2022-08-24 10:59:23 +03:00
bc8a66ccd7 Fix compile 2022-08-24 08:34:15 +03:00
d0f7c93970 Merge pull request #1010 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-08-23 22:06:27 +03:00
fcf2742de3 Merge branch 'feature/docx_renderer' into 'release/v7.2.0' 2022-08-23 18:57:50 +03:00
8985173d4d Fix bug 58559 2022-08-23 16:58:42 +03:00
a1b4f43735 Some fixes... 5 2022-08-23 11:28:48 +03:00
546a3e8a6c Refactoring. SetProperty("--work-directory", ...) automatically, if DocBuilder::Initialize was called with directory 2022-08-23 10:32:22 +03:00
7a068930a8 Fix memory leak (jscontext) 2022-08-22 19:04:21 +03:00
fdbc9334ca Fix bug 58587 2022-08-22 16:09:49 +03:00
d04e2158ca Fix bug 58554 2022-08-19 19:55:56 +03:00
7abf16abe3 fix bug #58602 2022-08-19 16:00:10 +03:00
537eaf52fa Merge branch 'release/v7.2.0' of https://github.com/ONLYOFFICE/core into release/v7.2.0 2022-08-19 15:43:07 +03:00
94ea9c6d87 Fix bug 58382 2022-08-19 15:42:00 +03:00
2d7a8a5b75 for bug #56669 2022-08-19 12:48:04 +03:00
34407c4a1c fix dTfs 2022-08-18 18:18:07 +03:00
dd85d4263e Support pdf/xps/djvu when test with ST 2022-08-18 18:09:16 +03:00
8f534e9bff Removed some smart pointers. 2022-08-18 17:31:19 +03:00
2f15678363 Add support new sign algs 2022-08-18 16:25:59 +03:00
a51a953d83 Crash fixed 2022-08-18 14:37:09 +03:00
236667333c fix bug #56669 2022-08-18 14:21:48 +03:00
8d42cf008d Fix bug 58584 2022-08-18 14:11:24 +03:00
f422a6ed01 fix bug #58546 2022-08-18 11:34:59 +03:00
8962897eb7 Fix compile with vs2015 & gcc4.8 2022-08-18 00:49:27 +03:00
f99a3f9d74 Refactoring. Added smart pointers. 2022-08-17 15:08:41 +03:00
b908cb4d85 for bug #57467 2022-08-17 11:05:14 +03:00
8f5d21945d Fix build 2022-08-17 08:18:44 +03:00
d19d447532 Fix build 2022-08-16 21:29:34 +03:00
f40e1997c9 Fix bug 58096 2022-08-16 18:51:25 +03:00
344fe41905 fix build #57467 2022-08-16 16:08:25 +03:00
c46aa7a777 Correct build with vlc 2022-08-16 12:04:37 +03:00
ce2fb1d062 fix build 2022-08-16 10:35:47 +03:00
4f3879ae71 Implement toXml function for PdfReader 2022-08-16 02:49:51 +03:00
5e2e67db6e Add .net wrapper for builder 2022-08-15 18:21:18 +03:00
a6968ce575 Added merging conts in lines and paragraphs. 2022-08-15 17:48:23 +03:00
562e6a1bf5 for bug #58515 2022-08-15 11:39:52 +03:00
15a3df0c50 fix embedded in embedded media 2022-08-15 08:50:15 +03:00
1035103910 fix test projects 2022-08-15 08:49:47 +03:00
17e3a5d5cc Fix memory leak 2022-08-12 16:44:30 +03:00
90f659326b Fix bug with base64 images 2022-08-12 16:27:37 +03:00
aadd92f861 fix bug #58324 2022-08-12 15:40:54 +03:00
e2d192a67d fix bug #58281 2022-08-12 14:01:41 +03:00
8e4b9bd04f Refactoring 2022-08-12 13:48:32 +03:00
d3db4b428f fix bug #58324 2022-08-12 13:10:26 +03:00
71afd00742 fix bug #58454 2022-08-12 09:27:46 +03:00
5010aa346d Add support additional params 2022-08-11 22:08:55 +03:00
8ecbc5b505 Add param for convertions with origin format 2022-08-11 21:57:57 +03:00
474242d241 Refactoring convert to pdf/image from doctrenderer commands. 2022-08-11 20:45:06 +03:00
96fa62ac80 Added CFontStyle and StyleManager. 2022-08-11 12:08:58 +03:00
818d813b98 ffix bug #58484 2022-08-11 12:03:37 +03:00
1429fd87c2 Add IsObject realization 2022-08-10 18:51:48 +03:00
b542bae8fc Revert INCLUDEPATH 2022-08-10 16:24:04 +03:00
9a6e7e2dc3 Remove extra iamge formats 2022-08-10 15:30:05 +03:00
cede0396c5 fix bug #58468 2022-08-10 10:33:19 +03:00
b78ad9e751 Fix bugs 2022-08-09 21:52:48 +03:00
b9bfc60806 Merge pull request #1006 from ONLYOFFICE/feature/api-descriptions
Api descriptions
2022-08-09 14:06:53 +03:00
88b73c18a2 small fix 2022-08-09 14:06:08 +03:00
d75f7675d5 updated api descriptions for new docbuilder classes and methods 2022-08-09 11:59:01 +03:00
23d217004f fix bug #58428 2022-08-09 10:33:49 +03:00
00de3e3d37 fix bug #58424 2022-08-09 09:55:10 +03:00
7ae49de02a Fix mac build 2022-08-09 09:48:26 +03:00
f93c317e7a Refactoring 2022-08-08 18:59:42 +03:00
e258e9ba63 Merge pull request #1005 from ONLYOFFICE/fix/metafile_to_svg
Fix/metafile to svg
2022-08-08 18:45:51 +03:00
c8b6532510 Refactoring 2022-08-08 18:44:12 +03:00
81e6c62c5a fix bug #58243 2022-08-08 18:09:52 +03:00
289fbd68b6 Developing image module 2022-08-08 17:47:31 +03:00
82b0045a98 Added reading metafile from buffer and saving svg conversion to string 2022-08-08 17:36:52 +03:00
8690a92afd Refactoring image (inside zlib) module 2022-08-08 16:17:47 +03:00
6033e40cc9 Fix mac build 2022-08-08 14:24:35 +03:00
99f7544762 Removed excess fill 2022-08-08 12:17:36 +03:00
c58e69f4d1 Fixed going beyond range 2022-08-08 12:17:12 +03:00
aff18b27d1 fix bug #58385 2022-08-08 12:08:16 +03:00
223a26df7f Merge pull request #1004 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-08-07 21:39:49 +03:00
c01c52da81 Merge pull request #1003 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-08-07 21:22:54 +03:00
1f6b4b23e0 Fix build 2022-08-06 16:40:32 +03:00
3e7732e2b2 Fix build 2022-08-06 16:11:22 +03:00
6a8c6827a0 Fix build 2022-08-06 15:27:59 +03:00
1f6707479e Added text effects recognition: Emboss, Engrave, Outline + Shadow. 2022-08-06 14:51:53 +03:00
a2eccad79e Some fixes... 4 2022-08-06 14:51:53 +03:00
8bc6926391 Some fixes... 3 2022-08-06 14:51:53 +03:00
01636d6f32 Pictures now use the shape format. 2022-08-06 14:51:53 +03:00
19e4bb58e5 Added text effects recognition: Emboss, Engrave, Outline + Shadow. 2022-08-06 07:09:59 +03:00
2bcb58703c Merge pull request #1002 from ONLYOFFICE/feature/imagesModule
Feature/images module
2022-08-05 17:06:04 +03:00
92033834cd Prepare for js module 2022-08-05 16:58:49 +03:00
e05b881856 Refactoring 2022-08-05 15:05:59 +03:00
e370c81b3b Refactoring 2022-08-05 13:14:14 +03:00
446f47a5e8 Merge pull request #1000 from ONLYOFFICE/fix/pdf-font
Fix pdf bugs
2022-08-05 12:12:49 +03:00
6724f57810 Fix bug 36412, 55591
partially 58084
2022-08-05 12:10:59 +03:00
cb4d5363f4 fix 2022-08-05 12:00:23 +03:00
f4dc89c7fe revert diffenet bugs 2022-08-05 11:59:23 +03:00
5594f48bdc Some fixes... 4 2022-08-05 06:59:28 +03:00
f0a65c6553 Refactoring 2022-08-04 19:51:59 +03:00
92119b07b7 Refactoring 2022-08-04 19:37:10 +03:00
bb66fe9fc5 Refactoring graphics project 2022-08-04 19:18:14 +03:00
3807ac3bc2 Fix bugs 36412, 55591
partially 58084
2022-08-04 17:28:07 +03:00
08ef7e79a2 Fix linux compile 2022-08-04 13:28:19 +03:00
1308f051e5 Add missed file 2022-08-04 12:52:24 +03:00
1aeaa320a9 Refactoring builder test example 2022-08-04 12:24:13 +03:00
244ee7a2bd create stroke with gradient fill 2022-08-03 18:49:24 +03:00
0469fe7b59 Refactoring 2022-08-03 18:43:51 +03:00
9977c2f4c2 Merge branch 'feature/metafile2svg' into feature/imagesModule 2022-08-03 17:46:41 +03:00
0b1fa41c21 [x2t] For bug 57318 2022-08-03 17:44:09 +03:00
bf1bcd40a2 Add test 2022-08-03 17:18:42 +03:00
c1493bf1f4 Merge branch 'feature/metafile_to_svg' into feature/imagesModule 2022-08-03 12:20:34 +03:00
d7f080283b Merge pull request #997 from ONLYOFFICE/metafile2
Refactoring
2022-08-03 11:46:42 +03:00
6d0da9364c Fix spaces 2022-08-03 11:42:48 +03:00
981f48c49e Fix spaces 2022-08-03 11:38:49 +03:00
a378aa92b1 Fix spaces 2022-08-03 11:29:22 +03:00
3fdefb4952 Refactoring 2022-08-02 20:37:07 +03:00
bbeccbca46 fix not CID Font, create updateBlendMode 2022-08-02 18:35:20 +03:00
549b8353e9 Developing 2022-08-02 17:40:35 +03:00
8ea92919c0 For bug 57318 2022-08-02 13:26:23 +03:00
8c12c53e6e Fix bug 58161 2022-08-02 11:30:27 +03:00
a1b56ad817 Merge branch 'release/v7.2.0' of https://github.com/ONLYOFFICE/core into release/v7.2.0 2022-08-02 07:59:50 +03:00
63feee4774 fix bug #58357 2022-08-02 07:59:26 +03:00
d517e8cf2a test not CID Font in pdf 2022-08-01 18:36:36 +03:00
ed87cc0047 Remove extra dependencies 2022-08-01 17:17:18 +03:00
289575b9cd Refactoring BinaryWriter 2022-08-01 10:23:53 +03:00
4213824325 Remove build files 2022-08-01 09:22:58 +03:00
995b87e3bc fix bug #54673 2022-07-29 20:48:14 +03:00
75804f709e Merge pull request #995 from ONLYOFFICE/fix/pdf-make-writable
Fix pdf make writable
2022-07-29 14:27:57 +03:00
2e820186b5 fix don't makeWritable different files 2022-07-29 13:26:46 +03:00
31158a5f5b fix CDocument::Close 2022-07-29 13:02:03 +03:00
536337f50d fix test 2022-07-29 12:52:58 +03:00
ad75893298 Merge remote-tracking branch 'origin/release/v7.2.0' into fix/pdf-make-writable 2022-07-29 12:42:22 +03:00
7375130f0f fix m_bTransparentGroupSoftMaskEnd 2022-07-29 12:30:38 +03:00
387f411ae0 Merge branch 'release/v7.2.0' of https://github.com/ONLYOFFICE/core into release/v7.2.0 2022-07-29 12:29:50 +03:00
2ed60fea2b fix bug #58265 2022-07-29 12:29:42 +03:00
f9651c90ee Merge pull request #994 from ONLYOFFICE/fix/bug57572
Fix bug 57572
2022-07-29 12:05:18 +03:00
ab4ac2b7c0 Fix bug 57572 2022-07-29 12:03:10 +03:00
1736e169cf fix encrypt with password 2022-07-29 12:00:43 +03:00
f640bef308 Some fixes... 3 2022-07-29 07:53:45 +03:00
03fc3a4426 fix Encrypt dictionary 2022-07-28 18:12:49 +03:00
315204b20d fix update GetInfo 2022-07-28 18:02:16 +03:00
6a099ce6d4 Fix bug 57435 2022-07-28 17:38:03 +03:00
9fbda8fb64 Merge pull request #993 from ONLYOFFICE/feature/v7.2.0-fix-bugs
Feature/v7.2.0 fix bugs
2022-07-28 09:17:06 +03:00
e59dba4519 2. fixed
fix bug #49378
2022-07-28 09:09:30 +03:00
95c844630e fix bug #56650 2022-07-27 19:11:49 +03:00
c5c6d3d5dd create makeWritable
need test for GetInfo, encrypted and bad situation (no access)
2022-07-27 18:04:26 +03:00
7a6c2b058d Merge pull request #992 from ONLYOFFICE/fix/bug_54964
Fix bug 54964
2022-07-27 17:11:12 +03:00
2281e35cda Added support for the vertical-align property for tables 2022-07-27 17:06:38 +03:00
2cf3c85d67 Fix bug #54964
Fixed a problem with the order of applying styles
2022-07-27 17:06:23 +03:00
cb77881c6a fix bug #55901 2022-07-27 14:16:29 +03:00
d53184868d Merge pull request #991 from ONLYOFFICE/fix/bug58289
Fix bug 58289
2022-07-27 13:18:32 +03:00
95b84f314f Fix bug 58289 2022-07-27 11:53:58 +03:00
e7b960c74d Merge pull request #990 from ONLYOFFICE/feature/v7.2.0-fix-bugs
fix bug #58264
2022-07-26 18:59:08 +03:00
0a65c6b5f4 fix bug #58264 2022-07-26 18:56:57 +03:00
ebbbfe51a5 Fix compilation com wrapper library 2022-07-26 16:59:02 +03:00
7cf83f1d85 Pictures now use the shape format. 2022-07-26 14:25:17 +03:00
9a3fa3ef2a Merge pull request #988 from ONLYOFFICE/feature/builder
Feature/builder
2022-07-25 19:40:25 +03:00
469c077079 Refactoring scopes and new files 2022-07-25 19:32:38 +03:00
31b326da5a Refactoring builder 2022-07-25 14:33:29 +03:00
162b520374 Refactoring 2022-07-25 00:07:03 +03:00
803d216e53 [x2t] Add image extensions to GetFormatByExtension 2022-07-24 16:19:47 +03:00
2703621d01 fix bug #54458 2022-07-24 14:18:11 +03:00
38709cbc15 Developing 2022-07-24 02:07:41 +03:00
380a4c2e1a Developing 2022-07-24 01:25:35 +03:00
52c72bf6a2 fix bug #58252 2022-07-23 18:51:04 +03:00
d8f57d3b9b Fix xp builds 2022-07-22 18:04:27 +03:00
8a5af04247 Merge pull request #987 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-07-22 17:06:36 +03:00
4347807ca1 Merge pull request #969 from ONLYOFFICE/feature/pdfwriter
Feature PdfWriter
2022-07-22 15:14:23 +03:00
1b835cde13 Merge pull request #986 from ONLYOFFICE/fix/pdfwriter
fix pdfwriter
2022-07-22 15:12:42 +03:00
3b5673220e fix 2022-07-22 15:10:29 +03:00
877efea69d fix unreleased TransparentGroup 2022-07-22 15:05:13 +03:00
db6c71a1e6 Refactoring 2022-07-22 14:23:05 +03:00
6e000bf3f4 Fix spaces 2022-07-22 13:57:13 +03:00
fcaf871c48 Refactoring 2022-07-22 13:46:12 +03:00
61d953d370 fix bug #56012 2022-07-22 13:43:38 +03:00
33f065f649 Fix spaces 2022-07-22 13:02:08 +03:00
072b887a21 Refactoring 2022-07-22 11:44:13 +03:00
e0e4d2f6cb relocated append to file 2022-07-22 11:18:55 +03:00
24e08cee67 AddRef/Release for PdfWriter in edit mode 2022-07-22 11:17:45 +03:00
c2ba4614d4 Fix spaces 2022-07-22 10:58:40 +03:00
ae7fa7d1aa Revert memory reallocation 2022-07-22 10:53:59 +03:00
31ccfafc84 fix bad obj for DictToXml 2022-07-22 10:12:05 +03:00
816d91b328 Some fixes... 2 2022-07-21 19:09:47 +03:00
2f82b50cfc Fixes for server docbuilder 2022-07-21 17:17:46 +03:00
de49cc012f .Net wrapper for builder 2022-07-21 16:31:09 +03:00
09370f1dcc Refactoring documentbuidler (fonts dir) 2022-07-21 12:32:41 +03:00
13a192b77b fix build (tmp) 2022-07-21 11:49:02 +03:00
6b194a1e97 Fix bug 58205 2022-07-20 17:10:42 +03:00
235bd4af94 Fix bug 57507 2022-07-20 11:32:56 +03:00
65d502d36f fix bug #55431 2022-07-20 11:30:20 +03:00
0a26bab1a2 Added definition of the shadow effect for the font. 2022-07-20 11:11:24 +03:00
4d538e3439 Fix typo 2022-07-20 10:06:33 +03:00
ae8807041e Some fixes... 2022-07-19 11:01:19 +03:00
ba0359e3d1 Fix bug 54401 2022-07-18 19:23:09 +03:00
e664bc77a0 Merge remote-tracking branch 'origin/release/v7.2.0' into feature/pdfwriter
# Conflicts:
#	Common/3dParty/html/css/src/CCompiledStyle.cpp
#	Common/3dParty/html/css/src/CCssCalculator_Private.cpp
#	Common/3dParty/html/css/src/ConstValues.h
#	Common/3dParty/html/css/src/xhtml/CDocumentStyle.cpp
#	HtmlFile2/test/main.cpp
#	PdfWriter/PdfRenderer.cpp
#	PdfWriter/PdfRenderer.h
2022-07-18 18:13:19 +03:00
fbf77242de Merge pull request #983 from ONLYOFFICE/fix/hotfix-v7.1.1-conflicts
hotfix/v7.1.1
2022-07-18 17:45:39 +03:00
54b3fc1866 Merge remote-tracking branch 'origin/hotfix/v7.1.1' into fix/hotfix-v7.1.1-conflicts
# Conflicts:
#	Common/3dParty/html/css/src/CCompiledStyle.cpp
#	Common/3dParty/html/css/src/CCssCalculator_Private.cpp
#	Common/3dParty/html/css/src/ConstValues.h
#	Common/3dParty/html/css/src/xhtml/CDocumentStyle.cpp
#	Common/3dParty/html/htmltoxhtml.h
#	Common/Network/FileTransporter/src/FileTransporter_win.cpp
#	HtmlFile2/htmlfile2.cpp
#	HtmlFile2/test/main.cpp
#	PdfWriter/PdfRenderer.cpp
#	PdfWriter/PdfRenderer.h
2022-07-18 17:41:10 +03:00
e49f1a481c Remove old code 2022-07-18 15:21:56 +03:00
76bcd744e0 Merge pull request #980 from ONLYOFFICE/feature/fixARC
Feature/fix arc
2022-07-18 12:47:57 +03:00
1f9078d5fb Merge pull request #979 from ONLYOFFICE/fix/emf-bugs
Fixed a crash in unix
2022-07-18 11:14:53 +03:00
dab91f313e fix bug #41715 2022-07-17 17:25:37 +03:00
34c4fbee25 for bug #41715 2022-07-16 17:56:12 +03:00
d152746a58 fix m_unFontsCount 2022-07-15 18:16:17 +03:00
66dbc15f86 fix bug #58114 2022-07-15 14:31:02 +03:00
f9876cfaf5 fix bug #58058 2022-07-15 13:37:06 +03:00
fed80cf2fa fix custom in binary 2022-07-15 12:14:27 +03:00
68e5ceb928 Refactoring textShaper engine 2022-07-14 15:51:33 +03:00
39fd527e89 fix bug #58095 2022-07-13 20:38:18 +03:00
b27a22038a fix setSoftMask 2022-07-13 18:51:20 +03:00
b6ec92a557 Refactoring 2022-07-13 14:04:28 +03:00
5c44484c24 fix images from word 2003 xml 2022-07-13 12:21:31 +03:00
03a278a5f1 fix bug #58058 2022-07-13 12:20:03 +03:00
18a9a92f4e Line type detection has been improved.
Added subscript and superscript support.
2022-07-13 08:31:57 +03:00
52728d1ef1 Fix bug 55995
Also m_bIsolatedTransparentGroup for 56118
2022-07-11 17:53:01 +03:00
d4a4e91d5a Merge branch hotfix/v7.1.1 into master 2022-07-11 08:58:59 +00:00
51ca6f0ef2 fix docxrenderer enum set 2022-07-11 10:26:35 +03:00
5d97b35ba4 fix build 2022-07-11 10:00:51 +03:00
2bdc1e4a6d fix write application tag 2022-07-11 09:01:21 +03:00
787379808e Merge pull request #977 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-07-11 00:47:48 +05:00
9a658a2818 Fix compilation with old compilers 2022-07-10 22:41:47 +03:00
079d80adcb Refactoring 6. 2022-07-10 19:27:29 +03:00
8ec5685786 . 2022-07-10 09:40:44 +03:00
769ab7b238 Refactoring zlib export 2022-07-09 15:46:46 +03:00
eae4921ccd Change regex engine to boost (gcc error) 2022-07-09 12:51:30 +03:00
2a28ba7060 . 2022-07-09 10:35:23 +03:00
eaabba0860 . 2022-07-09 10:33:48 +03:00
f892022232 . 2022-07-09 10:24:00 +03:00
3ab0a4ee5e Fix bug 58051 2022-07-08 23:09:14 +03:00
dfa93c344c Create Pict.cpp 2022-07-08 17:14:16 +03:00
adfc2ef30d office 2003 xml -> docx (with fix errors format) 2022-07-08 17:13:29 +03:00
f8549eaa13 Refactoring 5. Aded support for different types of text underlines. 2022-07-08 16:31:30 +03:00
fc280b1cd6 [android] Update to kotlin 1.7 2022-07-08 10:48:21 +03:00
6438c9a88a Typo fixed 2022-07-07 20:38:37 +03:00
302b575f29 Merge pull request #963 from ONLYOFFICE/fix/TableCssStyle
Fix table style
2022-07-07 20:37:41 +03:00
e1c87770bd Fixed Bitmap rendering error in Linux 2022-07-07 20:33:59 +03:00
b5d9d81704 Fixed crash conversion error on linux 2022-07-07 20:33:59 +03:00
dc92a8c07f Changed working with pointers to the interpreter 2022-07-07 20:33:20 +03:00
b3b7b82dda fix error with memory 2022-07-07 18:21:38 +03:00
fc8784c540 Fix excel crash (preinit js context in thread) 2022-07-06 22:44:53 +03:00
f290275406 fix SignatureField name 2022-07-06 18:08:12 +03:00
17fe15948a [android] Update gradle plugin and jvmTarget 2022-07-06 16:19:14 +03:00
6957bc3eba fix NullObject and try to fix m_bTransparentGroupSoftMask 2022-07-05 18:42:13 +03:00
38f11a9f4a fix bug #57904 2022-07-05 14:24:58 +03:00
ea43991901 fix bug #57968 2022-07-05 14:24:12 +03:00
a469bad6e3 Possible fix for the right border problem. 2022-07-04 10:36:46 +03:00
51781066b6 fix bug #57858 2022-07-01 13:14:16 +03:00
393baf5265 Refactoring 4. 2022-06-30 21:31:51 +03:00
aa6dd092f7 Added shading support. 2022-06-30 21:18:50 +03:00
00e47257e1 Fixed an issue with calculating the right border of the line. Added a correction constant for each font. 2022-06-30 21:18:50 +03:00
01911afb0f Refactoring 3. 2022-06-30 21:18:50 +03:00
fe3e7357d5 Refactoring 2. Improved calculation of the right border of the text. 2022-06-30 21:18:50 +03:00
541c90eacf Refactoring. 2022-06-30 21:18:49 +03:00
4641c135e7 Added support for shape according to the new standard. Fixed problem with extra spaces. Code refactoring. 2022-06-30 21:18:49 +03:00
5c403b39eb Added graphics detection: underline, strikethrough, and text highlighting in color. 2022-06-30 21:18:49 +03:00
1ba6c9b73f minor changes 2022-06-30 21:18:49 +03:00
2ede1b0d65 Fixed problem with merging of mixed text. Improved vertical and horizontal text alignment. Some problems were identified (todo). The interaction between the shape and the paragraph has been worked out. 2022-06-30 21:18:49 +03:00
3e5c005714 Fixed an problem with measuring a line with a long space. 2022-06-30 21:18:49 +03:00
217c5157e1 Added BuildByTypeShapeLine() 2022-06-30 21:18:49 +03:00
6783e79c15 Attempted to rewrite BuildByTypePlainParagraph(). Conclusion - I should use shapes instead of frames. 2022-06-30 21:18:49 +03:00
7f3a658611 Fix problem with spaces. 2022-06-30 21:18:49 +03:00
25a10fb642 DocxRenderer: Added support for TextAssociationType PlainParagraph. 2022-06-30 21:18:49 +03:00
96a6cadc66 fix DictToXml 2022-06-30 18:46:58 +03:00
189cb94892 fix bug #57904 2022-06-30 18:43:47 +03:00
974b0cc984 [android] Refactoring build gradle files 2022-06-30 14:24:04 +03:00
a202a87a67 x2t - binary - convert doc->docx in embedded 2022-06-30 13:23:03 +03:00
7e33da3883 fix bug #56786 2022-06-30 12:34:39 +03:00
35cb3fec1f pdf m_bEdit 2022-06-29 18:20:34 +03:00
1ba89fb865 fix CProxyObject memory and sign with XRef stream 2022-06-27 18:29:15 +03:00
600ebb2669 Merge remote-tracking branch 'origin/release/v7.2.0' into feature/pdfwriter
# Conflicts:
#	DesktopEditor/xmlsec/src/ooxmlsignature.pro
#	PdfWriter/PdfRenderer.cpp
#	PdfWriter/PdfRenderer.h
#	PdfWriter/PdfWriterLibTest/PdfWriterLibTest.cpp
2022-06-24 14:52:47 +03:00
ed64dba0ad pdf fix number of signature 2022-06-24 14:35:32 +03:00
97d699156e signatures with edit pdf 2022-06-23 16:25:11 +03:00
b59980bd62 Merge pull request #964 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-22 21:51:13 +03:00
c3bddd9e5d Refinement of the width of cells in tables 2022-06-22 16:51:09 +03:00
6f3776d5ad fix add multiple signatures 2022-06-21 18:00:35 +03:00
7e5421862b Improved calculation of the width of table cells 2022-06-21 09:55:04 +03:00
599e2d0d8b Working with the width of a cell in a table 2022-06-21 09:55:04 +03:00
964c75126e Improved working with styles 2022-06-21 09:55:04 +03:00
ee60028d7c Limiting the use of the file system 2022-06-21 09:29:21 +03:00
c7fc617a21 array of signatures 2022-06-20 19:14:17 +03:00
d43e0a4bc8 Limited use of FontManager 2022-06-15 20:06:28 +03:00
49a39cbd80 The work with the pictures was transferred to memory 2022-06-14 21:17:33 +03:00
399821046f Removed the use of CFontManager 2022-06-10 17:52:18 +03:00
47bcde4efe Remove extra file 2022-06-10 17:09:34 +03:00
213b4ddf64 Merge pull request #958 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-10 15:54:17 +03:00
0f71d4e2af appearance of the pdf signature 2022-06-10 13:47:25 +03:00
fd08ef00c3 Merge pull request #956 from ONLYOFFICE/release/v7.2.0
Fix compilation
2022-06-10 08:36:04 +03:00
85d7b5063e Merge pull request #955 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-10 08:27:41 +03:00
4c7cbbe184 add signature fields 2022-06-09 18:30:32 +03:00
97ca849c85 fix 2022-06-09 18:07:51 +03:00
334d61559b Refactoring 2022-06-09 17:43:36 +03:00
607c9b57f7 Merge remote-tracking branch 'origin/release/v7.2.0' into feature/pdfwriter
# Conflicts:
#	Common/3dParty/html/css/src/CCompiledStyle.cpp
#	Common/3dParty/html/css/src/ConstValues.h
#	Common/3dParty/html/css/src/xhtml/CDocumentStyle.cpp
#	HtmlFile2/htmlfile2.cpp
2022-06-09 17:19:14 +03:00
ce06cd0c4c Merge pull request #951 from ONLYOFFICE/release/v7.2.0
Refactoring ooxmlsignature library
2022-06-09 16:46:24 +03:00
583f907dd3 Fixing bugs 2022-06-09 16:00:47 +03:00
a9c99b5fb1 Elimination of defects 2022-06-08 18:55:30 +03:00
e5e30596f0 Merge pull request #950 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-08 17:24:32 +03:00
d733569179 Merge remote-tracking branch 'origin/master' into feature/pdfwriter
# Conflicts:
#	Common/3dParty/html/css/src/CCompiledStyle.cpp
#	Common/3dParty/html/css/src/CCssCalculator.cpp
#	Common/3dParty/html/css/src/CCssCalculator.h
#	Common/3dParty/html/css/src/CCssCalculator_Private.cpp
#	Common/3dParty/html/css/src/CCssCalculator_Private.h
#	Common/3dParty/html/css/src/CNode.h
#	Common/3dParty/html/htmltoxhtml.h
#	Common/Network/FileTransporter/src/FileTransporter_win.cpp
#	HtmlFile2/htmlfile2.cpp
#	PdfWriter/PdfRenderer.h
#	PdfWriter/PdfWriter.pro
2022-06-08 13:20:43 +03:00
c2654f2a3d Added conversion of WMV format to SVG 2022-06-07 20:41:52 +03:00
43b611e39e create CSignatureFormPr 2022-06-07 18:20:36 +03:00
b8d0b5df96 refactoring the WMF conversion code 2022-06-06 16:31:32 +03:00
d12680c027 fix Data for PDFSigner 2022-06-03 14:15:51 +03:00
e8d1e2d246 fix test 2022-06-03 11:45:55 +03:00
c7accbd1fb Improved EMF to SVG conversion 2022-06-02 19:49:55 +03:00
39337c4bf2 test PDFSigner 2022-06-02 18:47:24 +03:00
345565349f Improved EMF to SVG conversion 2022-06-01 19:48:02 +03:00
57b89540f7 Merge branch hotfix/v7.1.1 into master 2022-06-01 16:18:12 +00:00
50f5752b95 create PDFSigner 2022-06-01 17:48:36 +03:00
44647e33fb Expanded the possibilities of converting a metafile to SVG 2022-05-31 18:56:39 +03:00
d6141591ed pdf signature development 2022-05-30 18:49:33 +03:00
0af7c8b984 Merge pull request #946 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-05-28 22:11:28 +03:00
e3e027e663 add CWidgetAnnotation 2022-05-27 18:25:47 +03:00
170686840c Fixed an inaccuracy in calculating the width of a row in the table 2022-05-26 21:50:37 +03:00
89a787fc32 fix spacing between tables 2022-05-26 21:50:37 +03:00
56bec09bfd empty <w:p> between tables 2022-05-26 21:50:37 +03:00
341d7a0b55 Improved table display quality 2022-05-26 21:50:37 +03:00
c549d52123 Fix bug 57363 (#939) 2022-05-26 18:57:05 +03:00
e6c7efc0d5 Merge pull request #941 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-05-26 18:18:33 +03:00
8c69e55bdd Merge pull request #937 from ONLYOFFICE/fix/v7.1.1-fix-bugs
fix bug #57274
2022-05-26 12:12:53 +03:00
77a07b09a5 fix bug #57274 2022-05-26 12:05:28 +03:00
282a6b50a5 Merge pull request #936 from ONLYOFFICE/fix/html-table-style
Fix html table style
2022-05-25 20:18:15 +03:00
02fe14ffe3 fix htmltoxhtml 2022-05-25 19:44:38 +03:00
0c1659cf48 fix html and css table style 2022-05-25 19:43:35 +03:00
5c8132d476 Added the ability to convert Emf to Svg 2022-05-25 19:23:16 +03:00
1627332a20 Merge pull request #935 from ONLYOFFICE/fix/v7.1.1-fix-bugs
fix bug #57334
2022-05-25 16:52:27 +03:00
23d0b0e194 fix bug #57334 2022-05-25 16:51:11 +03:00
0e490d791a PdfWriter add Sign 2022-05-25 16:27:11 +03:00
2f11ac944d Fix typo 2022-05-25 10:27:22 +03:00
49f766a593 fix ooxmlsignature 2022-05-24 17:14:56 +03:00
0be13c04ce Fix bug 48473 2022-05-23 22:22:11 +03:00
0cdbdefeb2 Add support images from web 2022-05-23 21:28:15 +03:00
7f863a7b6a Merge pull request #930 from ONLYOFFICE/fix/v7.1.1-fix-bugs
fix save smart in group
2022-05-23 13:20:45 +03:00
d8cbbf4c2f fix save smart in group 2022-05-23 13:19:51 +03:00
930e76f8a9 fix background color in setSoftMaskFromImageMask 2022-05-23 08:31:50 +03:00
9bee310052 Merge pull request #928 from ONLYOFFICE/fix/v7.1.1-fix-bugs
fix  bug #57214
2022-05-19 15:09:02 +03:00
f76ede5078 fix bug #57214 2022-05-19 15:08:22 +03:00
22fd371f3f Merge remote-tracking branch 'origin/develop' into feature/pdfwriter
# Conflicts:
#	PdfReader/PdfReader.cpp
#	PdfReader/Src/RendererOutputDev.cpp
#	PdfWriter/PdfRenderer.h
#	PdfWriter/Src/Document.cpp
2022-05-17 12:20:43 +03:00
de5447c4a3 deferred rendering setSoftMaskFromImageMask 2022-05-13 17:52:11 +03:00
989935db24 fix setSoftMaskFromImageMask 2022-05-12 18:12:09 +03:00
f9791c3825 trying setSoftMaskFromImageMask 2022-05-11 18:09:30 +03:00
4cdd59d70d Fix bug 56993
Fix bug 56993
2022-05-04 15:53:05 +03:00
ec4fcf4d7a fix bug 56040
fix bug 56040
2022-05-04 11:33:38 +03:00
e1949a4cf3 trying to implement paintTransparencyGroup 2022-04-29 18:49:04 +03:00
6ec88fceba change Info 2022-04-28 15:44:19 +03:00
9d50ad16ff Fix bug 56082 2022-04-25 16:56:07 +03:00
42dc1645a9 fix linearized 2022-04-25 14:05:10 +03:00
5ffd7e9537 fix linearized pdf 2022-04-25 11:02:32 +03:00
2cc6ed350c fix drawSoftMaskedImage 2022-04-21 19:31:50 +03:00
37fc76e4da fix beginTransparencyGroup 2022-04-19 18:07:20 +03:00
4b1be35195 fix alpha and out of range
fix alpha of TransparencyGroup and out of range m_vWidths
2022-04-15 18:35:47 +03:00
2498d81922 fix merge 2022-04-14 15:28:50 +03:00
77f3429df9 Merge remote-tracking branch 'origin/develop' into feature/pdfwriter
# Conflicts:
#	PdfReader/PdfReader.cpp
#	PdfWriter/Src/Encrypt.cpp
2022-04-14 11:39:05 +03:00
4f90a015a9 test pdf.bin 2022-04-06 18:22:28 +03:00
9dd175bb82 fix page annotations 2022-04-04 18:38:26 +03:00
f2dd9d1a5f add page by index 2022-04-01 16:41:02 +03:00
9220b65861 create page tree and edit/remove pages 2022-04-01 15:14:06 +03:00
a7a4a48a2c remove page from page tree 2022-03-31 18:01:40 +03:00
d67b672a0c clear page tree from deleted page 2022-03-30 18:27:11 +03:00
441ec10b5f fix deleted destination link 2022-03-29 16:17:46 +03:00
240a553c55 add page remove 2022-03-29 16:13:53 +03:00
d43563fa75 fix page params and add page rotate 2022-03-28 18:19:47 +03:00
ecc44c6cec fix pred CTM and size of Page 2022-03-25 17:40:58 +03:00
a86ed9ee33 fix ID, need final CTM 2022-03-24 18:09:36 +03:00
0ec2180022 update pdf with RC4 Encrypt 2022-03-23 17:39:51 +03:00
346744aa02 fix bug in encrypt
Note that the pad is present when M is evenly divisible by 16. EXAMPLE A 9-byte message has a pad of 7 bytes, each with the value 0x07.
2022-03-23 14:11:12 +03:00
128118003b add support RC4 and AES FileKey 2022-03-22 18:04:45 +03:00
02fa4142a7 calculate encryption key 2022-03-21 17:32:45 +03:00
4decd0c631 update pdf with AES256 Encrypt 2022-03-18 14:29:20 +03:00
54a3b6efd6 fix test 2022-03-15 18:14:47 +03:00
e7a62ee9d4 fix write stream 2022-03-15 11:19:15 +03:00
b81a43d6bb cross-reference stream 2022-03-14 18:06:22 +03:00
5f434e77db fix ExtGStates 2022-02-24 14:58:22 +03:00
b52180ff9a fix binary string 2022-02-22 12:30:47 +03:00
7f6d3186cf fix test 2022-02-21 18:18:21 +03:00
2316968096 Refactoring & binary with test commands 2022-02-21 12:08:49 +03:00
59924c4b4e Merge pull request #853 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-02-21 09:50:26 +03:00
9bfe8762ff trailer from pred xref 2022-02-17 17:04:18 +03:00
046cbc06cf Add new page in edit pdf 2022-02-17 13:46:28 +03:00
b05605a24b add PageTree 2022-02-15 18:42:32 +03:00
eeb757f5a4 simple interface 2022-02-11 15:13:48 +03:00
70277f26bd fix 2022-02-10 18:26:18 +03:00
cd34915ef9 fix fonts 2022-02-10 18:06:45 +03:00
984e343ae1 fix array contents 2022-02-10 15:43:39 +03:00
beb86b072c fix FlateDecode for new contents 2022-02-09 16:44:27 +03:00
40b53144a8 fix spaces 2022-02-08 16:53:18 +03:00
5920ff19d1 appending to a pdf page 2022-02-08 15:23:03 +03:00
45f5ba45f7 passing CPage as xml to PdfWriter 2022-02-07 18:46:27 +03:00
32464079da appending to our pdf
page resources are not migrated
2022-02-04 17:07:38 +03:00
5e24200521 get Page object from PdfReader 2022-02-03 18:25:14 +03:00
e5aceb9b8c Add CPageForWriter 2022-02-02 17:12:20 +03:00
e5b9dfca5d creation new page object 2022-02-01 14:54:31 +03:00
7e0613e2e9 add to pdf moved to PdfReader 2022-01-31 13:34:00 +03:00
4f5567cf3c test add in pdf 2022-01-28 15:57:30 +03:00
31af7b633d test reader-writer without x2t 2022-01-27 18:11:36 +03:00
9649851e31 fix write pdf text 2022-01-25 15:08:17 +03:00
0c96caff02 fix conversion for streamGetChar 2022-01-21 16:01:21 +03:00
9057ea652b Merge branch 'develop' into feature/pdfwriter 2022-01-21 10:35:54 +03:00
8e1d208ac2 pdf test incremental updates 2022-01-17 18:15:39 +03:00
75bb782da7 PdfWriter test 2021-12-16 17:33:15 +03:00
f9103ee77c PdfWriterLibTest.pro 2021-12-15 14:53:57 +03:00
672 changed files with 67960 additions and 45159 deletions

2
.gitignore vendored
View File

@ -39,4 +39,6 @@ Thumbs.db
*.opendb
.vs
DesktopEditor/fontengine/js/common/freetype-2.10.4

View File

@ -323,7 +323,14 @@ namespace DocFileFormat
{
FontFamilyName* ffn = static_cast<FontFamilyName*>(_doc->FontTable->operator [] (nIndex));
if (ffn)
m_sDefaultFont = ffn->xszFtn;
{
m_sCsFont = ffn->xszFtn;
XMLTools::XMLAttribute* cs = new XMLTools::XMLAttribute(L"w:cs");
cs->SetValue(FormatUtils::XmlEncode(m_sCsFont, true));
rFonts->AppendAttribute(*cs);
RELEASEOBJECT(cs);
}
}
}break;
case sprmCHpsBi:
@ -432,7 +439,7 @@ namespace DocFileFormat
}break;
case 2:
{
hint.SetValue(L"eastAsia");
hint.SetValue(L"cs");
rFonts->AppendAttribute(hint);
}break;
case 0: break; // default
@ -482,28 +489,14 @@ namespace DocFileFormat
}
}
}
if (!m_sDefaultFont.empty() && m_sAsciiFont.empty() && m_sEastAsiaFont.empty() && m_shAnsiFont.empty())
{//????
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
ascii->SetValue( FormatUtils::XmlEncode(m_sDefaultFont));
//rFonts->AppendAttribute( *ascii );
RELEASEOBJECT( ascii );
}
//apend lang
if ( lang->GetAttributeCount() > 0 )
{
parent->AppendChild( *lang );
}
//append fonts
if ( rFonts->GetAttributeCount() > 0 )
{
parent->AppendChild( *rFonts );
}
//append color
if ( colorVal->GetValue() != L"")
{
color->AppendAttribute( *colorVal );

View File

@ -88,10 +88,9 @@ namespace DocFileFormat
bool _isRunStyleNeeded;
bool _isOwnRPr;
std::wstring m_sDefaultFont;
std::wstring m_sAsciiFont;
std::wstring m_sEastAsiaFont;
std::wstring m_shAnsiFont;
std::wstring m_sCsFont;
};
}

View File

@ -1905,7 +1905,7 @@ namespace DocFileFormat
XMLTools::XMLElement bookmarkElem(L"w:bookmarkStart");
bookmarkElem.AppendAttribute(L"w:id", FormatUtils::IntToWideString(id));
bookmarkElem.AppendAttribute(L"w:name", *bookmarkName);
bookmarkElem.AppendAttribute(L"w:name", XmlUtils::EncodeXmlString(*bookmarkName));
m_pXmlWriter->WriteString(bookmarkElem.GetXMLString());

View File

@ -53,14 +53,12 @@ namespace DocFileFormat
this->Fractional = fractional;
}
FixedPointNumber( unsigned int value )
FixedPointNumber( _UINT32 value )
{
unsigned char* bytes = FormatUtils::GetBytes( value );
unsigned short* bytes = (unsigned short*)(&value);
this->Integral = FormatUtils::BytesToUInt16( bytes, 0, sizeof(value) );
this->Fractional = FormatUtils::BytesToUInt16( bytes, 2, sizeof(value) );
RELEASEARRAYOBJECTS( bytes );
this->Integral = bytes[0];
this->Fractional = bytes[1];
}
FixedPointNumber( const unsigned char* bytes, unsigned int size )

View File

@ -588,9 +588,19 @@ namespace DocFileFormat
}
}break;
case sprmPWHeightAbs:
appendValueAttribute( _framePr, L"w:h", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
break;
{
unsigned short val = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
unsigned short DyaHeightAbs = GETBITS(val, 0, 14);
bool fMinHeight = GETBIT(val, 15);
if ( DyaHeightAbs > 0)
appendValueAttribute(_framePr, L"w:h", DyaHeightAbs);
if (fMinHeight)
appendValueAttribute(_framePr, L"w:hRule", L"atLeast");
else if (DyaHeightAbs == 0)
appendValueAttribute(_framePr, L"w:hRule", L"auto");
else
appendValueAttribute(_framePr, L"w:hRule", L"exact");
}break;
case sprmOldPDxaWidth:
case sprmPDxaWidth:
appendValueAttribute( _framePr, L"w:w", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );

View File

@ -31,6 +31,7 @@
*/
#include "PropertiesMapping.h"
#include "RGBColor.h"
namespace DocFileFormat
{

View File

@ -35,7 +35,6 @@
#include "Global.h"
#include "BorderCode.h"
#include "RGBColor.h"
#include "ShadingDescriptor.h"
#include "SinglePropertyModifier.h"

View File

@ -31,9 +31,8 @@
*/
#pragma once
#include "../../DesktopEditor/common/Types.h"
#include <sstream>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
#include <boost/format.hpp>
namespace DocFileFormat
{
@ -55,9 +54,13 @@ namespace DocFileFormat
std::wstring SixDigitHexCode;
std::wstring EightDigitHexCode;
RGBColor( int cv, ByteOrder order )
RGBColor( _UINT32 cv, ByteOrder order )
{
unsigned char* bytes = FormatUtils::GetBytes( cv );
unsigned char bytes[4];
bytes[0] = cv & 0x000000FF;
bytes[1] = (cv >> 8) & 0x000000FF;
bytes[2] = (cv >> 16) & 0x000000FF;
bytes[3] = (cv >> 24) & 0x000000FF;
std::wstringstream rgbColor6, rgbColor8;
@ -68,8 +71,8 @@ namespace DocFileFormat
this->Blue = bytes[2];
this->Alpha = bytes[3];
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue % /*A*/this->Alpha;
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % Red % Green % Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % Red % Green % Blue % Alpha;
SixDigitHexCode = rgbColor6.str();
EightDigitHexCode = rgbColor8.str();
@ -81,14 +84,12 @@ namespace DocFileFormat
this->Blue = bytes[0];
this->Alpha = bytes[3];
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % /*R*/this->Red % /*G*/this->Green % /*B*/this->Blue % /*A*/this->Alpha;
rgbColor6 << boost::wformat( L"%02x%02x%02x" ) % Red % Green % Blue;
rgbColor8 << boost::wformat( L"%02x%02x%02x%02x" ) % Red % Green % Blue % Alpha;
SixDigitHexCode = rgbColor6.str();
EightDigitHexCode = rgbColor8.str();
}
RELEASEARRAYOBJECTS( bytes );
}
};
}

View File

@ -46,8 +46,8 @@ namespace DocFileFormat
fNoHtmlExport(false),
fSemiHidden(false),
fLocked(false),
fInternalUse(false),
stk(paragraph_style),
fInternalUse(false), fUnhideWhenUsed(false),
stk(paragraph_style), uiPriority(0), fQFormat(false),
istdBase(0xffffff), cupx (0), istdNext(0xffffff), bchUpe(0)
{
@ -74,16 +74,14 @@ namespace DocFileFormat
fSemiHidden(false),
fLocked(false),
fInternalUse(false),
stk(paragraph_style),
stk(paragraph_style), uiPriority(0), fQFormat(false),
istdBase(0xffffff), cupx (0), istdNext(0xffffff), bchUpe(0)
{
//parsing the base (fix part)
//parsing the base (fix part)
if ( cbStdBase >= 2 )
{
//sti
sti = (StyleIdentifier)FormatUtils::GetUIntFromBytesBits( bytes, size, 0, 12 );
//flags
fScratch = FormatUtils::GetBitFromBytes( bytes, size, 12 );
fInvalHeight = FormatUtils::GetBitFromBytes( bytes, size, 13 );
fHasUpe = FormatUtils::GetBitFromBytes( bytes, size, 14 );
@ -92,29 +90,20 @@ namespace DocFileFormat
if ( cbStdBase >= 4 )
{
//stk
stk = (StyleKind)FormatUtils::GetUIntFromBytesBits( bytes, size, 16, 4 );
//istdBase
istdBase = FormatUtils::GetUIntFromBytesBits( bytes, size, 20, 12 );
}
if ( cbStdBase >= 6 )
{
//cupx
cupx = (unsigned short)FormatUtils::GetUIntFromBytesBits( bytes, size, 32, 4 );
//istdNext
istdNext = FormatUtils::GetUIntFromBytesBits( bytes, size, 36, 12 );
}
if ( cbStdBase >= 8 )
{
//bchUpe
bchUpe = (unsigned short)FormatUtils::GetUIntFromBytesBits( bytes, size, 48, 16 );
}
if ( cbStdBase >= 10 )
{
//flags
fAutoRedef = FormatUtils::GetBitFromBytes( bytes, size, 64 );
fHidden = FormatUtils::GetBitFromBytes( bytes, size, 65 );
f97LidsSet = FormatUtils::GetBitFromBytes( bytes, size, 66 );
@ -126,21 +115,20 @@ namespace DocFileFormat
fSemiHidden = FormatUtils::GetBitFromBytes( bytes, size, 72 );
fLocked = FormatUtils::GetBitFromBytes( bytes, size, 73 );
fInternalUse = FormatUtils::GetBitFromBytes( bytes, size, 74 );
fUnhideWhenUsed = FormatUtils::GetBitFromBytes(bytes, size, 75);
fQFormat = FormatUtils::GetBitFromBytes(bytes, size, 76);
//fReserved 3 bits
}
if ( cbStdBase == 0x0012)
{//StdfPost2000
istdLink = FormatUtils::GetUIntFromBytesBits( bytes, size, 80, 12 );
fHasOriginalStyle = FormatUtils::GetBitFromBytes( bytes, size, 92 );
short fSpare = FormatUtils::GetUIntFromBytesBits(bytes, size, 93, 3); //ignored
rsid = FormatUtils::GetUIntFromBytesBits( bytes, size, 96, 32 );
iftcHtml = FormatUtils::GetUIntFromBytesBits(bytes, size, 128, 3);
uiPriority = FormatUtils::GetUIntFromBytesBits(bytes, size, 132, 12);
}
if ( cbStdBase >= 12 )
{
//istdLink
istdLink = FormatUtils::GetUIntFromBytesBits( bytes, size, 80, 12 );
//fHasOriginalStyle
fHasOriginalStyle = FormatUtils::GetBitFromBytes( bytes, size, 92 );
}
if ( cbStdBase >= 16 )
{
//rsid
rsid = FormatUtils::GetUIntFromBytesBits( bytes, size, 96, 32 );
}
//parsing the variable part
unsigned char *name = NULL;
unsigned char characterCount = bytes[cbStdBase];

View File

@ -449,6 +449,9 @@ namespace DocFileFormat
/// A StyleSheetDescription can have a TAPX.
/// If the style doesn't modify table properties, tapx is null.
TablePropertyExceptions* tapx;
bool fQFormat;
bool fUnhideWhenUsed;
unsigned int uiPriority;
/// Creates an empty STD object
StyleSheetDescription();

View File

@ -66,13 +66,19 @@ namespace DocFileFormat
// not all stylesheet contain latent styles
if ( size > 20 )
{
cbLSD = FormatUtils::BytesToUInt16 ( bytes, 20, size );
cbLSD = FormatUtils::BytesToUInt16 ( bytes, 20, size );
for ( int i = 0; i < stiMaxWhenSaved; ++i)
{
unsigned int iLSD = FormatUtils::BytesToUInt32 ( bytes, ( 22 + (i * cbLSD) ), size );
LSD lsd = *(LSD*)&iLSD;
_UINT32 iLSD = FormatUtils::BytesToUInt32 ( bytes, ( 22 + (i * cbLSD) ), size );
LSD lsd;
lsd.fLocked = GETBIT(iLSD, 0);
lsd.fSemiHidden = GETBIT(iLSD, 1);
lsd.fUnhideWhenUsed = GETBIT(iLSD, 2);
lsd.fQFormat = GETBIT(iLSD, 3);
lsd.iPriority = GETBITS(iLSD, 4, 15);
lsd.fReserved = GETBITS(iLSD, 16, 31);
mpstilsd.push_back( lsd );
}
}

View File

@ -35,22 +35,15 @@
namespace DocFileFormat
{
/*
typedef struct _LatentStyleData
struct LSD
{
unsigned int grflsd;
bool fLocked;
} LatentStyleData;
*/
struct LSD
{
unsigned int fLocked : 1;
unsigned int fSemiHidden : 1;
unsigned int fUnhideWhenUsed : 1;
unsigned int fQFormat : 1;
unsigned int iPriority : 12;
unsigned int fReserved : 16;
};
bool fLocked = false;
bool fSemiHidden = false;
bool fUnhideWhenUsed = false;
bool fQFormat = false;
unsigned short iPriority = 0;
unsigned short fReserved = 0;
};
class StyleSheetInformation

View File

@ -42,6 +42,9 @@ namespace DocFileFormat
{
_ctx = ctx;
m_document = _ctx->_doc;
for (size_t i = 0; i < 157; ++i)
mapCheckReservedNames.insert(std::make_pair(StyleIdentifierMap[i], 0));
}
/*========================================================================================================*/
@ -83,7 +86,7 @@ namespace DocFileFormat
{
if ( *iter != NULL )
{
m_pXmlWriter->WriteNodeBegin( L"w:style", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:style", true);
m_pXmlWriter->WriteAttribute( L"w:type", FormatUtils::MapValueToWideString( (*iter)->stk, &StyleKindMap[0][0], 5, 10 ));
@ -95,70 +98,90 @@ namespace DocFileFormat
}*/
m_pXmlWriter->WriteAttribute( L"w:styleId", FormatUtils::XmlEncode(MakeStyleId( *iter )));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
// <w:name val="" />
std::wstring sName = FormatUtils::XmlEncode(getStyleName(*iter), true);
m_pXmlWriter->WriteNodeBegin( L"w:name", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:name", true);
if ((*iter)->sti == StyleIdentifier::Normal)
m_pXmlWriter->WriteAttribute(L"w:val", L"Normal");
else
m_pXmlWriter->WriteAttribute(L"w:val", sName);
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeEnd( L"", true);
if ((*iter)->sti == StyleIdentifier::Normal) // ??? < sti < 159
{
m_pXmlWriter->WriteNodeBegin(L"w:aliases", TRUE);
m_pXmlWriter->WriteNodeBegin(L"w:aliases", true);
m_pXmlWriter->WriteAttribute(L"w:val", sName);
m_pXmlWriter->WriteNodeEnd(L"", TRUE);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
// <w:basedOn val="" />
if ( ( (*iter)->istdBase != 4095 ) && ( (*iter)->istdBase < sheet->Styles->size() ) )
{
m_pXmlWriter->WriteNodeBegin( L"w:basedOn", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:basedOn", true);
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdBase ) )));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeEnd( L"", true);
}
// <w:next val="" />
if ( (*iter)->istdNext < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( L"w:next", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:next", true);
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdNext ) )));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
m_pXmlWriter->WriteNodeEnd( L"", true);
}
// <w:link val="" />
if ( (*iter)->istdLink < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( L"w:link", TRUE );
m_pXmlWriter->WriteNodeBegin( L"w:link", true);
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(MakeStyleId( sheet->Styles->at( (*iter)->istdLink ) )));
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
// <w:locked/>
if ( (*iter)->fLocked )
m_pXmlWriter->WriteNodeEnd( L"", true);
}
if ((*iter)->fAutoRedef)
{
m_pXmlWriter->WriteNodeBegin( L"w:locked" );
m_pXmlWriter->WriteNodeEnd( L"w:locked" );
m_pXmlWriter->WriteNodeBegin(L"w:autoRedefine", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
// <w:hidden/>
if ( (*iter)->fHidden )
{
m_pXmlWriter->WriteNodeBegin( L"w:hidden" );
m_pXmlWriter->WriteNodeEnd( L"w:hidden" );
m_pXmlWriter->WriteNodeBegin( L"w:hidden", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
if ((*iter)->uiPriority > 0)
{
m_pXmlWriter->WriteNodeBegin(L"w:uiPriority", true);
m_pXmlWriter->WriteAttribute(L"w:val", std::to_wstring((*iter)->uiPriority));
m_pXmlWriter->WriteNodeEnd(L"", true);
}
if ((*iter)->fQFormat)
{
m_pXmlWriter->WriteNodeBegin(L"w:qFormat", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
// <w:semiHidden/>
if ( (*iter)->fSemiHidden )
{
m_pXmlWriter->WriteNodeBegin( L"w:semiHidden" );
m_pXmlWriter->WriteNodeEnd( L"w:semiHidden" );
m_pXmlWriter->WriteNodeBegin( L"w:semiHidden", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
//write paragraph properties
if ((*iter)->fUnhideWhenUsed)
{
m_pXmlWriter->WriteNodeBegin(L"w:unhideWhenUsed", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
if ((*iter)->fLocked)
{
m_pXmlWriter->WriteNodeBegin(L"w:locked", true);
m_pXmlWriter->WriteNodeEnd(L"", true);
}
if ((*iter)->rsid > 0)
{
m_pXmlWriter->WriteNodeBegin(L"w:rsid", true);
m_pXmlWriter->WriteAttribute(L"w:val", FormatUtils::IntToFormattedWideString((*iter)->rsid, L"%08X"));
m_pXmlWriter->WriteNodeEnd(L"", true);
}
//write paragraph properties
if ( (*iter)->papx != NULL )
{
bool isBidi = false;
@ -167,7 +190,7 @@ namespace DocFileFormat
RELEASEOBJECT( ppMappingnew );
}
//write character properties
//write character properties
if ( (*iter)->chpx != NULL )
{
RevisionData rev;
@ -176,8 +199,7 @@ namespace DocFileFormat
(*iter)->chpx->Convert( cpMapping );
RELEASEOBJECT( cpMapping );
}
//write table properties
//write table properties
if ( (*iter)->tapx != NULL )
{
std::vector<short> tableGrid;
@ -185,7 +207,6 @@ namespace DocFileFormat
(*iter)->tapx->Convert( tpMapping );
RELEASEOBJECT( tpMapping );
}
m_pXmlWriter->WriteNodeEnd( L"w:style" );
}
}
@ -322,11 +343,14 @@ namespace DocFileFormat
}
else
{
//if no identifier is set, use the unique id.
std::map<std::wstring, std::wstring>::const_iterator findResult = m_mapStyleId.find(name);
if (mapCheckReservedNames.find(name) != mapCheckReservedNames.end())
{
name += L"1";
}
if( findResult != m_mapStyleId.end() )
{
id = findResult->second;
id = findResult->second;
}
else
{

View File

@ -59,6 +59,7 @@ namespace DocFileFormat
virtual ~StyleSheetMapping();
private:
std::map<std::wstring, char> mapCheckReservedNames;
void writeRunDefaults( StyleSheet* sheet );
void writeParagraphDefaults( StyleSheet* sheet );
/// Chooses the correct style name.

View File

@ -426,8 +426,11 @@ void TablePropertiesMapping::Apply(IVisitable* visited)
for (size_t i = 0; i < _grid->size(); i++)
{
XMLTools::XMLElement gridCol(L"w:gridCol");
XMLTools::XMLAttribute gridColW(L"w:w", FormatUtils::IntToWideString(_grid->at(i)));
gridCol.AppendAttribute(gridColW);
if (_grid->at(i) > 0)
{
XMLTools::XMLAttribute gridColW(L"w:w", FormatUtils::IntToWideString(_grid->at(i)));
gridCol.AppendAttribute(gridColW);
}
_tblGrid->AppendChild(gridCol);
}

View File

@ -210,7 +210,7 @@ namespace DocFileFormat
}
if (brcBottom)
{
XMLTools::XMLElement border(L"w:left");
XMLTools::XMLElement border(L"w:bottom");
appendBorderAttributes(brcBottom.get(), &border);
addOrSetBorder(_tblBorders, &border);
}

View File

@ -354,29 +354,37 @@ namespace DocFileFormat
case ODRAW::borderBottomColor:
if (!pict->brcBottom)
{
RGBColor bottomColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderbottomcolor", L"#" + bottomColor.SixDigitHexCode);
ODRAW::OfficeArtCOLORREF bottomColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(bottomColor);
if (false == bottomColor.sColorRGB.empty())
m_pXmlWriter->WriteAttribute(L"o:borderbottomcolor", L"#" + bottomColor.sColorRGB);
}
break;
case ODRAW::borderLeftColor:
if (!pict->brcLeft)
{
RGBColor leftColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderleftcolor", L"#" + leftColor.SixDigitHexCode);
ODRAW::OfficeArtCOLORREF leftColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(leftColor);
if (false == leftColor.sColorRGB.empty())
m_pXmlWriter->WriteAttribute(L"o:borderleftcolor", L"#" + leftColor.sColorRGB);
}
break;
case ODRAW::borderRightColor:
if (!pict->brcRight)
{
RGBColor rightColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderrightcolor", L"#" + rightColor.SixDigitHexCode);
ODRAW::OfficeArtCOLORREF rightColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(rightColor);
if (false == rightColor.sColorRGB.empty())
m_pXmlWriter->WriteAttribute(L"o:borderrightcolor", L"#" + rightColor.sColorRGB);
}
break;
case ODRAW::borderTopColor:
if (!pict->brcTop)
{
RGBColor topColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:bordertopcolor", L"#" + topColor.SixDigitHexCode);
ODRAW::OfficeArtCOLORREF topColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(topColor);
if (false == topColor.sColorRGB.empty())
m_pXmlWriter->WriteAttribute(L"o:bordertopcolor", L"#" + topColor.sColorRGB);
}
break;
//CROPPING

View File

@ -482,9 +482,10 @@ namespace DocFileFormat
// LINE
case ODRAW::lineColor:
{
RGBColor lineColor((int)iter->op, RedFirst);
if (!pShape->fBackground)
m_pXmlWriter->WriteAttribute(L"strokecolor", (std::wstring(L"#") + lineColor.SixDigitHexCode));
ODRAW::OfficeArtCOLORREF lineColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(lineColor);
if (false == lineColor.sColorRGB.empty() && !pShape->fBackground)
m_pXmlWriter->WriteAttribute(L"strokecolor", (std::wstring(L"#") + lineColor.sColorRGB));
}break;
case ODRAW::lineWidth:
{
@ -544,13 +545,18 @@ namespace DocFileFormat
// FILL
case ODRAW::fillColor:
{
RGBColor fillColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"fillcolor", (std::wstring(L"#") + fillColor.SixDigitHexCode));
ODRAW::OfficeArtCOLORREF fillColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(fillColor);
if (false == fillColor.sColorRGB.empty())
m_pXmlWriter->WriteAttribute(L"fillcolor", (std::wstring(L"#") + fillColor.sColorRGB));
}break;
case ODRAW::fillBackColor:
{
RGBColor fillBackColor((int)iter->op, RedFirst);
appendValueAttribute(&m_fill, L"color2", (std::wstring(L"#") + fillBackColor.SixDigitHexCode));
ODRAW::OfficeArtCOLORREF fillBackColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(fillBackColor);
if (false == fillBackColor.sColorRGB.empty())
appendValueAttribute(&m_fill, L"color2", (std::wstring(L"#") + fillBackColor.sColorRGB));
}break;
case ODRAW::fillAngle:
{
@ -623,8 +629,10 @@ namespace DocFileFormat
case ODRAW::shadowColor:
{
RGBColor shadowColor((int)iter->op, RedFirst);
appendValueAttribute(&m_shadow, L"color", (std::wstring(L"#") + shadowColor.SixDigitHexCode));
ODRAW::OfficeArtCOLORREF shadowColor((_UINT32)iter->op);
m_context->_doc->CorrectColor(shadowColor);
if (false == shadowColor.sColorRGB.empty())
appendValueAttribute(&m_shadow, L"color", (std::wstring(L"#") + shadowColor.sColorRGB));
}break;
case ODRAW::shadowOffsetX:
{

View File

@ -40,7 +40,6 @@
#include "VMLShapeTypeMapping.h"
#include "TwipsValue.h"
#include "EmuValue.h"
#include "RGBColor.h"
#include "FixedPointNumber.h"
#include "OfficeDrawing/BlipStoreContainer.h"

View File

@ -1005,5 +1005,119 @@ namespace DocFileFormat
return encodingChars;
}
}
void WordDocument::CorrectColor(ODRAW::OfficeArtCOLORREF & color)
{
#if 0
if (false == color.sColorRGB.empty()) return;
if (color.fSysIndex)
{
oox::_color sys_color;
_UINT32 nColorCode = color.index;
unsigned short nParameter = (unsigned short)((nColorCode >> 16) & 0x00ff); // the HiByte of nParameter is not zero, an exclusive AND is helping :o
unsigned short nFunctionBits = (unsigned short)((nColorCode & 0x00000f00) >> 8);
unsigned short nAdditionalFlags = (unsigned short)((nColorCode & 0x0000f000) >> 8);
unsigned short nColorIndex = (unsigned short)(nColorCode & 0x00ff);
unsigned short nPropColor = 0;
_UINT32 systemColors[25] =
{
0xc0c0c0, 0x008080, 0x000080, 0x808080, 0xc0c0c0, 0xffffff, 0x000000,
0x000000, 0x000000, 0xffffff, 0xc0c0c0, 0xc0c0c0, 0x808080, 0x000080,
0xffffff, 0xc0c0c0, 0x808080, 0x808080, 0x000000, 0xc0c0c0, 0xffffff,
0x000000, 0xc0c0c0, 0x000000, 0xffffc0
};
if (nColorIndex < 25)
{
sys_color.SetRGB((unsigned char)(systemColors[nColorIndex]>>16), (unsigned char)(systemColors[nColorIndex]>>8), (unsigned char)(systemColors[nColorIndex]));
}
else return;
if (nAdditionalFlags & 0x80) // make color gray
{
BYTE nZwi = 0x7f;//= aColor.GetLuminance();
sys_color.SetRGB(nZwi, nZwi, nZwi);
}
switch (nFunctionBits)
{
case 0x01: // darken color by parameter
{
BYTE R = static_cast<BYTE> ((nParameter * sys_color.GetR()) >> 8);
BYTE G = static_cast<BYTE> ((nParameter * sys_color.GetG()) >> 8);
BYTE B = static_cast<BYTE> ((nParameter * sys_color.GetB()) >> 8);
sys_color.SetRGB(R, G, B);
}
break;
case 0x02: // lighten color by parameter
{
unsigned short nInvParameter = (0x00ff - nParameter) * 0xff;
BYTE R = static_cast<BYTE>((nInvParameter + (nParameter * sys_color.GetR())) >> 8);
BYTE G = static_cast<BYTE>((nInvParameter + (nParameter * sys_color.GetG())) >> 8);
BYTE B = static_cast<BYTE>((nInvParameter + (nParameter * sys_color.GetB())) >> 8);
sys_color.SetRGB(R, G, B);
}break;
case 0x03: // add grey level RGB(p,p,p)
{
short nR = (short)sys_color.GetR() + (short)nParameter;
short nG = (short)sys_color.GetG() + (short)nParameter;
short nB = (short)sys_color.GetB() + (short)nParameter;
if (nR > 0x00ff) nR = 0x00ff;
if (nG > 0x00ff) nG = 0x00ff;
if (nB > 0x00ff) nB = 0x00ff;
sys_color.SetRGB((BYTE)nR, (BYTE)nG, (BYTE)nB);
}break;
case 0x04: // substract grey level RGB(p,p,p)
{
short nR = (short)sys_color.GetR() - (short)nParameter;
short nG = (short)sys_color.GetG() - (short)nParameter;
short nB = (short)sys_color.GetB() - (short)nParameter;
if (nR < 0) nR = 0;
if (nG < 0) nG = 0;
if (nB < 0) nB = 0;
sys_color.SetRGB((BYTE)nR, (BYTE)nG, (BYTE)nB);
} break;
case 0x05: // substract from gray level RGB(p,p,p)
{
short nR = (short)nParameter - (short)sys_color.GetR();
short nG = (short)nParameter - (short)sys_color.GetG();
short nB = (short)nParameter - (short)sys_color.GetB();
if (nR < 0) nR = 0;
if (nG < 0) nG = 0;
if (nB < 0) nB = 0;
sys_color.SetRGB((BYTE)nR, (BYTE)nG, (BYTE)nB);
}break;
case 0x06: // per component: black if < p, white if >= p
{
BYTE R = sys_color.GetR() < nParameter ? 0x00 : 0xff;
BYTE G = sys_color.GetG() < nParameter ? 0x00 : 0xff;
BYTE B = sys_color.GetB() < nParameter ? 0x00 : 0xff;
sys_color.SetRGB(R, G, B);
}break;
}
if (nAdditionalFlags & 0x40) // top-bit invert
sys_color.SetRGB(sys_color.GetR() ^ 0x80, sys_color.GetG() ^ 0x80, sys_color.GetB() ^ 0x80);
if (nAdditionalFlags & 0x20) // invert color
sys_color.SetRGB(0xff - sys_color.GetR(), 0xff - sys_color.GetG(), 0xff - sys_color.GetB());
color.sColorRGB = sys_color.sRGB;
}
//else if (color.fPaletteIndex)
//{
// std::map<int, std::wstring>::iterator it = colors_palette.find(color.index);
// if (it != colors_palette.end())
// {
// color.sColorRGB = it->second;
// }
//}
#endif
}
}

View File

@ -236,6 +236,7 @@ namespace DocFileFormat
Plex<EmptyStructure> *AutoTextPlex;
AnnotationReferenceExDescriptors *AnnotationsReferencesEx;
//------------------------------------------------------------------------------
void CorrectColor(ODRAW::OfficeArtCOLORREF & color);
};
}

View File

@ -96,15 +96,13 @@ namespace DocFileFormat
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
if (sApplication.empty())
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
pApp->SetApplication(sApplication);
#if defined(INTVER)
pApp->SetAppVersion(VALUE2STR(INTVER));
std::string s = VALUE2STR(INTVER);
sApplication += L"/" + std::wstring(s.begin(), s.end());
#endif
pApp->SetDocSecurity(0);
pApp->SetScaleCrop(false);
pApp->SetLinksUpToDate(false);
pApp->SetSharedDoc(false);
pApp->SetHyperlinksChanged(false);
pApp->m_sApplication = sApplication;
pApp->SetDefaults();
pApp->write(pathDocProps + FILE_SEPARATOR_STR + L"app.xml", DocProps, oContentTypes);
delete pApp;

View File

@ -80,6 +80,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
@ -121,6 +123,7 @@
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

View File

@ -69,6 +69,41 @@ namespace Writers
arItems.push_back(std::make_pair(sCustomXmlFilename, bGlossaryMode));
}
void CustomXmlWriter::WriteCustomA(const std::wstring& sCustomXmlPropertiesContent, const std::string& sCustomXmlContent, bool bGlossaryMode)
{
m_nCount++;
std::wstring sCustomXmlDir = m_sDir + FILE_SEPARATOR_STR;
sCustomXmlDir += OOX::FileTypes::CustomXml.DefaultDirectory().GetPath();
std::wstring sCustomXmlRelsDir = sCustomXmlDir + FILE_SEPARATOR_STR + L"_rels";
std::wstring sCustomXMLPropsFilename = OOX::FileTypes::CustomXmlProps.DefaultFileName().GetBasename();
sCustomXMLPropsFilename += std::to_wstring(m_nCount) + OOX::FileTypes::CustomXmlProps.DefaultFileName().GetExtention();
NSFile::CFileBinary::SaveToFile(sCustomXmlDir + FILE_SEPARATOR_STR + sCustomXMLPropsFilename, sCustomXmlPropertiesContent);
OOX::CContentTypes& oContentTypes = *m_pDrawingConverter->GetContentTypes();
oContentTypes.Registration(OOX::FileTypes::CustomXmlProps.OverrideType(), OOX::FileTypes::CustomXml.DefaultDirectory(), sCustomXMLPropsFilename);
std::wstring sCustomXmlFilename;
sCustomXmlFilename = OOX::FileTypes::CustomXml.DefaultFileName().GetBasename() + std::to_wstring(m_nCount);
sCustomXmlFilename += OOX::FileTypes::CustomXml.DefaultFileName().GetExtention();
NSFile::CFileBinary oFile;
if (true == oFile.CreateFileW(sCustomXmlDir + FILE_SEPARATOR_STR + sCustomXmlFilename))
{
if (false == sCustomXmlContent.empty())
oFile.WriteFile((BYTE*)sCustomXmlContent.c_str(), sCustomXmlContent.length());
oFile.CloseFile();
}
m_pDrawingConverter->SetDstContentRels();
unsigned int lId;
m_pDrawingConverter->WriteRels(OOX::FileTypes::CustomXmlProps.RelationType(), sCustomXMLPropsFilename, L"", &lId);
m_pDrawingConverter->SaveDstContentRels(sCustomXmlRelsDir + FILE_SEPARATOR_STR + sCustomXmlFilename + L".rels");
arItems.push_back(std::make_pair(sCustomXmlFilename, bGlossaryMode));
}
void CustomXmlWriter::WriteCustomSettings(const std::wstring& sUrl, const std::wstring& sXml, bool bGlossaryMode)
{
m_nCount++;

View File

@ -52,6 +52,7 @@ namespace Writers
void WriteCustomSettings(const std::wstring& sUrl, const std::wstring& sXml, bool bGlossaryMode);
void WriteCustom(const std::wstring& sCustomXmlPropertiesContent, const std::wstring& sCustomXmlContents, bool bGlossaryMode);
void WriteCustomA(const std::wstring& sCustomXmlPropertiesContent, const std::string& sCustomXmlContents, bool bGlossaryMode);
};
}

View File

@ -815,7 +815,7 @@ int Binary_rPrReader::ReadContent(BYTE type, long length, void* poResult)
case c_oSerProp_rPrType::MoveTo:
{
pRPr->m_oMoveTo.Init();
oBinary_CommonReader2.ReadTrackRevision2(length, pRPr->m_oMoveFrom.GetPointer());
oBinary_CommonReader2.ReadTrackRevision2(length, pRPr->m_oMoveTo.GetPointer());
}break;
case c_oSerProp_rPrType::rPrChange:
{
@ -1185,7 +1185,7 @@ int Binary_pPrReader::ReadInd(BYTE type, long length, void* poResult)
long nIndFirstLine = SerializeCommon::Round(dIndFirstLine * g_dKoef_mm_to_twips);
std::wstring sIndFirstLine;
if(nIndFirstLine >= 0)
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
sIndFirstLine = L" w:firstLine=\"" + std::to_wstring(nIndFirstLine) + L"\"";
else
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
pCStringWriter->WriteString(sIndFirstLine);
@ -1196,7 +1196,7 @@ int Binary_pPrReader::ReadInd(BYTE type, long length, void* poResult)
long nIndFirstLine = m_oBufferedStream.GetLong();
std::wstring sIndFirstLine;
if(nIndFirstLine >= 0)
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
sIndFirstLine = L" w:firstLine=\"" + std::to_wstring(nIndFirstLine) + L"\"";
else
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
pCStringWriter->WriteString(sIndFirstLine);
@ -3601,7 +3601,14 @@ int Binary_CustomsTableReader::ReadCustom(BYTE type, long length, void* poResult
int res = c_oSerConstants::ReadOk;
READ1_DEF(length, res, this->ReadCustomContent, &oCustomXmlProps);
m_oFileWriter.m_oCustomXmlWriter.WriteCustom(oCustomXmlProps.toXML(), oCustomXmlProps.m_oCustomXmlContent, m_oFileWriter.m_bGlossaryMode);
if (false == oCustomXmlProps.m_oCustomXmlContentA.empty())
{
m_oFileWriter.m_oCustomXmlWriter.WriteCustomA(oCustomXmlProps.toXML(), oCustomXmlProps.m_oCustomXmlContentA, m_oFileWriter.m_bGlossaryMode);
}
else if (false == oCustomXmlProps.m_oCustomXmlContent.empty())
{
m_oFileWriter.m_oCustomXmlWriter.WriteCustom(oCustomXmlProps.toXML(), oCustomXmlProps.m_oCustomXmlContent, m_oFileWriter.m_bGlossaryMode);
}
}
else
res = c_oSerConstants::ReadUnknown;
@ -8267,7 +8274,12 @@ int Binary_DocumentTableReader::Read_tblGrid(BYTE type, long length, void* poRes
}
else if( c_oSerDocTableType::tblGrid_ItemTwips == type )
{
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong())+ L"\"/>");
int ngridCol = m_oBufferedStream.GetLong();
if (ngridCol > 0)
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(ngridCol)+ L"\"/>");
else
pCStringWriter->WriteString(L"<w:gridCol/>");
}
else if( c_oSerDocTableType::tblGridChange == type )
{
@ -8781,8 +8793,7 @@ int Binary_DocumentTableReader::ReadEmbedded(BYTE type, long length, void* poRes
int id = m_oFileWriter.m_oChartWriter.nEmbeddedCount++;
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring(id + 1) + L".xlsx";
BinXlsxRW::SaveParams oSaveParams(strDstEmbeddedTempDrawingPath, strDstEmbeddedTempEmbeddingsPath, strDstEmbeddedTempThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());//???
BinXlsxRW::SaveParams oSaveParams(strDstEmbeddedTempDrawingPath, strDstEmbeddedTempEmbeddingsPath, strDstEmbeddedTempThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes(), NULL, true);
OOX::Spreadsheet::CXlsx oXlsx;
@ -8793,12 +8804,15 @@ int Binary_DocumentTableReader::ReadEmbedded(BYTE type, long length, void* poRes
oXlsx.Write(strDstEmbeddedTemp, *oSaveParams.pContentTypes);
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring(id + 1) + (oSaveParams.bMacroEnabled ? L".xlsm" : L".xlsx");
COfficeUtils oOfficeUtils(NULL);
oOfficeUtils.CompressFileOrDirectory(strDstEmbeddedTemp, strDstEmbedded + FILE_SEPARATOR_STR + sXlsxFilename, true);
std::wstring sEmbWorksheetRelsName = L"embeddings/" + sXlsxFilename;
std::wstring bstrEmbWorksheetRelType = OOX::FileTypes::MicrosoftOfficeExcelWorksheet.RelationType();
m_oFileWriter.m_pDrawingConverter->WriteRels(bstrEmbWorksheetRelType, sEmbWorksheetRelsName, std::wstring(), &pDrawingProperty->nObjectId);
std::wstring sEmbWorksheetRelType = oSaveParams.bMacroEnabled ? OOX::FileTypes::MicrosoftOfficeExcelMacro_EnabledWorksheet.RelationType() :
OOX::FileTypes::MicrosoftOfficeExcelWorksheet.RelationType();
m_oFileWriter.m_pDrawingConverter->WriteRels(sEmbWorksheetRelType, sEmbWorksheetRelsName, std::wstring(), &pDrawingProperty->nObjectId);
NSDirectory::DeleteDirectory(strDstEmbeddedTemp);
}
@ -9360,6 +9374,11 @@ int Binary_DocumentTableReader::ReadSdtPr(BYTE type, long length, void* poResult
pSdtPr->m_oPicture.Init();
READ1_DEF(length, res, this->ReadSdtPicture, pSdtPr->m_oPicture.GetPointer());
}
else if (c_oSerSdt::ComplexFormPr == type)
{
pSdtPr->m_oComplexFormPr.Init();
READ1_DEF(length, res, this->ReadSdtComplexFormPr, pSdtPr->m_oComplexFormPr.GetPointer());
}
else
res = c_oSerConstants::ReadUnknown;
return res;
@ -9419,11 +9438,17 @@ int Binary_DocumentTableReader::ReadSdtComboBox(BYTE type, long length, void* po
pSdtComboBox->m_sLastValue.Init();
pSdtComboBox->m_sLastValue->append(m_oBufferedStream.GetString3(length));
}
else if (c_oSerSdt::TextFormPrFormat == type)
{
pSdtComboBox->m_oFormat.Init();
READ1_DEF(length, res, this->ReadSdtTextFormPrFormat, pSdtComboBox->m_oFormat.GetPointer());
}
else if (c_oSerSdt::SdtListItem == type)
{
ComplexTypes::Word::CSdtListItem* pSdtListItem = new ComplexTypes::Word::CSdtListItem();
READ1_DEF(length, res, this->ReadSdtListItem, pSdtListItem);
pSdtComboBox->m_arrListItem.push_back(pSdtListItem); }
pSdtComboBox->m_arrListItem.push_back(pSdtListItem);
}
else
res = c_oSerConstants::ReadUnknown;
return res;
@ -9634,6 +9659,46 @@ int Binary_DocumentTableReader::ReadSdtTextFormPr(BYTE type, long length, void*
{
pTextFormPr->m_oMultiLine = m_oBufferedStream.GetBool();
}
else if (c_oSerSdt::TextFormPrFormat == type)
{
pTextFormPr->m_oFormat.Init();
READ1_DEF(length, res, this->ReadSdtTextFormPrFormat, pTextFormPr->m_oFormat.GetPointer());
}
else
res = c_oSerConstants::ReadUnknown;
return res;
}
int Binary_DocumentTableReader::ReadSdtComplexFormPr(BYTE type, long length, void* poResult)
{
int res = 0;
OOX::Logic::CComplexFormPr* pComplexForm = static_cast<OOX::Logic::CComplexFormPr*>(poResult);
if (c_oSerSdt::ComplexFormPrType == type)
{
pComplexForm->m_oType.Init();
pComplexForm->m_oType->SetValueFromByte(m_oBufferedStream.GetLong());
}
else
res = c_oSerConstants::ReadUnknown;
return res;
}
int Binary_DocumentTableReader::ReadSdtTextFormPrFormat(BYTE type, long length, void* poResult)
{
int res = 0;
ComplexTypes::Word::CTextFormFormat* pFormat = static_cast<ComplexTypes::Word::CTextFormFormat*>(poResult);
if (c_oSerSdt::TextFormPrFormatType == type)
{
pFormat->m_oType.Init();
pFormat->m_oType->SetValueFromByte(m_oBufferedStream.GetChar());
}
else if (c_oSerSdt::TextFormPrFormatVal == type)
{
pFormat->m_oVal = m_oBufferedStream.GetString3(length);
}
else if (c_oSerSdt::TextFormPrFormatSymbols == type)
{
pFormat->m_oSymbols = m_oBufferedStream.GetString3(length);
}
else
res = c_oSerConstants::ReadUnknown;
return res;
@ -9984,6 +10049,7 @@ int BinaryFileReader::ReadMainTable()
}break;
case c_oSerTableTypes::VbaProject:
{
m_bMacroRead = true;
m_oBufferedStream.Skip(1); //skip type
if (m_bMacro)
{

View File

@ -479,7 +479,9 @@ public:
int ReadSdtFormPr(BYTE type, long length, void* poResult);
int ReadSdtTextFormPr(BYTE type, long length, void* poResult);
int ReadSdtTextFormPrComb(BYTE type, long length, void* poResult);
int ReadSdtTextFormPrFormat(BYTE type, long length, void* poResult);
int ReadSdtPicture(BYTE type, long length, void* poResult);
int ReadSdtComplexFormPr(BYTE type, long length, void* poResult);
};
class Binary_NotesTableReader : public Binary_CommonReader
{
@ -500,8 +502,9 @@ private:
NSBinPptxRW::CBinaryFileReader& m_oBufferedStream;
Writers::FileWriter& m_oFileWriter;
std::wstring m_sFileInDir;
bool m_bMacro;
public:
bool m_bMacro = false;
bool m_bMacroRead = false;
public:
BinaryFileReader(std::wstring& sFileInDir, NSBinPptxRW::CBinaryFileReader& oBufferedStream, Writers::FileWriter& oFileWriter, bool bMacro = false);
int ReadFile();
int ReadMainTable();

File diff suppressed because one or more lines are too long

View File

@ -1252,6 +1252,7 @@ extern int g_nCurFormatVersion;
TextFormPrCombBorder = 56,
TextFormPrAutoFit = 57,
TextFormPrMultiLine = 58,
TextFormPrFormat = 59,
PictureFormPr = 60,
PictureFormPrScaleFlag = 61,
PictureFormPrLockProportions = 62,
@ -1260,7 +1261,12 @@ extern int g_nCurFormatVersion;
PictureFormPrShiftY = 65,
FormPrBorder = 70,
FormPrShd = 71,
TextFormPrCombWRule = 72
TextFormPrCombWRule = 72,
TextFormPrFormatType = 80,
TextFormPrFormatVal = 81,
TextFormPrFormatSymbols = 82,
ComplexFormPr = 90,
ComplexFormPrType = 91
};}
namespace c_oSerFFData{enum c_oSerFFData
{

View File

@ -1581,7 +1581,7 @@ void Binary_pPrWriter::WritePageMargin(OOX::Logic::CSectionProperty* pSectPr)
void Binary_pPrWriter::WriteHeaderFooter(OOX::Logic::CSectionProperty* pSectPr, std::vector<ComplexTypes::Word::CHdrFtrRef*>& aRefs, bool bHdr)
{
int nCurPos = 0;
for(size_t i = 0, length = aRefs.size(); i < length; ++i)
for (size_t i = 0, length = aRefs.size(); i < length; ++i)
{
const ComplexTypes::Word::CHdrFtrRef& oRef = *aRefs[i];
if( oRef.m_oType.IsInit() && oRef.m_oId.IsInit())
@ -1589,25 +1589,12 @@ void Binary_pPrWriter::WriteHeaderFooter(OOX::Logic::CSectionProperty* pSectPr,
int nIndex = 0;
OOX::CHdrFtr* pHdrFtr = NULL;
OOX::CDocxFlat *docx_flat = dynamic_cast<OOX::CDocxFlat*>(m_oBinaryHeaderFooterTableWriter->m_oParamsWriter.m_pMain);
smart_ptr<OOX::File> oFile = m_oBinaryHeaderFooterTableWriter->m_oDocumentRelsWriter->Find(oRef.m_oId->GetValue());
if (oFile.IsInit() && (OOX::FileTypes::Header == oFile->type() || OOX::FileTypes::Footer == oFile->type()))
{
pHdrFtr = (OOX::CHdrFtr*)oFile.GetPointer();
}
if (docx_flat)
{
std::map<std::wstring, OOX::CHdrFtr*>::iterator pFind = docx_flat->m_mapHeadersFooters.find(oRef.m_oId->GetValue());
if (pFind != docx_flat->m_mapHeadersFooters.end())
{
pHdrFtr = pFind->second;
}
}
else
{
smart_ptr<OOX::File> oFile = m_oBinaryHeaderFooterTableWriter->m_oDocumentRelsWriter->Find(oRef.m_oId->GetValue());
if (oFile.IsInit() && (OOX::FileTypes::Header == oFile->type() || OOX::FileTypes::Footer == oFile->type()))
{
pHdrFtr = (OOX::CHdrFtr*)oFile.GetPointer();
}
}
if (pHdrFtr)
{
if(bHdr)
@ -7739,7 +7726,13 @@ void BinaryDocumentTableWriter::WriteSdtPr(const OOX::Logic::CSdtPr& oStdPr)
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::PictureFormPr);
WriteSdtPicture(oStdPr.m_oPicture.get());
m_oBcw.WriteItemEnd(nCurPos);
}
}
if (oStdPr.m_oComplexFormPr.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::ComplexFormPr);
WriteSdtComplexFormPr(oStdPr.m_oComplexFormPr.get());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void BinaryDocumentTableWriter::WriteSdtPicture(const OOX::Logic::CSdtPicture& oSdtPicture)
{
@ -7775,6 +7768,16 @@ void BinaryDocumentTableWriter::WriteSdtPicture(const OOX::Logic::CSdtPicture& o
m_oBcw.WriteItemEnd(nCurPos);
}
}
void BinaryDocumentTableWriter::WriteSdtComplexFormPr(const OOX::Logic::CComplexFormPr& oComplexFormPr)
{
int nCurPos = 0;
if (oComplexFormPr.m_oType.IsInit() && !oComplexFormPr.m_oType->IsDefaultValue())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::ComplexFormPrType);
m_oBcw.m_oStream.WriteLONG(oComplexFormPr.m_oType->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void BinaryDocumentTableWriter::WriteSdtCheckBox(const OOX::Logic::CSdtCheckBox& oSdtCheckBox)
{
int nCurPos = 0;
@ -7830,6 +7833,12 @@ void BinaryDocumentTableWriter::WriteSdtComboBox(const OOX::Logic::CSdtComboBox&
m_oBcw.m_oStream.WriteStringW3(oSdtComboBox.m_sLastValue.get());
m_oBcw.WriteItemEnd(nCurPos);
}
if (oSdtComboBox.m_oFormat.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrFormat);
WriteSdtTextFormPrFormat(oSdtComboBox.m_oFormat.get());
m_oBcw.WriteItemEnd(nCurPos);
}
for(size_t i = 0; i < oSdtComboBox.m_arrListItem.size(); ++i)
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::SdtListItem);
@ -8020,6 +8029,34 @@ void BinaryDocumentTableWriter::WriteSdtTextFormPr(const OOX::Logic::CTextFormPr
m_oBcw.m_oStream.WriteBOOL(oTextFormPr.m_oMultiLine.get());
m_oBcw.WriteItemEnd(nCurPos);
}
if (oTextFormPr.m_oFormat.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrFormat);
WriteSdtTextFormPrFormat(oTextFormPr.m_oFormat.get());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void BinaryDocumentTableWriter::WriteSdtTextFormPrFormat(const ComplexTypes::Word::CTextFormFormat& oFormat)
{
int nCurPos = 0;
if (oFormat.m_oType.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrFormatType);
m_oBcw.m_oStream.WriteBYTE((BYTE)oFormat.m_oType->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
if (oFormat.m_oVal.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrFormatVal);
m_oBcw.m_oStream.WriteStringW3(oFormat.m_oVal.get());
m_oBcw.WriteItemEnd(nCurPos);
}
if (oFormat.m_oSymbols.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrFormatSymbols);
m_oBcw.m_oStream.WriteStringW3(oFormat.m_oSymbols.get());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void BinaryDocumentTableWriter::WriteSdtTextFormPrComb(const ComplexTypes::Word::CComb& oComb)
{
@ -9251,7 +9288,7 @@ void BinaryFileWriter::intoBindoc(const std::wstring& sDir)
if ((pDocxFlat) && (pDocxFlat->m_pDocument.IsInit()))
{
pDocument = pDocxFlat->m_pDocument.GetPointer();
pComments = &pDocxFlat->m_oComments;
pComments = pDocxFlat->m_pComments.GetPointer();
m_oParamsWriter.m_pSettings = pDocxFlat->m_pSettings.GetPointer();
m_oParamsWriter.m_pStyles = pDocxFlat->m_pStyles.GetPointer();
@ -9378,7 +9415,7 @@ void BinaryFileWriter::intoBindoc(const std::wstring& sDir)
}
else if (pDocxFlat)
{
oBinaryDocumentTableWriter.pBackground = dynamic_cast<OOX::WritingElement*>(pDocxFlat->m_oBgPict.GetPointer());
oBinaryDocumentTableWriter.pBackground = dynamic_cast<OOX::WritingElement*>(pDocxFlat->m_pBgPict.GetPointer());
}
// Write content

View File

@ -48,6 +48,8 @@
#include "../../Common/DocxFormat/Source/DocxFormat/HeaderFooter.h"
#include "../../Common/DocxFormat/Source/DocxFormat/App.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Core.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Footnote.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Endnote.h"
namespace NSBinPptxRW
{
@ -501,7 +503,9 @@ namespace BinDocxRW
void WriteSdtFormPr(const OOX::Logic::CFormPr& oFormPr);
void WriteSdtTextFormPr(const OOX::Logic::CTextFormPr& oTextFormPr);
void WriteSdtTextFormPrComb(const ComplexTypes::Word::CComb& oComb);
void WriteSdtTextFormPrFormat(const ComplexTypes::Word::CTextFormFormat& oFormat);
void WriteSdtPicture(const OOX::Logic::CSdtPicture& oSdtPicture);
void WriteSdtComplexFormPr(const OOX::Logic::CComplexFormPr& oComplexFormPr);
};
class BinaryCustomsTableWriter
{

View File

@ -48,6 +48,8 @@
#include "../../Common/DocxFormat/Source/DocxFormat/App.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Core.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Endnote.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Footnote.h"
int BinDocxRW::g_nCurFormatVersion = 0;
@ -610,3 +612,32 @@ bool BinDocxRW::CDocxSerializer::unpackageFile(const std::wstring& sSrcFileName,
return file.unpackage(sSrcFileName, sDstPath);
}
bool BinDocxRW::CDocxSerializer::convertFlat(const std::wstring& sSrcFileName, const std::wstring& sDstPath)
{
OOX::CDocxFlat docxflat(sSrcFileName);
if (false == docxflat.m_pDocument.IsInit())
return false;
OOX::CDocx docx;
if (docxflat.m_pDocument.IsInit())
{
NSCommon::smart_ptr<OOX::File> file = docxflat.m_pDocument.GetPointer(); file.AddRef();
docx.Add(file);
docx.m_oMain.document = docxflat.m_pDocument.GetPointer();
}
if (docxflat.m_pApp.IsInit())
{
NSCommon::smart_ptr<OOX::File> file(docxflat.m_pApp.GetPointer()); file.AddRef();
docx.Add(file);
}
if (docxflat.m_pCore.IsInit())
{
NSCommon::smart_ptr<OOX::File> file(docxflat.m_pCore.GetPointer()); file.AddRef();
docx.Add(file);
}
//docxflat.m_oBgPict.GetPointer();
return docx.Write(sDstPath);
}

View File

@ -66,6 +66,7 @@ namespace BinDocxRW
bool saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sTempPath);
bool unpackageFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath);
bool convertFlat(const std::wstring& sSrcFileName, const std::wstring& sDstPath);
bool CreateDocxFolders(std::wstring strDirectory, std::wstring& sThemePath, std::wstring& sMediaPath, std::wstring& sEmbedPath);

View File

@ -94,6 +94,7 @@ namespace BinXlsxRW{
oDrawingConverter.SetMediaDstPath(sMediaDir);
oDrawingConverter.SetEmbedDstPath(sEmbedDir);
oDrawingConverter.SetTempPath(m_sTempDir);
BinXlsxRW::BinaryFileReader oBinaryFileReader;
return oBinaryFileReader.ReadFile(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions, m_bIsMacro);
@ -147,7 +148,8 @@ namespace BinXlsxRW{
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"xl");
oDrawingConverter.SetSrcPath(strFileInDir, 2);
oDrawingConverter.SetFontDir(m_sFontDir);
BinXlsxRW::BinaryFileReader oBinaryFileReader;
return oBinaryFileReader.Xml2Xlsx(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions, m_bIsMacro);
}
@ -181,7 +183,7 @@ namespace BinXlsxRW{
std::wstring sFileName;
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sEmbedingPath, sThemePath, m_pExternalDrawingConverter->GetContentTypes());
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sEmbedingPath, sThemePath, m_pExternalDrawingConverter->GetContentTypes(), NULL, true);
BinXlsxRW::BinaryChartReader oBinaryChartReader(*pReader, oSaveParams, m_pExternalDrawingConverter);
bool bResult = false;
@ -200,6 +202,8 @@ namespace BinXlsxRW{
if (bResult && pReader->m_nDocumentType != XMLWRITER_DOC_TYPE_XLSX && !sEmbedingPath.empty() && !bXlsxPresent)
{
oSaveParams.bMacroEnabled = false;
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring(pReader->m_nCountEmbedded) + L".xlsx";
std::wstring sXlsxPath = sEmbedingPath + FILE_SEPARATOR_STR + sXlsxFilename;
@ -211,8 +215,9 @@ namespace BinXlsxRW{
std::wstring sChartsWorksheetRelsName = L"../embeddings/" + sXlsxFilename;
unsigned int rId;
std::wstring bstrChartsWorksheetRelType = OOX::FileTypes::MicrosoftOfficeExcelWorksheet.RelationType();
m_pExternalDrawingConverter->WriteRels(bstrChartsWorksheetRelType, sChartsWorksheetRelsName, std::wstring(), &rId);
std::wstring sChartsWorksheetRelType = OOX::FileTypes::MicrosoftOfficeExcelWorksheet.RelationType();
m_pExternalDrawingConverter->WriteRels(sChartsWorksheetRelType, sChartsWorksheetRelsName, std::wstring(), &rId);
chart_file->m_oChartSpace.m_externalData = new OOX::Spreadsheet::CT_ExternalData();
chart_file->m_oChartSpace.m_externalData->m_id = new std::wstring();
@ -257,7 +262,11 @@ namespace BinXlsxRW{
}
return bResult;
}
void CXlsxSerializer::setFontDir(const std::wstring& sFontDir)
void CXlsxSerializer::setTempDir(const std::wstring& sTempDir)
{
m_sTempDir = sTempDir;
}
void CXlsxSerializer::setFontDir(const std::wstring& sFontDir)
{
m_sFontDir = sFontDir;
}

View File

@ -51,6 +51,7 @@ namespace BinXlsxRW {
class CXlsxSerializer
{
private:
std::wstring m_sTempDir;
std::wstring m_sFontDir;
std::wstring m_sEmbeddedFontsDir;
NSBinPptxRW::CDrawingConverter* m_pExternalDrawingConverter;
@ -65,6 +66,7 @@ namespace BinXlsxRW {
//------------------------------------------------
static void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
void setTempDir (const std::wstring& sTempDir);
void setFontDir (const std::wstring& sFontDir);
void setEmbeddedFontsDir(const std::wstring& sEmbeddedFontsDir);
void setDrawingConverter(NSBinPptxRW::CDrawingConverter* pDrawingConverter);

View File

@ -159,7 +159,7 @@ public:
}break;
case 'T':
{
if ((pos + 6 <= size) && (expr.substr(pos, 6) == L"ТОСHKA"))
if ((pos + 6 <= size) && (expr.substr(pos, 6) == L"TОСHKA"))
{
result += L"."; pos += 6;
}
@ -230,6 +230,21 @@ public:
{
result += L"'"; pos += 8;
}
else if ((pos + 8 <= size) && (expr.substr(pos, 8) == L"APERSAND"))
{
result += L"&"; pos += 8;
}
else
{
result += expr[pos++];
}
}break;
case 'Z':
{
if ((pos + 9 <= size) && (expr.substr(pos, 9) == L"ZAPYATAYA"))
{
result += L","; pos += 9;
}
else
{
result += expr[pos++];
@ -243,7 +258,7 @@ public:
}
expr = result;
//XmlUtils::replace_all( expr, L"MINYS", L"-");
//XmlUtils::replace_all( expr, L"ТОСHKA", L".");
//XmlUtils::replace_all( expr, L"TОСHKA", L".");
//XmlUtils::replace_all( expr, L"VOSKL", L"!");
//XmlUtils::replace_all( expr, L"SCOBCAIN", L"(");
@ -273,7 +288,11 @@ public:
}break;
case '.':
{
result += L"ТОСHKA";
result += L"TОСHKA";
}break;
case ',':
{
result += L"ZAPYATAYA";
}break;
case '!':
{
@ -307,6 +326,10 @@ public:
{
result += L"KAVYCHKA";
}break;
case '&':
{
result += L"APERSAND";
}break;
default:
{
result += expr[pos];
@ -317,7 +340,7 @@ public:
expr = result;
//XmlUtils::replace_all( expr, L"-", L"MINYS");
//XmlUtils::replace_all( expr, L".", L"ТОСHKA");
//XmlUtils::replace_all( expr, L".", L"TОСHKA");
//XmlUtils::replace_all( expr, L"!", L"VOSKL");
//XmlUtils::replace_all( expr, L"(", L"SCOBCAIN");
@ -648,6 +671,7 @@ void oox2odf_converter::Impl::replace_semicolons(std::wstring& expr)
// boost::match_default | boost::format_all);
// expr = res;
//}
// заменить вертикальную черту во всех вхождениях в фигурных скобках, но не внутри строк
void oox2odf_converter::Impl::replace_vertical(std::wstring& expr)
{
@ -804,6 +828,7 @@ std::wstring oox2odf_converter::Impl::convert_conditional_formula(const std::wst
}
XmlUtils::replace_all(res, L"&", L"&amp;");
oox_replace_tmp_back( res);
replace_vertical(res);

View File

@ -569,7 +569,8 @@ enum ElementType
typeScriptEventListener,
typeNumberNumberStyle,
typeNumberBaseStyle,
typeNumberNumberStyle,
typeNumberDataStyle,
typeNumberText,
typeNumberNumber,

View File

@ -37,6 +37,8 @@
#include <stack>
#include <cassert>
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
namespace cpdoccore
{
@ -320,7 +322,7 @@ typedef xml::writer::element<wchar_t> xml_element;
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
#define CP_XML_ATTR_OPT_ENCODE_STRING(NAME, STR) if (STR)CP_XML_ATTR(NAME, XmlUtils::EncodeXmlString(XmlUtils::EncodeXmlString(*STR)))
#define CP_XML_ATTR_OPT_ENCODE_STRING(NAME, STR) if (STR)CP_XML_ATTR(NAME, XmlUtils::EncodeXmlString(*STR))
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)

View File

@ -123,7 +123,7 @@ void content_types_file::write(const std::wstring & RootPath)
content_type_content_.xml_to_stream(resStream);
std::wstring res = resStream.str();
simple_element elm(filename_, resStream.str());
simple_element elm(filename_, res);
elm.write(RootPath);
}

View File

@ -69,11 +69,11 @@ class slide_content : noncopyable
{
public:
slide_content();
std::wostream & content() { return content_; }
std::wstringstream & content() { return content_; }
void add_rel(relationship const & r);
void add_rels(rels & r);
rels_file_ptr get_rel_file() { return rels_; }
std::wstring str() { return content_.str(); }
std::wstring str() { return content_.str(); }
static _CP_PTR(slide_content) create();

View File

@ -172,13 +172,13 @@ void pptx_text_context::Impl::start_paragraph(const std::wstring & styleName)
{
if (paragraphs_cout_++ > 0)
{
if (in_list_ == false || in_comment == true)
{
// конец предыдущего абзаца и начало следующего
//text_ << L"&#10;";
text_ << L"\n";
}
else/* (paragraph_style_name_ != styleName)*/
//if (in_list_ == false || in_comment == true)
//{
//// конец предыдущего абзаца и начало следующего
////text_ << L"&#10;";
// text_ << L"\n";
//}
//else/* (paragraph_style_name_ != styleName)*/
{
dump_paragraph();
}

View File

@ -50,6 +50,8 @@ public:
// добавить условный формат числа
void add_format(std::wstring const & condition, std::wstring const & format);
std::wstring name;
private:
class Impl;
_CP_SCOPED_PTR(Impl) impl_;

View File

@ -33,9 +33,9 @@
#include "xlsx_defined_names.h"
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include "../../formulasconvert/formulasconvert.h"
#include "../../include/xml/simple_xml_writer.h"
namespace cpdoccore {
namespace oox {
@ -75,7 +75,7 @@ public:
{
CP_XML_NODE(L"definedName")
{
CP_XML_ATTR(L"name", content_[i].name);
CP_XML_ATTR(L"name", XmlUtils::EncodeXmlString(content_[i].name));
if (content_[i].tableId >= 0)
{
@ -84,11 +84,11 @@ public:
if ( content_[i].ref.find(L"#REF!") != std::wstring::npos )
{
CP_XML_ATTR(L"comment", content_[i].ref);
CP_XML_ATTR(L"comment", XmlUtils::EncodeXmlString(content_[i].ref));
CP_XML_CONTENT(L"#REF!");
}
else
CP_XML_CONTENT(content_[i].ref);
CP_XML_CONTENT(XmlUtils::EncodeXmlString(content_[i].ref));
}
}

View File

@ -118,9 +118,10 @@ std::wstring num_format_context::get_last_time_format() const
{
return impl_->last_time_format_;
}
void num_format_context::start_complex_format()
void num_format_context::start_complex_format(std::wstring const & name)
{
impl2_->complex_number_format_.reset();
impl2_->complex_number_format_.name = name;
}
odf_types::office_value_type::type num_format_context::type() const
{
@ -138,7 +139,20 @@ void num_format_context::add_format(std::wstring const & cond, std::wstring cons
void num_format_context::end_complex_format()
{
impl_->last_format_ = impl2_->complex_number_format_.result_value();
}
mapFormats.insert(std::make_pair(impl2_->complex_number_format_.name, std::make_pair(impl_->type_.get_type(), impl_->last_format_)));
}
std::wstring num_format_context::find_complex_format(std::wstring const & name, odf_types::office_value_type::type & type)
{
std::map<std::wstring, std::pair<odf_types::office_value_type::type, std::wstring>>::iterator pFind = mapFormats.find(name);
if (pFind != mapFormats.end())
{
type = pFind->second.first;
return pFind->second.second;
}
else
return L"";
}
}
}

View File

@ -51,7 +51,6 @@ public:
num_format_context(odf_reader::odf_read_context & odfContext);
~num_format_context();
public:
void start_format(const std::wstring & style_name);
std::wostream & output();
void end_format();
@ -63,16 +62,19 @@ public:
odf_types::office_value_type::type type() const;
void type(odf_types::office_value_type::type t);
void start_complex_format();
void start_complex_format(std::wstring const & name);
void add_format(std::wstring const & cond, std::wstring const & format);
void end_complex_format();
std::wstring find_complex_format(std::wstring const & name, odf_types::office_value_type::type & type);
//std::wstring default_data_style(int type);
odf_reader::odf_read_context & odf_context_;
private:
class Impl;
std::map<std::wstring, std::pair<odf_types::office_value_type::type, std::wstring>> mapFormats;
class Impl;
_CP_SCOPED_PTR(Impl) impl_;
class Impl2;

View File

@ -45,6 +45,29 @@ public:
std::wstring name_;
bool hidden_;
void clear()
{
cols_.clear();
sheetFormat_.clear();
sheetData_.clear();
mergeCells_.clear();
hyperlinks_.clear();
comments_.clear();
sort_.clear();
tableParts_.clear();
autofilter_.clear();
conditionalFormatting_.clear();
picture_background_.clear();
dataValidations_.clear();
dataValidationsX14_.clear();
ole_objects_.clear();
page_props_.clear();
header_footer_.clear();
controls_.clear();
protection_.clear();
breaks_.clear();
}
std::wstringstream cols_;
std::wstringstream sheetFormat_;
std::wstringstream sheetData_;
@ -202,11 +225,16 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_NODE(L"sheetData")
{
CP_XML_STREAM() << impl_->sheetData_.str();
if (impl_->sheetData_.rdbuf()->in_avail() != 0)
{
impl_->sheetData_.flush();
CP_XML_STREAM() << impl_->sheetData_.rdbuf();
}
}
if (!impl_->protection_.str().empty())
std::wstring protect = impl_->protection_.str();
if (false == protect.empty())
{
CP_XML_STREAM() << impl_->protection_.str();
CP_XML_STREAM() << protect;
}
//оказывается порядок нахождения элементов важен !!! (для office 2010)
//объединенные ячейки раньше чем гиперлинки !!!
@ -220,11 +248,13 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_STREAM() << impl_->conditionalFormatting_.str();
CP_XML_STREAM() << impl_->dataValidations_.str();
if (!impl_->hyperlinks_.str().empty())
std::wstring hyperlinks = impl_->hyperlinks_.str();
if (false == hyperlinks.empty())
{
CP_XML_NODE(L"hyperlinks")
{
CP_XML_STREAM() << impl_->hyperlinks_.str();
CP_XML_STREAM() << hyperlinks;
}
}
CP_XML_STREAM() << impl_->page_props_.str();
@ -248,30 +278,34 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_ATTR(L"r:id", impl_->vml_drawingId_);
}
}
if (false == impl_->ole_objects_.str().empty())
std::wstring oleObjects = impl_->ole_objects_.str();
if (false == oleObjects.empty())
{
CP_XML_NODE(L"oleObjects")
{
CP_XML_STREAM() << impl_->ole_objects_.str();
CP_XML_STREAM() << oleObjects;
}
}
std::wstring controls = impl_->controls_.str();
if (false == impl_->controls_.str().empty())
{
CP_XML_NODE(L"controls")
{
CP_XML_STREAM() << impl_->controls_.str();
CP_XML_STREAM() << controls;
}
}
if (false == impl_->tableParts_.str().empty())
std::wstring tableParts = impl_->tableParts_.str();
if (false == tableParts.empty())
{
CP_XML_NODE(L"tableParts")
{
CP_XML_STREAM() << impl_->tableParts_.str();
CP_XML_STREAM() << tableParts;
}
}
CP_XML_STREAM() << impl_->picture_background_.str();
if (false == impl_->dataValidationsX14_.str().empty())
std::wstring dataValidations14 = impl_->dataValidationsX14_.str();
if (false == dataValidations14.empty())
{
CP_XML_NODE(L"extLst")
{
@ -280,12 +314,13 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_ATTR(L"uri", L"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}");
CP_XML_ATTR(L"xmlns:x14", L"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
CP_XML_STREAM() << impl_->dataValidationsX14_.str();
CP_XML_STREAM() << dataValidations14;
}
}
}
}
}
impl_->clear();
}
void xlsx_xml_worksheet::set_drawing_link(std::wstring const & fileName, std::wstring const & id)

View File

@ -173,7 +173,7 @@ void sheets_files::write(const std::wstring & RootPath)
//item->get_rel_file()->write(path.string<std::wstring>());
package::simple_element(fileName, item->str()).write(path);
package::simple_element(fileName, item->content().str()).write(path);
}
}
//--------------------------------------------------------------------------------------------
@ -375,7 +375,7 @@ void xl_pivot_cache_files::write(const std::wstring & RootPath)
contentTypes->add_override(std::wstring(L"/xl/pivotCache/") + fileNameD, kWSConTypeD);
package::simple_element(fileNameD, pivot_caches_[i]->str_d()).write(path);
package::simple_element(fileNameD, pivot_caches_[i]->definitions().str()).write(path);
if (pivot_caches_[i]->get_rels().empty() == false)
{
@ -392,7 +392,7 @@ void xl_pivot_cache_files::write(const std::wstring & RootPath)
const std::wstring fileRef = std::wstring(L"pivotCache/") + fileNameD;
rels_->add(id, kWSRel, fileRef);
}
std::wstring content_records = pivot_caches_[i]->str_r();
std::wstring content_records = pivot_caches_[i]->records().str();
if (!content_records.empty())
{
const std::wstring fileNameR = std::wstring(L"pivotCacheRecords") + std::to_wstring(i + 1) + L".xml";

View File

@ -57,13 +57,11 @@ class sheet_content : noncopyable
{
public:
sheet_content();
std::wostream & content() { return content_; }
std::wstringstream & content() { return content_; }
void add_rel(relationship const & r);
void add_rels(rels & r);
rels_file_ptr get_rel_file() { return rels_; }
std::wstring str() { return content_.str(); }
static _CP_PTR(sheet_content) create();
private:
std::wstringstream content_;
rels_file_ptr rels_;
@ -79,13 +77,10 @@ public:
pivot_cache_content();
static _CP_PTR(pivot_cache_content) create();
std::wostream & definitions() { return definitions_; }
std::wostream & records() { return records_; }
std::wstringstream & definitions() { return definitions_; }
std::wstringstream & records() { return records_; }
rels & get_rels() { return definitions_rels_file_->get_rels(); }
std::wstring str_d() { return definitions_.str(); }
std::wstring str_r() { return records_.str(); }
friend class xl_pivot_cache_files;
private:
std::wstringstream records_;

View File

@ -236,20 +236,20 @@ double convertTime(int hours, int minutes, double sec)
return v;
}
bool parseDate(const std::wstring & Date, int & Year, int & Month, int & Day)
bool parseDateTime(const std::wstring & DateTime, int & Year, int & Month, int & Day,
_CP_OPT(int) & Hours, _CP_OPT(int) & Minutes, _CP_OPT(int) & Sec)
{
// for example, "1899-12-31T05:37:46.665696"
try
{
boost::wregex r(L"([\\d]+)-([\\d]+)-([\\d]+)(?:T([\\d]+):([\\d]+):([\\d]+)(?:\\.([\\d]+))?)?");
boost::match_results<std::wstring::const_iterator> res;
if (boost::regex_match(Date, res, r))
if (boost::regex_match(DateTime, res, r))
{
Year = boost::lexical_cast<int>(res[1].str());
Month = boost::lexical_cast<int>(res[2].str());
Day = boost::lexical_cast<int>(res[3].str());
int Hours, Minutes, Sec, FSec;
if (res[4].matched)
Hours = boost::lexical_cast<int>(res[4].str());
@ -260,7 +260,7 @@ bool parseDate(const std::wstring & Date, int & Year, int & Month, int & Day)
Sec = boost::lexical_cast<int>(res[6].str());
if (res[7].matched)
FSec = boost::lexical_cast<int>(res[7].str());
int FSec = boost::lexical_cast<int>(res[7].str());
return true;
}

View File

@ -33,7 +33,7 @@
#include <string>
#include <boost/cstdint.hpp>
#include "../../include/CPOptional.h"
#include "xlsx_cell_format.h"
namespace cpdoccore {
@ -57,9 +57,7 @@ bool parseBoolVal(const std::wstring & str);
std::wstring cellType2Str(XlsxCellType::type type);
bool parseDate(const std::wstring & Date, int & Year, int & Month, int & Day);
bool parseDateTime(const std::wstring & DateTime, int & Y, int & M, int & D, _CP_OPT(int) & H, _CP_OPT(int) & Min, _CP_OPT(int) & S);
bool parseTime(const std::wstring & Time, int & Hours, int & Minutes, double & seconds);
boost::int64_t convertDate(int Year, int Month, int Day);
double convertTime(int hours, int minutes, double sec);

View File

@ -192,7 +192,7 @@ void xlsx_conversion_context::end_document()
{
CP_XML_NODE(L"sheet")
{
CP_XML_ATTR(L"name", sheet->name()); // office 2010 ! ограничение на длину имени !!!
CP_XML_ATTR(L"name", XmlUtils::EncodeXmlString(sheet->name())); // office 2010 ! ограничение на длину имени !!!
CP_XML_ATTR(L"sheetId", i + 1);
CP_XML_ATTR(L"state", sheet->hidden() ? L"hidden" : L"visible");
CP_XML_ATTR(L"r:id", id);

View File

@ -646,34 +646,50 @@ void process_build_object::ApplyChartProperties(std::wstring style, std::vector<
if (false == data_style_name.empty())
{
office_element_ptr elm = number_styles_.find_by_style_name(data_style_name);
number_style_base *number_style = dynamic_cast<number_style_base*>(elm.get());
if (number_style)
office_value_type::type num_format_type = office_value_type::Custom;
std::wstring num_format = num_format_context_.find_complex_format(data_style_name, num_format_type);
if (num_format.empty())
{
num_format_context_.start_complex_format();
number_style->oox_convert(num_format_context_);
num_format_context_.end_complex_format();
std::wstring num_format = num_format_context_.get_last_format();
_property p(L"num_format", num_format);
propertiesOut.push_back(p);
office_element_ptr elm = number_styles_.find_by_style_name(data_style_name);
number_style_base *number_style = dynamic_cast<number_style_base*>(elm.get());
if (number_style)
{
num_format_context_.start_complex_format(data_style_name);
number_style->oox_convert(num_format_context_);
num_format_context_.end_complex_format();
num_format = num_format_context_.get_last_format();
}
}
if (false == num_format.empty())
{
_property p(L"num_format", num_format);
propertiesOut.push_back(p);
}
}
if (false == percentage_data_style_name.empty())
{
office_element_ptr elm = number_styles_.find_by_style_name(percentage_data_style_name);
number_style_base *number_style = dynamic_cast<number_style_base*>(elm.get());
if (number_style)
office_value_type::type num_format_type = office_value_type::Percentage;
std::wstring num_format = num_format_context_.find_complex_format(percentage_data_style_name, num_format_type);
if (num_format.empty())
{
office_element_ptr elm = number_styles_.find_by_style_name(percentage_data_style_name);
number_style_base *number_style = dynamic_cast<number_style_base*>(elm.get());
if (number_style)
{
num_format_context_.start_complex_format(percentage_data_style_name);
number_style->oox_convert(num_format_context_);
num_format_context_.end_complex_format();
num_format = num_format_context_.get_last_format();
}
}
if (false == num_format.empty())
{
num_format_context_.start_complex_format();
number_style->oox_convert(num_format_context_);
num_format_context_.end_complex_format();
std::wstring num_format = num_format_context_.get_last_format();
_property p(L"percentage_num_format", num_format);
propertiesOut.push_back(p);
}

View File

@ -392,10 +392,10 @@ void common_xlink_attlist::apply_from(const common_xlink_attlist & Other)
}
void common_xlink_attlist::serialize(CP_ATTR_NODE)
{
CP_XML_ATTR_OPT(L"xlink:href", href_);
CP_XML_ATTR_OPT(L"xlink:type", type_);
CP_XML_ATTR_OPT(L"xlink:show", show_);
CP_XML_ATTR_OPT(L"xlink:actuate", actuate_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"xlink:href", href_);
CP_XML_ATTR_OPT(L"xlink:type", type_);
CP_XML_ATTR_OPT(L"xlink:show", show_);
CP_XML_ATTR_OPT(L"xlink:actuate", actuate_);
}
//////////////////////////////////////////////////////////////////////////////////////////////////
@ -444,7 +444,7 @@ void common_value_and_type_attlist::serialize(CP_ATTR_NODE)
CP_XML_ATTR_OPT(L"office:date-value", office_date_value_);
CP_XML_ATTR_OPT(L"office:time-value", office_time_value_);
CP_XML_ATTR_OPT(L"office:boolean-value", office_boolean_value_);
CP_XML_ATTR_OPT(L"office:string-value", office_string_value_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"office:string-value", office_string_value_);
}
//////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -99,7 +99,7 @@ std::wstring presentation_class::get_type_ms()
//res = L"subTitle";
break;
case graphic:
res = L"dgm";
res = L"body";
break;
case object:
res = L"obj";

View File

@ -863,8 +863,8 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, union_comm
drawing->relativeHeight = L"2";
drawing->behindDoc = L"0";
if (((drawing->styleWrap && drawing->styleWrap->get_type() == style_wrap::RunThrough) ||
!drawing->styleWrap) && styleRunThrough && styleRunThrough->get_type() == run_through::Background)
if (((drawing->styleWrap && drawing->styleWrap->get_type() == style_wrap::RunThrough) || !drawing->styleWrap)
&& ((styleRunThrough && styleRunThrough->get_type() == run_through::Background) || !styleRunThrough))
{
drawing->behindDoc = L"1";
if (!drawing->styleWrap)

View File

@ -413,7 +413,7 @@ void format_number_number(
strm << L"General";
}
if (number_decimal_places_)
if ((number_decimal_places_) && (*number_decimal_places_ > 0))
{
strm << L".";
strm << std::wstring(*number_decimal_places_, L'0');

View File

@ -175,7 +175,7 @@ void office_annotation::xlsx_convert(oox::xlsx_conversion_context & Context)
{
author = xml::utils::replace_text_to_xml(dynamic_cast<dc_creator * >(dc_creator_.get())->content_);
}
int col = Context.current_table_column() + 1; if (col < 0) col = 0;
int col = Context.current_table_column(); if (col < 0) col = 0;
int row = Context.current_table_row(); if (row < 0) row = 0;
std::wstring ref = oox::getCellAddress(col, row);

View File

@ -241,18 +241,25 @@ void style_table_column_properties::docx_convert(oox::docx_conversion_context &
double width = 0.5 + 20.0 * attlist_.style_column_width_->get_value_unit(length::pt) * kf_max_width_ms;
Context.get_table_context().add_column_width(width);
strm << L"<w:gridCol w:w=\"" << (int)(width) << "\"/>";
if (width > 0)
strm << L"<w:gridCol w:w=\"" << (int)(width) << "\"/>";
else
strm << L"<w:gridCol/>";
}
else if ((attlist_.style_rel_column_width_) && (attlist_.style_rel_column_width_->get_unit() == length::rel))
{
double width = 0.5 + 20.0 * page_width * attlist_.style_rel_column_width_->get_value() / 65534.;
Context.get_table_context().add_column_width(width);
strm << L"<w:gridCol w:w=\"" << (int)(width) << "\"/>";
if (width > 0)
strm << L"<w:gridCol w:w=\"" << (int)(width) << "\"/>";
else
strm << L"<w:gridCol/>";
}
else
{
Context.get_table_context().add_column_width(0);
strm << L"<w:gridCol/>";
}
}

View File

@ -810,7 +810,7 @@ const wchar_t * table_content_validation::name = L"content-validation";
void table_content_validation::add_attributes(xml::attributes_wc_ptr const & Attributes)
{
CP_APPLY_ATTR(L"table:name", table_name_);
CP_APPLY_ATTR(L"table:name", table_name_);
CP_APPLY_ATTR(L"table:condition", table_condition_);
CP_APPLY_ATTR(L"table:display-list", table_display_list_);
CP_APPLY_ATTR(L"table:allowempty-cell", table_allowempty_cell_);

View File

@ -461,11 +461,7 @@ double pixToSize(double pixels, double maxDigitSize)
return (int(( pixels /*/ 0.75*/ - 5)/ maxDigitSize * 100. + 0.5)) /100. * 0.9; // * 9525. * 72.0 / (360000.0 * 2.54);
}
double cmToChars (double cm)
{
double pt = cm * 28.34467120181406;
return pt * 48. /(12.75 * 8.43 *2.);
}
}
void table_table_column::xlsx_convert(oox::xlsx_conversion_context & Context)
@ -552,8 +548,6 @@ void table_table_column::xlsx_convert(oox::xlsx_conversion_context & Context)
const double pixDpi = in_width * 96.;
width = pixToSize(pixDpi, Context.getMaxDigitSize().first);
//const double width = cmToChars(prop->attlist_.style_column_width_->get_value_unit(length::cm));
// see ECMA-376 page 1768
if (in_width > 0)
CP_XML_ATTR(L"width", *width);
@ -747,19 +741,23 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
if (false == data_style.empty())
{
office_element_ptr elm = odfContext.numberStyles().find_by_style_name(data_style);
number_style_base *num_style = dynamic_cast<number_style_base*>(elm.get());
if (num_style)
{
Context.get_num_format_context().start_complex_format();
num_style->oox_convert(Context.get_num_format_context());
Context.get_num_format_context().end_complex_format();
num_format = Context.get_num_format_context().get_last_format();
num_format = Context.get_num_format_context().find_complex_format(data_style, num_format_type);
num_format_type = Context.get_num_format_context().type();
}
if (num_format.empty())
{
office_element_ptr elm = odfContext.numberStyles().find_by_style_name(data_style);
number_style_base *num_style = dynamic_cast<number_style_base*>(elm.get());
if (num_style)
{
Context.get_num_format_context().start_complex_format(data_style);
num_style->oox_convert(Context.get_num_format_context());
Context.get_num_format_context().end_complex_format();
num_format = Context.get_num_format_context().get_last_format();
num_format_type = Context.get_num_format_context().type();
}
}
}
//------------------------------------------------------------------------
std::wstring number_val;
@ -810,16 +808,29 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
if (attr.office_date_value_)
{
int y, m, d;
if (oox::parseDate(attr.office_date_value_.get(), y, m, d))
_CP_OPT(int) h, min, sec;
if (oox::parseDateTime(attr.office_date_value_.get(), y, m, d, h, min, sec))
{
boost::int64_t intDate = oox::convertDate(y, m, d);
_CP_OPT(double) dTime;
if (h && min)
{
dTime = oox::convertTime(*h, *min, sec.get_value_or(0));
}
if (intDate > 0)
{
number_val = boost::lexical_cast<std::wstring>(intDate);
if (dTime)
{
number_val = XmlUtils::DoubleToString(*dTime + intDate);
}
else
{
number_val = boost::lexical_cast<std::wstring>(intDate);
}
xlsx_value_type = oox::XlsxCellType::n;
if (num_format_type == office_value_type::Currency)
{//тип формата данных из стиля не соответствует формату анных ячейки
{//тип формата данных из стиля не соответствует формату данных ячейки
num_format.clear();
num_format_type = office_value_type::Date;
}
@ -1001,7 +1012,7 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
CP_XML_ATTR(L"t", L"array");
CP_XML_ATTR(L"aca", false);
}
CP_XML_CONTENT(xlsxFormula);
CP_XML_CONTENT(XmlUtils::EncodeXmlString(xlsxFormula));
}
}
}
@ -1151,12 +1162,26 @@ void table_covered_table_cell::xlsx_convert(oox::xlsx_conversion_context & Conte
if (attr.office_date_value_)
{
int y, m, d;
if (oox::parseDate(attr.office_date_value_.get(), y, m, d))
_CP_OPT(int) h, min, s;
if (oox::parseDateTime(attr.office_date_value_.get(), y, m, d, h, min, s))
{
boost::int64_t intDate = oox::convertDate(y, m, d);
_CP_OPT(double) dTime;
if (h && min)
{
dTime = oox::convertTime(*h, *min, s.get_value_or(0));
}
if (intDate > 0)
{
number_val = boost::lexical_cast<std::wstring>(intDate);
if (dTime)
{
number_val = XmlUtils::DoubleToString(*dTime + intDate);
}
else
{
number_val = std::to_wstring(intDate);
}
}
else
{
@ -1195,17 +1220,22 @@ void table_covered_table_cell::xlsx_convert(oox::xlsx_conversion_context & Conte
if (!data_style.empty())
{
office_element_ptr elm = odfContext.numberStyles().find_by_style_name(data_style);
number_style_base *num_style = dynamic_cast<number_style_base*>(elm.get());
if (num_style)
num_format = Context.get_num_format_context().find_complex_format(data_style, odf_value_type);
if (num_format.empty())
{
Context.get_num_format_context().start_complex_format();
office_element_ptr elm = odfContext.numberStyles().find_by_style_name(data_style);
number_style_base *num_style = dynamic_cast<number_style_base*>(elm.get());
if (num_style)
{
Context.get_num_format_context().start_complex_format(data_style);
num_style->oox_convert(Context.get_num_format_context());
Context.get_num_format_context().end_complex_format();
num_format = Context.get_num_format_context().get_last_format();
}
Context.get_num_format_context().end_complex_format();
num_format = Context.get_num_format_context().get_last_format();
}
}
}
oox::xlsx_cell_format cellFormat;

View File

@ -365,6 +365,16 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context, _CP_OPT(std
}
for (size_t i = index; i < content_.size(); i++)
{
if (content_[i]->get_type() == typeTextP)
{//параграф в параграфе .... оО
p *para_inside = dynamic_cast<p*>(content_[i].get());
for (size_t j = 0; (para_inside) && (j < para_inside->paragraph_.content_.size()); ++j)
{
para_inside->paragraph_.content_[j]->docx_convert(Context);
}
continue;
}
if (Context.get_page_break())
{
if (Context.process_headers_footers_ == false)
@ -2054,6 +2064,11 @@ void variable_get::docx_convert(oox::docx_conversion_context & Context)
const wchar_t * variable_set::ns = L"text";
const wchar_t * variable_set::name = L"variable-set";
void variable_set::add_text(const std::wstring & Text)
{
office_element_ptr elm = text::create(Text);
content_.push_back(elm);
}
void variable_set::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"style:data-style-name", style_data_style_name_);
@ -2066,7 +2081,31 @@ void variable_set::add_attributes( const xml::attributes_wc_ptr & Attributes )
}
void variable_set::docx_convert(oox::docx_conversion_context & Context)
{
Context.finish_run();
Context.output_stream() << L"<w:sdt>";
Context.output_stream() << L"<w:sdtPr>";
{
Context.output_stream() << L"<w:id w:val=\"" + std::to_wstring(Context.get_drawing_context().get_current_shape_id()) + L"\"/>";
if (name_)
{
Context.output_stream() << L"<w:placeholder/>";
Context.output_stream() << L"<w:docPart w:val=\"" + xml::utils::replace_text_to_xml(*name_) + L"\"/>";
}
Context.output_stream() << L"<w:showingPlcHdr/>";
Context.output_stream() << L"<w:text/>";
}
Context.output_stream() << L"</w:sdtPr>";
Context.output_stream() << L"<w:sdtContent>";
{
for (size_t i = 0; i < content_.size(); i++)
{
content_[i]->docx_convert(Context);
}
}
Context.finish_run();
Context.output_stream() << L"</w:sdtContent>";
Context.output_stream() << L"</w:sdt>";
}
//---------------------------------------------------------------------------------------------------
const wchar_t * variable_decl::ns = L"text";

View File

@ -864,16 +864,18 @@ public:
void docx_convert(oox::docx_conversion_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_text(const std::wstring & Text);
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
odf_types::common_value_and_type_attlist office_value_;
_CP_OPT(std::wstring) office_formula_;
odf_types::common_value_and_type_attlist office_value_;
_CP_OPT(std::wstring) office_formula_;
_CP_OPT(std::wstring) style_data_style_name_;
_CP_OPT(std::wstring) display_;
_CP_OPT(std::wstring) name_;
_CP_OPT(std::wstring) style_data_style_name_;
_CP_OPT(std::wstring) display_;
_CP_OPT(std::wstring) name_;
office_element_ptr_array content_;
};
CP_REGISTER_OFFICE_ELEMENT2(variable_set);
//---------------------------------------------------------------------------------------------------

View File

@ -81,6 +81,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
@ -136,6 +138,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4267;4996;4172;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName)-static.lib</OutputFile>

View File

@ -81,6 +81,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
@ -136,12 +138,14 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4267;4996;4172;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
</Lib>
<PostBuildEvent>
<Command>D:\WORK\VersionControl.exe $(ProjectDir)\ASCOfficeOdfFile\version.h</Command>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

View File

@ -81,6 +81,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
@ -135,6 +137,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4267;4996;4172;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName)-static.lib</OutputFile>

View File

@ -80,6 +80,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
@ -124,6 +126,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4267;4996;4172;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>

View File

@ -41,9 +41,9 @@ class abstract_xml : public office_element_impl<abstract_xml>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = type_AbstractXml;
CPDOCCORE_DEFINE_VISITABLE()
public:
abstract_xml() {}

View File

@ -132,7 +132,7 @@ void anim_transition_filter_attlist::serialize(CP_ATTR_NODE)
}
void anim_audio_attlist::serialize(CP_ATTR_NODE)
{
CP_XML_ATTR_OPT(L"xlink:href", xlink_href_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"xlink:href", xlink_href_);
CP_XML_ATTR_OPT(L"anim:audio-level",anim_audio_level_);
}
const wchar_t * anim_transitionFilter::ns = L"anim";

View File

@ -49,9 +49,9 @@ class anim_par : public office_element_impl<anim_par>//Параллельные
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeAnimPar;
CPDOCCORE_DEFINE_VISITABLE();
odf_types::common_anim_smil_attlist attlist_;
office_element_ptr anim_par_;
@ -70,9 +70,8 @@ class anim_seq : public office_element_impl<anim_seq>//Последовател
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeAnimSeq;
CPDOCCORE_DEFINE_VISITABLE();
static const ElementType type = typeAnimSeq;
odf_types::common_anim_smil_attlist attlist_;
office_element_ptr_array anim_par_array_;
@ -112,9 +111,9 @@ class anim_transitionFilter : public office_element_impl<anim_transitionFilter>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeAnimTransitionFilter;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child){}
@ -131,9 +130,9 @@ class anim_audio : public office_element_impl<anim_audio>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeAnimAudio;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child){}

View File

@ -56,9 +56,9 @@ void calcext_icon_set_attr::serialize(CP_ATTR_NODE)
}
void calcext_condition_attr::serialize(CP_ATTR_NODE)
{
CP_XML_ATTR_OPT(L"calcext:base-cell-address", calcext_base_cell_address_);
CP_XML_ATTR_OPT(L"calcext:apply-style-name", calcext_apply_style_name_);
CP_XML_ATTR_OPT(L"calcext:value", calcext_value_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"calcext:base-cell-address", calcext_base_cell_address_);
CP_XML_ATTR_OPT(L"calcext:apply-style-name", calcext_apply_style_name_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"calcext:value", calcext_value_);
}
void calcext_date_is_attr::serialize(CP_ATTR_NODE)
{
@ -216,7 +216,7 @@ void calcext_formatting_entry::serialize(std::wostream & _Wostream)
{
CP_XML_NODE_SIMPLE()
{
CP_XML_ATTR_OPT(L"calcext:value",calcext_value_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"calcext:value",calcext_value_);
CP_XML_ATTR_OPT(L"calcext:type", calcext_type_);
}
}
@ -233,7 +233,7 @@ void calcext_color_scale_entry::serialize(std::wostream & _Wostream)
{
CP_XML_NODE_SIMPLE()
{
CP_XML_ATTR_OPT(L"calcext:value", calcext_value_);
CP_XML_ATTR_OPT_ENCODE_STRING(L"calcext:value", calcext_value_);
CP_XML_ATTR_OPT(L"calcext:type", calcext_type_);
CP_XML_ATTR_OPT(L"calcext:color", calcext_color_);
}

View File

@ -94,9 +94,9 @@ class calcext_color_scale_entry : public office_element_impl<calcext_color_scale
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextColorScaleEntry;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -116,9 +116,9 @@ class calcext_formatting_entry : public office_element_impl<calcext_formatting_e
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextFormattingEntry;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -137,9 +137,9 @@ class calcext_icon_set : public office_element_impl<calcext_icon_set>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextIconSet;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -158,9 +158,9 @@ class calcext_data_bar: public office_element_impl<calcext_data_bar>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextDataBar;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -178,9 +178,9 @@ class calcext_color_scale: public office_element_impl<calcext_color_scale>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextColorScale;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -197,9 +197,9 @@ class calcext_date_is: public office_element_impl<calcext_date_is>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextDateIs;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -216,9 +216,9 @@ class calcext_condition: public office_element_impl<calcext_condition>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextCondition;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -235,9 +235,9 @@ class calcext_conditional_format: public office_element_impl<calcext_conditional
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextConditionalFormat;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -258,9 +258,9 @@ class calcext_conditional_formats: public office_element_impl<calcext_conditiona
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeCalcextConditionalFormats;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -38,11 +38,6 @@
#include <boost/algorithm/string.hpp>
#include <xml/xmlchar.h>
#include <xml/attributes.h>
#include "odf_conversion_context.h"
namespace cpdoccore {

View File

@ -48,10 +48,8 @@ class draw_base : public office_element_impl<draw_base>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawBase;
CPDOCCORE_DEFINE_VISITABLE()
static const ElementType type = typeDrawBase;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -62,7 +60,6 @@ public:
odf_types::union_common_draw_attlists common_draw_attlists_;
office_element_ptr_array content_;
};
}

View File

@ -67,9 +67,9 @@ class draw_image : public office_element_impl<draw_image>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawImage;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -93,9 +93,9 @@ class draw_chart : public office_element_impl<draw_chart>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawChart;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -118,9 +118,7 @@ class draw_frame : public draw_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawFrame;
CPDOCCORE_DEFINE_VISITABLE()
static const ElementType type = typeDrawFrame;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -148,9 +146,9 @@ class draw_g : public office_element_impl<draw_g>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawG;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -183,9 +181,9 @@ class draw_text_box : public office_element_impl<draw_text_box>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawTextBox;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -204,9 +202,9 @@ class draw_object : public office_element_impl<draw_object>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawObject;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -225,9 +223,9 @@ class draw_object_ole : public office_element_impl<draw_object>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawObjectOle;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -246,9 +244,9 @@ class draw_plugin : public office_element_impl<draw_plugin>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawPlugin;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -68,9 +68,9 @@ class draw_page : public office_element_impl<draw_page>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDrawPage;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -91,9 +91,9 @@ class presentation_footer_decl : public office_element_impl<presentation_footer_
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typePresentationFooterDecl;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -112,9 +112,9 @@ class presentation_date_time_decl : public office_element_impl<presentation_date
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typePresentationDateTimeDecl;
CPDOCCORE_DEFINE_VISITABLE();
_CP_OPT(std::wstring) presentation_name_;
_CP_OPT(std::wstring) presentation_source_;
@ -134,9 +134,9 @@ class presentation_notes : public office_element_impl<presentation_notes>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typePresentationNotes;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -46,7 +46,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawShape;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
virtual void serialize_attlist(CP_ATTR_NODE);
@ -56,7 +56,7 @@ public:
_CP_OPT(std::wstring) draw_id_;//используется для анимашек
CPDOCCORE_DEFINE_VISITABLE();
int sub_type_;
@ -79,7 +79,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawRect;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -104,7 +104,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawEllipse;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -120,7 +120,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawCircle;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
};
@ -146,7 +146,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawLine;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -172,7 +172,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawPath;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -199,7 +199,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawPolygon;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -219,7 +219,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawCustomShape;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
virtual void add_child_element( const office_element_ptr & child_element);
@ -248,8 +248,8 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawEquation;
static const xml::NodeType xml_type = xml::typeElement;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -294,8 +294,8 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawHandle;
static const xml::NodeType xml_type = xml::typeElement;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -340,7 +340,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawEnhancedGeometry;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -361,7 +361,7 @@ public:
static int parsing(_CP_OPT(std::wstring) val);//todoooo наоборот
CPDOCCORE_DEFINE_VISITABLE();
};
CP_REGISTER_OFFICE_ELEMENT2(draw_enhanced_geometry);
@ -375,7 +375,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawCaption;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
};
@ -399,7 +399,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawConnector;
static const xml::NodeType xml_type = xml::typeElement;
virtual void serialize(std::wostream & _Wostream);
@ -418,7 +418,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawControl;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -442,7 +442,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDr3dScene;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -462,7 +462,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDr3dExtrude;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -479,7 +479,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDr3dRotate;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -494,9 +494,9 @@ class dr3d_light : public office_element_impl<dr3d_light>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDr3dLight;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -519,7 +519,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDr3dCube;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -541,7 +541,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeDr3dSphere;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -564,8 +564,8 @@ public:
static const wchar_t * name;
static const ElementType type = typeDrawA;
static const xml::NodeType xml_type = xml::typeElement;
CPDOCCORE_DEFINE_VISITABLE();
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -71,9 +71,9 @@ class style_header_footer_properties : public office_element_impl<style_header_f
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleHeaderFooterProperties;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child)

View File

@ -45,9 +45,9 @@ class text_number : public office_element_impl<text_number>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextNumber;
CPDOCCORE_DEFINE_VISITABLE()
public:
text_number() {}
@ -74,9 +74,9 @@ class text_list_item : public office_element_impl<text_list_item>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextListItem;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -110,9 +110,9 @@ class text_list_header : public office_element_impl<text_list_header>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextListHeader;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -41,10 +41,10 @@ class math_mstack : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMStack;
CPDOCCORE_DEFINE_VISITABLE();
private:
@ -65,10 +65,10 @@ class math_msrow : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSRow;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -88,10 +88,10 @@ class math_msline : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSLine;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -111,10 +111,10 @@ class math_mlongdiv : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSLongDiv;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -134,10 +134,10 @@ class math_mscarries : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSCarries;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -156,10 +156,10 @@ class math_msgroup : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSGroup;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -179,11 +179,11 @@ class math_mscarry : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSCarry;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(const office_element_ptr & child_element);

View File

@ -52,7 +52,7 @@ public:
static const wchar_t * name;
static const ElementType type = typeMathElement;
static const xml::NodeType xml_type = xml::typeElement;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name) {}
virtual void add_child_element(const office_element_ptr & child_element) {}
@ -60,8 +60,8 @@ public:
virtual void serialize(std::wostream & _Wostream) {}
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
friend class odf_document;
};
@ -72,10 +72,10 @@ class office_math : public office_element_impl<office_math>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMath;
CPDOCCORE_DEFINE_VISITABLE();
friend class odf_document;
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -94,11 +94,11 @@ class math_semantics : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMathSemantics;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(const office_element_ptr & child_element);
@ -116,14 +116,12 @@ class math_annotation : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMathAnnotation;
_CP_OPT(std::wstring) encoding_;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(const office_element_ptr & child_element);
@ -144,11 +142,11 @@ class math_annotation_xml : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMathAnnotationXml;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(const office_element_ptr & child_element);

View File

@ -49,13 +49,13 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMRow;
math_mrow();
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -73,11 +73,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMFrac;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
_CP_OPT(Bool) bevelled;
private:
@ -99,11 +99,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSqrt;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -120,11 +120,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMRoot;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -141,11 +141,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMStyle;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
_CP_OPT(color) color_;
@ -169,10 +169,10 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMEnClose;
CPDOCCORE_DEFINE_VISITABLE();
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -189,11 +189,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMFenced;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -210,11 +210,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMPadded;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);

View File

@ -43,11 +43,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSub;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -65,11 +65,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSup;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -88,11 +88,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSubSup;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -109,11 +109,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMNone;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -132,11 +132,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMPreScripts;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -151,11 +151,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMMultiScripts;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -174,11 +174,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMUnderOver;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -195,11 +195,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMOver;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
_CP_OPT(Bool) accent;
private:
@ -217,11 +217,11 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMUnder;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);

View File

@ -41,11 +41,11 @@ class math_mtable : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMTable;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -64,11 +64,11 @@ class math_malignmark : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMAlignMark;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -87,11 +87,11 @@ class math_maligngroup : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMAlignGroup;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -110,11 +110,11 @@ class math_mtd : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMTd;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -133,11 +133,11 @@ class math_mlabeledtr : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMLabelEdTr;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -156,11 +156,11 @@ class math_mtr : public office_math_element
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMTr;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);

View File

@ -44,7 +44,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMI;
private:
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
@ -68,7 +68,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMO;
_CP_OPT(Bool) accent_;
@ -97,7 +97,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMN;
@ -123,7 +123,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMText;
@ -149,7 +149,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMSpace;
@ -173,7 +173,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMS;
@ -197,7 +197,7 @@ namespace cpdoccore {
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMGlyph;

View File

@ -49,6 +49,9 @@ namespace cpdoccore {
using namespace odf_types;
namespace odf_writer {
const wchar_t * number_style_base::ns = L"number";
const wchar_t * number_style_base::name = L"base-style";
std::wstring number_style_base::get_style_name() const
{

View File

@ -43,12 +43,13 @@
namespace cpdoccore {
namespace odf_writer {
class number_style_base : public office_element
class number_style_base : public office_element_impl<number_style_base>
{
public:
CPDOCCORE_DEFINE_VISITABLE()
static const wchar_t * ns;
static const wchar_t * name;
static const ElementType type = typeNumberBaseStyle;
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child);
@ -71,10 +72,10 @@ class number_number_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberNumberStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
virtual void serialize(std::wostream & strm);
@ -87,10 +88,10 @@ class number_currency_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberCurrencyStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
virtual void serialize(std::wostream & strm);
};
@ -102,10 +103,10 @@ class number_text_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberTextStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
virtual void serialize(std::wostream & strm);
};
@ -117,10 +118,10 @@ class number_date_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberDataStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
virtual void serialize(std::wostream & strm);
@ -134,10 +135,8 @@ class number_percentage_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberPercentageStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
virtual void serialize(std::wostream & strm);
};
@ -149,11 +148,9 @@ class number_time_style : public number_style_base
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberTimeStyle;
CPDOCCORE_DEFINE_VISITABLE()
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
static const ElementType type = typeNumberTimeStyle;
_CP_OPT(bool) number_automatic_order_;
virtual void serialize(std::wostream & strm);
@ -166,9 +163,9 @@ class number_text : public office_element_impl<number_text>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberText;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
@ -187,9 +184,9 @@ class number_number : public office_element_impl<number_number>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberNumber;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child);
@ -215,9 +212,9 @@ class number_embedded_text : public office_element_impl<number_embedded_text>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberEmbeddedText;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -236,9 +233,9 @@ class number_scientific_number : public office_element_impl<number_scientific_nu
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberScientificNumber;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -263,9 +260,9 @@ class number_currency_symbol : public office_element_impl<number_currency_symbol
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberCurrencySymbol;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -286,9 +283,9 @@ class number_text_content : public office_element_impl<number_text_content>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberTextContent;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
@ -306,9 +303,9 @@ class number_day_of_week : public office_element_impl<number_day_of_week>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberDayOfWeek;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -324,9 +321,9 @@ class number_quarter : public office_element_impl<number_quarter>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberQuarter;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -342,9 +339,9 @@ class number_day : public office_element_impl<number_day>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberDay;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -361,9 +358,9 @@ class number_month : public office_element_impl<number_month>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberMonth;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -381,9 +378,9 @@ class number_year : public office_element_impl<number_year>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberYear;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -399,9 +396,9 @@ class number_hours : public office_element_impl<number_hours>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberHours;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -417,9 +414,9 @@ class number_minutes : public office_element_impl<number_minutes>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberMinutes;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -435,9 +432,9 @@ class number_seconds : public office_element_impl<number_seconds>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberSeconds;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -454,9 +451,9 @@ class number_am_pm : public office_element_impl<number_am_pm>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberAmPm;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);
@ -469,9 +466,9 @@ class number_fraction : public office_element_impl<number_fraction>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeNumberFraction;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void serialize(std::wostream & strm);

View File

@ -49,14 +49,200 @@ namespace odf_writer
{
namespace package
{
std::string GetUtf8StringFromUnicode_4bytes(const wchar_t* pUnicodes, size_t lCount)
{
std::string res;
res.resize(6 * lCount + 1);
BYTE* pData = (BYTE*)res.c_str();
BYTE* pCodesCur = pData;
const wchar_t* pEnd = pUnicodes + lCount;
const wchar_t* pCur = pUnicodes;
while (pCur < pEnd)
{
unsigned int code = (unsigned int)*pCur++;
if (code < 0x80)
{
*pCodesCur++ = (BYTE)code;
}
else if (code < 0x0800)
{
*pCodesCur++ = 0xC0 | (code >> 6);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x10000)
{
*pCodesCur++ = 0xE0 | (code >> 12);
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x1FFFFF)
{
*pCodesCur++ = 0xF0 | (code >> 18);
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x3FFFFFF)
{
*pCodesCur++ = 0xF8 | (code >> 24);
*pCodesCur++ = 0x80 | (code >> 18 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x7FFFFFFF)
{
*pCodesCur++ = 0xFC | (code >> 30);
*pCodesCur++ = 0x80 | (code >> 24 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 18 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 12 & 0x3F);
*pCodesCur++ = 0x80 | (code >> 6 & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
}
*pCodesCur++ = 0;
res.resize(pCodesCur - pData);
return res;
}
std::string GetUtf8StringFromUnicode_2bytes(const wchar_t* pUnicodes, size_t lCount)
{
std::string res;
res.resize(6 * lCount + 1);
BYTE* pData = (BYTE*)res.c_str();
BYTE* pCodesCur = pData;
const wchar_t* pEnd = pUnicodes + lCount;
const wchar_t* pCur = pUnicodes;
while (pCur < pEnd)
{
unsigned int code = (unsigned int)*pCur++;
if (code >= 0xD800 && code <= 0xDFFF && pCur < pEnd)
{
code = 0x10000 + (((code & 0x3FF) << 10) | (0x03FF & *pCur++));
}
if (code < 0x80)
{
*pCodesCur++ = (BYTE)code;
}
else if (code < 0x0800)
{
*pCodesCur++ = 0xC0 | (code >> 6);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x10000)
{
*pCodesCur++ = 0xE0 | (code >> 12);
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x1FFFFF)
{
*pCodesCur++ = 0xF0 | (code >> 18);
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x3FFFFFF)
{
*pCodesCur++ = 0xF8 | (code >> 24);
*pCodesCur++ = 0x80 | ((code >> 18) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
else if (code < 0x7FFFFFFF)
{
*pCodesCur++ = 0xFC | (code >> 30);
*pCodesCur++ = 0x80 | ((code >> 24) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 18) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 12) & 0x3F);
*pCodesCur++ = 0x80 | ((code >> 6) & 0x3F);
*pCodesCur++ = 0x80 | (code & 0x3F);
}
}
*pCodesCur = 0;
res.resize(pCodesCur - pData);
return res;
}
std::string GetUtf8StringFromUnicode(const wchar_t* pUnicodes, size_t lCount)
{
if (sizeof(WCHAR) == 2)
{
return GetUtf8StringFromUnicode_2bytes(pUnicodes, lCount);
}
else
{
return GetUtf8StringFromUnicode_4bytes(pUnicodes, lCount);
}
}
simple_element::simple_element(const std::wstring & FileName, const std::wstring & Content, bool utf8) : file_name_(FileName), utf8_(utf8)
{
if (utf8_)
{
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(Content);
if (Content.length() > 10 * 1024 * 1024)
{
size_t pos = 0;
while (pos < Content.length())
{
size_t sz = 2 * 1024 * 1024;
if (sz + pos > Content.length())
sz = Content.length() - pos;
if (sz < 1)
break;
content_utf8_ += NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content.c_str() + pos, sz);
pos += sz;
}
}
else
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content.c_str(), Content.length());
}else
content_utf8_ = std::string( Content.begin(), Content.end());
}
simple_element::simple_element(const std::wstring & FileName, wchar_t* Content, size_t Size, bool utf8)
{
if (utf8_)
{
if (Size > 10 * 1024 * 1024)
{
size_t pos = 0;
while (pos < Size)
{
size_t sz = 2 * 1024 * 1024;
if (sz + pos > Size)
sz = Size - pos;
if (sz < 1)
break;
content_utf8_ += NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content + pos, sz);
pos += sz;
}
}
else
content_utf8_ = NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(Content, Size);
}
else
{
std::wstring str(Content, Size);
content_utf8_ = std::string(str.begin(), str.end());
}
}
simple_element::simple_element(const std::wstring & FileName, std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> & streambuf, size_t Size, bool utf8)
{
}
simple_element::simple_element(const std::wstring & FileName, const std::string & Content) : file_name_(FileName), utf8_(false), content_utf8_(Content)
{
}
@ -361,9 +547,11 @@ namespace odf_writer
{
if (false == bXmlRootNodeWrite)
{
if (content)
if (content_)
{
simple_element elm(L"content.xml", content->content_str());
simple_element elm(L"content.xml", content_->content_str());
content_.reset();
elm.write(RootPath, add_padding);
}
}
@ -375,46 +563,6 @@ namespace odf_writer
{
CP_XML_NODE(L"office:document-content")
{
//CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
//CP_XML_ATTR(L"xmlns:style", L"urn:oasis:names:tc:opendocument:xmlns:style:1.0" );
//CP_XML_ATTR(L"xmlns:text", L"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
//CP_XML_ATTR(L"xmlns:table", L"urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
//CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
//CP_XML_ATTR(L"xmlns:fo", L"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
//CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
//CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/" );
//CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
//CP_XML_ATTR(L"xmlns:number", L"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
//CP_XML_ATTR(L"xmlns:presentation", L"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" );
//CP_XML_ATTR(L"xmlns:svg", L"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
//CP_XML_ATTR(L"xmlns:chart", L"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
//CP_XML_ATTR(L"xmlns:dr3d", L"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
//CP_XML_ATTR(L"xmlns:math", L"http://www.w3.org/1998/Math/MathML" );
//CP_XML_ATTR(L"xmlns:form", L"urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
//CP_XML_ATTR(L"xmlns:script", L"urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
//CP_XML_ATTR(L"xmlns:ooo", L"http://openoffice.org/2004/office" );
//CP_XML_ATTR(L"xmlns:ooow", L"http://openoffice.org/2004/writer" );
//CP_XML_ATTR(L"xmlns:oooc", L"http://openoffice.org/2004/calc" );
//CP_XML_ATTR(L"xmlns:dom", L"http://www.w3.org/2001/xml-events" );
//CP_XML_ATTR(L"xmlns:xforms", L"http://www.w3.org/2002/xforms");
//CP_XML_ATTR(L"xmlns:xsd", L"http://www.w3.org/2001/XMLSchema" );
//CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance" );
//CP_XML_ATTR(L"xmlns:rpt", L"http://openoffice.org/2005/report" );
//CP_XML_ATTR(L"xmlns:of", L"urn:oasis:names:tc:opendocument:xmlns:of:1.2" );
//CP_XML_ATTR(L"xmlns:xhtml", L"http://www.w3.org/1999/xhtml" );
//CP_XML_ATTR(L"xmlns:grddl", L"http://www.w3.org/2003/g/data-view#" );
//CP_XML_ATTR(L"xmlns:officeooo", L"http://openoffice.org/2009/office" );
//CP_XML_ATTR(L"xmlns:textooo", L"http://openoffice.org/2013/office" );
//CP_XML_ATTR(L"xmlns:tableooo", L"http://openoffice.org/2009/table" );
//CP_XML_ATTR(L"xmlns:drawooo", L"http://openoffice.org/2010/draw" );
//CP_XML_ATTR(L"xmlns:chartooo", L"http://openoffice.org/2010/chart" );
//CP_XML_ATTR(L"xmlns:smil", L"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
//CP_XML_ATTR(L"xmlns:anim", L"urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
//CP_XML_ATTR(L"xmlns:calcext", L"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" );
//CP_XML_ATTR(L"xmlns:field", L"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" );
//CP_XML_ATTR(L"xmlns:formx", L"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" );
//CP_XML_ATTR(L"xmlns:loext", L"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" );
//CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
CP_XML_ATTR(L"xmlns:meta", L"urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0");
CP_XML_ATTR(L"xmlns:draw", L"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
@ -457,19 +605,23 @@ namespace odf_writer
CP_XML_ATTR(L"office:version", L"1.2");
if (content)
if ((content_) && (content_->styles_.rdbuf()->in_avail() != 0))
{
CP_XML_STREAM() << content->styles_str();
content_->styles_.flush();
CP_XML_STREAM() << content_->styles_.rdbuf();
content_->styles_.clear();
}
CP_XML_NODE(L"office:body")
{
if (content)
if ((content_) && (content_->content_.rdbuf()->in_avail() != 0))
{
CP_XML_STREAM() << content->content_str();
content_->content_.flush();
CP_XML_STREAM() << content_->content_.rdbuf();
content_->content_.clear();
}
}
}
}
}
simple_element elm(L"content.xml", resStream.str());
elm.write(RootPath, add_padding);
}
@ -523,14 +675,16 @@ namespace odf_writer
CP_XML_ATTR(L"xmlns:css3t", L"http://www.w3.org/TR/css3-text/" );
CP_XML_ATTR(L"office:version", L"1.2");
if (content_)
if ((content_) && (content_->content().rdbuf()->in_avail() != 0))
{
CP_XML_STREAM() << content_->str();
content_->content().flush();
CP_XML_STREAM() << content_->content().rdbuf();
}
}
}
content_.reset();
simple_element elm(L"styles.xml", resStream.str());
elm.write(RootPath, add_padding);
}
@ -547,14 +701,16 @@ namespace odf_writer
CP_XML_ATTR(L"xmlns:xlink", L"http://www.w3.org/1999/xlink" );
CP_XML_ATTR(L"xmlns:office", L"urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
if (content_)
if ((content_) && (content_->content().rdbuf()->in_avail() != 0))
{
CP_XML_STREAM() << content_->str();
content_->content().flush();
CP_XML_STREAM() << content_->content().rdbuf();
}
}
}
content_.reset();
simple_element elm(L"settings.xml", resStream.str());
elm.write(RootPath, add_padding);
}

View File

@ -58,10 +58,8 @@ namespace odf_writer
{
public:
content_simple(){}
std::wostream & content() { return content_; }
std::wstring str() { return content_.str(); }
static _CP_PTR(content_simple) create();
std::wstringstream & content() { return content_;}
private:
std::wstringstream content_;
};
@ -72,6 +70,8 @@ namespace odf_writer
class content_content : noncopyable
{
public:
friend class content_file;
content_content(){}
std::wostream & content() { return content_; }
std::wostream & styles() { return styles_; }
@ -103,6 +103,10 @@ namespace odf_writer
simple_element(const std::wstring & FileName, const std::string & Content);
simple_element(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
simple_element(const std::wstring & FileName, wchar_t* Content, size_t Size, bool utf8 = true);
simple_element(const std::wstring & FileName, std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> & streambuf, size_t Size, bool utf8 = true);
static element_ptr create(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
static element_ptr create(const std::wstring & FileName, const std::string & Content);
@ -126,10 +130,10 @@ namespace odf_writer
private:
bool bXmlRootNodeWrite = true;
public:
void set_content(content_content_ptr & c, bool bRootNode = true) { content = c; bXmlRootNodeWrite = bRootNode; }
void set_content(content_content_ptr & c, bool bRootNode = true) { content_ = c; bXmlRootNodeWrite = bRootNode; }
virtual void write(const std::wstring & RootPath, bool add_padding = false);
content_content_ptr content;
content_content_ptr content_;
};
class styles_file : public element

View File

@ -89,10 +89,18 @@ odf_conversion_context::odf_conversion_context(_office_type_document type_, pack
}
odf_conversion_context::~odf_conversion_context()
{
output_document_ = NULL;
if (applicationFonts_)
delete applicationFonts_;
for (size_t i = 0; i < objects_.size(); ++i)
{
if (objects_[i]) delete objects_[i];
objects_[i] = NULL;
}
objects_.clear();
}
void odf_conversion_context::set_fonts_directory(std::wstring pathFonts)
{
if (applicationFonts_)
@ -130,14 +138,14 @@ double odf_conversion_context::convert_symbol_width(double val)
odf_style_context* odf_conversion_context::styles_context()
{
if (!objects_.empty())
return objects_[current_object_].style_context.get();
return objects_[current_object_]->style_context.get();
else
return NULL;
}
odf_settings_context* odf_conversion_context::settings_context()
{
if (!objects_.empty())
return objects_[current_object_].settings_context.get();
return objects_[current_object_]->settings_context.get();
else
return NULL;
}
@ -159,22 +167,22 @@ odf_math_context* odf_conversion_context::math_context()
odf_number_styles_context* odf_conversion_context::numbers_styles_context()
{
if (objects_.size() > 0 && objects_[current_object_].style_context)
return &(objects_[current_object_].style_context->numbers_styles());
if (objects_.size() > 0 && objects_[current_object_]->style_context)
return &(objects_[current_object_]->style_context->numbers_styles());
else return NULL;
}
_mediaitems* odf_conversion_context::mediaitems()
{
return &objects_[current_object_].mediaitems;
return &objects_[current_object_]->mediaitems;
}
void odf_conversion_context::end_document()
{
rels rels_;
rels rels_;
for (size_t i = 0; i < objects_.size(); i++)
{
_object & object = objects_[i];
_object & object = *objects_[i];
bool isRoot = (i == 0 ? true : false);
if (object.content == NULL)continue;
@ -184,8 +192,8 @@ void odf_conversion_context::end_document()
package::content_content_ptr content_root_ = package::content_content::create();
if (objects_.back().scripts)
objects_.back().scripts->serialize(content_root_->styles());
if (objects_.back()->scripts)
objects_.back()->scripts->serialize(content_root_->styles());
object.content->serialize(content_root_->content());
@ -245,15 +253,13 @@ void odf_conversion_context::end_document()
output_document_->add_object(package::element_ptr(object_files), isRoot);
}
}
output_document_->set_rels(rels_);
}
void odf_conversion_context::start_chart()
{
create_object();
create_element(L"office", L"chart", objects_.back().content, this, true);
create_element(L"office", L"chart", objects_.back()->content, this, true);
chart_context_.set_styles_context(odf_conversion_context::styles_context());
chart_context_.start_chart(get_current_object_element());
@ -261,36 +267,39 @@ void odf_conversion_context::start_chart()
void odf_conversion_context::start_spreadsheet()
{
create_object();
create_element(L"office", L"spreadsheet", objects_.back().content, this, true);
create_element(L"office", L"spreadsheet", objects_.back()->content, this, true);
}
void odf_conversion_context::start_text()
{
create_object();
create_element(L"office", L"text", objects_.back().content, this, true);
create_element(L"office", L"text", objects_.back()->content, this, true);
}
void odf_conversion_context::start_presentation()
{
create_object();
create_element(L"office", L"presentation", objects_.back().content, this, true);
create_element(L"office", L"presentation", objects_.back()->content, this, true);
create_element(L"office", L"scripts", objects_.back().scripts, this);
create_element(L"office", L"scripts", objects_.back()->scripts, this);
}
void odf_conversion_context::create_object(bool bAddContentExt)
{
_object obj;
obj.content_ext = bAddContentExt;
obj.style_context = boost::make_shared<odf_style_context>();
obj.settings_context = boost::make_shared<odf_settings_context>();
obj.name = get_next_name_object();
obj.style_context->set_odf_context(this);
obj.settings_context->set_odf_context(this);
objects_.push_back(obj);
_object *obj = new _object();
current_object_ = objects_.size() - 1;
if (obj)
{
obj->content_ext = bAddContentExt;
obj->style_context = boost::make_shared<odf_style_context>();
obj->settings_context = boost::make_shared<odf_settings_context>();
obj->name = get_next_name_object();
obj->style_context->set_odf_context(this);
obj->settings_context->set_odf_context(this);
objects_.push_back(obj);
current_object_ = objects_.size() - 1;
}
}
void odf_conversion_context::end_chart()
{
@ -312,7 +321,7 @@ bool odf_conversion_context::start_math()
//имитация рисованного объекта - высота-ширина ????
create_object(false);
create_element(L"math", L"math", objects_.back().content, this, true);
create_element(L"math", L"math", objects_.back()->content, this, true);
math_context_.set_styles_context(odf_conversion_context::styles_context());
math_context_.start_math(get_current_object_element());
@ -368,7 +377,7 @@ office_element_ptr & odf_conversion_context::get_current_object_element()
create_object();
}
return objects_[current_object_].content;
return objects_[current_object_]->content;
}
std::wstring odf_conversion_context::get_next_name_object()
@ -535,13 +544,13 @@ void odf_conversion_context::add_font(const std::wstring& font_name)
{
if (objects_.empty())return;
if (objects_[current_object_].mapFonts.find(font_name) == objects_[current_object_].mapFonts.end())
if (objects_[current_object_]->mapFonts.find(font_name) == objects_[current_object_]->mapFonts.end())
{
objects_[current_object_].mapFonts.insert(std::make_pair(font_name, 1));
objects_[current_object_]->mapFonts.insert(std::make_pair(font_name, 1));
}
else
{
objects_[current_object_].mapFonts[font_name]++;
objects_[current_object_]->mapFonts[font_name]++;
}
}
}

View File

@ -165,7 +165,7 @@ private:
odf_element_state temporary_;
std::vector<_object> objects_;//"0" = root
std::vector<_object*> objects_;//"0" = root
odf_chart_context chart_context_;
odf_page_layout_context page_layout_context_;

View File

@ -2215,6 +2215,9 @@ void odf_drawing_context::set_line_width(double pt)
{
if (!impl_->current_graphic_properties) return;
if (pt < 0.0001)
impl_->current_graphic_properties->draw_stroke_ = line_style::None;
impl_->current_graphic_properties->svg_stroke_width_ = length(length(pt,length::pt).get_value_unit(length::cm), length::cm);
}

View File

@ -425,7 +425,7 @@ office_element_ptr & odf_style_context::add_or_find(std::wstring name, style_fam
if (oox_id >= 0 && style_state_list_[i]->style_oox_id_ == oox_id)
return style_state_list_[i]->get_office_element();
if ((name.length() >=0 && style_state_list_[i]->odf_style_->get_name() == name)
if ((name.length() >= 0 && style_state_list_[i]->odf_style_->get_name() == name)
&& style_state_list_[i]->root_ == root) return style_state_list_[i]->get_office_element();
//во избежания имена генерим уникальные (в принципе для root и остальных - можно одинаковые)
}

View File

@ -294,10 +294,10 @@ void odf_text_context::start_paragraph(office_element_ptr & elm, bool styled)
}
text_p* p = dynamic_cast<text_p*>(elm.get());
if (p) p->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
if (p) p->paragraph_attrs_.text_style_name_ = style_name;
text_h* h = dynamic_cast<text_h*>(elm.get());
if (h) h->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
if (h) h->paragraph_attrs_.text_style_name_ = style_name;
style *style_ = dynamic_cast<style*>(style_elm.get());
if (style_)
@ -310,10 +310,10 @@ void odf_text_context::start_paragraph(office_element_ptr & elm, bool styled)
else if (false == parent_paragraph_style_.empty())
{
text_p* p = dynamic_cast<text_p*>(elm.get());
if (p)p->paragraph_.paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
if (p)p->paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
text_h* h = dynamic_cast<text_h*>(elm.get());
if (h)p->paragraph_.paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
if (h)p->paragraph_attrs_.text_style_name_ = parent_paragraph_style_;
}
if (paragraph_properties_ && need_break_)
{
@ -643,12 +643,12 @@ void odf_text_context::add_text_style(office_element_ptr & style_elm, std::wstri
if (text_p* p = dynamic_cast<text_p*>(current_level_.back().elm.get()))
{
p->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
p->paragraph_attrs_.text_style_name_ = style_name;
}
if (text_h* h = dynamic_cast<text_h*>(current_level_.back().elm.get()))
{
h->paragraph_.paragraph_attrs_.text_style_name_ = style_name;
h->paragraph_attrs_.text_style_name_ = style_name;
}
}
@ -709,8 +709,8 @@ void odf_text_context::save_property_break()
current_level_[i].style_elm = style_->get_office_element();
current_level_[i].style_name = style_->get_name();
if (p) p->paragraph_.paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
if (h) h->paragraph_.paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
if (p) p->paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
if (h) h->paragraph_attrs_.text_style_name_ = current_level_[i].style_name;
}
break;
}

View File

@ -424,7 +424,7 @@ void ods_table_context::set_data_validation_error(const std::wstring &title, con
text_p *p = dynamic_cast<text_p*>(error_message->content_.back().get());
if (p)
{
p->paragraph_.add_text(content);
p->add_text(content);
}
}
}
@ -452,7 +452,7 @@ void ods_table_context::set_data_validation_promt(const std::wstring &title, con
text_p *p = dynamic_cast<text_p*>(help_message->content_.back().get());
if (p)
{
p->paragraph_.add_text(content);
p->add_text(content);
}
}
}

View File

@ -160,9 +160,6 @@ ods_table_state::ods_table_state(odf_conversion_context * Context, office_elemen
defaut_row_height_ = 9;
defaut_column_width_ = 28.34467120181406 * 1.674;//
cells_size_ = 0;
}
void ods_table_state::set_table_name(std::wstring name)
@ -498,17 +495,17 @@ void ods_table_state::set_row_height(double height)
bool ods_table_state::is_cell_hyperlink()
{
if ( cells_size_ < 1 )return false;
if (cells_.empty())return false;
return cells_.back().hyperlink_idx >= 0 ? true : false;
}
bool ods_table_state::is_cell_comment()
{
if ( cells_size_ < 1 )return false;
if (cells_.empty())return false;
return cells_.back().comment_idx >= 0 ? true : false;
}
bool ods_table_state::is_cell_data_validation()
{
if ( cells_size_ < 1 ) return false;
if (cells_.empty()) return false;
return cells_.back().data_validation_name.empty() ? true : false;
}
int ods_table_state::is_cell_hyperlink(int col, int row)
@ -607,14 +604,14 @@ office_element_ptr & ods_table_state::current_row_element()
}
office_element_ptr & ods_table_state::current_cell_element()
{
if (cells_size_ > 0)
if (false == cells_.empty())
return cells_.back().elm;
else
throw;
}
ods_hyperlink_state & ods_table_state::current_hyperlink()
{
if ((cells_size_ > 0 && !hyperlinks_.empty()) && (cells_.back().hyperlink_idx >= 0) )
if ((false == cells_.empty() && !hyperlinks_.empty()) && (cells_.back().hyperlink_idx >= 0) )
{
return hyperlinks_[cells_.back().hyperlink_idx];
}
@ -657,7 +654,6 @@ void ods_table_state::start_cell(office_element_ptr & elm, office_element_ptr &
current_table_column_ += state.repeated;
cells_.push_back(state);
cells_size_++;
if (current_covered_cols_ > 0 && covered_cell)
current_covered_cols_--;
@ -665,7 +661,7 @@ void ods_table_state::start_cell(office_element_ptr & elm, office_element_ptr &
void ods_table_state::set_cell_format_value(office_value_type::type value_type)
{
if (cells_size_ < 1)return;
if (cells_.empty())return;
if (value_type == office_value_type::Custom)return; //general .. need detect
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
@ -679,7 +675,7 @@ void ods_table_state::set_cell_format_value(office_value_type::type value_type)
}
void ods_table_state::set_cell_type(int type)
{
if (cells_size_ < 1)return;
if (cells_.empty())return;
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
if (cell == NULL)return;
@ -1270,7 +1266,7 @@ void ods_table_state::set_cell_text(odf_text_context* text_context, bool cash_va
}
void ods_table_state::set_cell_value(const std::wstring & value, bool need_cash)
{
if (cells_size_ < 1)return;
if (cells_.empty())return;
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
if (cell == NULL)return;
@ -1416,7 +1412,7 @@ void ods_table_state::end_cell_text()
}
void ods_table_state::end_cell()
{
if ( cells_size_ < 1)return;
if (cells_.empty())return;
if (cells_.back().comment_idx >= 0)
{
@ -1434,6 +1430,10 @@ void ods_table_state::end_cell()
table_table_cell* cell = dynamic_cast<table_table_cell*>(cells_.back().elm.get());
if (cell)cell->attlist_.common_value_and_type_attlist_ = boost::none;
}
if (map_merged_cells.empty())
{
cells_.pop_back();
}
}
void ods_table_state::add_default_cell( int repeated)
@ -1565,7 +1565,6 @@ void ods_table_state::add_default_cell( int repeated)
state.comment_idx = comment_idx;
cells_.push_back(state);
cells_size_++;
current_table_column_ += state.repeated;
@ -1667,6 +1666,13 @@ void ods_table_state::start_conditional_rule(int rule_type, _CP_OPT(unsigned int
if (col.empty()) col = L".A";
if (row.empty()) row = L"1";
if (std::wstring::npos != table.find(L" "))
{
if (table[0] != L'\'')
{
table = L"'" + table + L"'";
}
}
condition->attr_.calcext_base_cell_address_ = table + col + row;
}
switch(rule_type)

View File

@ -124,7 +124,9 @@ namespace utils
std::reverse(a.begin(), a.end());
XmlUtils::replace_all( a, L"$", L"");
XmlUtils::GetUpper(a);
XmlUtils::replace_all( a, L"[", L"");
XmlUtils::replace_all( a, L"]", L"");
XmlUtils::GetUpper(a);
for (size_t i = 0; i < a.length(); i++)
{
@ -493,7 +495,6 @@ private:
std::vector<office_element_ptr> current_level_;//постоянно меняющийся список уровней ("0-й элемент - сама таблица)
std::vector<ods_cell_state> cells_;
long cells_size_;
std::vector<ods_hyperlink_state> hyperlinks_;
std::map<unsigned int, ods_shared_formula_state> shared_formulas_;

View File

@ -1325,7 +1325,8 @@ int odt_conversion_context::start_comment(int oox_comm_id)
create_element(L"office", L"annotation", comm_elm, this);
comment_context_.start_comment(comm_elm, oox_comm_id);
comm_state = 1;
if (text_context()->current_level_.empty())
{
comm_state = 2;
@ -1339,8 +1340,10 @@ int odt_conversion_context::start_comment(int oox_comm_id)
odf_element_state state(comm_elm, L"", office_element_ptr(), text_context()->current_level_.size());
text_context()->current_level_.push_back(state);
return comm_state;
}
return comm_state;
else return 0;
}
void odt_conversion_context::start_comment_content()
{

View File

@ -71,9 +71,9 @@ class dc_date : public office_element_impl<dc_date>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDcDate;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element ( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element ( const office_element_ptr & child_element){}
@ -92,9 +92,9 @@ class dc_creator : public office_element_impl<dc_creator>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDcCreator;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -113,9 +113,9 @@ class office_annotation : public office_element_impl<office_annotation>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotation;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
@ -139,9 +139,9 @@ class office_annotation_end : public office_element_impl<office_annotation_end>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotationEnd;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( const office_element_ptr & child_element){}
@ -166,9 +166,9 @@ class officeooo_annotation : public office_element_impl<officeooo_annotation>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotation;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);

View File

@ -49,10 +49,10 @@ class office_body : public office_element_impl<office_body>
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeBody;
CPDOCCORE_DEFINE_VISITABLE()
office_element * content() { return content_.get(); }

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