Compare commits

...

1454 Commits

Author SHA1 Message Date
6e20801b45 fiix bug #57513 2022-06-28 11:52:23 +03:00
8a2e46cb53 fix bug #57788 2022-06-27 17:08:53 +03:00
8df2390d9d [x2t] Сonvert ooxml to pdf/img without Editor.bin with m_sConvertToOrigin param 2022-06-26 19:13:14 +03:00
f5789d5059 Merge pull request #974 from ONLYOFFICE/fix/v7.2.0-fix-bugs
fix bug #57788
2022-06-25 19:15:59 +03:00
f97a7b1ea3 fix bug #57788 2022-06-25 19:14:42 +03:00
1a0ecb17a7 Refactoring GetCurrentContext 2022-06-25 09:47:19 +03:00
bc447c4522 Fix parallel working of js contexts (jsc) 2022-06-24 21:35:07 +03:00
bebdd90aa2 Merge pull request #973 from ONLYOFFICE/fix/v7.2.0-fix-bugs
.
2022-06-24 17:02:50 +03:00
7d91973ddd . 2022-06-24 17:01:04 +03:00
d98d1859b4 Merge pull request #972 from ONLYOFFICE/fix/v7.2.0-fix-bugs
.
2022-06-24 16:51:59 +03:00
2e34600e01 . 2022-06-24 16:51:13 +03:00
4e4d69235d Merge pull request #971 from ONLYOFFICE/fix/v7.2.0-fix-bugs
for bug #57788
2022-06-24 16:47:33 +03:00
29125519d9 for bug #57788 2022-06-24 16:47:03 +03:00
46c6efee45 Merge pull request #970 from ONLYOFFICE/fix/v7.2.0-ppt
fix part of 57689. Add XmlUtils::EncodeXmlString()
2022-06-24 15:52:57 +03:00
690a614ba5 Merge pull request #968 from ONLYOFFICE/fix/v7.2.0-fix-bugs
fix bug #45874
2022-06-24 14:24:20 +03:00
b48e6d508d fix bug #45874 2022-06-24 14:23:44 +03:00
65a469ef92 Merge pull request #967 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-06-23 20:44:11 +03:00
41a4eedb63 fix bug #57544 2022-06-23 20:43:28 +03:00
19bec43364 fix bug #57702 2022-06-23 17:19:06 +03:00
21f134cf71 Fix writing underline type to binary 2022-06-23 14:27:44 +03:00
80b361fe7d Merge pull request #966 from ONLYOFFICE/fix/v7.2.0-fix-bugs2
Fix/v7.2.0 fix bugs2
2022-06-23 11:46:21 +03:00
32c752a71f for bug #52363
extend xlsx connection
re-place vba xml in binary
2022-06-23 11:45:31 +03:00
1fe41b8b23 fix part of 57689. Add XmlUtils::EncodeXmlString() 2022-06-22 23:24:09 +03:00
464aa7c8c4 xlsx - fix convert ActiveX to Control (FormControlPr) 2022-06-22 19:33:49 +03:00
9646ac25ae Fix project file 2022-06-22 16:48:47 +03:00
b928936f2b fix bug #57677 2022-06-22 12:34:12 +03:00
69448ebba0 fix bug #57682 2022-06-22 12:28:50 +03:00
879715efe9 Fix typo with ligatures type 2022-06-21 17:54:59 +03:00
1bec6aacad Merge pull request #961 from ONLYOFFICE/fix/v7.2.0-fix-bugs2
fix vba read and other
2022-06-20 18:07:28 +03:00
ac64868d4c fix vba read and other 2022-06-20 18:06:19 +03:00
23283244e9 Create fonts directory, if font files cannot be created 2022-06-20 17:49:51 +03:00
c4e6dea3a3 Fix constants for ligatures in docx 2022-06-20 16:25:34 +03:00
ffd60188c2 Fix typo 2022-06-20 15:52:59 +03:00
0da5552fdf Fix allfonts path 2022-06-20 15:50:10 +03:00
37acb4cfc2 Fix compilation 2022-06-18 17:01:02 +03:00
7651a7e472 Fix for native editors (ios/android) 2022-06-17 18:11:03 +03:00
ad51fa70e4 Merge pull request #960 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-06-17 16:58:12 +03:00
0a6b3efbbc add ext rPr 2022-06-17 16:57:15 +03:00
58865ae153 Merge pull request #959 from ONLYOFFICE/fix/pdf-DrawTextGid
pdf DrawTextGid
2022-06-16 20:09:19 +03:00
b620e1b6e4 Refactor saving gids and unicodes to CIDFont 2022-06-16 20:08:11 +03:00
2fb242b9bb xls - read addition streams 2022-06-16 17:48:04 +03:00
b763dd2e3c fix
pdf.bin has the fonts present in the system
2022-06-16 16:30:42 +03:00
b9bc3d0597 fix DrawTextGid 2022-06-16 16:11:43 +03:00
d321366de7 create DrawTextGid
In order to avoid a crash, other functions don't change, only new ones are added
2022-06-15 19:17:23 +03:00
bb657dc536 Store codepoints in a grapheme for saving to pdf 2022-06-14 21:48:25 +03:00
3b581bf5e3 Refactoring 2022-06-14 19:00:09 +03:00
5bd69e0b73 Fix memory leaks 2022-06-10 15:52:27 +03:00
5510223302 Merge pull request #957 from ONLYOFFICE/feature/mobile-extend-insert-image
[native] Extend model of insert image
2022-06-10 15:15:41 +03:00
78b7fcd7ae [native] Extend model of insert image 2022-06-10 15:14:54 +03:00
fee2eb653f Fix compilation 2022-06-10 08:35:07 +03:00
8bc77fa710 Fix compilation 2022-06-10 08:27:02 +03:00
e111568c34 Fix build 2022-06-09 23:04:30 +03:00
500a32a1dc Merge pull request #954 from ONLYOFFICE/android_build
Android build
2022-06-09 21:26:29 +03:00
5387175ed1 Refactoring 2022-06-09 20:57:33 +03:00
63a3da31a9 Merge pull request #953 from ONLYOFFICE/fix/v7.2.0-fix-bugs
Fix/v7.2.0 fix bugs
2022-06-09 18:29:59 +03:00
8555b7d5fe Refactoring ooxmlsignature library 2022-06-09 16:41:22 +03:00
18de7c5da1 [android] Build android app 2022-06-09 14:07:38 +03:00
5e052325ea fix user file (WH30HVUkfv0_VF3YRELqjvuWW8ECe6dQlCI5rw) 2022-06-09 11:53:53 +03:00
ffebbbe0af doc info 2022-06-09 11:26:03 +03:00
03b25199d9 vba in bin 2022-06-09 11:25:38 +03:00
1569b58dab Fix bugs 2022-06-07 22:02:11 +03:00
a2614b0020 Change memorystream engine 2022-06-07 12:46:02 +03:00
01d20d1b13 Fix previous commit 2022-06-07 12:30:37 +03:00
f4c6818570 Fix path 2022-06-07 12:29:03 +03:00
709ac68a97 Remove GraphicsEmbed object by default 2022-06-07 12:28:19 +03:00
c6a4f83a9d Add MemoryStreamEmbed object by default 2022-06-07 12:14:31 +03:00
d7bd15b4e2 Fix builder bug with path to AllFonts 2022-06-06 14:08:00 +03:00
1937f47043 Fix code points calculation for js font engine 2022-06-06 13:40:45 +03:00
f2b19e9701 . 2022-06-03 22:32:34 +03:00
9cbbca4712 Fix typo 2022-06-03 15:28:18 +03:00
319c9d3522 Fix for test function 2022-06-03 13:25:25 +03:00
a33cf2fc7f Fix for shaper 2022-06-03 13:05:04 +03:00
830aee3ae4 Merge pull request #949 from ONLYOFFICE/feature/textNativeEngine
Feature/text native engine
2022-06-02 22:30:12 +03:00
9ae72e5a74 New realization 2022-06-02 19:51:44 +03:00
92e3d6d3cc update core, app from xls, ppt, doc, odf 2022-06-02 17:06:02 +03:00
a6fd52ae70 Worked native version 2022-06-02 13:37:50 +03:00
089f817962 Debugging native text module 2022-06-02 11:48:11 +03:00
97653a5be7 Refactoring 2022-06-02 10:00:41 +03:00
9c81eb5bd1 Developing builder 2022-06-01 23:04:57 +03:00
543c5a59d9 Fix bugs 2022-06-01 22:15:12 +03:00
3517208b92 Fix previous commit 2022-06-01 21:22:11 +03:00
172308579a Fix typo 2022-06-01 19:42:13 +03:00
9860be4434 Add missed file 2022-06-01 19:39:00 +03:00
8ae061d50b Add window as link to global object 2022-06-01 19:38:11 +03:00
00de58f59d Refactoring DoctRenderer.config 2022-06-01 18:26:07 +03:00
98ad73ce7d New text module 2022-06-01 17:37:28 +03:00
7f12d47f7b Remove "/" from paths 2022-05-31 20:56:32 +03:00
df1bac754b Fix crash 2022-05-31 20:39:27 +03:00
be72b15872 Refactoring 2022-05-31 20:19:52 +03:00
700e91629d Fix typo 2022-05-31 19:58:46 +03:00
95e747e400 . 2022-05-31 19:54:46 +03:00
1ba4412bd4 Text measurer module 2022-05-31 19:53:06 +03:00
6d69fc21d5 Merge pull request #947 from ONLYOFFICE/release/v7.2.0
From release
2022-05-31 18:03:08 +03:00
53a0196dea Fix build on old gcc 2022-05-31 17:55:21 +03:00
2e3e75a39c Fix typo 2022-05-31 17:28:27 +03:00
525f318e17 Build on macos 2022-05-31 16:38:19 +03:00
a3d083e7bd Delete harfbuzz.pri 2022-05-31 16:19:44 +03:00
2267f1bca2 Add execute rights 2022-05-31 16:17:44 +03:00
85baa9afc7 Refactoring harfbuzz module 2022-05-31 16:08:17 +03:00
8f97f55e67 Push file 2022-05-31 15:29:27 +03:00
19070ca5c9 Developing 2022-05-31 15:26:36 +03:00
32ac61f890 Developing 2022-05-31 12:31:28 +03:00
ce2727862d [doctrenderer] Fix CZipEmbed::getFile 2022-05-31 10:12:48 +03:00
b1a044ba14 Refactoring zip module 2022-05-30 11:45:41 +03:00
eae2ef8d85 Fix build with qt < 5.15 2022-05-28 22:08:20 +03:00
3599c01b97 Change buffer to unexternalized 2022-05-28 00:00:51 +03:00
c76649d296 Refactoring 2022-05-26 21:18:31 +03:00
738568bf6d [x2t] Call apply_changes for docx 2022-05-26 19:54:04 +03:00
b730fb350d Merge pull request #940 from ONLYOFFICE/feature/newEmbed
Feature/new embed
2022-05-26 18:18:02 +03:00
e147129642 Fix buh with HEAP8 instead HEAPU8 2022-05-26 16:12:49 +03:00
3f097fa83c Change spases to tabs 2022-05-26 15:29:03 +03:00
9a971f16dd Merge pull request #938 from ONLYOFFICE/fix/v7.2.0-fix-bugs
fix bug #57319
2022-05-26 14:54:49 +03:00
272cbbb8b6 fix bug #57319 2022-05-26 14:53:57 +03:00
1d14056ebc Update fonts engine 2022-05-26 14:00:21 +03:00
39e06f668e Fix build module 2022-05-26 10:43:20 +03:00
150a76650e Fix typo 2022-05-25 22:48:02 +03:00
4016df7fc7 End support ZipEmbed 2022-05-25 22:41:58 +03:00
8422e3cd3b Refactoring 2022-05-25 21:26:14 +03:00
827fc16fbe Fix mac version 2022-05-25 21:08:28 +03:00
9b2208b97d Add files 2022-05-25 20:55:58 +03:00
8a34dcf222 Start developing 2022-05-25 20:51:49 +03:00
6aae00a6ee . 2022-05-25 10:39:11 +03:00
42acdac865 Refactoring 2022-05-24 19:52:50 +03:00
459313292e Refactoring zlib module 2022-05-24 18:40:59 +03:00
08612c0cd5 oleSize 2022-05-24 14:38:01 +03:00
7c72b34986 fix bug #57259 2022-05-24 14:37:06 +03:00
d396c8dc7e Merge pull request #931 from ONLYOFFICE/fix/CssTableStyle
Fix css table style
2022-05-23 16:53:42 +03:00
13ee681c22 fix empty w:tblW 2022-05-23 14:40:27 +03:00
3e1c28687a Merge pull request #929 from ONLYOFFICE/feature/ppt_7
Feature/ppt 7
2022-05-23 11:09:24 +03:00
2625d6cd26 Merge remote-tracking branch 'origin/fix/v7.1.0-fix-bugs-ppt3' into feature/ppt_7 2022-05-23 11:07:24 +03:00
dae64684b1 . 2022-05-21 12:46:39 +03:00
6db7f67972 improving the quality of converting table styles 2022-05-20 17:45:06 +03:00
561298b43c fix bug #54031 2022-05-20 17:41:52 +03:00
7c08b05fcd html fix empty <w:tc> 2022-05-19 19:02:51 +03:00
dc9e6ffdd5 html fix empty <w:tc> 2022-05-19 14:57:34 +03:00
b8e5f7d01b html fix hyperlink 2022-05-19 13:16:41 +03:00
32841d6596 Merge pull request #927 from ONLYOFFICE/hotfix/v7.1.1
Hotfix/v7.1.1
2022-05-19 11:50:20 +03:00
4d2830732f fix part of 54031 2022-05-18 23:44:31 +03:00
c8d5ae5f52 html different <w:p> 2022-05-18 18:52:48 +03:00
dbf5e2c0af Merge pull request #926 from ONLYOFFICE/fix/v7.1.1-fix-bugs
fix bug #57224
2022-05-18 16:46:13 +03:00
981ce25bfc fix bug #57224 2022-05-18 16:45:23 +03:00
6eb4e89fe2 Merge pull request #925 from ONLYOFFICE/hotfix/v7.1.1
Hotfix/v7.1.1
2022-05-18 16:31:24 +03:00
3d71a1a8ff Add method to interface 2022-05-18 16:30:38 +03:00
d9407f6534 Fix targetname 2022-05-18 14:02:15 +03:00
6ec06a8342 Flag for qt6 2022-05-18 12:28:38 +03:00
0398c6a018 Added the display property 2022-05-18 12:12:37 +03:00
93d1688e13 . 2022-05-18 10:58:21 +03:00
72cde59fdb Fixed a problem with incorrect display of table borders 2022-05-17 18:50:51 +03:00
03bfb325cd vb->bin 2022-05-17 16:22:56 +03:00
06f7208e20 Merge pull request #924 from ONLYOFFICE/android_password
[android] Add save password
2022-05-17 16:07:22 +03:00
1dcaa7e5cb [android] Add save password 2022-05-17 15:58:24 +03:00
fd3abeca46 fix indent for tab level with bullet 2022-05-17 15:29:14 +03:00
e9f1734f88 Merge pull request #923 from ONLYOFFICE/fix/v7.1.1-fix-bugs
Fix/v7.1.1 fix bugs
2022-05-17 15:14:29 +03:00
c5b124790e . 2022-05-17 15:13:46 +03:00
c8e8cd05fa fix bug #57177 2022-05-17 15:13:25 +03:00
f60dd5b3c7 . 2022-05-17 14:04:00 +03:00
25b8ccfdbd Merge pull request #922 from ONLYOFFICE/fix/v7.1.1-fix-bugs
Fix/v7.1.1 fix bugs
2022-05-17 10:43:05 +03:00
34e6fdaf64 Merge branch 'fix/v7.1.0-fix-bugs' into fix/v7.1.1-fix-bugs 2022-05-17 10:40:42 +03:00
f443771b12 fix UTF-16 fb2 2022-05-17 10:39:22 +03:00
dad67014be fix build 2022-05-17 10:24:02 +03:00
a8f61fa7f4 Merge pull request #921 from ONLYOFFICE/fix/pre7.1.1
Fix/pre7.1.1
2022-05-16 20:57:49 +03:00
4c3f3ea607 fix big csv 2022-05-16 19:40:55 +03:00
05c7e09041 add m_mAttrs to NSCSS::CNode 2022-05-16 17:22:44 +03:00
5e127f15e2 html table attributes 2022-05-16 17:04:22 +03:00
94bfcfc9a6 Merge branch release/v7.1.0 into develop 2022-05-16 12:52:12 +00:00
6738395c7f Add docxf & oform to standardtester 2022-05-16 14:38:46 +03:00
d565300d25 fix UTF-16 html 2022-05-16 12:31:34 +03:00
bb1534f674 vb 2022-05-16 11:43:09 +03:00
c3b585d811 Refactoring 2022-05-14 16:35:01 +03:00
08d23ee5bd For bug 46495 2022-05-13 20:01:07 +03:00
9b5c287820 For bug 46495 2022-05-13 19:59:35 +03:00
c025475f8b Merge branch release/v7.1.0 into master 2022-05-12 13:17:03 +00:00
af50c8a956 Fix build macos version with v8 js engine 2022-05-11 20:33:56 +03:00
668940e5bd Fix bug 57080 2022-05-11 15:40:56 +03:00
ff44478342 fix bug #57104 2022-05-11 12:09:23 +03:00
e02a4cdfea Merge branch 'fix/v7.1.0-fix-bug' into fix/v7.1.0-fix-bugs 2022-05-11 11:17:14 +03:00
bafc119c9c Fix generation wams/asmjs modules 2022-05-10 18:14:08 +03:00
4f4a3cc8fa [x2t] Add numformat formatCode16 for bug 48273 2022-05-10 11:02:35 +03:00
891bcb87ce fix bug #57068 2022-05-09 15:39:45 +03:00
385f82cde6 fix bug #57070 2022-05-09 09:05:23 +03:00
46445c7772 Fix crash with invalid json option 2022-05-07 22:33:22 +03:00
52c3ac384e Fix bug with draw images with transparency 2022-05-07 17:27:26 +03:00
73864cf5f2 Merge pull request #918 from ONLYOFFICE/fix/bug57029
fix bug #57029
2022-05-07 13:58:52 +03:00
5adbcb151f fix bug #57029
(cherry picked from commit 64e9652941)
2022-05-07 13:57:41 +03:00
64e9652941 fix bug #57029 2022-05-06 17:04:46 +03:00
fdde20948b Add UnLock method to imagecache 2022-05-04 11:10:47 +03:00
4ec1a1ec9d fix bug #56901 2022-05-04 10:01:55 +03:00
b701cc43aa for bug #56940 2022-05-04 10:01:55 +03:00
4a083fa784 For bug 56865 2022-05-03 19:32:44 +03:00
657c45d9b4 Merge pull request #917 from ONLYOFFICE/fix/bug55251
Fix bug 55251
2022-05-02 19:12:13 +03:00
6a31f998cb [pdf] Implement alpha channel writing for texture fills 2022-05-02 18:13:17 +03:00
b414fe2058 Fix bug 55251 2022-05-02 15:10:10 +03:00
1f01c756de fix bug #56901 2022-05-01 14:48:12 +03:00
7be5253d15 Fix bug 56748 2022-04-30 10:46:09 +03:00
ec8fa5d6cc [Test] Update tests 2022-04-29 17:26:51 +03:00
a3ea929707 for bug #56940 2022-04-29 17:07:15 +03:00
972a1eff53 Fix bug 56708 2022-04-29 15:42:23 +03:00
43081b2a28 Fix bug 56662 2022-04-29 13:11:37 +03:00
09c617010a Merge pull request #915 from ONLYOFFICE/fix/emf
Fixing a build error
2022-04-29 12:36:15 +03:00
186bfb4b89 Fixing a build error 2022-04-29 12:33:01 +03:00
8e3519236d Fix bug 52601 2022-04-29 11:15:12 +03:00
53b78c1f84 fix bug #56795 2022-04-28 19:29:49 +03:00
1e8a9867fe fix bug #56911 2022-04-28 19:29:49 +03:00
67b71d296c Fix bug 56903 2022-04-28 10:47:29 +03:00
512c7bba6c Merge pull request #913 from ONLYOFFICE/fix/pdf-creator
fix pdf creator
2022-04-27 19:51:18 +03:00
51c88417d6 Creator & Producer 2022-04-27 19:47:04 +03:00
d05c4ae889 fix pdf creator 2022-04-27 18:20:02 +03:00
fc936844bd fix bug #56689 2022-04-27 13:03:05 +03:00
ced58f6cfa fix bug #56655
fix bug #56659
2022-04-27 13:03:05 +03:00
ad53cd99c3 Merge pull request #911 from ONLYOFFICE/fix/emf_wmf
Fix/emf_wmf
2022-04-27 12:10:15 +03:00
dbcf20c3f4 Fix bug 56872 2022-04-27 11:39:32 +03:00
c691df5cac Change default lang 2022-04-26 22:11:24 +03:00
7515049b17 Fix bug 56872 2022-04-26 21:58:00 +03:00
4c5ff20a07 Merge branch 'develop' into fix/emf_wmf 2022-04-26 18:31:04 +03:00
38460e9163 Fixed a problem with incorrect positioning of single characters 2022-04-26 18:25:26 +03:00
882f47f6bc Fix bug 56057 2022-04-26 17:20:53 +03:00
603fa295f4 Add folder for fonts (windows) & dash bug 2022-04-26 13:45:59 +03:00
55850f870c Fix debug build 2022-04-26 11:22:05 +03:00
398c6a6aa3 Fix dash sizes 2022-04-25 17:18:20 +03:00
ce41b18a93 Pdf2Docx bugs 2022-04-25 16:15:48 +03:00
0922267efb Merge pull request #910 from ONLYOFFICE/fix/bug56806
fix bug 56806
2022-04-25 11:36:29 +03:00
e7f34c71e4 add initialization 2022-04-25 11:34:16 +03:00
f455929de3 fix only pdf 2022-04-25 11:27:46 +03:00
e2a7eab89f fix bug 56806 2022-04-25 11:12:39 +03:00
ef5e5e417a Merge pull request #909 from ONLYOFFICE/fix/v7.1.0-fix-bugs
for bug #56655
2022-04-22 17:22:47 +03:00
6e936ffafc for bug #56655 2022-04-22 17:21:55 +03:00
66d7c464c4 Merge pull request #908 from ONLYOFFICE/fix/v7.1.0-fix-bugs
.
2022-04-22 07:32:18 +03:00
4c8abba476 . 2022-04-22 07:31:35 +03:00
7a3be96e58 Merge pull request #907 from ONLYOFFICE/fix/v7.1.0-fix-bugs
.
2022-04-21 18:17:59 +03:00
472073bdd1 . 2022-04-21 18:17:15 +03:00
f01d10d49e Merge pull request #906 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #56768
2022-04-21 11:25:15 +03:00
fcb820ce1d fix bug #56768 2022-04-21 11:24:23 +03:00
e29057693e Merge pull request #905 from ONLYOFFICE/fix/v7.1.0-fix-bugs
rtf formfield, fix odt fields
2022-04-20 13:27:53 +03:00
c4bf58282c rtf formfield, fix odt fields 2022-04-20 13:26:56 +03:00
856183aab6 Fix bug 56642 2022-04-20 13:16:34 +03:00
82da4217a2 Fix bug 56680 2022-04-15 19:22:59 +03:00
b8a0f9faae Fix bug 56488 2022-04-15 16:04:06 +03:00
88d61afb97 Improve performance of reading jpeg2000 2022-04-14 22:51:45 +03:00
564d76f041 Merge pull request #901 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #56663
2022-04-14 21:58:45 +03:00
3b6bb53335 fix bug #56663 2022-04-14 21:58:13 +03:00
1a39c5e01a Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-04-14 18:22:57 +03:00
8d31ec4b57 Fix bug 56205 2022-04-14 18:22:18 +03:00
dd998710d4 Merge pull request #900 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #56656
2022-04-14 18:15:22 +03:00
9d9e09e93c fix bug #56656 2022-04-14 18:14:32 +03:00
1fa69a32f3 Refactoring convertation pdf=>docx 2022-04-14 16:37:19 +03:00
1d91829136 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-04-14 16:27:41 +03:00
1a3a76c379 Fix bug 56636 2022-04-14 16:26:59 +03:00
c5319eda0c Merge pull request #899 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix bug #56638
2022-04-14 12:29:18 +03:00
2a8fcbf1d4 fix bug #56638 2022-04-14 12:28:23 +03:00
177a87cfb9 Change pick font 2022-04-13 17:45:17 +03:00
868fd15f74 Clear statistics page by page 2022-04-13 14:34:02 +03:00
e8ac0d8eb0 Merge pull request #898 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix bug #56573; fix convert with macro xls
2022-04-13 13:39:32 +03:00
8ba10ab8ba fix bug #56573 2022-04-13 13:38:07 +03:00
120057be57 Fix bug #39212
Fix the problem with parsing jpeg2000 images
2022-04-12 22:30:38 +03:00
6a543bb12d Merge remote-tracking branch 'remotes/origin/release/v7.1.0' into develop 2022-04-12 18:51:22 +03:00
efbaf157a2 Merge pull request #897 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
Fix/v7.1.0 fix bugs3
2022-04-12 10:31:21 +03:00
8b015a7d04 for bug #45728 2022-04-12 10:30:27 +03:00
9737d61f14 for bug #56577 2022-04-12 08:26:26 +03:00
2249fef63f Fix bug 56537 2022-04-11 22:07:36 +03:00
a40275c659 Merge pull request #896 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix build
2022-04-10 14:14:14 +03:00
add329c8ea fix build 2022-04-10 14:12:21 +03:00
a6e59cc6ff [bug] Change convertToOrigin option to fix conversion pdf with docx inside and vice versa 2022-04-08 17:32:43 +03:00
7e4f9f48cd Merge pull request #894 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
.
2022-04-08 17:25:40 +03:00
993eb9809d . 2022-04-08 17:25:00 +03:00
660e7a8f4e Fix xps with empty PageContent node 2022-04-08 15:37:58 +03:00
103611fd74 Merge pull request #893 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
Fix/v7.1.0 fix bugs3
2022-04-08 11:50:00 +03:00
e3b54624c3 fix bug #55849 2022-04-08 11:47:43 +03:00
5ea2bc345c Fix bugs with text in svgwriter 2022-04-07 21:06:33 +03:00
068868953f Fix bug 56484 2022-04-07 18:29:44 +03:00
4973518a1f Fix bug 56471 2022-04-07 17:21:57 +03:00
840caf8ba4 Refactoring 2022-04-07 13:52:33 +03:00
a80642bfaf Corrected the definition of parity 2022-04-06 14:22:04 +03:00
14801e3620 Working with reading and drawing regions 2022-04-06 14:22:04 +03:00
bfadbbb73f Merge branch 'release/v7.1.0' into fix/v7.1.0-fix-bugs3 2022-04-05 18:11:13 +03:00
01cff05f71 Merge pull request #891 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-04-05 15:13:20 +03:00
20bf33ca68 [native] Add event type of image url change. 2022-04-05 14:16:24 +03:00
9a397e8882 Merge pull request #890 from ONLYOFFICE/fix/pdf-encryption
Fix pdf encryption
2022-04-05 13:39:48 +03:00
ff84f09478 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-04-05 12:50:56 +03:00
4e7f35c108 Merge pull request #889 from ONLYOFFICE/release/v7.1.0
Move ft_library to cache class from manager
2022-04-04 20:17:46 +03:00
923540e5b5 Move ft_library to cache class from manager 2022-04-04 20:04:54 +03:00
55428c64fb Merge pull request #888 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-04-04 13:44:00 +03:00
8bd724353e for bug #55901 2022-04-04 09:50:37 +03:00
f4e1082ab5 Fix bug #48052 2022-04-01 14:52:51 +03:00
d01a4f1c4d For bug 56317 2022-04-01 14:30:15 +03:00
f8be868a2b For bug 46818 2022-04-01 12:05:40 +03:00
93fa98720c For bug 56165 2022-03-31 21:11:57 +03:00
6b737f4b55 For bug 56205 2022-03-31 20:14:29 +03:00
a40242fb86 Add functions for xml engine 2022-03-31 19:30:18 +03:00
73845ec7fd Add method for work with xml with different BOM 2022-03-31 18:04:22 +03:00
7f0691ee09 Fix bug 56180 2022-03-31 18:00:01 +03:00
4db485cc8a Fix crash with not valid fonts (pdf=>docx) 2022-03-31 12:19:06 +03:00
a8e1f9117f Fix typo 2022-03-31 11:41:27 +03:00
fc52fb3c17 Merge pull request #886 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-03-31 11:39:05 +03:00
8eb21889bf Fix bug 56275 2022-03-30 21:22:15 +03:00
286eb3fe9a Fix logic bug because of which with memory problems 2022-03-30 15:58:54 +03:00
e88f00c27d Fix build for 32bit platform 2022-03-30 14:05:09 +03:00
27ccd7d2d3 Added scaling of some values and refactoring 2022-03-30 10:00:57 +03:00
77dc170f13 fix bug #54765 2022-03-29 14:42:53 +03:00
258e4cda5a For bug 55777 2022-03-28 17:37:48 +03:00
ab2235f7cd fix bug #56012 2022-03-28 14:31:22 +03:00
a2fc2fb9d6 Merge pull request #885 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix bug #56304
2022-03-28 11:49:10 +03:00
96a3ac70ca fix bug #56304 2022-03-28 11:34:36 +03:00
61b5ad4e02 Merge pull request #884 from ONLYOFFICE/fix/v7.1.0-fix-bugs-ppt
fix bug #56110
2022-03-28 10:15:21 +03:00
88435e51bb Merge pull request #883 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-03-27 18:29:51 +03:00
8c0843b218 Add type for qrenderer 2022-03-27 18:28:53 +03:00
5e7b33ba61 Add CMaps 2022-03-26 22:59:26 +03:00
d6d117c5dd fix bug #56110 2022-03-25 22:37:15 +03:00
ded794244d [Test] Update tests 2022-03-25 18:26:05 +03:00
5e8422be62 Merge pull request #881 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix bug #56300
2022-03-25 15:55:20 +03:00
b0fd733e95 fix bug #56300 2022-03-25 15:11:37 +03:00
f201a55045 Merge pull request #880 from ONLYOFFICE/fix/v7.1.0-fix-bugs3
fix bug #56057
2022-03-23 20:12:05 +03:00
d03f203553 fix bug #56057 2022-03-23 17:33:34 +03:00
1f24c4fbec Fix standardtester crash 2022-03-22 19:15:00 +03:00
22515b9f0c Rename property 2022-03-22 18:58:37 +03:00
49eff29fac Fix bugs in document info 2022-03-22 15:51:10 +03:00
e3faa6db48 Add getDocumentInfo method 2022-03-22 11:45:18 +03:00
54163e612a Add speed logger to doctrenderer 2022-03-21 22:14:52 +03:00
bb9897acbf Merge pull request #878 from ONLYOFFICE/feature/odf_2
Update MathConverter.cpp
2022-03-21 17:44:08 +03:00
e06edbc6fe Update MathConverter.cpp
Annotation
2022-03-21 17:31:07 +04:00
d05a7233db Merge pull request #877 from ONLYOFFICE/feature/jp2
Feature/jp2
2022-03-20 11:41:44 +03:00
efdc370ca2 Mac build 2022-03-20 11:39:42 +03:00
1d9dc39390 Linux build 2022-03-20 10:54:09 +03:00
f5c5d1fb57 New engine for jpeg2000 2022-03-18 21:54:47 +03:00
c2c69d2a8e Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-03-18 11:11:43 +03:00
1e13179d78 Merge pull request #875 from ONLYOFFICE/fix/v7.1.0-fix-bugs-ppt
Fix/v7.1.0 fix bugs ppt
2022-03-18 11:08:39 +03:00
ff03e6c2a8 Merge remote-tracking branch 'origin/release/v7.1.0' into fix/v7.1.0-fix-bugs-ppt 2022-03-18 11:07:04 +03:00
71e4ddb7b4 Merge branch 'refs/heads/fix/v7.0.0-ppt1' into fix/v7.1.0-fix-bugs-ppt 2022-03-18 10:49:05 +03:00
c1532e8e1f Merge pull request #874 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-03-17 23:11:51 +03:00
468f5dd0b1 fix bug #54124 2022-03-17 18:05:02 +03:00
a4be4bcc56 fix bug #56098 2022-03-17 17:41:12 +03:00
fe19e83d1e for bug #55915 2022-03-17 15:09:26 +03:00
1928974f0a Merge pull request #873 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-03-17 09:33:48 +03:00
9161d5d3fb fix bug #56072 2022-03-17 09:32:33 +03:00
2825342c14 fix bug #56071 2022-03-17 09:16:53 +03:00
4b2cc293cf Refactoring pdf 2022-03-16 21:27:35 +03:00
cd75c6e502 Fix typo 2022-03-16 19:40:07 +03:00
3de0f27479 . 2022-03-16 18:10:00 +03:00
9c6fa52d76 Fix bug 55442 2022-03-15 19:51:24 +03:00
1406c5c781 Improve speed of drawing images 2022-03-15 17:13:12 +03:00
224ba9144d fix in bug 54031 default value 2022-03-15 15:35:50 +03:00
35a3c4e803 fix bug #54031 2022-03-15 15:26:35 +03:00
96bdb12014 Merge pull request #872 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #56025
2022-03-15 09:37:55 +03:00
9a953c7182 fix bug #56025 2022-03-15 09:37:03 +03:00
4ca1ea0595 Fix build 2022-03-14 10:35:34 +03:00
5b4d1d0bae Merge pull request #871 from ONLYOFFICE/fix/drawingfile-info
fix drawingfile info
2022-03-13 09:29:02 +03:00
ac94da49fd fix replace_all to NSStringExt::Replace 2022-03-11 20:35:09 +03:00
6ac102569e fix xps 2022-03-11 20:09:05 +03:00
8bb58c35cb fix quotes 2022-03-11 18:29:47 +03:00
1137a38594 Fix bug 55845 2022-03-11 17:42:55 +03:00
6a3fad4a3a . 2022-03-11 17:02:15 +03:00
43c935b79e Merge branch 'feature/odf_2' into develop 2022-03-11 17:02:05 +03:00
1ef9329036 Merge pull request #869 from ONLYOFFICE/fix/drawingfile-info
Fix/drawingfile info
2022-03-11 16:59:32 +03:00
feb203abc2 Merge branch 'feature/xlsb_2' into develop 2022-03-11 15:59:41 +03:00
9ae39513d3 Merge branch 'release/v7.1.0' into develop 2022-03-11 15:53:27 +03:00
c8b91b8e61 Merge pull request #870 from ONLYOFFICE/fix/v7.1.0-fix-bugs2
Fix/v7.1.0 fix bugs2
2022-03-11 15:39:15 +03:00
c23a0ee4a8 fix bug #55940 2022-03-11 15:38:06 +03:00
a90b578e9c Fix bug 55987 2022-03-11 14:48:27 +03:00
328395dfea fix GetInfo 2022-03-11 12:32:46 +03:00
a5baf69f57 Added support for rendering Wmf in Emf+ records 2022-03-11 10:48:36 +03:00
62445265e6 Refactoring 2022-03-10 18:35:40 +03:00
a18d19b6f7 optimize 2022-03-10 17:55:58 +03:00
8ef62fd670 djvu GetInfo 2022-03-10 17:40:05 +03:00
0852fc134e xps GetInfo 2022-03-10 15:16:54 +03:00
191669ea1a [xlsb][read] add default value for pivots 2022-03-10 12:56:14 +03:00
af28e9d319 annotation fix 2022-03-10 13:03:55 +04:00
22b00f4354 for bug #55803 2022-03-10 11:48:00 +03:00
5b3860103e fix bug #55894 2022-03-10 11:20:34 +03:00
2604226810 pdf GetInfo 2022-03-10 11:12:11 +03:00
6c25c52a50 create GetInfo 2022-03-09 19:01:22 +03:00
8c6b665fc5 fix zlib
If delete unread file in open file, then don't need to free the file pointer
2022-03-09 17:14:03 +03:00
c4a767e038 Merge pull request #867 from ONLYOFFICE/fix/v7.1.0-fix-bugs2
fix bug #55919
2022-03-09 16:15:21 +03:00
fa40db9ce2 fix bug #55919 2022-03-09 16:14:14 +03:00
bca42bf3de Add module for text engine 2022-03-06 14:10:08 +03:00
4d1c217905 Added support for EMR_FILLRGN recording 2022-03-05 15:55:47 +03:00
855245068c Correct colors for hatch brushes 2022-03-04 18:14:52 +03:00
583c6b4944 Merge remote-tracking branch 'origin/master' into release/v7.1.0 2022-03-04 18:06:01 +03:00
ede2accb1c add <a:pPr hangingPunct=1> val and correct buChar when buFont.charset==10 2022-03-04 16:08:51 +03:00
edf7e2b4f0 [xlsb][read] skip USERSHVIEWS (customSheetView) 2022-03-04 12:52:32 +03:00
758f59303a Merge pull request #865 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix mac build
2022-03-04 11:55:20 +03:00
12b710d212 fix mac build 2022-03-04 11:54:45 +03:00
fec6f7b85f Merge pull request #864 from ONLYOFFICE/feature/de-prst-dash
[de][native]prstDash
2022-03-04 11:30:00 +03:00
22d1811e94 [xlsb][read] add check on default value in sheetData 2022-03-03 22:33:26 +03:00
8262f8802c [xlsb][read] add write each readed worksheet in file (xlsb -> xlsx) 2022-03-03 18:12:54 +03:00
715425185b [xlsb][read] fix for fmlas 2022-03-02 20:16:57 +03:00
dd260234e4 Add support formats in text format for builderJS object 2022-03-02 18:53:57 +03:00
613df67e27 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-03-02 17:04:08 +03:00
06258d3c74 Fix bug 55759 2022-03-02 17:03:20 +03:00
af801f1dcc Merge pull request #863 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-03-02 11:17:55 +03:00
0cae25d1d5 fix #55830 2022-03-02 11:17:10 +03:00
988cbc406d . 2022-03-02 09:40:57 +03:00
1ec288eb9a [xlsb] add external sheet name in formulas 2022-03-01 23:46:33 +03:00
bb4cf4eebc Minor defects have been fixed 2022-03-01 22:04:47 +03:00
750a9bde7e Merge pull request #862 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-03-01 20:02:02 +03:00
ec2ddfb477 for bug #55298 2022-03-01 20:01:07 +03:00
a472fe382a fix bug #55819 2022-03-01 19:59:27 +03:00
91c065377f Fix bug 55831 2022-03-01 18:22:12 +03:00
f8df8a0afe Remove unused files 2022-03-01 18:07:28 +03:00
4f3bd8b91b [xlsb] add memory optimization for convert xml sheetData from Unicode to
UTF8
2022-02-28 20:33:43 +03:00
fa56a45026 [xlsb] memory optimizations for large sheetData 2022-02-28 19:40:52 +03:00
2259629dba Fix bug #55460 2022-02-28 15:23:19 +03:00
9af13304d5 Partially changed calculations of the angle and position of lineCap 2022-02-25 20:37:32 +03:00
6f4bcbb548 LineCaps implementation started 2022-02-25 18:13:34 +03:00
b5c502714c Fix bug with font streams 2022-02-25 14:38:02 +03:00
33d688543d Merge pull request #861 from ONLYOFFICE/fix/v7.1.0-fix-math-odf
fix delimetr
2022-02-25 12:38:27 +03:00
7fe60af017 Merge pull request #860 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #55290
2022-02-25 12:25:39 +03:00
24ba23f132 fix bug #55290 2022-02-25 12:21:12 +03:00
ef7d753e03 Merge pull request #859 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #55662
2022-02-25 11:50:49 +03:00
4cd39bbcbd fix bug #55662 2022-02-25 11:49:44 +03:00
5b08350475 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-25 10:57:42 +03:00
f847267c3c [xlsb] fix formula exception 2022-02-24 21:50:08 +03:00
c298122393 Fix bug 55485 2022-02-24 18:55:17 +03:00
8c7a59ed39 fix free memory in zlib 2022-02-24 17:59:35 +03:00
b5e3467cc3 fix realloc 2022-02-24 16:36:51 +03:00
aa6f11ee62 [de][native]prstDash 2022-02-24 12:19:20 +03:00
4d10b801bb xlsb - optimization for PivotCacheRecords 2022-02-22 21:11:25 +03:00
e78dbed50d LineCaps implementation started and refactoring 2022-02-22 20:27:52 +03:00
7b853f2136 fix delimetr 2022-02-22 17:09:02 +03:00
2906945525 [ios] Remove dependency ImageUtils_ios.h 2022-02-22 15:27:35 +03:00
93fe2e8f50 Fix bug 55190 2022-02-22 13:49:46 +03:00
1b7111bb03 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-22 13:26:33 +03:00
c2dd57e895 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-22 13:26:27 +03:00
8534679f04 [xlsb] . 2022-02-22 13:22:35 +03:00
7c83535528 Merge branch hotfix/v7.0.1 into master 2022-02-22 08:13:32 +00:00
db8a0b3a6f [xlsb] some fixes for optimization 2022-02-22 10:54:01 +03:00
262fb3314c Fix crash with base14 fonts 2022-02-22 10:52:47 +03:00
3e5f946338 Merge pull request #855 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix embedded xlsx from chart
2022-02-21 18:13:42 +03:00
17a7820d96 fix embedded xlsx from chart 2022-02-21 18:12:44 +03:00
320befbc53 . 2022-02-21 16:29:41 +03:00
e9d42264c0 Merge branch 'feature/odf_2' of https://github.com/ONLYOFFICE/core into feature/odf_2 2022-02-21 15:51:30 +03:00
5abab316fb some fixes 2022-02-21 15:51:01 +03:00
5b17cf6da3 . 2022-02-21 11:41:11 +03:00
177a57e4ef . 2022-02-21 11:19:46 +03:00
b4cd2f065d . 2022-02-20 20:58:33 +03:00
59d420543f . 2022-02-20 20:49:25 +03:00
6305ac3f20 Fix crash with pick font by character 2022-02-20 18:07:06 +03:00
c701d480b8 Fix bugs with pdf to docx convertation 2022-02-20 16:21:30 +03:00
195709f629 ofstream->NSFile 2022-02-20 14:49:04 +03:00
084ae03ddb fix linux build 2022-02-20 14:30:32 +03:00
4725acd2e7 Merge branch 'develop' into feature/odf_2 2022-02-18 18:34:22 +03:00
609afe6de3 . 2022-02-18 18:33:17 +03:00
17ea6e66c8 fix build graphics 2022-02-18 14:27:01 +03:00
b8144ef394 Refactoring hunspell module 2022-02-18 12:55:00 +03:00
bb700daba1 [xlsb] fix bugs with formulas 2022-02-18 01:40:46 +03:00
444e82d520 Merge remote-tracking branch 'remotes/origin/feature/emf_wmf' into develop 2022-02-17 14:43:55 +03:00
5b9c2383cf . 2022-02-17 12:20:34 +03:00
908609c3f8 Merge pull request #852 from ONLYOFFICE/fix/v7.1.0-fix-bugs
fix bug #55567
2022-02-16 20:49:27 +03:00
b22eeeab9d fix bug #55567 2022-02-16 20:48:20 +03:00
b625b724c7 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-16 16:43:45 +03:00
54bb1e79d3 Merge pull request #851 from ONLYOFFICE/feature/xlsb_2
[xlsb] add optimization for reading sheetData
2022-02-16 16:43:07 +03:00
643dc749f2 Merge pull request #850 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-02-16 16:41:24 +03:00
4dd402f49a fix bug #50094 2022-02-16 16:40:15 +03:00
f0aa7d3212 for bug #55298 2022-02-16 15:36:18 +03:00
721e4ec5d8 Merge pull request #847 from ONLYOFFICE/feature/downloader
Feature/downloader
2022-02-16 12:43:30 +03:00
e632f0df3f [de][native] Add shadow structure 2022-02-16 08:36:23 +03:00
c371fea966 [xlsb] add optimization for reading sheetData 2022-02-15 21:42:42 +03:00
bd63cc0d6b Fixed bugs 2022-02-15 21:07:31 +03:00
35a86586ab Merge pull request #849 from ONLYOFFICE/fix/bug-55460
Fix bug #55460
2022-02-15 11:51:25 +03:00
00fa7e7afe Fix bug #55460 2022-02-15 11:38:54 +03:00
e9535abe9f for bug #55298
fix controls & forms spreadsheets
2022-02-14 20:05:50 +03:00
dac870635f . 2022-02-14 10:31:58 +03:00
1c2a45aa98 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-13 17:43:10 +03:00
743800155c Merge pull request #848 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-02-13 17:37:34 +03:00
ee5fed4dbb fix bug #55465
fix & extend biff2, biff3, biff4
2022-02-13 17:36:32 +03:00
444cdb6b9a . 2022-02-13 11:22:28 +03:00
894239a034 . 2022-02-12 15:04:57 +03:00
b8091509f4 Merge pull request #846 from ONLYOFFICE/fix/xpsFonts
fix xps fonts
2022-02-12 11:44:23 +03:00
0239816790 delete pSlashPoints 2022-02-12 10:42:16 +03:00
f0bda85e87 fix 2022-02-11 19:22:17 +03:00
5a42572d79 common NormalizePath 2022-02-11 18:39:52 +03:00
8cd9dfaef4 fix ../ in paths zlib 2022-02-11 18:20:29 +03:00
fa6b903edc .. clearning waste 2022-02-11 11:55:13 +03:00
747341f8eb Merge branch 'release/v7.1.0' into develop 2022-02-11 10:39:40 +03:00
da48349248 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-11 10:38:43 +03:00
c83b1d9f67 [xlsb] fix bugs with slicer in Pivot Table 2022-02-10 23:05:04 +03:00
a7e4ced942 [xlsb] fix bug with id table and corresponding slicers 2022-02-10 19:01:22 +03:00
e45a14e8df Merge pull request #845 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-02-10 17:56:35 +03:00
953a14ce13 Merge branch 'release/v7.1.0' into fix/v7.1.0-fix-bugs 2022-02-10 17:54:17 +03:00
ee79088f92 fix bug #55436 2022-02-10 17:44:07 +03:00
422b462bb8 Refactoring and fixed bugs 2022-02-10 17:42:11 +03:00
550039df32 [xlsb] some fixes 2022-02-10 14:57:09 +03:00
1e2614ece9 for bug #55431 2022-02-10 10:17:52 +03:00
a4c2eff0de added simple text shadow 2022-02-09 20:55:52 +03:00
b6d868a176 [xlsb] fix bugs in pivot table (2) 2022-02-09 20:25:48 +03:00
1b31dc3b72 Fixed bugs 2022-02-09 19:08:40 +03:00
b47e7155ab . 2022-02-09 18:35:24 +03:00
ca2d91a7f8 for bug #55298 2022-02-09 18:35:10 +03:00
89d70ff2cb [xlsb] fix bugs in pivot table 2022-02-09 17:49:40 +03:00
e796ed7d72 small refactoring OdfReader includes paths 2022-02-08 21:54:34 +03:00
ebb375dfda small refactoring XlsFormat includes paths 2022-02-08 21:37:20 +03:00
7f30be5eba Remove extra deps 2022-02-08 21:30:02 +03:00
986a7783ab Merge branch 'develop' into feature/odf_2 2022-02-08 20:30:01 +03:00
47be7419d2 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-08 20:29:40 +03:00
6c1434724f Merge pull request #844 from ONLYOFFICE/fix/v7.1.0-fix
.
2022-02-08 20:28:45 +03:00
f6a0121f1a . 2022-02-08 20:28:07 +03:00
c7b7bd928c [xlsb] fix bugs 2022-02-08 20:14:46 +03:00
7cce201567 Merge branch 'develop' into feature/emf_wmf 2022-02-08 14:41:36 +03:00
5fe1188c5b The error has been removed 2022-02-08 14:40:21 +03:00
a95d7117c7 Fixed bags and implementation of text rendering in Emf+ records has begun 2022-02-08 13:58:48 +03:00
b569af10a5 . 2022-02-08 13:12:49 +03:00
cff91a5235 Merge branch 'develop' into feature/odf_2 2022-02-08 09:40:13 +03:00
0aee8e6d53 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-08 09:36:43 +03:00
00a18714e4 Merge pull request #840 from ONLYOFFICE/fix/v7.1.0-fix-bugs-odf2
Fix/v7.1.0 fix bugs odf2
2022-02-08 09:33:41 +03:00
aecf675627 . 2022-02-08 09:30:23 +03:00
ee3898085c some fixes 2022-02-08 08:01:27 +03:00
73e5c70e39 [xlsb] add PCRRecord 2022-02-07 23:59:16 +03:00
3694c008ea trying to fix 54125 2022-02-07 22:38:51 +03:00
915e41e0ac fix bug #55239 2022-02-07 17:03:50 +03:00
b0e9f2a255 fix bug #55235 2022-02-07 14:39:54 +03:00
1d7b17f149 [xlsb] fix bugs and add pivotCacheID in workbook 2022-02-07 12:50:15 +03:00
45d3a1d490 Refactoring icu includes path 2022-02-07 10:06:40 +03:00
dc574f6606 [x2t] For bug 55284 2022-02-06 13:02:42 +03:00
70d591d505 Added support for recording EMR_CREATEMONOBRUSH, fixed bugs with brushes and pens 2022-02-04 19:05:14 +03:00
ea70fb9404 Refactoring 2022-02-04 16:21:52 +03:00
c09f25b8d0 Fix bug #33395
Fix the problem with parsing embedded truetype font
2022-02-04 16:06:21 +03:00
132c041182 Refactoring TextAssociation types 2022-02-04 16:05:48 +03:00
c886341ac1 Fix bug 53831 2022-02-04 15:03:06 +03:00
45121fa2f8 fix 2022-02-04 08:51:32 +03:00
526523c5a3 fix bug #52780 2022-02-04 00:19:42 +03:00
4fab74ffdd Merge branch 'fix/v7.1.0-fix-bugs-odf' into fix/v7.1.0-fix-bugs-odf2 2022-02-03 22:24:07 +03:00
27a7c792b0 Fixed some bugs related to brushes, pens and lack of font 2022-02-03 20:23:22 +03:00
d25a2a79d8 bug 55239 2022-02-03 19:56:21 +03:00
6ed6802123 . 2022-02-03 14:47:24 +03:00
76f4c5bfe3 fix part of #52780 2022-02-02 21:34:37 +03:00
f9f887535f fix bug #55290 2022-02-02 16:41:50 +03:00
f88b208a57 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 2022-02-02 13:28:00 +03:00
30025abbed for xlsb pivots 2022-02-02 12:59:37 +03:00
84ac4f343d fix bug #54032 2022-02-01 20:46:33 +03:00
0773ad19e6 Add statistics to viewer 2022-02-01 20:14:30 +03:00
c89a45e08b Revert "girignore"
This reverts commit 20760b8ce2.
2022-02-01 18:37:15 +03:00
d632fcc2a2 Merge pull request #838 from ONLYOFFICE/fix/bug55177
Fix bug 55177
2022-02-01 18:05:13 +03:00
b2087497ae [xlsb] fix bug with cell type 2022-02-01 18:01:58 +03:00
ece6f2a907 Merge branch 'develop' into feature/downloader 2022-02-01 17:50:54 +03:00
e5472df42c fix empty wsFontBaseName
fix bug 55177
2022-02-01 17:35:01 +03:00
f395aa1257 Merge pull request #837 from ONLYOFFICE/fix/bug55177
Fix bug 55177
2022-02-01 16:18:56 +03:00
a326867444 fix bug 55177 2022-02-01 16:16:34 +03:00
732c29b2cb . 2022-02-01 14:57:10 +03:00
45c7f8b9f6 Remove unused files 2022-02-01 14:18:06 +03:00
32f0be300a Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-01 13:39:35 +03:00
24fe803997 Merge branch 'release/v7.1.0' into develop 2022-02-01 13:38:57 +03:00
41eeaf8cd7 some fixes 2 2022-02-01 10:20:14 +03:00
daa7328a86 [xlsb] fix bugs 2022-01-31 22:48:57 +03:00
bf656716ed correct <a:endParaRPr> for #54032 2022-01-31 22:47:20 +03:00
372366adc0 some fixes 2022-01-31 18:08:34 +03:00
6b4566fe9a Merge pull request #836 from ONLYOFFICE/fix/bug55177
Fix bug 55177
2022-01-31 15:55:21 +03:00
59836490a3 Fix bug 55177
xpdf itself tries to handle the error and if it succeeds, then isOk will be gTrue
2022-01-31 15:49:54 +03:00
e82902f387 [xlsb] fix exception and add to logic.cpp 2022-01-31 13:00:29 +03:00
20760b8ce2 girignore 2022-01-31 12:30:11 +03:00
8ab7ddd5ca Merge pull request #835 from ONLYOFFICE/fix/v7.1.0-fix-bugs-odf
fix bug with Large Operator
2022-01-31 11:13:50 +03:00
60cbfc54e8 fix bug with Large Operator 2022-01-31 10:47:13 +03:00
32f755dc10 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. [xlsb] merge with release/v7.1.0 2022-01-30 23:57:11 +03:00
855fb66aef [xlsb] add PIVOTCACHEDEF (fill inside objects) 2022-01-30 23:11:32 +03:00
0064635fe7 Merge branch 'feature/odf_2' of https://github.com/ONLYOFFICE/core into feature/odf_2 2022-01-30 19:54:58 +03:00
fb6142cb9d Other annotations with some bugs 2022-01-30 19:54:33 +03:00
5e62690318 The problem with missing lines due to the lack of pen thickness has been solved, minor bugs have been fixed 2022-01-28 20:26:27 +03:00
2750b471ba [test] For bug 55091 2022-01-28 19:42:39 +03:00
5d4dbb3eb5 fix bug #52199 2022-01-28 18:37:44 +03:00
08471d634f [Test] Update tests 2022-01-28 16:48:31 +03:00
6a64a2849c Refactoring 2022-01-28 16:47:33 +03:00
dfd40deb5c CShapeElement was replaced by shared_ptr<CElement> 2022-01-28 16:33:02 +03:00
bc28411096 add table txBody and bullets 2022-01-28 15:29:21 +03:00
2f330e16a6 fix bug #54562 2022-01-28 13:39:49 +03:00
4dbd3b05e9 add wrap=none 2022-01-28 12:02:19 +03:00
4a93c91011 Fix bug 47558 2022-01-28 11:39:25 +03:00
d1dc39447d fix bug #53860 2022-01-28 11:00:24 +03:00
8f1b0db9ae Merge remote-tracking branch 'origin/fix/v7.0.0-ppt1' into release/v7.1.0 2022-01-28 09:47:15 +03:00
e1e54ae2da Refactoring image interpolation 2022-01-27 22:04:18 +03:00
d2e0712a92 [xlsb] add PivotTable (fill inside objects) 2022-01-27 21:03:10 +03:00
43cb660f80 Added bitmap rendering of images embedded in EmfPlus recording 2022-01-27 20:29:15 +03:00
804d0822f2 Fix bug #54676
Fix the problem with inheritance
2022-01-27 18:52:10 +03:00
e32f76c8db [pdf] Fix the problem with rendering images with soft mask 2022-01-27 17:16:07 +03:00
b339ea1866 Fix erasing path string when no file was selected 2022-01-27 17:08:57 +03:00
18f53a9350 fix bug #54124 2022-01-27 16:57:09 +03:00
9d42b9d4f4 Fix related links after moving project 2022-01-27 14:48:24 +03:00
574fa40950 Move test project to upper folder 2022-01-27 14:41:58 +03:00
561dc7e8c5 Set zoom to page height by default
Fix minor bugs
2022-01-27 14:34:09 +03:00
1fe1155834 Improve test pdf view example 2022-01-27 12:33:14 +03:00
52ae479593 Merge remote-tracking branch 'origin/hotfix/v7.0.1' into release/v7.1.0 2022-01-27 11:27:33 +03:00
5940f95c3f Merge pull request #834 from ONLYOFFICE/fix/pdfStructure
fix pdf structure
2022-01-27 11:11:49 +03:00
f188a48f48 fix empty NamedDest 2022-01-27 11:08:23 +03:00
c8f4f52e4f Fix main part of bug 54124 2022-01-26 18:31:54 +03:00
cdae42d897 . 2022-01-26 17:41:43 +03:00
291edf8319 fix bug #54530 2022-01-26 15:32:38 +03:00
53186e12d2 [Test] Update tests 2022-01-25 20:24:18 +03:00
8c2534b572 fix bug #55074 2022-01-25 17:46:13 +03:00
896832f05c [xlsb] add PIVOTCACHEDEF (record and unions only) 2022-01-25 17:19:27 +03:00
80c5e10c9d fix bug #54031 2022-01-25 15:34:59 +03:00
12a18a4e03 Correct table's bullets or <a:pPr> 2022-01-25 14:35:20 +03:00
95bca8599a fix bug #54713 2022-01-25 13:32:03 +03:00
4e8df0bc79 fix and correct bullets. But it's need refactoring 2022-01-25 11:43:24 +03:00
b49aa4413f fix bug #54625 2022-01-25 11:20:29 +03:00
03776dac88 [Network] debug 2022-01-25 00:18:32 +03:00
2a3f16a4d8 [Network] debug download "abort" flag on linux 2022-01-24 23:59:38 +03:00
26fbe3babf [Network] changed checking for 'aborted' thread's flag 2022-01-24 23:59:37 +03:00
e28e8b56b1 [Network] refactoring 2022-01-24 23:59:37 +03:00
536b080451 [Network] replaced isExit flag 2022-01-24 23:59:37 +03:00
952d16458c . 2022-01-24 20:38:33 +03:00
2dc6aa71de Refactoring and fix not table bullets 2022-01-24 18:28:34 +03:00
94f51bda81 xlsb->xlsx 2022-01-24 17:48:47 +03:00
6c056e4289 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-01-24 16:55:28 +03:00
9e98968d04 Refactoring generation wasm drawingfile module 2022-01-24 16:54:42 +03:00
56925eff71 Fix ios build 2022-01-24 14:11:59 +03:00
012f04acd2 . 2022-01-24 11:37:57 +03:00
388b680547 fix xlsb->xlsx(t) 2022-01-24 01:09:16 +03:00
4c7e16a33c The principle of working with Emf files embedded in EmfPlus recording has been completely redesigned and refactoring 2022-01-22 22:04:25 +03:00
d997dae36c [Network] and [Kernel] add Cancel for downloader (windows) 2022-01-22 20:04:48 +03:00
920adde65f [Network] and [Kernal] add cancel from thread (linux) 2022-01-22 14:55:28 +03:00
7066a55813 [Test] Update tests 2022-01-21 17:49:22 +03:00
6b24197cf1 . 2022-01-21 16:05:27 +03:00
209a3874c8 Merge pull request #832 from ONLYOFFICE/fix/v7.0.1-fix-bugs
fix bug #55027
2022-01-21 15:34:22 +03:00
abc74e21d0 fix bug #55027 2022-01-21 15:33:26 +03:00
42478ac950 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-01-21 15:03:03 +03:00
7dfe4af359 Add support darkMode in wasm module 2022-01-21 15:02:16 +03:00
c066c24449 fix bug #54957 2022-01-21 13:15:17 +03:00
4a6d338a08 fix bug #54625 2022-01-21 12:26:14 +03:00
a9cb8de197 Refacrtoring wasm module 2022-01-20 20:31:00 +03:00
683955bb5e Merge pull request #831 from ONLYOFFICE/fix/v7.1.0-fix-bugs
Fix/v7.1.0 fix bugs
2022-01-20 11:57:07 +03:00
db2930ed33 for bug #54956 2022-01-20 11:54:17 +03:00
a763b497a2 fixbug #54713 2022-01-20 11:38:36 +03:00
ed86945e14 fix bug #54433 2022-01-19 18:05:17 +03:00
5a4ca8479f fix bug #54791 2022-01-19 17:11:37 +03:00
694ea6abe4 [xlsb] add remaining records and unions for PIVOTTABLE 2022-01-19 16:32:37 +03:00
9018e9a252 fix bug #51735 2022-01-19 16:14:11 +03:00
8bd6f45fb2 Merge remote-tracking branch 'origin/hotfix/v7.0.1' into release/v7.1.0 2022-01-19 14:22:36 +03:00
a5c4cb9438 Merge branch 'hotfix/v7.0.1' into fix/v7.0.0-ppt1 2022-01-19 11:50:50 +03:00
e78b399810 Merge pull request #830 from ONLYOFFICE/fix/v7.0-fix-bugs
Fix/v7.0 fix bugs
2022-01-19 11:39:52 +03:00
53f53200df Merge pull request #828 from ONLYOFFICE/feature/add-onProgress-downloader
Feature/add on progress downloader
2022-01-18 17:46:27 +03:00
f3f627572f Support text commands 2022-01-18 17:31:11 +03:00
916a84b041 [Network] add fix callBack onProgress for windows 2022-01-18 16:40:01 +03:00
1f0f8ae1b4 [Network] add fix callBack onProgress for curl linux (comment for mobile) 2022-01-18 16:16:23 +03:00
db67132ce2 Merge pull request #829 from ONLYOFFICE/release/v7.1.0
Fix typo
2022-01-18 15:35:05 +03:00
125110e805 Fix typo 2022-01-18 15:33:13 +03:00
fb2b4b2797 [Network] add save call onProcess on windows 2022-01-18 15:08:00 +03:00
539f1cab81 Merge pull request #827 from ONLYOFFICE/release/v7.1.0
Remove using graphics.pri in release mode
2022-01-18 15:05:56 +03:00
04e58e38f0 Remove using graphics.pri in release mode 2022-01-18 15:05:47 +03:00
2194dd5899 [Network] add callBack onProcess for curl (both variant) 2022-01-18 15:00:27 +03:00
2799b63869 Merge pull request #826 from ONLYOFFICE/release/v7.1.0
Add missed files
2022-01-18 12:06:15 +03:00
6d94535ff8 Add missed files 2022-01-18 12:06:04 +03:00
8fa09793eb Merge pull request #825 from ONLYOFFICE/release/v7.1.0
Fix build
2022-01-18 10:55:17 +03:00
8f29d012a2 Fix build 2022-01-18 10:53:31 +03:00
0a577290ba Merge pull request #824 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-17 20:56:33 +03:00
79d5bdd78b Add missed file 2022-01-17 20:54:57 +03:00
23dd433b20 [Test] Update tests 2022-01-17 20:00:20 +03:00
194faf5eff Merge pull request #823 from ONLYOFFICE/feature/add-onProgress-downloader
[Test] add TestDownloader
2022-01-17 19:30:09 +03:00
8f9d36085b [Test] add TestDownloader 2022-01-17 19:26:47 +03:00
2342956bb1 Merge pull request #822 from ONLYOFFICE/feature/add-onProgress-downloader
[Network][FileDownloader] add callBack onProgress for windows
2022-01-17 19:05:03 +03:00
892c415382 [Network][FileDownloader] add callBack onProgress for windows 2022-01-17 19:02:56 +03:00
63ccb0fbee Fractions with Annotations 2022-01-17 18:41:38 +03:00
1136916768 Fix build wasm module 2022-01-17 18:20:32 +03:00
e6b69fe2f4 Merge branch release/v7.0.0 into release/v7.1.0 2022-01-17 14:19:11 +00:00
9ca2b70ee3 Merge branch release/v7.0.0 into develop 2022-01-17 14:19:06 +00:00
1f976ae79a Merge branch release/v7.0.0 into master 2022-01-17 14:18:57 +00:00
79e57e8965 Merge pull request #818 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-17 16:20:26 +03:00
795a7fcb3b Merge pull request #817 from ONLYOFFICE/fix/tmp7.1
Fix/tmp7.1
2022-01-17 16:18:03 +03:00
85a551fb63 Refactoring 2022-01-17 16:04:41 +03:00
b9d6b59991 Merge branch 'fix/drFile' into fix/tmp7.1 2022-01-17 13:32:45 +03:00
99ee15f65f [xlsb] add records and unions for PIVOTTABLE (without FRTSXVIEW) 2022-01-17 13:16:06 +03:00
487e9ae95a Merge pull request #815 from ONLYOFFICE/feature/add-custom-fonts-path
Add CUSTOM_FONTS_PATH env var
2022-01-16 20:19:48 +03:00
d7521d04a7 fix pptx binary group with chart & smart art 2022-01-14 18:26:46 +03:00
6af132ab18 Merge branch 'feature/odf_2' into develop 2022-01-14 16:51:04 +03:00
f42c1df7a9 . 2022-01-14 16:17:25 +03:00
c434d82807 Refactoring 2022-01-14 14:31:00 +03:00
b694019e19 Refactoring 2022-01-14 12:32:22 +03:00
e0185bd0c3 Refactoring 2022-01-14 10:42:11 +03:00
e13683874a Refactoring 2022-01-13 20:50:02 +03:00
28ac386e08 Refactoring 2022-01-13 20:11:38 +03:00
4b9da896ab fix bug #54485 2022-01-13 18:12:26 +03:00
1870b3fba4 Add changes 2022-01-13 16:30:54 +03:00
fb079be1bd fix debug win build 2022-01-12 21:00:43 +03:00
fc342a90ee Fix bug 54803 2022-01-12 18:24:18 +03:00
269855a862 Refactoring 2022-01-12 16:41:57 +03:00
bdacbac1b2 Merge pull request #814 from ONLYOFFICE/fix/bug54731
Fix bug 54731
2022-01-12 16:37:24 +03:00
88877241e3 Fix crash 2022-01-12 16:13:50 +03:00
6561216356 fix bug #54819 2022-01-11 19:10:16 +03:00
01a4770af4 [test] Fix test scripts 2022-01-11 19:07:32 +03:00
874129f41c Merge branch 'feature/number-format-locale' into develop 2022-01-11 17:45:57 +03:00
4e0cd2f9b0 Merge branch 'fix/v7.0.0-ppt1' of https://github.com/ONLYOFFICE/core into fix/v7.0.0-ppt1 2022-01-11 13:53:42 +03:00
64c361f806 [xlsb] add PivotCacheRecords (records, unions, fill inside objects) 2022-01-11 13:33:41 +03:00
f2c9aec380 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-01-11 11:22:20 +03:00
68582b65d1 Add CUSTOM_FONTS_PATH env var 2022-01-11 11:21:05 +03:00
2ef8b83da0 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into release/v7.1.0 2022-01-10 18:57:45 +03:00
218b36ab8d . 2022-01-10 18:57:39 +03:00
8ebcbe8636 Merge pull request #811 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-10 18:22:12 +03:00
5b7deea769 Fix android build 2022-01-10 18:21:33 +03:00
eb75805c88 Merge remote-tracking branch 'origin/fix/v7-fix-bugs' into release/v7.1.0 2022-01-10 17:44:17 +03:00
26fea8bf52 error in BinaryFileReader.getbase64DecodedData if v5 Editor.bin 2022-01-10 16:07:35 +03:00
44c5e23bc1 Merge pull request #810 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-10 14:30:56 +03:00
b4f424737c Merge pull request #809 from ONLYOFFICE/feature/arm64
Feature/arm64
2022-01-10 14:27:19 +03:00
9484e549b4 Merge pull request #654 from ONLYOFFICE/feature/network/callback
[Common][Network] change typedef style func to c++11 std::function
2022-01-10 13:07:14 +03:00
2e054bf9d9 Developing... 2022-01-07 11:16:04 +03:00
c75e65eb4c Developing... 2022-01-04 19:07:37 +03:00
18c41a4846 [x2t] Fallback to xml mode if command line argument did nor recognized 2021-12-30 19:56:31 +03:00
61735c2790 [Test] Update tests; remove xsd:extension 2021-12-30 17:47:09 +03:00
461006b3b8 Added calculation of exact X-axis coordinates for rendering embedded Emf+ Emf records 2021-12-29 21:08:12 +03:00
e872a4c0ac . 2021-12-29 10:53:42 +03:00
5af2d1b472 fix name of .bin file for doctrenderer 2021-12-28 14:48:57 +03:00
6044929214 fix name of .bin file for doctrenderer 2021-12-28 11:10:27 +03:00
1175fd4150 [xlsb] add External links (records, unions, fill inside objects) 2021-12-27 14:55:18 +03:00
f293394cf4 . 2021-12-27 13:40:35 +03:00
c0c11cf928 DjVu to clean 2021-12-24 10:08:50 +03:00
ecbc73d33b OdfFormatWriter - add convert math equation in spreadsheets and presentation 2021-12-23 20:37:19 +03:00
4f9d22bcb0 Merge branch 'feature/odf' into develop 2021-12-23 20:17:10 +03:00
7a261ba649 Some fixes 2021-12-23 11:19:43 +03:00
81d95a9108 Merge pull request #808 from ONLYOFFICE/feature/mobile_footnote
Dev mobile footnote and endnote
2021-12-22 18:05:24 +03:00
57b46c22ef . 2021-12-21 16:36:12 +03:00
7ecfa52517 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2021-12-21 16:12:39 +03:00
8de5e88469 [xlsb] fix bug (invisible cell value) 2021-12-21 15:58:39 +03:00
7f8988278c [xlsb] add to logic.cpp for release 2021-12-21 15:43:29 +03:00
26b2256fa8 Add footnote properties define 2021-12-21 13:57:33 +03:00
67facf5e69 fix nativegraphics test 2021-12-21 11:18:39 +03:00
92e2385650 DjVu GString return 2021-12-20 20:48:44 +03:00
ebec731098 [x2t] For xlsb opening 2021-12-20 20:15:06 +03:00
2fdcd75eab [xlsb] fix bugs and add chart sheet (records, unions, fill inside objects) 2021-12-20 20:02:19 +03:00
ccb5105ff7 Trying to fix 54124. 2021-12-20 18:36:35 +03:00
efeaf9b8d1 fix bug #54623 2021-12-20 17:29:34 +03:00
9e7d7a366d Restore stock freetype 2021-12-20 16:02:47 +03:00
af4a07d12f Merge pull request #807 from ONLYOFFICE/develop
Develop
2021-12-20 15:10:24 +03:00
a3b83ecace diakrit. symbols
semi results
2021-12-20 14:04:17 +03:00
955025a3a1 fix bug #54530 2021-12-17 16:20:27 +03:00
c0dd3db439 Merge branch 'feature/ppt_8' into fix/v7.0.0-ppt1 2021-12-17 12:20:25 +03:00
afe1c7b341 Add ExOleEmbedAtom. Trying to find diagram data 2021-12-17 11:14:28 +03:00
6d53f5745b [ios] Add NSDictionary and NSString extension 2021-12-16 18:02:27 +03:00
b3d9d4cc6e Merge pull request #806 from ONLYOFFICE/fix/v7-fix-bugs
Fix/v7 fix bugs
2021-12-16 17:25:28 +03:00
03b10cb446 fix bug 2021-12-16 17:24:37 +03:00
53fcb5e639 [xlsb] add dataConsolidation (records, unions, fill inside objects) 2021-12-16 14:56:24 +03:00
b87dad75fc fix bug #54521 2021-12-16 11:57:59 +03:00
03a7332f8a [xlsb] fix bugs and add rwBreak, colBreak, picture, protectedRanges
(records, unions, fill inside objects)
2021-12-15 20:19:36 +03:00
c8a848766d [Test] Update DocxFormatCodeGen for js xml 2021-12-15 20:09:31 +03:00
d21ad2ae43 Brackets 2021-12-15 10:46:28 +03:00
e1ce3d8456 DocxRenderer fix TempDirectory 2021-12-15 10:23:56 +03:00
8b6c3c288b [xlsb] fix bugs 2021-12-14 19:35:37 +03:00
0f9433c7ce [xlsb] oleObjects, controls, sheetPr (records, unions, fill inside
objects)
2021-12-14 17:39:57 +03:00
0275791b2c fix bug #54461 2021-12-14 17:39:19 +03:00
dd474f72ea fix build linux 2021-12-14 16:56:41 +03:00
1b918413cb . 2021-12-14 14:06:15 +03:00
eb2aada6d9 fix DocxRenderer res 2021-12-14 12:35:09 +03:00
6dcf645e88 Merge branch 'feature/xlsb_2' into develop 2021-12-14 11:45:53 +03:00
f61bf56d14 . 2021-12-14 11:45:30 +03:00
b78fca4290 pdf/xps/djvu -> docx_dir -> fromDocxDir 2021-12-14 11:45:26 +03:00
b6cc7c823a . 2021-12-14 11:28:52 +03:00
da2bf87c2b . 2021-12-14 10:34:48 +03:00
15ed64791f Merge branch 'feature/xlsb_2' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 2021-12-14 10:17:19 +03:00
fc7751a4e3 fix 2021-12-14 10:06:33 +03:00
a98dc97e48 [xlsb] fix slicerCache 2021-12-13 22:41:42 +03:00
82dc397171 [xlsb] add slicerCache in workbook 2021-12-13 17:30:17 +03:00
20e92bbf95 base-14 fonts selection 2021-12-13 17:23:41 +03:00
a30e9ac37f fix bug #54492 2021-12-13 15:33:54 +03:00
09862cdd1c . 2021-12-13 14:54:41 +03:00
30ed03be15 . 2021-12-13 10:22:28 +03:00
005fea0701 . 2021-12-13 09:57:56 +03:00
e0bd7f3e84 Merge pull request #805 from ONLYOFFICE/release/v7.0.0
Fix allfontsgen
2021-12-12 19:18:42 +03:00
abec57becd Refactoring base64 fonts 2021-12-11 23:52:47 +03:00
cdc74ada43 Fix allfontsgen 2021-12-11 21:17:42 +03:00
281ee487cb The work with the FinalTransform update has been finalized 2021-12-10 20:36:33 +03:00
02efc63109 . 2021-12-10 18:08:48 +03:00
bdf1295693 Merge remote-tracking branch 'origin/develop' into fix/drawing_file_client 2021-12-10 17:49:02 +03:00
c3b8e90a3e PdfWriter test 2021-12-10 17:28:24 +03:00
8e0216281d . 2021-12-10 17:18:04 +03:00
e721f6c942 Merge branch 'feature/xlsb_2' into develop 2021-12-10 17:10:03 +03:00
20eb11bf3f Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-12-10 17:09:25 +03:00
9a4a9a805f [xlsb] add slicerEx in worksheet 2021-12-10 15:56:20 +03:00
74920d70b7 Merge pull request #804 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-12-10 15:06:34 +03:00
5a2b693092 fix reset binary run props 2021-12-10 15:05:19 +03:00
e2bae2e187 fix bug #54461 2021-12-10 14:48:08 +03:00
1c9b9d5e0f . 2021-12-10 13:59:07 +03:00
0d5b92520b [xlsb] add SlicerCache (record, unions, fill inside objects) for
slicerCaches.bin
2021-12-10 13:42:57 +03:00
809020965f Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2021-12-10 12:05:05 +03:00
d612b64b4b Merge branch 'release/v7.0.0' into develop 2021-12-10 12:04:00 +03:00
7c15562236 . 2021-12-10 11:50:58 +03:00
2cd312f396 Fix bug 54475 (problem with opening locked file) 2021-12-10 11:12:27 +03:00
74a8455e13 fix build 2021-12-10 10:35:59 +03:00
db83a36fc4 Merge remote-tracking branch 'origin/fix/v7.0.0-ppt' into develop 2021-12-10 10:20:54 +03:00
2f88cf34ea Adding Emf+ Record - Interpretator communication support 2021-12-09 21:30:57 +03:00
d796de176c fix part of bug 54124. Fix text bold 2021-12-09 21:04:08 +03:00
d44da46e1e fix shape text box a:bodyPr wrap=none 2021-12-09 19:57:06 +03:00
9d12314f22 fix empty djvu 2021-12-09 14:16:59 +03:00
2e83d4e9c8 fix bug #54460 2021-12-09 12:39:05 +03:00
c352a057e8 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2021-12-09 12:24:24 +03:00
8293a06d40 Merge pull request #802 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-12-09 11:11:51 +03:00
6b78d139ee fix bug #54384 2021-12-09 11:03:52 +03:00
c95b3dd04b Fix linux build 2021-12-09 10:34:40 +03:00
51c33e0701 Merge pull request #801 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-12-08 20:06:03 +03:00
a707ded8b2 . 2021-12-08 20:05:06 +03:00
0756b8ff90 for bug #54311 2021-12-08 20:05:00 +03:00
a2d1a74e3d Add destroy method for pixels 2021-12-08 15:57:30 +03:00
840d679e49 fix bug #54124 2021-12-08 14:26:48 +03:00
658d35739a [xlsb] add slicer (records, unions, fill inside objects) 2021-12-08 13:34:11 +03:00
cbf727460b [xlsb] add sparkline (records, unions, fill inside objects) 2021-12-07 19:47:26 +03:00
22d4592a1a Add ASCW3 to picker font by character 2021-12-07 19:19:02 +03:00
446ef4d577 fix bug #54333 2021-12-07 18:21:51 +03:00
4aae8eabca fix isBase-14 2021-12-07 17:17:08 +03:00
53deeec405 fix Base-14 like before 2021-12-07 11:44:58 +03:00
6a77d1d1c6 [xlsb] add Connections (fill objects part) 2021-12-07 11:14:11 +03:00
6e789e0697 Merge pull request #800 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-12-07 09:45:48 +03:00
f2db638138 Update MathConverter.cpp
Fix some bugs of Large Operators
2021-12-07 01:54:13 +03:00
5bbe04dd69 Changed the position calculation for the emf image, which is embedded in the emf+ record 2021-12-06 21:45:07 +03:00
79087dda1e add Resources fonts to displayFontTab 2021-12-06 18:51:30 +03:00
6d9778e913 Merge pull request #799 from ONLYOFFICE/feature/docx-renderer
Feature/docx renderer
2021-12-05 20:52:14 +03:00
d7f98f26d0 Remove convertation to docxf from pdf/xps/djvu 2021-12-05 20:50:46 +03:00
fc2cb5f533 fix bug #54200 2021-12-04 13:00:17 +03:00
995beaefa1 [xlsb] add Connections (only records, structs, unions) 2021-12-03 19:57:04 +03:00
b71f62fcad Added calculations of the X-axis position of the emf image embedded in emf+ 2021-12-03 18:57:12 +03:00
5388697b0c Fix bug 54322 2021-12-03 18:26:15 +03:00
377f454872 m_oTextParams 2021-12-03 13:39:28 +03:00
e3c6e9b3f9 pdf/xps/djvu to docx_dir 2021-12-03 11:07:31 +03:00
82909e892f fix bug #53541 2021-12-02 23:27:42 +03:00
6133c11f38 Combining EmfPlus objects 2021-12-02 21:13:42 +03:00
25de0c763f Fixed a typo in the test example 2021-12-02 21:10:44 +03:00
941b9d0ec1 Merge pull request #798 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-12-02 19:58:16 +03:00
136d123ba2 fix bug #52412 2021-12-02 19:56:30 +03:00
c036733ff8 fix bug #54187 2021-12-02 19:21:24 +03:00
9ac1a088b5 Fix pick font by name 2021-12-02 18:26:40 +03:00
62289d1310 pdf/xps/djvu to docx in x2t 2021-12-02 14:40:45 +03:00
a29d7cb8b3 Merge pull request #797 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-12-02 10:05:51 +03:00
8264f89be2 Fix bug #53273
Fix the problem with saving MaxLen parameter of a text form in case of several forms with the same key
2021-12-02 10:00:53 +03:00
98f7b9d647 Fix bug #54088
Fix the problem with writing strings encoded with UTF-16
2021-12-02 10:00:53 +03:00
711d0017df Fix bug #53616
Fix the problem with bold and italic fonts
2021-12-02 10:00:53 +03:00
6bf0f0faf3 Fix bug #54168
Rework font substitution based on font embedding restrictions
2021-12-02 10:00:53 +03:00
021f9f64b4 For bug #54170
Fix the problem with writing shade color of a form. Also fix the problem with ExtGState counter
2021-12-02 10:00:53 +03:00
925979c534 trying to fix 53541. Add tag a:lum. No exists ppt struct 2021-12-01 19:44:18 +03:00
b9c53b877c Merge pull request #795 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #54270
2021-12-01 19:39:21 +03:00
a081b37d6d fix bug #54270 2021-12-01 19:38:16 +03:00
01107f5a07 Fix bug 53947 2021-12-01 16:49:47 +03:00
a324d9f8d9 fix pdf Base-14 font 2021-12-01 12:47:18 +03:00
72a48b656f Merge pull request #794 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-12-01 10:45:01 +03:00
9834392df8 fix bug #54186 2021-12-01 10:44:04 +03:00
9545a3e7f3 [xlsb] add QueryTable (records, unions, fill inside objects) 2021-11-30 22:44:31 +03:00
3428df7bac fix bug #52780 2021-11-30 19:40:00 +03:00
d71477e8a3 fix bug #54184 2021-11-30 17:49:51 +03:00
c100d54aa5 fix bug #54187 2021-11-30 16:28:13 +03:00
721fc5e7ac Fix build with new qmake & vs2019 2021-11-30 12:47:13 +03:00
cb0360008b Merge pull request #793 from ONLYOFFICE/fix/v7.0.0-ppt
fix bug #54197
2021-11-30 10:29:05 +03:00
31e0f5e177 Fixed the position of the rotated and reflected text at the same time 2021-11-29 21:40:01 +03:00
bf78be5e81 Merge pull request #792 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #54161
2021-11-29 18:40:45 +03:00
ba1a0f7763 fix bug #54161 2021-11-29 18:39:04 +03:00
f77fe887ae fix bug #54197 2021-11-29 16:07:11 +03:00
b4c8269729 fix make.py 2021-11-29 11:16:29 +03:00
7b49631c73 Merge remote-tracking branch 'origin/release/v7.0.0' into develop
# Conflicts:
#	PdfReader/old/XRef.cpp
2021-11-29 11:15:53 +03:00
57e5fea9cc [x2t] Add AVS_FILEUTILS_ERROR_CONVERT_DRM_UNSUPPORTED type for bug 54148 2021-11-28 19:34:37 +03:00
046e0f7710 [x2t] Fix saving to docxf 2021-11-28 19:34:37 +03:00
76d3b45fb8 Refactoring 2021-11-28 18:35:57 +03:00
3dba3a4d06 Merge pull request #789 from ONLYOFFICE/fix.v7.0.0-fix-bugs2
fix bug #54148
2021-11-27 11:39:43 +03:00
2b78a8b617 fix bug #54148
fix ppt project
2021-11-27 11:38:55 +03:00
c73bd8b904 Merge pull request #788 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-11-27 10:35:58 +03:00
3727b7391a try fix pdf selection of fonts
oFontSelect.bBold and oFontSelect.bItalic are not filled.
The font to find is an external font file for Base-14 font, but base14SysFonts is empty with BUILDING_WASM_MODULE. Need fix it.
2021-11-26 18:51:24 +03:00
a3cab2d098 fix zlib_addon 2021-11-26 16:12:38 +03:00
92d8d9ad05 fix bug #54031 2021-11-26 15:04:41 +03:00
9ce86699ed Merge branch 'fix/v7.0.0-ppt' of https://github.com/ONLYOFFICE/core into fix/v7.0.0-ppt 2021-11-26 13:39:46 +03:00
c051240cd4 fix bug #54032 2021-11-26 13:39:08 +03:00
978d80e198 Fix reading strings in pdf to xml conversion 2021-11-26 11:00:10 +03:00
ccd47865bd Intermediate commit 2021-11-25 22:41:27 +03:00
725b60245f Fixed a bug in the test example 2021-11-25 22:21:30 +03:00
23c427495b Merge pull request #787 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-11-25 22:21:00 +03:00
cac9293d87 fix bug #54116 2021-11-25 22:20:08 +03:00
137d757631 Merge pull request #786 from ONLYOFFICE/fix_bug_54053
[android] Fix bug 54053
2021-11-25 17:20:08 +03:00
06052da308 [android] Fix bug 54053 2021-11-25 16:37:57 +03:00
9cd8cb0662 fix bug #53305 2021-11-25 13:21:57 +03:00
3430f915d3 fix ApplicationFonts 2021-11-25 10:59:35 +03:00
f172cc86b3 Merge branch 'develop' into fix/drawing_file_client
# Conflicts:
#	DesktopEditor/fontengine/ApplicationFonts.cpp
2021-11-25 10:47:56 +03:00
22f6607545 .gitignore change 2021-11-25 10:10:58 +03:00
95c96bbffc [xlsb] fix bugs for table (Banded, Header, Total options) 2021-11-24 18:56:28 +03:00
f76bf0cee1 add buBlip. bullet as image 2021-11-24 18:41:17 +03:00
6ae8c69efa Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-11-24 18:31:08 +03:00
c8ef152d08 Merge pull request #785 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53908
2021-11-24 18:29:06 +03:00
b058f017e0 fix bug #53908
docxf
2021-11-24 18:28:20 +03:00
04bb20a8e4 try fix setupBaseFonts for base14SysFonts 2021-11-24 17:37:43 +03:00
0ffc7ef04c add ConvertExtention9() for buBlip 2021-11-23 23:25:13 +03:00
9153cc678d Refactoring 2021-11-23 21:57:19 +03:00
d9ca2f9e46 Fixed a bug in the test example 2021-11-23 21:53:30 +03:00
2b8e9009a9 [xlsb] fix DataValidation formula, fix Table formula(for case, where
reference to table, which not parsed yet)
2021-11-23 20:54:59 +03:00
853b22bf73 Merge pull request #784 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53873
2021-11-23 12:45:54 +03:00
93ed14aba2 fix bug #53873 2021-11-23 12:43:58 +03:00
ded9e12051 Merge pull request #783 from ONLYOFFICE/release/v7.0.0
Fix build
2021-11-23 12:04:41 +03:00
f5e4369384 Fix build 2021-11-23 12:03:47 +03:00
9134d0f087 Merge branch 'release/v7.0.0' into develop 2021-11-23 10:53:49 +03:00
9e6b88c920 Fix build mobile target 2021-11-23 10:41:33 +03:00
21685704b6 Create README.md 2021-11-22 17:13:56 +03:00
d4f7cc6d6f relocate polyfill and fix sources 2021-11-22 12:56:23 +03:00
374af06be8 Fix build 2021-11-21 21:31:32 +03:00
2a9ffc41b5 Find new substitution font if the specified font is restricted for embedding 2021-11-21 20:06:33 +03:00
cb84378637 Fix bug #53629
Forbid to embed fonts that are limited by license
2021-11-21 17:13:56 +03:00
8b42268d7e Merge branch 'release/v7.0.0' into develop 2021-11-21 16:12:33 +03:00
9c05b99951 Refactoring fonts_selection.bin generation 2021-11-21 15:59:42 +03:00
cad1004d28 Read file without write rights if not needed 2021-11-19 23:33:14 +03:00
0784a62e89 Refactoring 2021-11-19 21:08:48 +03:00
70dbebf727 Merge pull request #780 from ONLYOFFICE/fix/v7.0.0-fix-bugs
for bug #53888
2021-11-19 17:45:36 +03:00
a22f0515e0 [xlsb] add DataValidation and DataValidation extension (records, unions,
fill inside objects)
2021-11-19 16:20:26 +03:00
d5087108d0 for bug #53888 2021-11-19 16:19:20 +03:00
29822ad719 Merge pull request #779 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-11-19 14:26:22 +03:00
b47c766b24 fix bug #53873 2021-11-19 14:25:46 +03:00
67bb9f18e6 fix bug #53877 2021-11-19 13:59:57 +03:00
a33de97309 without after.py 2021-11-19 11:07:23 +03:00
c81c98f524 Merge pull request #778 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-11-18 19:45:35 +03:00
06079aa022 fix bug #53873 2021-11-18 19:44:23 +03:00
1e66105813 fix bug #53875 2021-11-18 18:13:57 +03:00
03dec3dcf6 fix bug #53813 2021-11-18 17:22:09 +03:00
707e610625 common script for xmlsec
add support python in-line before and after script
2021-11-18 16:24:01 +03:00
560b07f3ca oform 2021-11-18 15:25:25 +03:00
3ca8446729 Merge branch 'fix/v7.0.0-ppt' of https://github.com/ONLYOFFICE/core into fix/v7.0.0-ppt 2021-11-17 22:56:10 +03:00
aad0ec464f trying to add blip bullet to fix numbering 2021-11-17 22:54:07 +03:00
3bafd3f9f2 Working with EMF+ records 2021-11-17 21:22:31 +03:00
89a8a1d62a Fix build with new qmake 2021-11-17 19:40:56 +03:00
0e76a06c46 Merge branch 'feature/xlsb_2' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 2021-11-17 16:25:55 +03:00
137d25cdbb [xlsb] add HeaderFooter (records, union, fill inside objects) 2021-11-17 16:25:39 +03:00
29214ee77e common script for hunspell
fix bug: hunspell/src/hunspell/dictmgr.cxx does not exist
2021-11-17 12:39:58 +03:00
3e922260d3 Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-11-17 10:57:12 +03:00
a2c92066ba Merge pull request #777 from ONLYOFFICE/feature/xlsb_2
Feature/xlsb 2
2021-11-17 10:55:52 +03:00
b3530fa2dd . 2021-11-17 10:51:32 +03:00
3219de14ee Merge pull request #776 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-11-17 10:26:37 +03:00
8906ea6707 . 2021-11-17 10:21:43 +03:00
a3f9832b4e Working with EMF+ records 2021-11-16 20:33:42 +03:00
d8e9b2d2b4 fix bug #53690 2021-11-16 20:27:38 +03:00
67bd59e343 [xlsb] add Margins, PageSetup, PrintOptions for worksheet (records, fill
inside objects)
2021-11-16 19:13:25 +03:00
8b85428f82 common script for zlib 2021-11-16 18:20:56 +03:00
99f44b62ed fix common script for drawingfile 2021-11-16 15:48:13 +03:00
ea6c30e2bd common script 2021-11-15 18:55:05 +03:00
3e3aa0352d [xlsb] add table formula, fix defined names 2021-11-15 15:28:04 +03:00
06c64fa222 Fix target name 2021-11-15 10:41:05 +03:00
ebfa8da621 Add pro files for vs2019 2021-11-15 09:15:47 +03:00
231daf9977 Fix build 2021-11-14 11:52:11 +03:00
5645f15c58 Working with EMF+ records 2021-11-12 20:34:04 +03:00
70473c80a0 Merge pull request #770 from ONLYOFFICE/feature/xlsb_2
[xlsb] fix shared formula, add new Ftab functions
2021-11-12 17:18:34 +03:00
2f4ae5ebc8 [xlsb] fix shared formula, add new Ftab functions 2021-11-12 14:43:19 +03:00
95fc2c2e94 Working with EMF+ records 2021-11-11 20:29:47 +03:00
597155af11 add DjVu GetGlyphs 2021-11-11 17:21:46 +03:00
69f2c29679 . 2021-11-11 14:26:12 +03:00
e68fd292ba . 2021-11-11 13:12:00 +03:00
b7129680c3 Merge pull request #768 from ONLYOFFICE/feature/xlsb_2
Feature/xlsb 2
2021-11-11 13:02:26 +03:00
b0062b6135 Working with EMF+ records 2021-11-10 21:26:06 +03:00
30d3472b62 test GetGlyphs 2021-11-10 17:19:13 +03:00
48e3b820a3 [xlsb] fix formulas (sheet name in references) 2021-11-09 19:24:34 +03:00
e845124498 [xlsb] add files in .pro 2021-11-09 19:23:38 +03:00
72c2753cab xps refactoring 2021-11-09 15:08:33 +03:00
5ff7ca9b4c Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-11-09 12:29:37 +03:00
5392788a72 Merge branch 'develop' into feature/xlsb_2 2021-11-09 11:46:43 +03:00
0602d89de0 refactoring xlsb project 2021-11-09 11:45:22 +03:00
5d3c3ce818 Working with EMF+ records 2021-11-08 20:11:24 +03:00
fc91e7b9ce refactoring 2021-11-08 18:00:30 +03:00
1c5a0bd0f4 fix memory pImageData 2021-11-08 14:10:11 +03:00
a7cd1c1210 fix StringExt 2021-11-08 13:02:05 +03:00
9ecc2410a6 [xlsb] fix table and add extension for table (altText) 2021-11-08 10:21:32 +03:00
ebf2680335 Fix convertation with block mode 2021-11-07 21:53:54 +03:00
0294266863 [xlsb] add Table (records, unions and fill inside objects) 2021-11-03 16:29:45 +03:00
be04ee38b7 [xlsb] add fill inside objects for autofilters 2021-11-02 18:10:27 +03:00
b73ef690bb fix realloc memory error and xps dpi 2021-11-02 17:57:35 +03:00
d5189a952a [xlsb] add AUTOFILTER (only records and unions) 2021-11-02 00:42:23 +03:00
1535e5763d Working with EMF+ records 2021-11-01 19:01:56 +03:00
87af894198 refactoring 2021-11-01 17:55:38 +03:00
3ecdbe6d64 . 2021-11-01 17:40:48 +03:00
28220bbde7 . 2021-11-01 12:02:55 +03:00
f6908517e2 fix build 2021-11-01 11:01:55 +03:00
3cb19a4ceb Merge branch 'feature/xlsb2' into feature/xlsb3 2021-10-30 13:06:07 +03:00
433c5b1cfe xps fix GetGlyphs 2021-10-29 18:40:33 +03:00
cb51dc3e40 [xlsb] fix bug with start space in Si 2021-10-29 18:28:59 +03:00
6ff569edf7 [xlsb] fix bugs with fonts and build 2021-10-29 17:03:52 +03:00
1e9e2ab603 Merge branch 'release/v7.0.0' into develop 2021-10-29 16:19:54 +03:00
d1aa2ebfe3 xlsb small refactoring + fix build 2021-10-29 15:51:48 +03:00
9701fa9807 [xlsb] fix mergeCell 2021-10-29 14:37:22 +03:00
fc7d427407 pdf fix links 2021-10-29 14:21:21 +03:00
0bee7b0aaa pdf text link 2021-10-29 13:41:08 +03:00
722ab2c2ca [xlsb] fix dxf bugs 2021-10-29 13:15:51 +03:00
b547c28e72 [xlsb] refactoring for fonts in Si 2021-10-29 11:40:39 +03:00
9ed5581b39 Working with EMF+ records 2021-10-28 20:43:34 +03:00
17b25167b1 xps fix change font 2021-10-28 13:57:17 +03:00
1e922e4724 Working with EMF+ records 2021-10-27 20:05:04 +03:00
3c6096967b xps fix nCurrentFont 2021-10-27 18:58:11 +03:00
ef99a5d92d [xlsb] add CXlsb class, refactoring code 2021-10-27 17:58:22 +03:00
94167f1954 Working with EMF+ records 2021-10-26 21:15:21 +03:00
ada8f8beb8 fix WriteDouble2 and test 2021-10-26 18:03:34 +03:00
ea11a8c348 [xlsb] add comments support (records, fill inside objects) 2021-10-26 12:27:16 +03:00
73362fd852 xps getGlyphs 2021-10-25 18:06:14 +03:00
b611a6b099 fix getGlyphs format 2021-10-25 16:35:00 +03:00
e2c0d814bb Working with EMF+ records 2021-10-22 20:28:41 +03:00
c3b7d3de8b add DumpLine 2021-10-22 16:55:18 +03:00
0d20ab0378 Refactoring 2021-10-22 16:18:05 +03:00
b89180a549 [xlsb] add ext for styles (fill objects) 2021-10-22 14:49:05 +03:00
958e1fcadf Fix bad font types 2021-10-22 11:24:21 +03:00
0793519bb0 add _GetErrorCode 2021-10-22 11:01:41 +03:00
f5332a8b59 Fix problem with writing streams to xml 2021-10-22 10:08:57 +03:00
92d916fa57 [xlsb] add FRTSTYLESHEET (only records and unions), fix bugs 2021-10-21 20:32:00 +03:00
d1b7b280c5 Fix compile 2021-10-21 19:32:46 +03:00
c85774a897 Working with EMF+ records 2021-10-21 19:02:44 +03:00
113e15c391 develop GetGlyphs 2021-10-21 18:48:31 +03:00
2481578533 Add support vs2019 & v8 8.9 2021-10-21 15:05:17 +03:00
8950b3535a [xlsb] add ext for conditionalFormatting, fix bugs 2021-10-20 23:20:37 +03:00
b4701ac83c develop new GetGlyphs 2021-10-20 18:09:29 +03:00
9e58de380e Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-10-19 21:06:11 +03:00
df5140532d Added reading of EMF records+ 2021-10-19 19:36:27 +03:00
05c6260499 Add support vs2019 2021-10-19 14:12:12 +03:00
6dd1e80ce5 [xlsb] add CONDITIONALFORMATTING14 and fix bugs 2021-10-18 23:39:10 +03:00
7588b592df The addition of the implementation of EMF+ records has begun 2021-10-18 21:24:16 +03:00
533d04e8f3 change origin to top left corner
only in xps format the canvas sizes are multiplied
2021-10-18 17:46:05 +03:00
bf434987f9 Fixed a bug in the test example in which the EMR_SETPIXELV record was incorrectly written 2021-10-15 22:10:39 +03:00
d5f8c4b474 Added statistics update when deleting or adding records 2021-10-15 22:09:49 +03:00
a81115d2f3 pdf password 2021-10-15 18:07:16 +03:00
3618465853 pdf fix coord 2021-10-15 17:29:43 +03:00
e20588a3da fix coords 2021-10-15 16:03:26 +03:00
fafa2023d1 Fix minimize version 2021-10-14 20:23:34 +03:00
32823bd55a pdf fix coords 2021-10-14 16:40:10 +03:00
37a851ef98 . 2021-10-14 13:09:47 +03:00
9099a04b2d fix build linux 2021-10-14 12:36:41 +03:00
af246c553e . 2021-10-14 12:27:09 +03:00
42e515dfec . 2021-10-14 11:08:50 +03:00
15da75c473 fix build 2021-10-14 10:31:20 +03:00
e90b2957a6 [xlsb] fix bugs, add fonts to shared strings 2021-10-13 23:47:04 +03:00
9d2d7e646a Refactoring 2021-10-13 21:51:30 +03:00
b0f77fddf1 Refactoring 2021-10-13 16:53:13 +03:00
276bc48a24 Merge pull request #744 from ONLYOFFICE/fix/drawing_file_client_fonts
Change setjmp/longjmp to c++ exeptions
2021-10-13 16:50:04 +03:00
9d475122e3 Change setjmp/longjmp to c++ exeptions 2021-10-13 16:43:54 +03:00
6f01769c4d fix build 2021-10-13 10:32:35 +03:00
6d4cb1ff4c Added search for records in the Xml tree 2021-10-12 21:37:26 +03:00
5495def631 [xlsb] add tableStyles, colorPalette (records, fill inside objects) 2021-10-12 19:26:32 +03:00
a6a2243099 pdf GetGlyphs like xps 2021-10-12 18:10:30 +03:00
90172d03ef pdf GetGlyphs 2021-10-12 17:33:23 +03:00
6f321fc0e3 Merge pull request #742 from ONLYOFFICE/fix/drawing_file_client_fonts
Fix/drawing file client fonts
2021-10-12 16:02:33 +03:00
c8e2b18f35 Remove fonts binary 2021-10-12 13:37:59 +03:00
7956395c7c . 2021-10-12 13:28:48 +03:00
d5cbd33a59 restore 2021-10-12 12:45:01 +03:00
25fb7daee9 back 2021-10-12 12:26:32 +03:00
afbb6fe4ff fix qt project & build 2021-10-11 23:29:58 +03:00
03e2fa60fa [xlsb] add Style and DXFs (records, fill inside objects) 2021-10-11 23:29:46 +03:00
e0fcaae71e In the test example, the method of tracking the right mouse click has been changed 2021-10-11 21:27:26 +03:00
efdc67e1ba Refactoring 2021-10-11 21:20:41 +03:00
cb8f8c535c Merge pull request #741 from ONLYOFFICE/fix/drawing_file_client
pdf fix GetStructure and start GetGlyphs
2021-10-11 20:43:11 +03:00
ed9e6a83e6 Add ARM_ALIGN flag for wasm/asmjs compilation 2021-10-11 20:23:03 +03:00
e9325f77e0 Developint not embedded fonts 2021-10-11 19:04:28 +03:00
2ff6b62854 pdf fix GetStructure and start GetGlyphs 2021-10-11 17:53:43 +03:00
8e4750bb0b Merge branch 'feature/odf' into feature/odf2 2021-10-11 09:40:00 +03:00
8dbe1da419 Developing not embedded fonts in viewer 2021-10-10 20:49:15 +03:00
c8cf662c1b Add file 2021-10-10 20:47:49 +03:00
4ff908701c [Bug 40483]Fixed 2021-10-09 00:14:04 +03:00
81a1364ae0 pdf GetLinks and GetStructure 2021-10-08 17:43:01 +03:00
57f1438949 cleaning of code 2021-10-08 16:38:31 +03:00
45b6929dd4 gitignore stuff 2021-10-08 16:35:14 +03:00
f66053508b [xlsb] add cellStyleXFs, cellXFs (records, fill objects) 2021-10-08 16:21:12 +03:00
f29c812aa7 [Bug 40483] Fixed a problem with the text position 2021-10-07 22:32:01 +03:00
b30b91ca6d [Bug 40483] Fixed a problem with objects going outside the image boundaries 2021-10-07 22:31:16 +03:00
82b11909f9 Fix bugs 2021-10-07 21:42:28 +03:00
5bc07126a9 pdf identifyMem fix 2021-10-07 18:40:11 +03:00
4836418528 fix 2021-10-07 11:45:11 +03:00
4547a18aab [xlsb] add Borders (records, fill inside objects) 2021-10-07 11:42:59 +03:00
ed2f9e0035 Fix load .mem file 2021-10-07 10:15:39 +03:00
20011c8647 Merge branch 'fix/drawing_file_client' of https://github.com/ONLYOFFICE/core into fix/drawing_file_client 2021-10-07 08:31:26 +03:00
1599d943f4 Refactoring 2021-10-07 08:30:50 +03:00
b03b2a52bb [xlsb] add FMTS, FONTS, FILLS parsing for styles (records, fill inside
object)
2021-10-06 19:30:10 +03:00
ad44fecc10 fix 2021-10-06 18:22:19 +03:00
64b428a992 ie support 2021-10-06 13:12:33 +03:00
4c3ec3259c [Bug 40483] Fixed missing formulas 2021-10-05 21:49:03 +03:00
39f6dda5d8 Refactoring 2021-10-05 21:03:46 +03:00
3f73c12f83 build wasm module 2021-10-05 19:17:39 +03:00
5702a34d69 Refactoring 2021-10-05 18:01:32 +03:00
5487058744 Refactoring 2021-10-05 17:36:53 +03:00
c75af891b2 xps fix 2021-10-05 16:51:16 +03:00
3c1a598fd5 Fix xps 2021-10-05 16:21:17 +03:00
d7c4ceba92 Fix errors 2021-10-05 15:13:22 +03:00
54e10c7b55 Support disabling to pdf convertation 2021-10-05 11:53:37 +03:00
9327fce5ca fix link 2021-10-05 11:41:23 +03:00
0bd55565fe Fix 2021-10-05 11:38:36 +03:00
48121355f3 js fix merge with develop 2021-10-05 11:03:19 +03:00
d5d8c86e8e js fix 2021-10-04 19:55:13 +03:00
7569534cfd c++ fix merge with develop 2021-10-04 18:11:05 +03:00
e0fd7ff1f0 Merge branch 'develop' into fix/drawing_file_client
# Conflicts:
#	PdfReader/PdfReader.h
#	PdfReader/Src/RendererOutputDev.cpp
#	PdfReader/old/Graphics.cpp
2021-10-04 15:37:09 +03:00
d9217329eb fix some problems 2021-10-04 15:02:16 +03:00
e3fa8c53bf fix PDFGraphics 2021-10-04 10:47:26 +03:00
4bb7f3cf83 [Bug 52289]Fixed 2021-10-01 18:55:49 +03:00
26a677074c pdf fix js implementation 2021-10-01 17:57:45 +03:00
601f615a35 [x2t] Add m_bConvertToOrigin xml param 2021-10-01 13:03:18 +03:00
c45b6034c7 Fix build 2021-10-01 11:15:17 +03:00
2c2cfbe07d Merge branch 'feature/xlsb' into feature/xlsb2 2021-10-01 10:31:51 +03:00
3f730897a0 [Bug 52289]Fixed missing images 2021-09-30 22:19:09 +03:00
792915bb3a Merge remote-tracking branch 'remotes/origin/release/v6.5.0' into develop 2021-09-30 19:41:13 +03:00
5de83dc86a Merge branch hotfix/v6.4.1 into develop 2021-09-30 12:13:42 +00:00
7d5eb31f25 [xlsb] add shared strings (records and fill inside objects (without font
info) ) and fix bugs
2021-09-30 13:41:58 +03:00
5910bbfa5d fix embedded font 2021-09-30 12:00:00 +03:00
6fd26cf0f7 [Bug 52289]Added the display of the text background and removed the stub 2021-09-29 22:02:50 +03:00
4ec1830847 add BUILDING_WASM_MODULE in RendererOutputDev::UpdateFont
need fix external font
2021-09-29 17:57:09 +03:00
ee81e468ab Merge remote-tracking branch 'origin/release/v6.5.0' into develop 2021-09-29 09:57:44 +03:00
fcd824042a add js pdf
need to fix cryptopp
2021-09-28 18:17:49 +03:00
0df0b9774d Merge pull request #729 from ONLYOFFICE/feature/docxrenderer2
Feature/docxrenderer2
2021-09-28 14:18:46 +03:00
b81c634800 Merge remote-tracking branch 'origin/feature/docxrenderer' into feature/docxrenderer2 2021-09-28 14:15:45 +03:00
1b9541b2b6 PDF LoadFromMemory and ConvertToPixels
change RendererOutputDev::UpdateFont
2021-09-27 18:03:33 +03:00
a7ef272cb5 [xlsb] add fill inside objects for ConditionalFormatting 2021-09-27 17:52:56 +03:00
bafa576191 Merge branch 'feature/NewParcerNamespaceTest' into develop 2021-09-27 10:47:13 +03:00
461809134c Merge pull request #722 from ONLYOFFICE/release/v6.5.0
Release/v6.5.0
2021-09-26 16:39:51 +03:00
aade9540d0 Fix ExtractAllImages 2021-09-26 16:35:22 +03:00
93b55d7936 [x2t] Add NSStringExt::FromHumanReadableByteCount to parse memory limit 2021-09-26 00:31:18 +03:00
faeac14054 [x2t] Rename MEMORY_LIMIT -> X2T_MEMORY_LIMIT; "0" is no memory limit 2021-09-24 20:03:37 +03:00
6148c337d9 [x2t] Add MEMORY_LIMIT environment variable 2021-09-24 20:03:37 +03:00
a4fcd4919d Fix compile 2021-09-24 16:26:19 +03:00
b7d6948081 Merge branch 'feature/NewParcerNamespaceTest' of https://github.com/ONLYOFFICE/core into feature/NewParcerNamespaceTest 2021-09-24 16:14:26 +03:00
8fda6f48ce convert to raster swapRGB fix 2021-09-24 16:02:49 +03:00
ad2023083f Fix compile 2021-09-24 15:13:33 +03:00
e5e090f385 Added scrolling in the record editing widget 2021-09-22 23:55:00 +03:00
83bf58cb93 [xlsb] add SheetProtection, TableParts, SortState parsing (records and
fill inner objects)
2021-09-22 11:03:10 +03:00
21a9296e85 [xlsb] fix crash with virtual functions 2021-09-17 17:19:48 +03:00
d4a083c6ba [xlsb] add parser sheetFormatPr and sheetViews (records and inside
objects)
2021-09-17 13:50:06 +03:00
8a29a3e9e4 Merge branch 'release/v6.5.0' into develop 2021-09-17 11:56:03 +03:00
78e4a4e92b Refactoring 2021-09-16 22:27:25 +03:00
4ac1c8c928 some debug stuff 2021-09-15 21:45:26 +03:00
abed5269b2 [xlsb] add parsing SheetData object 2021-09-15 14:24:27 +03:00
0455514ea9 Added the ability to create a text record 2021-09-14 22:20:43 +03:00
071c0e75c8 [test] For MemoryLimit 2021-09-14 13:02:02 +03:00
c6823c617a [test] Test process memory limitation 2021-09-14 12:51:37 +03:00
5142761c85 transparent img fix 2021-09-13 19:39:33 +03:00
950515f219 Added the ability to create a text record 2021-09-10 17:27:56 +03:00
a16921b2e9 Added the ability to create a text record 2021-09-09 20:55:09 +03:00
9faf8bedd5 [xlsb] add records for worksheet (for Cols, Hyperlinks, MergeCells,
Drawing, SheetData) and write data from records for Cols, Hyperlinks,
MergeCells, Drawing
2021-09-09 18:54:08 +03:00
7a33ead400 Refactoring and increased the number of possible record creation 2021-09-08 22:18:40 +03:00
1c6c5f982a Increased the number of possible record creation 2021-09-07 23:10:15 +03:00
f5ef1dd683 axial special case fix 2021-09-07 20:35:11 +03:00
59eb3cfea5 . 2021-09-07 13:13:04 +03:00
761ceab8d2 Merge commit '8c726e475a562e64a39d36cac32226249a3f7697' into feature/odf 2021-09-07 12:10:14 +03:00
f62f1dff83 Increased the number of possible record creation 2021-09-07 02:48:33 +03:00
9a4769eb47 Refactoring 2021-09-03 21:10:47 +03:00
a2cf7ed13c Added the ability to save in Emf format 2021-09-03 20:48:52 +03:00
1d97c0e61d Changed the display of the buffer record 2021-09-03 20:35:05 +03:00
d2c8c14f8b axial shading fix 2021-09-03 13:39:21 +03:00
e67089c5b4 The logic of converting created records into a tree object has been redesigned 2021-09-02 21:17:01 +03:00
fbe9ba88b9 build with pdf 2021-09-02 13:30:32 +03:00
e75b9dd848 radial fix, little mesh patch optimisation 2021-09-01 11:35:34 +03:00
a5c1351cde The addition of the ability to create records has begun 2021-08-30 21:38:38 +03:00
34a525e74d Some stuff 2021-08-30 21:30:22 +03:00
bcc1801edb functional fix 2021-08-30 12:34:16 +03:00
58e99cd2d4 Fixed a malfunction when saving Xml and a small refactoring 2021-08-27 21:40:59 +03:00
905973fded Implemented real-time updating of image changes 2021-08-27 20:28:06 +03:00
709282dfd4 add pdf 2021-08-27 18:42:59 +03:00
f7c518d145 custom gradients
todo type 67
todo coord debug 23
2021-08-26 23:08:50 +03:00
7779b864c1 [xlsb] add basic complete parse workbook.bin 2021-08-26 23:00:51 +03:00
717ebd02af Refactoring and adding the ability to edit records 2021-08-26 20:19:34 +03:00
4a5c027cf4 xps fix links 2021-08-26 13:45:40 +03:00
e57b35c77e Added a window for editing records 2021-08-25 22:16:17 +03:00
a1caf0792d djvu fix coords 2021-08-25 18:22:59 +03:00
317d425ff2 [xlsb] add fill data 2021-08-23 14:51:25 +03:00
84d0cef869 In the test example, the ability to save XML has been added 2021-08-20 16:51:17 +03:00
b4d2bff379 xps combining external and internal links 2021-08-20 16:27:11 +03:00
99742dd7b3 textclip 2021-08-20 16:09:16 +03:00
f0e7921347 fix djvu exception 2021-08-20 14:49:10 +03:00
d152aabd82 The implementation of XML to EMF conversion is finally completed 2021-08-20 14:34:38 +03:00
35fb50c226 clip fix
TODO text clip, new gradient render implementation
2021-08-20 11:50:26 +03:00
0c6c406cf5 Added saving polygons in polygons 2021-08-19 22:01:22 +03:00
0465a264aa js djvu links 2021-08-19 18:02:59 +03:00
7f8a98f290 Added an entry in the Xml of unknown records 2021-08-18 21:50:38 +03:00
aaa24271e9 [xlsb] add clone func in common records and EndBook record 2021-08-18 16:08:07 +03:00
c8ce35e4b9 djvu links 2021-08-18 13:14:17 +03:00
e4cf0cb61f Refactoring 2021-08-17 20:57:50 +03:00
934bbe2283 [xlsb] add BrtWebOpt and BrtFileRecover records 2021-08-17 20:28:59 +03:00
cf3a73a548 [xlsb] merge with develop 2021-08-17 14:04:26 +03:00
c86e6258af Refactoring 2021-08-16 21:10:03 +03:00
c06c0ad088 clip stack (debug needed) 2021-08-16 15:10:18 +03:00
7b12ef172a fixed clip on test example
but doesnt work in general
2021-08-16 08:42:15 +03:00
6cb75bc53a imageOutputDev + xmlfeatures 2021-08-13 12:40:18 +03:00
4ce8c56fc9 fix coords 2021-08-11 11:57:27 +03:00
1034f66555 js xps external and internal links 2021-08-11 11:17:27 +03:00
2627e2a7dd xps get glyphs and links without repaint 2021-08-09 11:56:48 +03:00
93209acab6 actual fix + refactoring
the previous one just forsed a substitute font
2021-08-08 22:46:53 +03:00
36dc01463f fix font linux
TODO test this on windows
2021-08-06 15:58:18 +03:00
f9730a4a6d font fix 2021-08-06 00:05:54 +03:00
d4de820fa3 xps external and internal links 2021-08-05 14:30:22 +03:00
7b0bc5a059 xps get glyphs, first paint 2021-08-03 15:14:09 +03:00
96a8f54933 Correction of defects 2021-07-30 18:57:16 +03:00
18a4775984 djvu get glyphs separately from paint 2021-07-30 18:27:49 +03:00
2dc8038257 temp file 2021-07-30 14:39:14 +03:00
8de9a7dd31 Refactoring 2021-07-29 13:56:49 +03:00
1e7c83a0e7 Fixed saving empty records in Xml 2021-07-28 18:02:18 +03:00
ef7281f362 fix djvu coords and structure pages 2021-07-28 14:01:46 +03:00
016a90610f [xlsb] add change .pro for build 2021-07-28 12:56:06 +03:00
2e3b5e6d39 fix 2021-07-27 18:42:06 +03:00
f862f962e0 djvu glyphs 2021-07-27 18:10:51 +03:00
da76475a51 [xlsb] add BrtOleSize and BrtUserBookView records 2021-07-27 14:30:33 +03:00
521053adf8 workaround for icu in xps
temporary solution
2021-07-27 13:31:17 +03:00
a234671ad2 fix 2021-07-27 12:47:46 +03:00
5214162718 general compilation and optimization glyphs 2021-07-26 18:37:49 +03:00
2845b2ea4b [xlsb] add BrtCalcProp record 2021-07-23 18:46:26 +03:00
d652e3c32f djvu structure 2021-07-23 18:18:18 +03:00
974b66aa60 [xlsb] add BrtName record and fix some records 2021-07-23 16:13:49 +03:00
6fb07e8ae3 Fix color for shapes 2021-07-23 14:34:01 +03:00
7ddc578d1f Changed saving float and string types to an EMF file 2021-07-22 21:48:25 +03:00
6ad4a538eb djvu compilation 2021-07-22 17:32:02 +03:00
f47f27890c one pic for a page 2021-07-22 11:55:55 +03:00
319e390b87 The cycle of reading data from an Xml file has been changed 2021-07-21 21:18:20 +03:00
b589dafb48 Fix convertation pdf2docx 2021-07-21 20:33:38 +03:00
3872501d7f [xlsb] add EXTERNALS, SUP unions and dependency records/structs, add CommonRecords.h 2021-07-21 19:04:49 +03:00
6f33e529e5 optimization 2021-07-21 18:04:44 +03:00
9ec56fb323 fix repaint 2021-07-21 11:53:57 +03:00
cf65ec1448 Fix crash on empty strings 2021-07-20 20:33:48 +03:00
2f8e492fc6 xps structure 2021-07-20 16:38:02 +03:00
18063bbbbf Refactoring and added recording of the remaining records in Emf 2021-07-19 21:50:31 +03:00
75866f2e86 creat Structure 2021-07-19 18:58:18 +03:00
9457fd7ac0 [xlsb] change under_score_case to CamelCase and add FNGROUP union and dependency record 2021-07-19 17:48:41 +03:00
692890f75d Fix some ranges 2021-07-19 13:51:19 +03:00
5b3467290f Remove old files 2021-07-19 13:18:20 +03:00
e711c7b993 Prepare for debug 2021-07-19 13:16:13 +03:00
25d3b69fde matrixex 2021-07-19 12:31:48 +03:00
db72b01e99 Realize some TODO 2021-07-18 16:13:31 +03:00
e9e9a954ac [docxrenderer] Compiled version 2021-07-18 15:49:35 +03:00
a7c1d6bf59 Added recording of some records in Emf 2021-07-16 21:56:58 +03:00
2e4486b49b fix for djvu, pdf 2021-07-16 18:34:40 +03:00
f7a1773105 text selection 2021-07-16 18:30:30 +03:00
b9782ddb7c save changes 2021-07-16 15:47:29 +03:00
79283a087a [xlsb] add BOOKVIEWS, BUNDLESHS unions and dependent records & structures 2021-07-16 10:54:36 +03:00
7abae785cb refactoring 2021-07-15 18:48:19 +03:00
132c979174 Class StringUTF32 for platform-independed Unicode strings 2021-07-15 16:31:53 +03:00
673df114cc Refactoring 2021-07-14 23:33:54 +03:00
33eb1a7ab7 text and image render 2021-07-14 15:22:20 +03:00
f8b730dbc8 [xlsb] add ACABSPATH union FileSharing/Iso record, WbProp record and dependent structures 2021-07-14 13:56:11 +03:00
406005815b Refactoring and adding a save to Emf has started 2021-07-13 21:55:08 +03:00
72edf8e89d get glyphs from c++ 2021-07-13 12:55:13 +03:00
4c483e506e Refactoring and adding data reading from an Xml file 2021-07-12 21:32:48 +03:00
4fd0b0e461 crush fix 2021-07-12 19:06:43 +03:00
c309339666 Major refactoring 2021-07-09 22:29:16 +03:00
3185ca0f36 [XlsbFormat] fix build 2021-07-09 17:36:04 +03:00
5f96f5dbb7 refactoring 2021-07-09 14:47:21 +03:00
2dadace9e0 [Common][Network] change typedef style func to c++11 std::function 2021-07-09 14:01:14 +03:00
e6edae010a [XlsbFormat] refactoring, create WorkBookStream and take a part of WorkBook.bin records 2021-07-09 13:12:13 +03:00
1b7b530906 change call GetArray from binaryReader 2021-07-09 13:01:04 +03:00
c7c25895c2 change GetArray allocate memory to outside allocate 2021-07-09 12:55:37 +03:00
da415dcbbd sync changes to test on linux 2021-07-07 16:16:23 +03:00
bf2edb3776 [xlsb] add binary stream reader 2021-07-07 15:46:46 +03:00
dd7010f2cd swap_ranges faster 2021-07-06 17:18:51 +03:00
cc7294cadb already ready xps 2021-07-06 13:03:52 +03:00
1f809a129d adding xps to DjVuFile/wasm 2021-07-06 12:57:21 +03:00
edcdd0ab8e compile djvu 2021-07-05 18:39:59 +03:00
da5a147393 Merge branch 'feature/localgraphics' into feature/drawing_file_client 2021-07-05 11:15:44 +03:00
321ca7e0ff Developing 2021-07-05 07:22:55 +03:00
04b9c9ae1d Developing... 2021-07-04 22:10:17 +03:00
69d4a44b3c Refactoring 2021-07-03 21:03:54 +03:00
237fb15d19 Errors fixing
Trying not to use CGenericList
2021-07-03 01:46:21 +03:00
124e90696c fix bugs 2021-07-02 16:23:47 +03:00
d2ff657b81 fix rgba
some letters disappear
2021-07-02 13:22:31 +03:00
8a39c5470e build wasm 2021-07-01 18:22:00 +03:00
08d55a40ff null pointer exception fix 2021-07-01 17:15:17 +03:00
1747439048 wasm JBig2 2021-06-30 18:47:19 +03:00
419d0ba99a draws smth 2021-06-30 17:47:07 +03:00
39347207da Refactoring 2021-06-29 21:14:25 +03:00
fe129f33ce xps texture in memory 2021-06-29 18:09:55 +03:00
2ed31b0b8a instant crash fix 2021-06-29 15:50:05 +03:00
7b14e28ffa fixed roots, limits and logarithms 2021-06-29 14:39:42 +03:00
4c84e5f9a3 Developing... 2021-06-29 09:35:28 +03:00
b97006cda9 Fixed incorrect entry of some records in XML 2021-06-28 21:57:29 +03:00
09d6d280a5 launch linux 2021-06-28 18:39:06 +03:00
a1b480b83e fix fonts in folder, xps in folder 2021-06-28 18:14:27 +03:00
3a9cf26462 compiling on linux 2021-06-28 15:19:37 +03:00
00db21d443 string classes comparability
todo Clip
2021-06-27 21:10:09 +03:00
dbc591ab44 fix path 2021-06-27 17:39:39 +03:00
ebc9990f71 Rename enum in core & repair external lib 2021-06-27 12:23:14 +03:00
3a43362536 Refactoring 2021-06-25 22:06:58 +03:00
c9144ea4c6 Namechages + adaptor classes 2021-06-25 18:37:59 +03:00
77ce9fbef3 xps in memory 2021-06-25 17:17:13 +03:00
2b29a23b26 [DocxFormatLib][XlsbFormat] add BaseRecords, biff12 stream parser and working with sharedStrings.bin 2021-06-25 16:32:35 +03:00
38356d622a new branch, minimal changes to lib 2021-06-24 17:50:46 +03:00
b0c898b97e ZipFolder moved to OfficeUtils 2021-06-24 12:01:56 +03:00
ec13c73f03 Started adding a read from an Xml file 2021-06-23 21:09:52 +03:00
edb7bc2fc3 change conflict names 2021-06-23 15:47:03 +03:00
dee8a6d37a fix re-creation 2021-06-23 10:24:35 +03:00
f2da4416ae with static 2021-06-23 10:14:20 +03:00
f72475b172 CGlobalFontsMemoryStorage 2021-06-22 17:47:13 +03:00
1af0a7845d . 2021-06-22 14:27:07 +03:00
01d753cfc3 linux fix 2021-06-21 14:06:24 +03:00
64dcd1d0d7 fix memory leaks 2021-06-21 13:09:44 +03:00
5ddbe33783 Brackets and functions 2021-06-21 08:58:33 +03:00
8489f6e02b Added the function of zooming images using the mouse wheel 2021-06-20 16:44:39 +03:00
434a69f15a Refactoring 2021-06-20 16:13:06 +03:00
922810b157 Combining data output into Xml and a file 2021-06-17 22:42:39 +03:00
b24d16534d Refactoring 2021-06-16 21:47:23 +03:00
861833b792 add text support
Common/3dParty/icu/icu/source/common/udata.cpp needs to change openCommonData implementation
2021-06-16 14:38:35 +03:00
0e666c8e17 . 2021-06-16 11:35:42 +03:00
b9308428ed Added a draft version of combining structures 2021-06-15 22:15:08 +03:00
2ea9e20bd4 Merge branch 'feature/grad' into feature/newParser 2021-06-15 13:03:47 +03:00
c525b15de2 Fraction withput Bar 2021-06-15 10:50:38 +03:00
3fb32cc029 first commit 2021-06-15 10:21:19 +03:00
3f0bb334ed adding icu 2021-06-11 17:48:52 +03:00
2573f77c96 texture from file 2021-06-11 13:10:30 +03:00
6f91f99649 texture fill 2021-06-10 17:05:56 +03:00
b41613a67f test gradient 2021-06-09 17:18:05 +03:00
806dc7f21b graphics test 2021-06-09 12:34:08 +03:00
abe4b20d46 Refactoring 2021-06-08 22:47:30 +03:00
2b79302d2b yet without fonts 2021-06-08 18:43:54 +03:00
0574712c5c with fonts from memory 2021-06-08 17:44:58 +03:00
57774bb53e Added deleting elements from the tree 2021-06-07 21:45:45 +03:00
15d5213146 fix js test 2021-06-07 18:03:09 +03:00
2c4d2af648 add c++ functions 2021-06-07 16:14:05 +03:00
010c73675e js test 2021-06-04 18:30:54 +03:00
6d958038cb c++ test 2021-06-04 15:24:30 +03:00
4de761f624 Added support for reading all records from an Xml file 2021-06-03 22:23:26 +03:00
1990eb70d4 build graphics.js 2021-06-03 16:29:19 +03:00
fe1d0e8f4c fractions without wideslash + integrals 2021-06-03 15:55:46 +03:00
a5c97f8b57 refactoring, roots and indexes 2021-06-03 07:28:28 +03:00
ecd62f9fcc add freetytype includes 2021-06-02 18:10:17 +03:00
33b7f5ffb7 add raster.o for graphics_make.py 2021-06-02 15:13:56 +03:00
c4e31235d5 Added file statistics 2021-06-01 23:55:24 +03:00
729bdfd752 add includes 2021-06-01 19:18:02 +03:00
293805d0ef add graphics_make.py 2021-06-01 15:22:54 +03:00
5255d356f3 fix build 2021-06-01 11:05:45 +03:00
03b0045ba9 add dependency 2021-06-01 10:57:53 +03:00
01ed59348f Some fixes 2021-06-01 09:24:42 +03:00
b82be5aac8 Profile as debug 2021-05-31 21:54:37 +03:00
3e7519ff4f create graphics 2021-05-31 14:45:59 +03:00
5bd661720d Fixed closing the Xml file 2021-05-28 22:19:49 +03:00
4039b87453 Improved appearance 2021-05-28 21:58:34 +03:00
f98ebcac7d Improved appearance 2021-05-26 22:50:50 +03:00
7763f666fd funtional gradient 2021-05-26 17:56:08 +03:00
f71d111641 radius fix 2021-05-25 19:20:22 +03:00
9dae8f2b66 transform to mm 2021-05-25 18:52:06 +03:00
ea4f885923 empty lines fix 2021-05-25 16:53:31 +03:00
ba5b250faf add remaining files, remove auto 2021-05-25 12:42:34 +03:00
2bd9e8adf1 scale refactor
little optimisation
2021-05-25 11:21:10 +03:00
0b40961549 Removing unnecessary content 2021-05-24 20:06:03 +03:00
26aa839648 Fix 2021-05-24 18:15:48 +03:00
0cf5cf0bfa Move functions for different shadings to the proper place 2021-05-24 18:02:42 +03:00
9d84c6a435 Fix problem with drawing shadings 2021-05-24 17:08:01 +03:00
06a5922b9d Changed the display of the XML file on QTreeView 2021-05-21 23:54:03 +03:00
7e2e5c07c1 17 refactoring and comments 2021-05-20 16:18:32 +03:00
8f430b75c6 16 brackets 2021-05-19 20:02:15 +03:00
24b6e73b41 Adjusting the size of the resulting image 2021-05-19 19:43:48 +03:00
d757c5c048 15
brackets
2021-05-19 19:37:38 +03:00
beab3a36e1 on the way to fix linear grad
test commit from new PC
2021-05-19 15:24:51 +03:00
4259d2d256 Added rendering of metafiles 2021-05-18 21:37:14 +03:00
4e761e9f1d 14
Function section of math conversation
2021-05-17 11:45:23 +03:00
62e0ca27d1 scaling fix, little refactoring 2021-05-13 16:28:07 +03:00
c74b034372 13
finish of realization <mn> and <mo> tag istead of few bugs
2021-05-11 10:50:27 +03:00
cff1d0e2ac Fix test 2021-05-10 13:51:26 +03:00
6a3b6ff05f Added reading bytes from an Xml file 2021-05-07 21:01:14 +03:00
48f23caff6 Refactoring 2021-05-07 18:41:05 +03:00
9bf8bf7c0f Refactoring 2021-05-07 18:23:55 +03:00
58dc38315a Added support for reading new records from Xml 2021-05-06 21:06:30 +03:00
86d34b1341 functional + test change 2021-05-06 18:05:47 +03:00
77ee0a7aab 12) Add some operators for <mo> odf tag 2021-05-06 06:25:14 +03:00
fa86ad2322 Added a prototype for reading data from an Xml file 2021-05-05 21:25:42 +03:00
0d7983c905 math drawing fix, add xmlns, fix relationship to math 2021-05-05 13:20:55 +03:00
242f4496e5 11
add <mrow> <mn> tags. Realisation "add text" for math_mi/mo/mn/
2021-05-05 11:19:22 +03:00
650268b474 odf write math xml without root node 2021-05-04 11:01:47 +03:00
b97b0bfde3 10 2021-04-30 13:40:29 +03:00
c2cb1fd828 Added saving arbitrary bytes from an EMF file to XML, Refactoring 2021-04-28 23:38:55 +03:00
420e2b8518 Linnear fix
[agg]Fixed issue when axial gradient didn't render extended part
[Graphics]Removed console log in color function
[Test] page numeration fix
2021-04-27 15:15:31 +03:00
6369200c6e New test, changed name 2021-04-26 18:03:39 +03:00
dce5c3f1b0 9 2021-04-26 10:23:25 +03:00
aad4c38574 Refactoring saving EMF to XML 2021-04-22 19:00:46 +03:00
72d9418fd5 radial fix 2021-04-22 15:37:50 +03:00
1da52687ae fix math context 2021-04-21 18:19:09 +03:00
de80aa2e42 8
odf_math_context
2021-04-21 04:37:02 +03:00
9f7f51fc82 Merge branch 'feature/grad' of https://github.com/ONLYOFFICE/core into feature/grad 2021-04-20 12:58:57 +03:00
dee0cf0424 New test for pdf 2021-04-20 12:51:11 +03:00
575339bdb8 Revert "Added saving of the Unsigned int type"
This reverts commit a7ee06aeca.
2021-04-19 18:31:00 +03:00
cac21d43ad Fix build on windows 2021-04-19 17:52:10 +03:00
a7ee06aeca Added saving of the Unsigned int type 2021-04-19 17:09:12 +03:00
78e44be4d1 Refactoring 2021-04-19 07:05:56 +03:00
82fb489cdd Added image display and its xml representation in Qt 2021-04-18 15:37:44 +03:00
d3bcc73216 Refactoring 2021-04-14 21:20:21 +03:00
de88587dde wrong radius fix
correct radius
wrong background
2021-04-14 15:16:30 +03:00
1b5766ac77 wrong radius fix 2021-04-14 14:41:05 +03:00
ea281eb57c fix
little radial fix
2021-04-13 14:15:39 +03:00
6676124c5b 7
math serialize
2021-04-12 17:15:02 +03:00
14e3951d7e back vcxproj and add some math files to OdfWriter 2021-04-12 13:49:42 +03:00
99ce92b794 Added saving EMF to XML 2021-04-10 14:25:46 +03:00
923cab1fc0 triangle
found patch bug if res = 0
2021-04-09 14:36:29 +03:00
882ac192a2 6 math serialize 2021-04-08 21:36:53 +03:00
db72b90d3a 5
Math structures in OdfFormatWriterLib without serialize
2021-04-08 16:39:33 +03:00
7cc4bff37c patch, axial and radial gradient
works most of the times but there are some bugs
cannot test functional and triangle
2021-04-08 16:32:22 +03:00
ca66431f14 4 2021-04-07 16:32:54 +03:00
2e549efa1b Coons patch
Added correct coord transformation and alpha channel support
Started working on other gradients
2021-04-07 13:33:32 +03:00
e30806413a 3 2021-04-06 21:38:29 +03:00
c4cad9ced9 2 2021-04-06 21:30:15 +03:00
f03e7cf2a9 magic constant 2021-04-06 16:42:17 +03:00
f6e2e91a4d Radial fix, PDF gradinet implementation
Fixed radial shading cone display
Started working on coons shading, it can convert pdfreader colors to graphics colors(rgb only) and drow similar (in math sense) shape, however size is still wrong, figuring out how to diplay shape with corect size and offset.
Todo:
 Other gradients
 Size and offset
 Alpha Channel
2021-04-03 17:40:56 +03:00
ee296ff09d math conversation 2021-04-02 07:01:27 +03:00
f7b3f95bcb Merge pull request #563 from ONLYOFFICE/develop
Develop
2021-04-01 10:18:48 +03:00
bea00062b4 Refactoring 2021-03-31 18:01:22 +03:00
d586befe30 Merge remote-tracking branch 'origin/feature/odf' into feature/odf 2021-03-31 14:42:38 +03:00
4269b2862f gitignore + start of feature 2021-03-31 14:22:53 +03:00
ccda615144 gitignore smth 2021-03-31 11:42:02 +03:00
e142db5400 Adjusted the size of some polygons 2021-03-30 21:09:58 +03:00
4d9e28ce09 UI triangle 2021-03-26 18:18:16 +03:00
7cb4914239 fix test crash
Not parametric coonspatch optimisation
2021-03-26 17:40:11 +03:00
ed498c296d Test UI and Bug fixes
Made new ui to test
Fixed bug with linear gradient
Optimised Coons patch
2021-03-26 15:57:37 +03:00
27950b108b Empty pixel fix
Finally fixed not rendering some pixels in an effective way.
Added comments. Started making an adaptor to easly convert PDF info to gradient info.
2021-03-24 14:10:45 +03:00
6a3ca43a1d Fixed incorrect position of arcs in some cases 2021-03-22 21:17:13 +03:00
08f303d73d Fixed incorrect background in some cases 2021-03-22 21:14:25 +03:00
e1f905ffe0 fixed empty pixels
Now there are no empty pixels but it works muchs slower.
Trying different ways to optimise.
Small change in test app, now its easier to test shadings.
2021-03-22 18:25:08 +03:00
290b677dbe coons patch and tensor shading
made somewhat working realisation of coons patch gradient and tensor shading
still need debugging and optimisations
2021-03-22 14:03:00 +03:00
c1855bbf2a Working trinagle interpolation
Fixed triangle interpolation, both parametric and color.
Started developing Tensor Product gradient. (Does not work for now)
A bit of refactoring.
2021-03-20 16:47:44 +03:00
468b2bf877 Changed the default background color from black to white 2021-03-19 22:11:44 +03:00
5b88f73bf5 Fixed a problem with different text rotation direction 2021-03-19 20:39:36 +03:00
b8f7f267ff Fixed the position of the rotated text 2021-03-18 22:56:27 +03:00
b8d663139b Fix compile on all platforms 2021-03-18 09:17:19 +03:00
b725ab4d75 added test trinagle gradient
still buggy
2021-03-17 18:31:07 +03:00
b683adb0ba code style and little fix 2021-03-15 11:20:12 +03:00
17a84755ba bug fix 2021-03-15 11:01:04 +03:00
d58bd76f8c GUI test and buf fixes
fixed a few bugs
found a few new bugs
made a GUI for testing
2021-03-14 21:36:15 +03:00
d11c2e5b1b fix bug, optimisation
finished realisation of basic gradient
optimised float point calculation
2021-03-13 13:12:57 +03:00
61f6422f4d refactor
new types of gradients
todo:
 1. More refactoring
 2. Rotate linear gradient debug
 3. Reflect, repeat adaptor
2021-03-12 15:12:49 +03:00
3262b0e551 Changing the formula for calculating new text coordinates when rotating 2021-03-11 20:42:58 +03:00
c3ab05b40e first version
added new gradients
still need a lot of refactoring/debuging(prob.)
pushing to backup somewhat working version
2021-03-11 18:44:36 +03:00
8c3490eaf6 Fix the coordinates of the position of the rotated text 2021-03-10 21:10:00 +03:00
57cf4311a0 Refactoring 2021-03-09 16:37:30 +03:00
e1d7bf74ba test variant 2021-03-09 16:16:32 +03:00
8f6a51a4f8 [test] Update test file 2020-12-25 13:48:52 +03:00
4748ad961b Fixed a bug with incorrect position of ellipses 2020-11-24 20:01:04 +03:00
a9131b0841 The rotated text appears in the desired area 2020-11-19 21:10:06 +03:00
467360bc3e [test] Add test file 2020-11-17 22:42:11 +03:00
90ffc2be3b Numbers appeared in different places 2020-11-13 15:45:34 +03:00
11bbb0880d [se] dates is updated proof resolved 2020-11-11 15:06:20 +03:00
e69514a338 [se] macros-locale-data.xlsm chanes date 2020-11-10 17:06:28 +03:00
66eac90262 [se]the dates's been changed 2020-10-28 16:49:08 +03:00
2ddefee334 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale 2020-10-27 13:09:39 +03:00
456f25d9e1 [se]fix 2020-10-27 13:09:17 +03:00
e447a428d0 [se] fix 2020-10-27 13:08:50 +03:00
c52c2306c3 [se] 2020-10-27 09:02:29 +03:00
68c07a11d4 updated 2020-10-27 08:58:59 +03:00
b4b8c74fd7 updated 2020-10-27 08:58:29 +03:00
908524ff2e [se] builders 2020-10-27 08:57:43 +03:00
bfd8f52e5e [se]ParseLocalFormatSymbol 2020-10-23 17:32:18 +03:00
40ef42f18d [se] view 2020-10-23 13:43:20 +03:00
057514398c [se] renamed 2020-10-23 13:40:51 +03:00
2f1975eca7 [se] renamed 2020-10-23 13:37:40 +03:00
199325b458 [se] chanhed Readme.md 2020-10-23 13:34:18 +03:00
7bb737e4ab [se]fix 2020-10-23 13:18:53 +03:00
4a381a013c [se]fix 2020-10-23 12:34:23 +03:00
795601e243 [se]fix 2020-10-23 12:29:21 +03:00
e0f902ef50 [se] moved 2020-10-23 12:28:57 +03:00
a8c605da58 [se] changed output 2020-10-23 12:18:58 +03:00
1330c28758 [se]rename 2020-10-23 12:17:32 +03:00
06cbaa82f2 [se] 2020-10-23 12:14:36 +03:00
bdd3cd0795 [se]alghoritm 2020-10-23 12:13:43 +03:00
bb6fc86e0a [se]renamed 2020-10-23 12:01:00 +03:00
900d28e002 [se] update 2020-10-22 15:34:43 +03:00
d41904eab0 [se]fix 2020-10-22 15:13:49 +03:00
22063acc38 [se] fxi 2020-10-22 14:52:45 +03:00
b61ecc11ae [se]algoiscommented 2020-10-22 14:41:22 +03:00
ded9f2cc6a [se] changeofdata 2020-10-22 14:38:00 +03:00
a7c136cdeb [se]changenamess2 2020-10-22 13:52:55 +03:00
d1e75447a0 [se] changenames s1 2020-10-22 13:25:53 +03:00
5263677365 [se]fix 2020-10-22 13:20:07 +03:00
de6d5de360 [se] alghoritm 2020-10-22 13:04:26 +03:00
66478ba28e [se] the comented algorithm 2020-10-22 09:56:11 +03:00
c6ed595019 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale
# Conflicts:
#	Test/Applications/ParseExcelNumberFormatLocales/test/proof/test.js
2020-10-22 09:51:01 +03:00
7dd98a564c [se] fix 2020-10-22 09:27:01 +03:00
19d2417ffe Readme.md's been filled. 2020-10-22 09:26:25 +03:00
da2d9f6ed3 _ 2020-10-21 13:05:03 +03:00
6b0256ae4c _ 2020-10-21 13:00:07 +03:00
5ca14e42a6 _ 2020-10-21 12:59:51 +03:00
d150c439d4 _ 2020-10-21 12:01:36 +03:00
9952900ca8 _ 2020-10-21 11:57:39 +03:00
bc2f1a2c82 _ 2020-10-21 08:51:56 +03:00
ec1c5b278c fix 2020-10-20 17:15:40 +03:00
207cb4e6dd _ 2020-10-20 15:31:37 +03:00
f01770ba3c _ 2020-10-20 15:27:23 +03:00
dc2236c664 _ 2020-10-20 14:59:56 +03:00
112e2a866a fix 2020-10-20 14:55:39 +03:00
8add25ef19 _ 2020-10-20 14:51:27 +03:00
4863b89e62 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale
# Conflicts:
#	Test/Applications/ParseExcelNumberFormatLocales/test/macros-locale (1).xlsm
#	Test/Applications/ParseExcelNumberFormatLocales/test/run2.vbs
#	Test/Applications/ParseExcelNumberFormatLocales/test/test2.ps1
2020-10-20 14:48:32 +03:00
f63dcd82f4 added dates 2020-10-19 15:45:06 +03:00
25b35c542a -replace "," to "." and " " to "!". the 2 bugs's been found. The first is webstorm cant replace "\u00A0" to "\u0020", the second is bad data, str2[297][1] = "\", strofdec[297] = "," 2020-10-19 15:41:00 +03:00
fc3060d2d0 [test] Move to relative path 2020-10-12 13:24:03 +03:00
8f4cbc5a5c [test] testing of the functional for changing symbols 2020-10-12 11:44:37 +03:00
34cd2d3e77 [test] Add new test project 2020-10-08 12:57:44 +03:00
8703 changed files with 1338004 additions and 468038 deletions

14
.gitignore vendored
View File

@ -26,3 +26,17 @@ Thumbs.db
*.dat
*.txt
*.log
*.ipch
*.ipch
*.ipch
*.db-wal
*.db-shm
*.db
*.opendb
DesktopEditor/fontengine/js/common/freetype-2.10.4

View File

@ -32,7 +32,7 @@
#pragma once
#include <string>
#include <map>
#include <unordered_map>
#include <list>
#include <boost/shared_ptr.hpp>
@ -123,15 +123,15 @@ namespace XMLTools
private:
std::wstring m_Name;
std::wstring m_ElementText;
std::map<std::wstring, std::wstring> m_AttributeMap;
std::map<std::wstring, int> m_ChildMap; //for uniq
std::unordered_map<std::wstring, std::wstring> m_AttributeMap;
std::unordered_map<std::wstring, int> m_ChildMap; //for uniq
std::list<XMLElement> m_Elements;
typedef std::list<XMLElement>::iterator ElementsIterator;
typedef std::list<XMLElement>::const_iterator ElementsIteratorConst;
typedef std::map<std::wstring, std::wstring>::iterator AttMapIterator;
typedef std::map<std::wstring, std::wstring>::const_iterator AttMapIteratorConst;
typedef std::unordered_map<std::wstring, std::wstring>::iterator AttMapIterator;
typedef std::unordered_map<std::wstring, std::wstring>::const_iterator AttMapIteratorConst;
public:

View File

@ -130,7 +130,7 @@ namespace DocFileFormat
if (_webHidden)
{
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( L"w:webHidden" );
XMLTools::XMLElement *webHidden = new XMLTools::XMLElement ( L"w:webHidden" );
parent->AppendChild( *webHidden );
RELEASEOBJECT( webHidden );
}
@ -141,322 +141,308 @@ namespace DocFileFormat
{
int nProperty = 0; //for unknown test
switch ( (int)( iter->OpCode ) )
switch ((int)(iter->OpCode))
{
case sprmOldCIstd :
case sprmCIstd : // style id
case sprmOldCIstd:
case sprmCIstd: // style id
{
if (_isRunStyleNeeded && !_webHidden)
{
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
_currentIstd = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
if (_currentIstd < _doc->Styles->Styles->size())
{
appendValueElement( parent, L"rStyle", StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
appendValueElement(parent, L"rStyle", StyleSheetMapping::MakeStyleId(_doc->Styles->Styles->at(_currentIstd)), true);
}
}
}break;
case sprmCFBiDi :
appendFlagElement( parent, *iter, L"rtl", true );
_isRTL = true;
break;
case sprmOldCFBold :
case sprmCFBold :
appendFlagElement( parent, *iter, L"b", true );
break;
case sprmCFBoldBi :
appendFlagElement( parent, *iter, L"bCs", true );
break;
case sprmOldCFCaps :
case sprmCFCaps :
appendFlagElement( parent, *iter, L"caps", true );
break;
case sprmCFComplexScripts :
appendFlagElement( parent, *iter, L"cs", true );
break;
case sprmCFDStrike :
appendFlagElement( parent, *iter, L"dstrike", true );
break;
case sprmCFEmboss :
appendFlagElement( parent, *iter, L"emboss", true );
break;
case sprmCFImprint :
appendFlagElement( parent, *iter, L"imprint", true );
break;
case sprmOldCFItalic :
case sprmCFItalic :
appendFlagElement( parent, *iter, L"i", true );
break;
case sprmCFItalicBi:
appendFlagElement( parent, *iter, L"iCs", true );
break;
case 0x0875:
appendFlagElement( parent, *iter, L"noProof", true );
break;
case sprmOldCFOutline:
case sprmCFOutline:
appendFlagElement( parent, *iter, L"outline", true );
break;
case sprmOldCFShadow:
case sprmCFShadow:
appendFlagElement( parent, *iter, L"shadow", true );
break;
case sprmOldCFSmallCaps:
case sprmCFSmallCaps:
appendFlagElement( parent, *iter, L"smallCaps", true );
break;
case sprmCFSpecVanish:
appendFlagElement( parent, *iter, L"specVanish", true );
break;
case sprmOldCFStrike:
case sprmCFStrike:
appendFlagElement( parent, *iter, L"strike", true );
break;
case sprmOldCFVanish:
case sprmCFVanish:
appendFlagElement( parent, *iter, L"vanish", true );
break;
case 0x0811:
appendFlagElement( parent, *iter, L"webHidden", true );
break;
case sprmOldCIss:
case sprmCIss:
if (iter->argumentsSize > 0 && iter->Arguments[0] < 3) //Metaevan.doc
appendValueElement( parent, L"vertAlign", FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
break;
case sprmCRgLid0_80:
case sprmCRgLid0:
}break;
case sprmCFBiDi:
{
appendFlagElement(parent, *iter, L"rtl", true);
_isRTL = true;
}break;
case sprmOldCFBold:
case sprmCFBold:
{
appendFlagElement(parent, *iter, L"b", true);
}break;
case sprmCFBoldBi:
{
appendFlagElement(parent, *iter, L"bCs", true);
}break;
case sprmOldCFCaps:
case sprmCFCaps:
{
appendFlagElement(parent, *iter, L"caps", true);
}break;
case sprmCFComplexScripts:
{
appendFlagElement(parent, *iter, L"cs", true);
}break;
case sprmCFDStrike:
{
appendFlagElement(parent, *iter, L"dstrike", true);
}break;
case sprmCFEmboss:
{
appendFlagElement(parent, *iter, L"emboss", true);
}break;
case sprmCFImprint:
{
appendFlagElement(parent, *iter, L"imprint", true);
}break;
case sprmOldCFItalic:
case sprmCFItalic:
{
appendFlagElement(parent, *iter, L"i", true);
}break;
case sprmCFItalicBi:
{
appendFlagElement(parent, *iter, L"iCs", true);
}break;
case 0x0875:
{
appendFlagElement(parent, *iter, L"noProof", true);
}break;
case sprmOldCFOutline:
case sprmCFOutline:
{
appendFlagElement(parent, *iter, L"outline", true);
}break;
case sprmOldCFShadow:
case sprmCFShadow:
{
appendFlagElement(parent, *iter, L"shadow", true);
}break;
case sprmOldCFSmallCaps:
case sprmCFSmallCaps:
{
appendFlagElement(parent, *iter, L"smallCaps", true);
}break;
case sprmCFSpecVanish:
{
appendFlagElement(parent, *iter, L"specVanish", true);
}break;
case sprmOldCFStrike:
case sprmCFStrike:
{
appendFlagElement(parent, *iter, L"strike", true);
}break;
case sprmOldCFVanish:
case sprmCFVanish:
{
appendFlagElement(parent, *iter, L"vanish", true);
}break;
case 0x0811:
{
appendFlagElement(parent, *iter, L"webHidden", true);
}break;
case sprmOldCIss:
case sprmCIss:
{
if (iter->argumentsSize > 0 && iter->Arguments[0] < 3) //Metaevan.doc
appendValueElement(parent, L"vertAlign", FormatUtils::MapValueToWideString(iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12), true);
}break;
case sprmCRgLid0_80:
case sprmCRgLid0:
{ //latin
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
LanguageId langid(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Default );
LanguageIdMapping* langIDMapping = new LanguageIdMapping(lang, Default);
langid.Convert( langIDMapping );
langid.Convert(langIDMapping);
RELEASEOBJECT( langIDMapping );
}break;
case sprmOldCLid:
case sprmCRgLid1_80:
case sprmCRgLid1:
RELEASEOBJECT(langIDMapping);
}break;
case sprmOldCLid:
case sprmCRgLid1_80:
case sprmCRgLid1:
{ //east asia
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
LanguageId langid(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, EastAsian );
LanguageIdMapping* langIDMapping = new LanguageIdMapping(lang, EastAsian);
langid.Convert( langIDMapping );
langid.Convert(langIDMapping);
RELEASEOBJECT( langIDMapping );
RELEASEOBJECT(langIDMapping);
}break;
case sprmCLidBi:
{
LanguageId langid(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
case sprmCLidBi:
{
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
LanguageIdMapping* langIDMapping = new LanguageIdMapping(lang, Complex);
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Complex );
langid.Convert(langIDMapping);
langid.Convert( langIDMapping );
RELEASEOBJECT( langIDMapping );
}break;
case sprmCBrc80:
case sprmCBrc:
RELEASEOBJECT(langIDMapping);
}break;
case sprmCBrc80:
case sprmCBrc:
{ //borders
XMLTools::XMLElement bdr( L"w:bdr" );
BorderCode bc( iter->Arguments, iter->argumentsSize );
appendBorderAttributes( &bc, &bdr );
parent->AppendChild( bdr );
}break;
case sprmCShd80:
case sprmCShd:
{ //shading
ShadingDescriptor desc( iter->Arguments, iter->argumentsSize );
appendShading( parent, desc );
}break;
case sprmOldCIco:
case sprmCIco:
case sprmCIcoBi:
{//color
colorVal->SetValue( FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ));
XMLTools::XMLElement bdr(L"w:bdr");
BorderCode bc(iter->Arguments, iter->argumentsSize);
appendBorderAttributes(&bc, &bdr);
parent->AppendChild(bdr);
}break;
case sprmCShd80:
case sprmCShd:
{ //shading
ShadingDescriptor desc(iter->Arguments, iter->argumentsSize);
case sprmCCv:
appendShading(parent, desc);
}break;
case sprmOldCIco:
case sprmCIco:
case sprmCIcoBi:
{//color
colorVal->SetValue(FormatUtils::MapValueToWideString(iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12));
}break;
case sprmCCv:
{
std::wstringstream sstream;
sstream << boost::wformat(L"%02x%02x%02x") % iter->Arguments[0] % /*G*/iter->Arguments[1] % /*B*/iter->Arguments[2];
colorVal->SetValue(sstream.str());
}break;
case sprmCOldHighlight:
{
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorNameIdentifier[0][0], 17, 12 ), true );
}break;
case sprmCHighlight:
{
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorNameIdentifier[0][0], 17, 12 ), true );
}break;
case sprmOldCDxaSpace:
case sprmCDxaSpace:
{
appendValueElement( parent, L"spacing", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCFtcBi :
case sprmCOldHighlight:
{
appendValueElement(parent, L"highlight", FormatUtils::MapValueToWideString(iter->Arguments[1], &Global::ColorNameIdentifier[0][0], 17, 12), true);
}break;
case sprmCHighlight:
{
appendValueElement(parent, L"highlight", FormatUtils::MapValueToWideString(iter->Arguments[0], &Global::ColorNameIdentifier[0][0], 17, 12), true);
}break;
case sprmOldCDxaSpace:
case sprmCDxaSpace:
{
appendValueElement(parent, L"spacing", FormatUtils::IntToWideString(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize)), true);
}break;
case sprmCFtcBi:
{//default from FontTable
size_t nIndex = FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize);
if( nIndex < _doc->FontTable->Data.size() )
size_t nIndex = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
if (nIndex < _doc->FontTable->Data.size())
{
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
FontFamilyName* ffn = static_cast<FontFamilyName*>(_doc->FontTable->operator [] (nIndex));
if (ffn)
m_sDefaultFont = ffn->xszFtn;
}
}break;
case sprmCHpsBi :
case sprmCHpsBi:
{
appendValueElement( parent, L"szCs",
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
appendValueElement(parent, L"szCs",
FormatUtils::IntToWideString(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize)), true);
}
break;
// Font Size in points (2~3276) default 20-half-points
case sprmOldCHps :
// Font Size in points (2~3276) default 20-half-points
case sprmOldCHps:
{
appendValueElement (parent, L"sz",
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
true );
appendValueElement(parent, L"sz",
FormatUtils::IntToWideString(FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize)),
true);
}break;
case sprmCHps :
{
appendValueElement (parent, L"sz",
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
case sprmCHps:
{
appendValueElement(parent, L"sz",
FormatUtils::IntToWideString(FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize)), true);
}break;
case sprmCMajority :
case sprmCMajority:
{ //for complex props
}break;
case sprmOldCHpsPos:
case sprmOldCHpsPos:
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
short nVertPos = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
appendValueElement (parent, L"position", nVertPos, true);
appendValueElement(parent, L"position", nVertPos, true);
}break;
case sprmCHpsPos:
case sprmCHpsPos:
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
short nVertPos = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
appendValueElement (parent, L"position", nVertPos, true);
appendValueElement(parent, L"position", nVertPos, true);
}break;
case sprmOldCHpsKern:
case sprmCHpsKern:
case sprmOldCHpsKern:
case sprmCHpsKern:
{
appendValueElement( parent, L"kern", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
appendValueElement(parent, L"kern", FormatUtils::IntToWideString(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize)), true);
}break;
case sprmOldCFtc:
case sprmCRgFtc0:
case sprmOldCFtc:
case sprmCRgFtc0:
{ // font family
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
if( nIndex < _doc->FontTable->Data.size() )
size_t nIndex = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
if (nIndex < _doc->FontTable->Data.size())
{
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute(L"w:ascii");
FontFamilyName* ffn = static_cast<FontFamilyName*>(_doc->FontTable->operator [] (nIndex));
m_sAsciiFont = ffn->xszFtn;
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont, true));
rFonts->AppendAttribute( *ascii );
RELEASEOBJECT( ascii );
ascii->SetValue(FormatUtils::XmlEncode(m_sAsciiFont, true));
rFonts->AppendAttribute(*ascii);
RELEASEOBJECT(ascii);
}
}break;
case sprmCRgFtc1:
case sprmCRgFtc1:
{
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
size_t nIndex = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
if (nIndex >= 0 && nIndex < _doc->FontTable->Data.size())
{
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( L"w:eastAsia" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute(L"w:eastAsia");
FontFamilyName* ffn = static_cast<FontFamilyName*>(_doc->FontTable->operator [] (nIndex));
m_sEastAsiaFont = ffn->xszFtn;
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont));
rFonts->AppendAttribute( *eastAsia );
RELEASEOBJECT( eastAsia );
eastAsia->SetValue(FormatUtils::XmlEncode(m_sEastAsiaFont));
rFonts->AppendAttribute(*eastAsia);
RELEASEOBJECT(eastAsia);
}
}
break;
case sprmCRgFtc2:
case sprmCRgFtc2:
{
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
size_t nIndex = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
if (nIndex >= 0 && nIndex < _doc->FontTable->Data.size())
{
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( L"w:hAnsi" );
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute(L"w:hAnsi");
FontFamilyName* ffn = static_cast<FontFamilyName*>(_doc->FontTable->operator [] (nIndex));
m_shAnsiFont = ffn->xszFtn;
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont));
rFonts->AppendAttribute( *ansi );
RELEASEOBJECT( ansi );
ansi->SetValue(FormatUtils::XmlEncode(m_shAnsiFont));
rFonts->AppendAttribute(*ansi);
RELEASEOBJECT(ansi);
}
}break;
case sprmOldCKul:
case sprmCKul:
}break;
case sprmOldCKul:
case sprmCKul:
{ //Underlining
appendValueElement( parent, L"u", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
appendValueElement(parent, L"u", FormatUtils::MapValueToWideString(iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16), true);
}
break;
case sprmCCharScale:
break;
case sprmCCharScale:
{ //char width
appendValueElement( parent, L"w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
}break;
case sprmCSfxText:
appendValueElement(parent, L"w", FormatUtils::IntToWideString(FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize)), true);
}break;
case sprmCSfxText:
{ //animation
appendValueElement( parent, L"effect", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
}break;
case sprmCIdctHint:
appendValueElement(parent, L"effect", FormatUtils::MapValueToWideString(iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16), true);
}break;
case sprmCIdctHint:
{
switch(iter->Arguments[0])
XMLTools::XMLAttribute hint(L"w:hint");
switch (iter->Arguments[0])
{
case 0: break; // default
case 1: break; // eastAsia
case 2: break; // cs
case 1:
{
hint.SetValue(L"eastAsia");
rFonts->AppendAttribute(hint);
}break;
case 2:
{
hint.SetValue(L"eastAsia");
rFonts->AppendAttribute(hint);
}break;
case 0: break; // default
case 0xFF: break; //No ST_Hint equivalent
}
}break;
case sprmCPbiIBullet:
case sprmCPbiIBullet:
{
int nIndex = FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize );
if (nIndex >=0)
int nIndex = FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize);
if (nIndex >= 0)
{
std::map<int, int>::iterator it = _doc->PictureBulletsCPsMap.find(nIndex);
if (it != _doc->PictureBulletsCPsMap.end())
@ -465,28 +451,34 @@ namespace DocFileFormat
}
}
}break;
case sprmCPbiGrf:
case sprmCPbiGrf:
{
//used picture bullet
int val = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
int val = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
}break;
case sprmCRsidProp:
case sprmCRsidText:
break;
default:
if (iter->argumentsSize == 2)
case sprmCRsidProp:
case sprmCRsidText:
break;
case sprmCFUsePgsuSettings:
{
nProperty = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
}else
if (iter->argumentsSize == 1)
appendFlagElement(parent, *iter, L"snapToGrid", true);
}break;
default:
{
nProperty = FormatUtils::BytesToUChar( iter->Arguments, 0, iter->argumentsSize );
}
break;
switch (iter->argumentsSize)
{
case 1:
nProperty = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
break;
case 2:
nProperty = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
break;
case 4:
nProperty = FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize);
break;
}
}break;
}
}
}
@ -544,7 +536,7 @@ namespace DocFileFormat
if ( flag == 0 )
{
val->SetValue( L"false" );
val->SetValue( L"0" );
ele->AppendAttribute( *val );
node->AppendChild( *ele );
}
@ -587,7 +579,7 @@ namespace DocFileFormat
//invert it
if ( stylesVal )
{
val->SetValue( L"false" );
val->SetValue( L"0" );
ele->AppendAttribute( *val );
}

View File

@ -55,7 +55,6 @@ namespace DocFileFormat
{
m_context->_docx->RegisterComments();
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:comments", TRUE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
@ -148,7 +147,6 @@ namespace DocFileFormat
{
m_context->_docx->RegisterCommentsExtended();
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w15:commentsEx", TRUE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );

View File

@ -91,7 +91,6 @@ namespace DocFileFormat
doc->listTable->Convert( &numberingMapping );
}
//write the footnotes
FootnotesMapping footnotesMapping( &context );
doc->Convert( &footnotesMapping );

View File

@ -518,6 +518,7 @@ namespace DocFileFormat
std::wstring PAGEREF ( L"PAGEREF" );
std::wstring PAGE ( L"PAGE" );
std::wstring SHAPE ( L"SHAPE" );
std::wstring NREF ( L"NREF");
if (arField.empty() == false)
f = arField[0];
@ -538,8 +539,9 @@ namespace DocFileFormat
bool bEquation = search( f.begin(), f.end(), Equation.begin(), Equation.end()) != f.end();
bool bPAGE = search( f.begin(), f.end(), PAGE.begin(), PAGE.end()) != f.end();
bool bTOC = search( f.begin(), f.end(), TOC.begin(), TOC.end()) != f.end();
bool bSHAPE = search( f.begin(), f.end(), SHAPE.begin(), SHAPE.end()) != f.end();
bool bSHAPE = search( f.begin(), f.end(), SHAPE.begin(), SHAPE.end()) != f.end();
bool bNREF = search( f.begin(), f.end(), NREF.begin(), NREF.end()) != f.end();
bool bPAGEREF = false;
if (bHYPERLINK && arField.size() > 1)
{
@ -928,15 +930,15 @@ namespace DocFileFormat
}
else if ((TextMark::DrawnObject == code) && fSpec)
{
Spa* pSpa = NULL;
Spa* pSpa = NULL;
if (typeid(*this) == typeid(MainDocumentMapping))
{
pSpa = static_cast<Spa*>(m_document->OfficeDrawingPlex->GetStruct(cp));
pSpa = static_cast<Spa*>(m_document->OfficeDrawingPlex->GetStruct(cp));
}
else if ((typeid(*this) == typeid(HeaderMapping) ) || ( typeid(*this) == typeid(FooterMapping)))
{
int headerCp = ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn );
pSpa = static_cast<Spa*>(m_document->OfficeDrawingPlexHeader->GetStruct(headerCp));
int headerCp = ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn );
pSpa = static_cast<Spa*>(m_document->OfficeDrawingPlexHeader->GetStruct(headerCp));
}
bool bPicture = false;
@ -1310,7 +1312,7 @@ namespace DocFileFormat
TableInfo tai( papx, m_document->nWordVersion );
//build the table grid
//build the table grid
std::vector<short> grid;
buildTableGrid( cp, nestingLevel, grid);
@ -1387,9 +1389,9 @@ namespace DocFileFormat
while ( tai.fInTable )
{
iTap_current = 1;
fEndNestingLevel = false;
for ( std::list<SinglePropertyModifier>::iterator iter = papx->grpprl->begin(); iter != papx->grpprl->end(); iter++ )
for ( std::list<SinglePropertyModifier>::iterator iter = papx->grpprl->begin(); !fEndNestingLevel && iter != papx->grpprl->end(); iter++ )
{
DWORD code = iter->OpCode;
@ -1398,7 +1400,7 @@ namespace DocFileFormat
case sprmPFInnerTableCell:
case sprmPFInnerTtp:
{
fEndNestingLevel = ( iter->Arguments[0] == 1 ) ? (true) : (false);
fEndNestingLevel = ( iter->Arguments[0] == 1 && (nestingLevel == iTap_current)) ? (true) : (false);
}break;
case sprmOldPFInTable:
@ -1431,19 +1433,9 @@ namespace DocFileFormat
boundary1 = FormatUtils::BytesToInt16( iter->Arguments + 1, i * 2 , iter->argumentsSize );
boundary2 = FormatUtils::BytesToInt16( iter->Arguments + 1, ( i + 1 ) * 2, iter->argumentsSize );
//if (boundary1 < 0) boundary1 = 0;
//if (boundary2 < 0) boundary2 = 0;
mapBoundaries.insert(std::make_pair(boundary1, 0));
mapBoundaries.insert(std::make_pair(boundary2, 0));
//AddBoundary(boundary1, boundary2, mapBoundaries);
}
if (max_boundary < boundary2)
max_boundary = boundary2;
mapBoundaries.insert(std::make_pair(boundary2, 0));
mapBoundaries.insert(std::make_pair(max_boundary, 0));
//AddBoundary(boundary2, max_boundary, mapBoundaries);
bPresent = true;
}break;
default:
@ -1451,9 +1443,9 @@ namespace DocFileFormat
}
}
}
if (nestingLevel != iTap_current && fEndNestingLevel && !mapBoundaries.empty())
if ((nestingLevel != iTap_current || fEndNestingLevel) && !mapBoundaries.empty())
break;
//get the next papx
//get the next papx
papx = findValidPapx( fcRowEnd );
tai = TableInfo( papx, m_document->nWordVersion );
fcRowEnd = findRowEndFc( cp, cp, nestingLevel );
@ -1473,7 +1465,7 @@ namespace DocFileFormat
{
int sz = it_next->first - it->first;
if (sz > 2)
grid.push_back( it_next->first - it->first );
grid.push_back(it_next->first - it->first);
}
}
_lastValidPapx = backup;

View File

@ -444,40 +444,50 @@ namespace DocFileFormat
rsidRoot = FormatUtils::BytesToInt32(bytes, 588, size);
//unused 2
if (size > 594 && size > 609) //start && stop bound /* && fib->m_FibNew.nFibNew > Fib2002*/
if (size > 594 && size > 609)
{
//split bytes 592,593,594,595 into bits
fTreatLockAtnAsReadOnly = FormatUtils::GetBitFromBytes((bytes + 592), 4, 0);
fStyleLock = FormatUtils::GetBitFromBytes((bytes + 592), 4, 1);
fAutoFmtOverride = FormatUtils::GetBitFromBytes((bytes + 592), 4, 2);
fRemoveWordML = FormatUtils::GetBitFromBytes((bytes + 592), 4, 3);
fApplyCustomXForm = FormatUtils::GetBitFromBytes((bytes + 592), 4, 4);
fStyeLockEnforced = FormatUtils::GetBitFromBytes((bytes + 592), 4, 5);
fFakeLockAtn = FormatUtils::GetBitFromBytes((bytes + 592), 4, 6);
fIgnoreMixedContent = FormatUtils::GetBitFromBytes((bytes + 592), 4, 7);
fShowPlaceholderText = FormatUtils::GetBitFromBytes((bytes + 592), 4, 8);
grf = FormatUtils::GetUIntFromBytesBits((bytes + 592), 4, 9, 23);
const size_t dop2003_offset = 594;
//split bytes 596 and 597 into bits
fReadingModeInkLockDown = FormatUtils::GetBitFromBytes((bytes + 596), 2, 0);
fAcetateShowInkAtn = FormatUtils::GetBitFromBytes((bytes + 596), 2, 1);
fFilterDttm = FormatUtils::GetBitFromBytes((bytes + 596), 2, 2);
fEnforceDocProt = FormatUtils::GetBitFromBytes((bytes + 596), 2, 3);
iDocProtCur = (unsigned short)FormatUtils::GetUIntFromBytesBits((bytes + 596), 2, 4, 3);
fDispBkSpSaved = FormatUtils::GetBitFromBytes((bytes + 596), 2, 7);
_UINT32 flags = FormatUtils::BytesToUInt32(bytes, dop2003_offset, size);
fTreatLockAtnAsReadOnly = GETBIT(flags, 0);
fStyleLock = GETBIT(flags, 1);
fAutoFmtOverride = GETBIT(flags, 2);
fRemoveWordML = GETBIT(flags, 3);
fApplyCustomXForm = GETBIT(flags, 4);
fStyeLockEnforced = GETBIT(flags, 5);
fFakeLockAtn = GETBIT(flags, 6);
fIgnoreMixedContent = GETBIT(flags, 7);
fShowPlaceholderText = GETBIT(flags, 8);
bool unused = GETBIT(flags, 9);
fWord97Doc = GETBIT(flags, 10);
fStyleLockTheme = GETBIT(flags, 11);
fStyleLockQFSet = GETBIT(flags, 12);
//empty = 19
dxaPageLock = FormatUtils::BytesToInt16(bytes, 598, size);
dyaPageLock = FormatUtils::BytesToInt16(bytes, 600, size);
pctFontLock = FormatUtils::BytesToInt32(bytes, 602, size);
grfitbid = bytes[606];
//unsigned char 607 is unused
ilfoMacAtCleanup = FormatUtils::BytesToUInt16(bytes, 608, size);
BYTE flags2 = bytes[dop2003_offset + 4];
fReadingModeInkLockDown = GETBIT(flags2, 0);
fAcetateShowInkAtn = GETBIT(flags2, 1);
fFilterDttm = GETBIT(flags2, 2);
fEnforceDocProt = GETBIT(flags2, 3);
iDocProtCur = GETBITS(flags2, 4, 6);
fDispBkSpSaved = GETBIT(flags2, 7);
//empty2 = 8
dxaPageLock = FormatUtils::BytesToInt32(bytes, dop2003_offset + 6, size);
dyaPageLock = FormatUtils::BytesToInt32(bytes, dop2003_offset + 10, size);
pctFontLock = FormatUtils::BytesToInt32(bytes, dop2003_offset + 14, size);
grfitbid = bytes[dop2003_offset + 18];
//empty3 = 8
ilfoMacAtCleanup = FormatUtils::BytesToUInt16(bytes, dop2003_offset + 20, size);
if (size > 616 && size > 621) //start && stop bound /* && fib->m_FibNew.nFibNew > Fib2003*/
{
const size_t dop2007_offset = 616;
//4 bytes reserved
bool fRMTrackFormatting = FormatUtils::GetBitFromBytes((bytes + 620), 2, 0);
bool fRMTrackMoves = FormatUtils::GetBitFromBytes((bytes + 620), 2, 1);
bool fRMTrackFormatting = FormatUtils::GetBitFromBytes((bytes + dop2007_offset + 4), 2, 0);
bool fRMTrackMoves = FormatUtils::GetBitFromBytes((bytes + dop2007_offset + 4), 2, 1);
//dopMth = 34 bytes from 624 = 658
if (size > 674/* && fib->m_FibNew.nFibNew > Fib2007*/)
@ -799,13 +809,12 @@ namespace DocFileFormat
fFakeLockAtn = false;
fIgnoreMixedContent = false;
fShowPlaceholderText = false;
grf = 0;
fReadingModeInkLockDown = false;
fAcetateShowInkAtn = false;
fFilterDttm = false;
fEnforceDocProt = false;
iDocProtCur = 0;
fDispBkSpSaved = true;
fDispBkSpSaved = false;
dxaPageLock = 0;
dyaPageLock = 0;
pctFontLock = 0;

View File

@ -570,7 +570,11 @@ namespace DocFileFormat
bool fIgnoreMixedContent;
// XML Option: Show placeholder text for all empty XML elements
bool fShowPlaceholderText;
unsigned int grf;
bool fWord97Doc = false;
bool fStyleLockTheme = false;
bool fStyleLockQFSet = false;
// Reading mode: ink lock down
bool fReadingModeInkLockDown;
// Track changes: Show ink annotations
@ -587,9 +591,9 @@ namespace DocFileFormat
unsigned short iDocProtCur;
bool fDispBkSpSaved;
// Reading Layout page size lockdown
short dxaPageLock;
int dxaPageLock;
// Reading Layout page size lockdown
short dyaPageLock;
int dyaPageLock;
// Reading Layout font lockdown
int pctFontLock;
unsigned char grfitbid;

View File

@ -54,7 +54,6 @@ namespace DocFileFormat
int id = 0;
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:endnotes", TRUE );
//write namespaces

View File

@ -52,7 +52,6 @@ namespace DocFileFormat
_ctx->_docx->RegisterFontTable();
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:fonts", TRUE );
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );

View File

@ -45,7 +45,6 @@ namespace DocFileFormat
m_document = static_cast<WordDocument*>( visited );
//start the document
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:ftr", TRUE );
//write namespaces

View File

@ -54,7 +54,6 @@ namespace DocFileFormat
int id = 0;
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:footnotes", TRUE );
//write namespaces

View File

@ -45,7 +45,6 @@ namespace DocFileFormat
m_document = static_cast<WordDocument*>( visited );
//start the document
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin( L"w:hdr", TRUE );
//write namespaces

View File

@ -51,7 +51,6 @@ namespace DocFileFormat
m_document = static_cast<WordDocument*>(visited);
// Header
m_pXmlWriter->WriteNodeBegin(L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin(L"w:document", TRUE );
// Namespaces

View File

@ -197,6 +197,9 @@ public:
virtual int Seek (int offset, int origin = 0/*STREAM_SEEK_SET*/)
{
if (origin == 2) offset = m_Position + offset;
if (origin == 1) offset = m_Size - offset;
if ( (m_Data != NULL) && (offset >= 0) && ((unsigned int)offset < m_Size) )
return m_Position = offset;

View File

@ -63,7 +63,6 @@ namespace DocFileFormat
m_xmldocument->RegisterNumbering();
//start the document
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:numbering", TRUE );
//write namespaces

View File

@ -40,7 +40,7 @@ namespace DocFileFormat
public:
static const unsigned short TYPE_CODE_0xF00D = 0xF00D;
OfficeArtClientTextbox () : Record(), m_nIndex(0)
OfficeArtClientTextbox () : Record()
{
}
@ -50,24 +50,15 @@ namespace DocFileFormat
unsigned int number = Reader->ReadUInt16();
m_nIndex = Reader->ReadUInt16();
}
virtual ~OfficeArtClientTextbox()
{
}
virtual Record* NewObject(IBinaryReader* reader, unsigned int bodySize, unsigned int typeCode, unsigned int version, unsigned int instance)
{
return new OfficeArtClientTextbox(reader, bodySize, typeCode, version, instance);
}
inline int GetIndex ()
{
return m_nIndex;
}
public:
int m_nIndex;
int m_nIndex = 0;
};
}

View File

@ -108,6 +108,8 @@ namespace DocFileFormat
std::wstring pathFileName = outputDir + FILE_SEPARATOR_STR + fileName;
if (file.CreateFileW(pathFileName))
{
std::string root = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
file.WriteFile((BYTE*)root.c_str(), root.length());
file.WriteStringUTF8(XMLContent);
file.CloseFile();
}
@ -397,7 +399,6 @@ namespace DocFileFormat
{
XMLTools::CStringXmlWriter writer;
writer.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
writer.WriteNodeBegin( L"Relationships", TRUE );
//write namespaces
@ -433,7 +434,6 @@ namespace DocFileFormat
XMLTools::CStringXmlWriter writer;
// write content types
writer.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
writer.WriteNodeBegin( L"Types", TRUE );
//write namespaces

View File

@ -439,15 +439,15 @@ namespace DocFileFormat
val.SetValue( getBorderType( brc->brcType ));
border->AppendAttribute( val );
XMLTools::XMLAttribute color( L"w:color" );
color.SetValue( RGBColor( brc->cv, RedFirst ).SixDigitHexCode);
border->AppendAttribute( color );
XMLTools::XMLAttribute space( L"w:space" , FormatUtils::IntToWideString( brc->dptSpace ));
border->AppendAttribute( space );
XMLTools::XMLAttribute sz( L"w:sz", FormatUtils::IntToWideString( brc->dptLineWidth ));
border->AppendAttribute( sz );
XMLTools::XMLAttribute space( L"w:space" , FormatUtils::IntToWideString( brc->dptSpace ));
border->AppendAttribute( space );
XMLTools::XMLAttribute color( L"w:color" );
color.SetValue( RGBColor( brc->cv, RedFirst ).SixDigitHexCode);
border->AppendAttribute( color );
if ( brc->fShadow )
{

View File

@ -108,7 +108,7 @@ namespace DocFileFormat
switch (iter->OpCode)
{
case sprmOldSGprfIhdt:
case sprmSGprfIhdt:
//case sprmSGprfIhdt: //betesil_pl_it.doc
{
fHF = FormatUtils::BytesToUChar( iter->Arguments, 0, iter->argumentsSize );
}break;
@ -162,6 +162,7 @@ namespace DocFileFormat
//MUST be ignored if the section does not have page number restart enabled.([MS-DOC] — v20101113. стр 152)
bool bWasSprmSFPgnRestart = false;
std::wstring wsSprmSPgnStart;
int nProperty = 0; // for unknown
for (std::list<SinglePropertyModifier>::iterator iter = sepx->grpprl->begin(); iter != sepx->grpprl->end(); ++iter)
{
@ -474,9 +475,14 @@ namespace DocFileFormat
break;
default:
if (iter->argumentsSize == 2)
{
int sz = iter->argumentsSize;
}break;
nProperty = FormatUtils::BytesToUInt16(iter->Arguments, 0, iter->argumentsSize);
}
else if (iter->argumentsSize == 1)
{
nProperty = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
}
}
}

View File

@ -76,7 +76,6 @@ namespace DocFileFormat
_ctx->_docx->RegisterSettings();
//start w:settings
m_oXmlWriter.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_oXmlWriter.WriteNodeBegin( L"w:settings", TRUE );
//write namespaces
m_oXmlWriter.WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );

View File

@ -60,7 +60,6 @@ namespace DocFileFormat
}
Spa();
virtual ~Spa();
virtual ByteStructure* ConstructObject(VirtualStreamReader* reader, int length);
@ -68,7 +67,6 @@ namespace DocFileFormat
{
return spid;
}
private:
/// Shape Identifier. Used in conjunction with the office art data

View File

@ -94,7 +94,7 @@ namespace DocFileFormat
numberOfColumns = bytes[0];
int pointer = 1;
// rgdxaCenter
// rgdxaCenter
for (int i = 0; i < numberOfColumns + 1; ++i)
{
int pos = FormatUtils::BytesToInt16(bytes, pointer, size);
@ -103,7 +103,7 @@ namespace DocFileFormat
}
// rgTc80
// rgTc80
for (int i = 0; i < numberOfColumns; ++i)
{
@ -116,21 +116,21 @@ namespace DocFileFormat
oTC80.ftsWidth = Global::dxa;
oTC80.wWidth = 0;
oTC80.brcTop = new BorderCode();
oTC80.brcLeft = new BorderCode();
oTC80.brcBottom = new BorderCode();
oTC80.brcRight = new BorderCode();
oTC80.brcTop = new BorderCode();
oTC80.brcLeft = new BorderCode();
oTC80.brcBottom = new BorderCode();
oTC80.brcRight = new BorderCode();
rgTc80.push_back(oTC80);
}
break;
}
}
TC80 tc;
// the flags
// the flags
unsigned short flags = FormatUtils::BytesToUInt16(bytes, pointer, size);
unsigned short flags = FormatUtils::BytesToUInt16(bytes, pointer, size);
tc.horzMerge = (unsigned char)FormatUtils::BitmaskToInt((int)flags, 0x3);
tc.textFlow = (Global::TextFlow)FormatUtils::BitmaskToInt((int)flags, 0x1C);
@ -139,38 +139,26 @@ namespace DocFileFormat
tc.ftsWidth = (Global::CellWidthType)FormatUtils::BitmaskToInt((int)flags, 0xE00);
tc.fFitText = FormatUtils::BitmaskToBool(flags, 0x1000);
tc.fNoWrap = FormatUtils::BitmaskToBool(flags, 0x2000);
tc.fHideMark = FormatUtils::BitmaskToBool(flags, 0x4000);
tc.fHideMark = FormatUtils::BitmaskToBool(flags, 0x4000);
pointer += 2;
// cell width
tc.wWidth = FormatUtils::BytesToInt16(bytes, pointer, size);
pointer += 2;
// cell width
tc.wWidth = FormatUtils::BytesToInt16(bytes, pointer, size);
pointer += 2;
const int borderCodeBytes = 4;
//border top
unsigned char brcTopBytes[borderCodeBytes];
memcpy(brcTopBytes, (bytes + pointer), borderCodeBytes);
tc.brcTop = new BorderCode(brcTopBytes, borderCodeBytes);
tc.brcTop = new BorderCode((bytes + pointer), borderCodeBytes);
pointer += borderCodeBytes;
//border left
unsigned char brcLeftBytes[borderCodeBytes];
memcpy(brcLeftBytes, (bytes + pointer), borderCodeBytes);
tc.brcLeft = new BorderCode(brcLeftBytes, borderCodeBytes);
tc.brcLeft = new BorderCode((bytes + pointer), borderCodeBytes);
pointer += borderCodeBytes;
//border bottom
unsigned char brcBottomBytes[borderCodeBytes];
memcpy(brcBottomBytes, (bytes + pointer), borderCodeBytes);
tc.brcBottom = new BorderCode(brcBottomBytes, borderCodeBytes);
tc.brcBottom = new BorderCode((bytes + pointer), borderCodeBytes);
pointer += borderCodeBytes;
//border top
unsigned char brcRightBytes[borderCodeBytes];
memcpy(brcRightBytes, (bytes + pointer), borderCodeBytes);
tc.brcRight = new BorderCode(brcRightBytes, borderCodeBytes);
tc.brcRight = new BorderCode((bytes + pointer), borderCodeBytes);
pointer += borderCodeBytes;
rgTc80.push_back(tc);

View File

@ -140,7 +140,7 @@ namespace DocFileFormat
POLE::Stream *streamNew = new POLE::Stream(storageOut, streamName, true, size_stream);
if (!streamNew) return;
unsigned char* data_stream = new unsigned char[size_stream];
unsigned char* data_stream = new unsigned char[(unsigned int)size_stream];
if (data_stream)
{
stream->read(data_stream, size_stream);

View File

@ -60,7 +60,6 @@ namespace DocFileFormat
this->_ctx->_docx->RegisterStyleSheet();
//start the document
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_pXmlWriter->WriteNodeBegin( L"w:styles", TRUE );
//write namespaces
@ -98,12 +97,23 @@ namespace DocFileFormat
m_pXmlWriter->WriteAttribute( L"w:styleId", FormatUtils::XmlEncode(MakeStyleId( *iter )));
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
// <w:name val="" />
// <w:name val="" />
std::wstring sName = FormatUtils::XmlEncode(getStyleName(*iter), true);
m_pXmlWriter->WriteNodeBegin( L"w:name", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(getStyleName( *iter ), true ));
m_pXmlWriter->WriteNodeEnd( L"", 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 );
// <w:basedOn val="" />
if ((*iter)->sti == StyleIdentifier::Normal) // ??? < sti < 159
{
m_pXmlWriter->WriteNodeBegin(L"w:aliases", TRUE);
m_pXmlWriter->WriteAttribute(L"w:val", sName);
m_pXmlWriter->WriteNodeEnd(L"", TRUE);
}
// <w:basedOn val="" />
if ( ( (*iter)->istdBase != 4095 ) && ( (*iter)->istdBase < sheet->Styles->size() ) )
{
m_pXmlWriter->WriteNodeBegin( L"w:basedOn", TRUE );
@ -111,7 +121,7 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
// <w:next val="" />
// <w:next val="" />
if ( (*iter)->istdNext < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( L"w:next", TRUE );
@ -119,7 +129,7 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
}
// <w:link val="" />
// <w:link val="" />
if ( (*iter)->istdLink < sheet->Styles->size() )
{
m_pXmlWriter->WriteNodeBegin( L"w:link", TRUE );

View File

@ -63,10 +63,6 @@ namespace DocFileFormat
RELEASEOBJECT(_tcPr);
RELEASEOBJECT(_tcMar);
RELEASEOBJECT(_tcBorders);
RELEASEOBJECT(_brcTop);
RELEASEOBJECT(_brcLeft);
RELEASEOBJECT(_brcRight);
RELEASEOBJECT(_brcBottom);
}
}
@ -97,7 +93,6 @@ namespace DocFileFormat
}
}
bool bPresentDefTable = false;
for (std::list<SinglePropertyModifier>::reverse_iterator iter = tapx->grpprl->rbegin(); iter != tapx->grpprl->rend(); ++iter)
{
@ -190,26 +185,17 @@ namespace DocFileFormat
if (!IsTableBordersDefined(tapx->grpprl))
{
RELEASEOBJECT(_brcTop);
_brcTop = new BorderCode(*_tcDef.brcTop);
RELEASEOBJECT(_brcLeft);
_brcLeft = new BorderCode(*_tcDef.brcLeft);
RELEASEOBJECT(_brcRight);
_brcRight = new BorderCode(*_tcDef.brcRight);
RELEASEOBJECT(_brcBottom);
_brcBottom = new BorderCode(*_tcDef.brcBottom);
_brcTop = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcTop));
_brcLeft = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcLeft));
_brcRight = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcRight));
_brcBottom = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcBottom));
}
}
}
break;
case sprmTDxaCol:
{
}break;
case sprmTCellPadding:
{
unsigned char first = iter->Arguments[0];
@ -248,10 +234,9 @@ namespace DocFileFormat
apppendCellShading(iter->Arguments, iter->argumentsSize, _cellIndex);
}
}break;
case sprmOldTDefTableShd:
case sprmTDefTableShd:
{ // cell shading for cells 0-20
{ // cell shading for cells 0-20
apppendCellShading(iter->Arguments, iter->argumentsSize, _cellIndex);
}break;
@ -259,14 +244,12 @@ namespace DocFileFormat
{ // cell shading for cells 21-42
apppendCellShading(iter->Arguments, iter->argumentsSize, (_cellIndex - 21));
}break;
case sprmTDefTableShd3rd:
{ // cell shading for cells 43-62
apppendCellShading(iter->Arguments, iter->argumentsSize, (_cellIndex - 43));
}break;
case sprmTCellWidth:
{ //width
{ //width
unsigned char first = iter->Arguments[0];
unsigned char lim = iter->Arguments[1];
@ -276,10 +259,9 @@ namespace DocFileFormat
_width = FormatUtils::BytesToInt16(iter->Arguments, 3, iter->argumentsSize);
}
}
break;
break;
case sprmTVertAlign:
{ //vertical alignment
{ //vertical alignment
unsigned char first = iter->Arguments[0];
unsigned char lim = iter->Arguments[1];
@ -289,7 +271,6 @@ namespace DocFileFormat
}
}
break;
case sprmTFitText:
{ //Autofit
unsigned char first = iter->Arguments[0];
@ -301,10 +282,9 @@ namespace DocFileFormat
}
}
break;
case sprmOldTSetBrc:
case sprmTSetBrc:
{ //borders (cell definition)
{ //borders (cell definition)
unsigned char min = iter->Arguments[0];
unsigned char max = iter->Arguments[1];
@ -318,35 +298,34 @@ namespace DocFileFormat
if( FormatUtils::BitmaskToBool( bordersToApply, 0x01 ) )
{
RELEASEOBJECT( _brcTop );
_brcTop = new BorderCode( brcBytes, brcSize );
_brcTop = std::shared_ptr<BorderCode>(new BorderCode( brcBytes, brcSize ));
}
if( FormatUtils::BitmaskToBool( bordersToApply, 0x02 ) )
{
RELEASEOBJECT( _brcLeft );
_brcLeft = new BorderCode( brcBytes, brcSize );
_brcLeft = std::shared_ptr<BorderCode>(new BorderCode( brcBytes, brcSize ));
}
if ( FormatUtils::BitmaskToBool( bordersToApply, 0x04 ) )
{
RELEASEOBJECT( _brcBottom );
_brcBottom = new BorderCode( brcBytes, brcSize );
_brcBottom = std::shared_ptr<BorderCode>(new BorderCode( brcBytes, brcSize ));
}
if ( FormatUtils::BitmaskToBool( bordersToApply, 0x08 ) )
{
RELEASEOBJECT( _brcRight );
_brcRight = new BorderCode( brcBytes, brcSize );
_brcRight = std::shared_ptr<BorderCode>(new BorderCode( brcBytes, brcSize ));
}
}
}
break;
}break;
default:
break;
}
}
if (_gridSpan <= 1 && nComputedCellWidth > _width && _width > 1)
int nComputedCellWidthsGrid = 0;
for (size_t ccc = 0; ccc < _grid->size() && ccc <= _gridIndex; ccc++)
{
nComputedCellWidthsGrid += _grid->at(ccc);
}//zadost.doc
if (_gridSpan <= 1 && nComputedCellWidth > _width/* && _width > 1*/ && nComputedCellWidths > nComputedCellWidthsGrid)
{
int width_current = 0;
for (int i = _gridIndex; i < _grid->size(); i++)
@ -359,22 +338,22 @@ namespace DocFileFormat
_width = nComputedCellWidth;
}
XMLTools::XMLElement tcW ( L"w:tcW" );
XMLTools::XMLElement tcW ( L"w:tcW" );
if (_width > 1 || nComputedCellWidth > 0)
{
if (_ftsWidth == Global::CellWidthType::nil)
_ftsWidth = Global::CellWidthType::dxa;
}
else _ftsWidth = Global::CellWidthType::Auto;
XMLTools::XMLAttribute tcWVal ( L"w:w", FormatUtils::IntToWideString( _width > 1 ? _width : nComputedCellWidth) );
XMLTools::XMLAttribute tcWType ( L"w:type", (_width > 1 || nComputedCellWidth > 0) ? FormatUtils::MapValueToWideString( _ftsWidth, &Global::CellWidthTypeMap[0][0], 4, 5 ) : L"auto");
XMLTools::XMLAttribute tcWType ( L"w:type", FormatUtils::MapValueToWideString(_ftsWidth, &Global::CellWidthTypeMap[0][0], 4, 5 ));
tcW.AppendAttribute( tcWType );
tcW.AppendAttribute( tcWVal );
tcW.AppendAttribute( tcWType );
_tcPr->AppendChild( tcW );
int nComputedCellWidthsGrid = 0;
for (size_t ccc = 0; ccc < _grid->size() && ccc <= _gridIndex; ccc++)
{
nComputedCellWidthsGrid += _grid->at(ccc);
}
if ( _gridSpan == 1 && ( _gridIndex < (int)_grid->size() ) && ( nComputedCellWidths > nComputedCellWidthsGrid ) )
{
//check the number of merged cells
@ -405,28 +384,28 @@ namespace DocFileFormat
if (_brcTop)
{
XMLTools::XMLElement topBorder( L"w:top" );
appendBorderAttributes(_brcTop, &topBorder);
appendBorderAttributes(_brcTop.get(), &topBorder);
addOrSetBorder(_tcBorders, &topBorder );
}
if (_brcLeft )
{
XMLTools::XMLElement leftBorder( L"w:left" );
appendBorderAttributes(_brcLeft, &leftBorder);
appendBorderAttributes(_brcLeft.get(), &leftBorder);
addOrSetBorder(_tcBorders, &leftBorder);
}
if (_brcBottom)
{
XMLTools::XMLElement bottomBorder( L"w:bottom" );
appendBorderAttributes(_brcBottom, &bottomBorder);
appendBorderAttributes(_brcBottom.get(), &bottomBorder);
addOrSetBorder(_tcBorders, &bottomBorder);
}
if (_brcRight)
{
XMLTools::XMLElement rightBorder( L"w:right" );
appendBorderAttributes( _brcRight, &rightBorder );
appendBorderAttributes( _brcRight.get(), &rightBorder );
addOrSetBorder( _tcBorders, &rightBorder );
}

View File

@ -87,15 +87,15 @@ namespace DocFileFormat
const std::vector<short>* _grid;
std::vector<short> _tGrid;
short _width;
int _width;
Global::CellWidthType _ftsWidth;
TC80 _tcDef;
unsigned int _depth;
BorderCode* _brcTop;
BorderCode* _brcLeft;
BorderCode* _brcRight;
BorderCode* _brcBottom;
std::shared_ptr<BorderCode> _brcLeft;
std::shared_ptr<BorderCode> _brcTop;
std::shared_ptr<BorderCode> _brcBottom;
std::shared_ptr<BorderCode> _brcRight;
int _gridSpan;
bool _bCoverCell;

View File

@ -47,421 +47,390 @@ TablePropertiesMapping::~TablePropertiesMapping()
RELEASEOBJECT (_tblPr);
RELEASEOBJECT (_tblGrid);
RELEASEOBJECT (_tblBorders);
RELEASEOBJECT (brcLeft);
RELEASEOBJECT (brcTop);
RELEASEOBJECT (brcBottom);
RELEASEOBJECT (brcRight);
RELEASEOBJECT (brcHorz);
RELEASEOBJECT (brcVert);
}
}
namespace DocFileFormat
void TablePropertiesMapping::Apply(IVisitable* visited)
{
void TablePropertiesMapping::Apply(IVisitable* visited)
TablePropertyExceptions* tapx = static_cast<TablePropertyExceptions*>(visited);
XMLTools::XMLElement tblCellMar(L"w:tblCellMar");
XMLTools::XMLElement tblLayout(L"w:tblLayout");
XMLTools::XMLElement tblpPr(L"w:tblpPr");
XMLTools::XMLAttribute layoutType(L"w:type", L"fixed");
_CP_OPT(short) tblIndent;
short gabHalf = 0;
short marginLeft = 0;
short marginRight = 0;
short cellSpacing = 0;
BYTE itcFirst = 0;
BYTE itcLim = 0;
bool bTableW = false;
for (std::list<SinglePropertyModifier>::iterator iter = tapx->grpprl->begin(); iter != tapx->grpprl->end(); iter++)
{
TablePropertyExceptions* tapx = static_cast<TablePropertyExceptions*>( visited );
XMLTools::XMLElement tblCellMar ( L"w:tblCellMar");
XMLTools::XMLElement tblLayout ( L"w:tblLayout");
XMLTools::XMLElement tblpPr ( L"w:tblpPr");
XMLTools::XMLAttribute layoutType ( L"w:type", L"fixed");
_CP_OPT(short) tblIndent;
short gabHalf = 0;
short marginLeft = 0;
short marginRight = 0;
BYTE itcFirst = 0;
BYTE itcLim = 0;
bool bTableW = false;
for ( std::list<SinglePropertyModifier>::iterator iter = tapx->grpprl->begin(); iter != tapx->grpprl->end(); iter++ )
switch (iter->OpCode)
{
switch( iter->OpCode )
case sprmOldTDxaGapHalf:
case sprmTDxaGapHalf:
{
gabHalf = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
}break;
case sprmOldTDefTable:
case sprmTDefTable:
{
//table definition
SprmTDefTable tDef(iter->Arguments, iter->argumentsSize);
//Workaround for retrieving the indent of the table:
//In some files there is a indent but no sprmTWidthIndent is set.
//For this cases we can calculate the indent of the table by getting the
//first boundary of the TDef and adding the padding of the cells
tblIndent = gabHalf + FormatUtils::BytesToInt16(iter->Arguments, 1, iter->argumentsSize);
//If there follows a real sprmTWidthIndent, this value will be overwritten
//tblIndent = (std::max)((int)tblIndent,0); //cerere.doc
}break;
case sprmTTableWidth:
{
//preferred table width
unsigned char fts = iter->Arguments[0];
short width = FormatUtils::BytesToInt16(iter->Arguments, 1, iter->argumentsSize);
XMLTools::XMLElement tblW(L"w:tblW");
XMLTools::XMLAttribute w(L"w:w", FormatUtils::IntToWideString(width));
XMLTools::XMLAttribute type(L"w:type", FormatUtils::MapValueToWideString(fts, &WidthType[0][0], 4, 5));
tblW.AppendAttribute(type);
tblW.AppendAttribute(w);
_tblPr->AppendChild(tblW);
bTableW = true;
}break;
case sprmTMerge:
{
itcFirst = iter->Arguments[0];
itcLim = iter->Arguments[1];
}break;
case sprmTSplit:
{
}break;
case sprmOldTJc:
case sprmTJc:
case sprmTJcRow:
{
appendValueElement(_tblPr, L"jc", FormatUtils::MapValueToWideString(iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15), true);
}break;
case sprmTWidthIndent:
{
tblIndent = FtsWWidth_Indent(iter->Arguments).wWidth;
}break;
case sprmTIstd:
case sprmTIstdPermute:
{
if (_isTableStyleNeeded)
{
case sprmOldTDxaGapHalf:
case sprmTDxaGapHalf:
size_t ind = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
std::wstring id = ind < _styles->Styles->size() ? StyleSheetMapping::MakeStyleId(_styles->Styles->at(ind)) : L"";
if (id != std::wstring(L"TableNormal") && !id.empty())
{
gabHalf = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
}break;
case sprmOldTDefTable:
case sprmTDefTable:
{
//table definition
SprmTDefTable tDef( iter->Arguments, iter->argumentsSize );
//Workaround for retrieving the indent of the table:
//In some files there is a indent but no sprmTWidthIndent is set.
//For this cases we can calculate the indent of the table by getting the
//first boundary of the TDef and adding the padding of the cells
tblIndent = gabHalf + FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
//If there follows a real sprmTWidthIndent, this value will be overwritten
//tblIndent = (std::max)((int)tblIndent,0); //cerere.doc
}break;
case sprmTTableWidth:
{
//preferred table width
unsigned char fts = iter->Arguments[0];
short width = FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
XMLTools::XMLElement tblW( L"w:tblW");
XMLTools::XMLAttribute w( L"w:w", FormatUtils::IntToWideString( width ) );
XMLTools::XMLAttribute type( L"w:type", FormatUtils::MapValueToWideString( fts, &WidthType[0][0], 4, 5 ) );
tblW.AppendAttribute( type );
tblW.AppendAttribute( w );
_tblPr->AppendChild( tblW );
bTableW = true;
}break;
case sprmTMerge:
{
itcFirst = iter->Arguments[0];
itcLim = iter->Arguments[1];
}break;
case sprmTSplit:
{
}break;
case sprmOldTJc:
case sprmTJc:
case sprmTJcRow:
{
appendValueElement( _tblPr, L"jc" , FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ), true );
}break;
case sprmTWidthIndent:
{
tblIndent = FtsWWidth_Indent(iter->Arguments).wWidth;
// tblIndent = FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
}break;
case sprmTIstd:
case sprmTIstdPermute:
{
if ( _isTableStyleNeeded )
{
size_t ind = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
std::wstring id = ind < _styles->Styles->size() ? StyleSheetMapping::MakeStyleId( _styles->Styles->at( ind ) ) : L"";
if( id != std::wstring( L"TableNormal") && !id.empty() )
{
appendValueElement( _tblPr, L"tblStyle", id, true );
}
}
}break;
case sprmTFBiDi:
case sprmTFBiDi90:
{
appendValueElement( _tblPr, L"bidiVisual", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), true );
}break;
case sprmOldTTlp:
case sprmTTlp:
{
appendValueElement( _tblPr, L"tblLook", FormatUtils::IntToFormattedWideString( FormatUtils::BytesToInt16( iter->Arguments, 2, iter->argumentsSize ), L"%04x" ), true );
}break;
case sprmTFAutofit:
{
if ( iter->Arguments[0] == 1 )
{
layoutType.SetValue( L"auto" );
}
}break;
case sprmTCellPadding:
case sprmTCellPaddingDefault:
case sprmTCellPaddingOuter:
{ //default cell padding (margin)
unsigned char grfbrc = iter->Arguments[2];
short wMar = FormatUtils::BytesToInt16( iter->Arguments, 4, iter->argumentsSize );
std::wstring strValue = FormatUtils::IntToWideString( wMar );
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x01 ) )
{
appendDxaElement( &tblCellMar, L"top" , strValue, true );
}
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x02 ) )
{
marginLeft = wMar;
}
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x04 ) )
{
appendDxaElement( &tblCellMar, L"bottom", strValue, true );
}
if ( FormatUtils::BitmaskToBool( (int)grfbrc, 0x08 ) )
{
marginRight = wMar;
}
}break;
case sprmTCHorzBands:
{
appendValueElement( _tblPr, L"tblStyleRowBandSize", iter->Arguments[0], true );
}break;
case sprmTCVertBands:
{
appendValueElement( _tblPr, L"tblStyleColBandSize", iter->Arguments[0], true );
}break;
case sprmTFNoAllowOverlap:
{
std::wstring tblOverlapVal(L"overlap");
if ( iter->Arguments[0] )
{
tblOverlapVal = L"never";
}
appendValueElement( _tblPr, L"tblOverlap", tblOverlapVal, true );
}break;
case sprmOldTSetShd :
case sprmTSetShdTable :
{
appendShading( _tblPr, ShadingDescriptor( iter->Arguments, iter->argumentsSize ) );
}break;
case sprmTTableBorders80:
{
const int size = 4;
unsigned char brc80[size];
//top border
memcpy( brc80, iter->Arguments, size );
RELEASEOBJECT( brcTop );
brcTop = new BorderCode( brc80, size );
//left
memcpy( brc80, ( iter->Arguments + 4 ), size );
RELEASEOBJECT( brcLeft );
brcLeft = new BorderCode( brc80, size );
//bottom
memcpy( brc80, ( iter->Arguments + 8 ), size );
RELEASEOBJECT( brcBottom );
brcBottom = new BorderCode( brc80, size );
//right
memcpy( brc80, ( iter->Arguments + 12 ), size );
RELEASEOBJECT( brcRight );
brcRight = new BorderCode( brc80, size );
//inside H
memcpy( brc80, ( iter->Arguments + 16 ), size );
RELEASEOBJECT( brcHorz );
brcHorz = new BorderCode( brc80, size );
//inside V
memcpy( brc80, ( iter->Arguments + 20 ), size );
RELEASEOBJECT( brcVert );
brcVert = new BorderCode( brc80, size );
}break;
case sprmOldTTableBorders:
case sprmTTableBorders:
{
const int size = 8;
unsigned char brc[size];
//top border
memcpy( brc, iter->Arguments, size );
RELEASEOBJECT( brcTop );
brcTop = new BorderCode( brc, size );
//left
memcpy( brc, ( iter->Arguments + 8 ), size );
RELEASEOBJECT( brcLeft );
brcLeft = new BorderCode( brc, size );
//bottom
memcpy( brc, ( iter->Arguments + 16 ), size );
RELEASEOBJECT( brcBottom );
brcBottom = new BorderCode( brc, size );
//right
memcpy( brc, ( iter->Arguments + 24 ), size );
RELEASEOBJECT( brcRight );
brcRight = new BorderCode( brc, size );
//inside H
memcpy( brc, ( iter->Arguments + 32 ), size );
RELEASEOBJECT( brcHorz );
brcHorz = new BorderCode( brc, size );
//inside V
memcpy( brc, ( iter->Arguments + 40 ), size );
RELEASEOBJECT( brcVert );
brcVert = new BorderCode( brc, size );
}break;
case sprmTPc:
{
unsigned char flag = ( iter->Arguments[0] & 0x30 ) >> 4;
appendValueAttribute( &tblpPr, L"w:vertAnchor", FormatUtils::MapValueToWideString( flag, &Global::VerticalPositionCode[0][0], 4, 7 ) );
flag = ( iter->Arguments[0] & 0xC0 ) >> 6;
appendValueAttribute( &tblpPr, L"w:horzAnchor", FormatUtils::MapValueToWideString( flag, &Global::HorizontalPositionCode[0][0], 4, 7 ) );
}break;
case sprmTDxaFromText:
{
appendValueAttribute( &tblpPr, L"w:leftFromText", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
case sprmTDxaFromTextRight:
{
appendValueAttribute( &tblpPr, L"w:rightFromText", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
case sprmTDyaFromText:
{
appendValueAttribute( &tblpPr, L"w:topFromText", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
case sprmTDyaFromTextBottom:
{
appendValueAttribute( &tblpPr, L"w:bottomFromText", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
case sprmTDxaAbs:
{
appendValueAttribute( &tblpPr, L"w:tblpX", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
case sprmTDyaAbs:
{
appendValueAttribute( &tblpPr, L"w:tblpY", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
}break;
appendValueElement(_tblPr, L"tblStyle", id, true);
}
}
}
if (false == bTableW)
}break;
case sprmTFBiDi:
case sprmTFBiDi90:
{
XMLTools::XMLElement tblW( L"w:tblW");
XMLTools::XMLAttribute w( L"w:w", L"0");
XMLTools::XMLAttribute type( L"w:type", L"auto" );
tblW.AppendAttribute( type );
tblW.AppendAttribute( w );
_tblPr->AppendChild( tblW );
}
//indent
if ( tblIndent )
appendValueElement(_tblPr, L"bidiVisual", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize), true);
}break;
case sprmOldTTlp:
case sprmTTlp:
{
XMLTools::XMLElement tblInd( L"w:tblInd");
XMLTools::XMLAttribute tblIndW( L"w:w", FormatUtils::IntToWideString( *tblIndent ) );
tblInd.AppendAttribute( tblIndW );
XMLTools::XMLAttribute tblIndType( L"w:type", L"dxa");
tblInd.AppendAttribute( tblIndType );
_tblPr->AppendChild( tblInd );
}
//append floating props
if ( tblpPr.GetAttributeCount() > 0 )
appendValueElement(_tblPr, L"tblLook", FormatUtils::IntToFormattedWideString(FormatUtils::BytesToInt16(iter->Arguments, 2, iter->argumentsSize), L"%04x"), true);
}break;
case sprmTFAutofit:
{
_tblPr->AppendChild( tblpPr );
}
//set borders
if ( brcTop != NULL )
if (iter->Arguments[0] == 1)
{
layoutType.SetValue(L"auto");
}
}break;
case sprmTCellSpacing:
case sprmTCellSpacingDefault:
{
XMLTools::XMLElement topBorder( L"w:top");
appendBorderAttributes( brcTop, &topBorder );
addOrSetBorder( _tblBorders, &topBorder );
}
unsigned char grfbrc = iter->Arguments[2];
short wSpc = FormatUtils::BytesToInt16(iter->Arguments, 4, iter->argumentsSize);
std::wstring strValue = FormatUtils::IntToWideString(wSpc);
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x01))
{
appendDxaElement(_tblPr, L"tblCellSpacing", strValue, true);
}
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x02))
{
cellSpacing = wSpc;
}
}break;
case sprmTCellPadding:
case sprmTCellPaddingDefault:
case sprmTCellPaddingOuter:
{//default cell padding (margin)
unsigned char grfbrc = iter->Arguments[2];
short wMar = FormatUtils::BytesToInt16(iter->Arguments, 4, iter->argumentsSize);
std::wstring strValue = FormatUtils::IntToWideString(wMar);
if ( brcLeft != NULL )
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x01))
{
appendDxaElement(&tblCellMar, L"top", strValue, true);
}
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x02))
{
marginLeft = wMar;
}
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x04))
{
appendDxaElement(&tblCellMar, L"bottom", strValue, true);
}
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x08))
{
marginRight = wMar;
}
}break;
case sprmTCHorzBands:
{
XMLTools::XMLElement leftBorder( L"w:left");
appendBorderAttributes( brcLeft, &leftBorder );
addOrSetBorder( _tblBorders, &leftBorder );
}
if ( brcBottom != NULL )
appendValueElement(_tblPr, L"tblStyleRowBandSize", iter->Arguments[0], true);
}break;
case sprmTCVertBands:
{
XMLTools::XMLElement bottomBorder( L"w:bottom");
appendBorderAttributes( brcBottom, &bottomBorder );
addOrSetBorder( _tblBorders, &bottomBorder );
}
if ( brcRight != NULL )
appendValueElement(_tblPr, L"tblStyleColBandSize", iter->Arguments[0], true);
}break;
case sprmTFNoAllowOverlap:
{
XMLTools::XMLElement rightBorder( L"w:right");
appendBorderAttributes( brcRight, &rightBorder );
addOrSetBorder( _tblBorders, &rightBorder );
}
std::wstring tblOverlapVal(L"overlap");
if ( brcHorz != NULL )
if (iter->Arguments[0])
{
tblOverlapVal = L"never";
}
appendValueElement(_tblPr, L"tblOverlap", tblOverlapVal, true);
}break;
case sprmOldTSetShd:
case sprmTSetShdTable:
{
XMLTools::XMLElement insideHBorder( L"w:insideH");
appendBorderAttributes( brcHorz, &insideHBorder );
addOrSetBorder( _tblBorders, &insideHBorder );
}
if ( brcVert != NULL )
appendShading(_tblPr, ShadingDescriptor(iter->Arguments, iter->argumentsSize));
}break;
case sprmTTableBorders80:
{
XMLTools::XMLElement insideVBorder( L"w:insideV");
appendBorderAttributes( brcVert, &insideVBorder );
addOrSetBorder( _tblBorders, &insideVBorder );
}
const int size = 4;
unsigned char brc80[size];
if ( _tblBorders->GetChildCount() > 0 )
memcpy(brc80, iter->Arguments, size);
brcTop = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 4), size);
brcLeft = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 8), size);
brcBottom = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 12), size);
brcRight = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 16), size);
brcHorz = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 20), size);
brcVert = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
}break;
case sprmOldTTableBorders:
case sprmTTableBorders:
{
_tblPr->AppendChild( *_tblBorders );
}
const int size = 8;
unsigned char brc[size];
if (false == layoutType.GetValue().empty())
memcpy(brc, iter->Arguments, size);
brcTop = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
memcpy(brc, (iter->Arguments + 8), size);
brcLeft = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
memcpy(brc, (iter->Arguments + 16), size);
brcBottom = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
memcpy(brc, (iter->Arguments + 24), size);
brcRight = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
memcpy(brc, (iter->Arguments + 32), size);
brcHorz = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
memcpy(brc, (iter->Arguments + 40), size);
brcVert = std::shared_ptr<BorderCode>(new BorderCode(brc, size));
}break;
case sprmTPc:
{
tblLayout.AppendAttribute(layoutType);
}
_tblPr->AppendChild( tblLayout );
unsigned char flag = (iter->Arguments[0] & 0x30) >> 4;
if ( ( marginLeft == 0 ) && ( gabHalf != 0 ) )
appendValueAttribute(&tblpPr, L"w:vertAnchor", FormatUtils::MapValueToWideString(flag, &Global::VerticalPositionCode[0][0], 4, 7));
flag = (iter->Arguments[0] & 0xC0) >> 6;
appendValueAttribute(&tblpPr, L"w:horzAnchor", FormatUtils::MapValueToWideString(flag, &Global::HorizontalPositionCode[0][0], 4, 7));
}break;
case sprmTDxaFromText:
{
appendDxaElement( &tblCellMar, L"left", FormatUtils::IntToWideString( gabHalf ), true );
}
else
appendValueAttribute(&tblpPr, L"w:leftFromText", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
case sprmTDxaFromTextRight:
{
appendDxaElement( &tblCellMar, L"left", FormatUtils::IntToWideString( marginLeft ), true );
}
if ( ( marginRight == 0 ) && ( gabHalf != 0 ) )
appendValueAttribute(&tblpPr, L"w:rightFromText", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
case sprmTDyaFromText:
{
appendDxaElement( &tblCellMar, L"right", FormatUtils::IntToWideString( gabHalf ), true );
}
else
appendValueAttribute(&tblpPr, L"w:topFromText", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
case sprmTDyaFromTextBottom:
{
appendDxaElement( &tblCellMar, L"right", FormatUtils::IntToWideString( marginRight ), true );
}
_tblPr->AppendChild( tblCellMar );
//write Properties
if ( ( _tblPr->GetChildCount() > 0 ) || ( _tblPr->GetAttributeCount() > 0 ) )
appendValueAttribute(&tblpPr, L"w:bottomFromText", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
case sprmTDxaAbs:
{
m_pXmlWriter->WriteString( _tblPr->GetXMLString() );
}
//append the grid
_tblGrid = new XMLTools::XMLElement( L"w:tblGrid");
for (size_t i = 0; i < _grid->size(); i++)
appendValueAttribute(&tblpPr, L"w:tblpX", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
case sprmTDyaAbs:
{
XMLTools::XMLElement gridCol(L"w:gridCol");
XMLTools::XMLAttribute gridColW(L"w:w", FormatUtils::IntToWideString(_grid->at(i)));
gridCol.AppendAttribute(gridColW);
_tblGrid->AppendChild(gridCol);
appendValueAttribute(&tblpPr, L"w:tblpY", FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize));
}break;
}
m_pXmlWriter->WriteString( _tblGrid->GetXMLString() );
}
if (false == bTableW)
{
XMLTools::XMLElement tblW(L"w:tblW");
XMLTools::XMLAttribute w(L"w:w", L"0");
XMLTools::XMLAttribute type(L"w:type", L"auto");
tblW.AppendAttribute(type);
tblW.AppendAttribute(w);
_tblPr->AppendChild(tblW);
}
if (tblIndent)
{
XMLTools::XMLElement tblInd(L"w:tblInd");
XMLTools::XMLAttribute tblIndW(L"w:w", FormatUtils::IntToWideString(*tblIndent));
tblInd.AppendAttribute(tblIndW);
XMLTools::XMLAttribute tblIndType(L"w:type", L"dxa");
tblInd.AppendAttribute(tblIndType);
_tblPr->AppendChild(tblInd);
}
if (tblpPr.GetAttributeCount() > 0)
{
_tblPr->AppendChild(tblpPr);
}
if (brcTop)
{
XMLTools::XMLElement topBorder(L"w:top");
appendBorderAttributes(brcTop.get(), &topBorder);
addOrSetBorder(_tblBorders, &topBorder);
}
if (brcLeft)
{
XMLTools::XMLElement leftBorder(L"w:left");
appendBorderAttributes(brcLeft.get(), &leftBorder);
addOrSetBorder(_tblBorders, &leftBorder);
}
if (brcBottom)
{
XMLTools::XMLElement bottomBorder(L"w:bottom");
appendBorderAttributes(brcBottom.get(), &bottomBorder);
addOrSetBorder(_tblBorders, &bottomBorder);
}
if (brcRight)
{
XMLTools::XMLElement rightBorder(L"w:right");
appendBorderAttributes(brcRight.get(), &rightBorder);
addOrSetBorder(_tblBorders, &rightBorder);
}
if (brcHorz)
{
XMLTools::XMLElement insideHBorder(L"w:insideH");
appendBorderAttributes(brcHorz.get(), &insideHBorder);
addOrSetBorder(_tblBorders, &insideHBorder);
}
if (brcVert)
{
XMLTools::XMLElement insideVBorder(L"w:insideV");
appendBorderAttributes(brcVert.get(), &insideVBorder);
addOrSetBorder(_tblBorders, &insideVBorder);
}
if (_tblBorders->GetChildCount() > 0)
{
_tblPr->AppendChild(*_tblBorders);
}
if (false == layoutType.GetValue().empty())
{
tblLayout.AppendAttribute(layoutType);
}
_tblPr->AppendChild(tblLayout);
if ((marginLeft == 0) && (gabHalf != 0))
{
appendDxaElement(&tblCellMar, L"left", FormatUtils::IntToWideString(gabHalf), true);
}
else
{
appendDxaElement(&tblCellMar, L"left", FormatUtils::IntToWideString(marginLeft), true);
}
if ((marginRight == 0) && (gabHalf != 0))
{
appendDxaElement(&tblCellMar, L"right", FormatUtils::IntToWideString(gabHalf), true);
}
else
{
appendDxaElement(&tblCellMar, L"right", FormatUtils::IntToWideString(marginRight), true);
}
_tblPr->AppendChild(tblCellMar);
if ((_tblPr->GetChildCount() > 0) || (_tblPr->GetAttributeCount() > 0))
{
m_pXmlWriter->WriteString(_tblPr->GetXMLString());
}
//append the grid
_tblGrid = new XMLTools::XMLElement(L"w:tblGrid");
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);
_tblGrid->AppendChild(gridCol);
}
m_pXmlWriter->WriteString(_tblGrid->GetXMLString());
}
}

View File

@ -84,12 +84,12 @@ namespace DocFileFormat
StyleSheet* _styles;
std::vector<short>* _grid;
BorderCode* brcLeft;
BorderCode* brcTop;
BorderCode* brcBottom;
BorderCode* brcRight;
BorderCode* brcHorz;
BorderCode* brcVert;
std::shared_ptr<BorderCode> brcLeft;
std::shared_ptr<BorderCode> brcTop;
std::shared_ptr<BorderCode> brcBottom;
std::shared_ptr<BorderCode> brcRight;
std::shared_ptr<BorderCode> brcHorz;
std::shared_ptr<BorderCode> brcVert;
bool _isTableStyleNeeded;
};

View File

@ -53,6 +53,13 @@ namespace DocFileFormat
{
TablePropertyExceptions* tapx = static_cast<TablePropertyExceptions*>( visited );
std::shared_ptr<BorderCode> brcLeft;
std::shared_ptr<BorderCode> brcTop;
std::shared_ptr<BorderCode> brcBottom;
std::shared_ptr<BorderCode> brcRight;
std::shared_ptr<BorderCode> brcHorz;
std::shared_ptr<BorderCode> brcVert;
//delete infos
RevisionData rev( _rowEndChpx );
@ -84,7 +91,7 @@ namespace DocFileFormat
}
}break;
case sprmTWidthAfter:
{ //width after
{ //width after
XMLTools::XMLElement wAfter( L"w:wAfter" );
XMLTools::XMLAttribute wAfterValue( L"w:w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize ) ) );
wAfter.AppendAttribute( wAfterValue );
@ -94,7 +101,7 @@ namespace DocFileFormat
_trPr->AppendChild( wAfter, true );
}break;
case sprmTWidthBefore:
{ //width before
{ //width before
short before = FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
if ( before != 0 )
@ -110,7 +117,7 @@ namespace DocFileFormat
}break;
case sprmOldTDyaRowHeight:
case sprmTDyaRowHeight:
{ //row height
{ //row height
XMLTools::XMLElement rowHeight( L"w:trHeight" );
XMLTools::XMLAttribute rowHeightVal( L"w:val" );
XMLTools::XMLAttribute rowHeightRule( L"w:hRule" );
@ -142,113 +149,98 @@ namespace DocFileFormat
case sprmOldTFCantSplit:
case sprmTFCantSplit:
case sprmTFCantSplit90:
{ //can't split
{ //can't split
appendFlagElement( _trPr, *iter, L"cantSplit", true );
}break;
//div id
}break;
case sprmTIpgp:// = PGPInfo.ipgpSelf (PGPInfo structure describes the border and margin properties)
{ //div id
}break;
case sprmTCellSpacing:
case sprmTCellSpacingDefault:
{
unsigned char grfbrc = iter->Arguments[2];
short wSpc = FormatUtils::BytesToInt16(iter->Arguments, 4, iter->argumentsSize);
std::wstring strValue = FormatUtils::IntToWideString(wSpc);
if (FormatUtils::BitmaskToBool((int)grfbrc, 0x01))
{
appendDxaElement(_trPr, L"tblCellSpacing", strValue, true);
}
}break;
case sprmTTableBorders80:
{
const int size = 4;
unsigned char brc80[size];
memcpy(brc80, iter->Arguments, size);
brcTop = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 4), size);
brcLeft = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 8), size);
brcBottom = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 12), size);
brcRight = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 16), size);
brcHorz = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
memcpy(brc80, (iter->Arguments + 20), size);
brcVert = std::shared_ptr<BorderCode>(new BorderCode(brc80, size));
}break;
default:
break;
//borders 80 exceptions
//case SinglePropertyModifier.OperationCode.sprmTTableBorders80:
// unsigned char[] brc80 = new unsigned char[4];
// //top border
// Array.Copy(sprm.Arguments, 0, brc80, 0, 4);
// brcTop = new BorderCode(brc80);
// //left
// Array.Copy(sprm.Arguments, 4, brc80, 0, 4);
// brcLeft = new BorderCode(brc80);
// //bottom
// Array.Copy(sprm.Arguments, 8, brc80, 0, 4);
// brcBottom = new BorderCode(brc80);
// //right
// Array.Copy(sprm.Arguments, 12, brc80, 0, 4);
// brcRight = new BorderCode(brc80);
// //inside H
// Array.Copy(sprm.Arguments, 16, brc80, 0, 4);
// brcHorz = new BorderCode(brc80);
// //inside V
// Array.Copy(sprm.Arguments, 20, brc80, 0, 4);
// brcVert = new BorderCode(brc80);
// break;
//border exceptions
//case SinglePropertyModifier.OperationCode.sprmTTableBorders:
// unsigned char[] brc = new unsigned char[8];
// //top border
// Array.Copy(sprm.Arguments, 0, brc, 0, 8);
// brcTop = new BorderCode(brc);
// //left
// Array.Copy(sprm.Arguments, 8, brc, 0, 8);
// brcLeft = new BorderCode(brc);
// //bottom
// Array.Copy(sprm.Arguments, 16, brc, 0, 8);
// brcBottom = new BorderCode(brc);
// //right
// Array.Copy(sprm.Arguments, 24, brc, 0, 8);
// brcRight = new BorderCode(brc);
// //inside H
// Array.Copy(sprm.Arguments, 32, brc, 0, 8);
// brcHorz = new BorderCode(brc);
// //inside V
// Array.Copy(sprm.Arguments, 40, brc, 0, 8);
// brcVert = new BorderCode(brc);
// break;
}
}
//set borders
//if (brcTop != null)
//{
// XmlNode topBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "top", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcTop, topBorder);
// addOrSetBorder(_tblBorders, topBorder);
//}
//if (brcLeft != null)
//{
// XmlNode leftBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "left", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcLeft, leftBorder);
// addOrSetBorder(_tblBorders, leftBorder);
//}
//if (brcBottom != null)
//{
// XmlNode bottomBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "bottom", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcBottom, bottomBorder);
// addOrSetBorder(_tblBorders, bottomBorder);
//}
//if (brcRight != null)
//{
// XmlNode rightBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "right", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcRight, rightBorder);
// addOrSetBorder(_tblBorders, rightBorder);
//}
//if (brcHorz != null)
//{
// XmlNode insideHBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "insideH", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcHorz, insideHBorder);
// addOrSetBorder(_tblBorders, insideHBorder);
//}
//if (brcVert != null)
//{
// XmlNode insideVBorder = _nodeFactory.CreateNode(XmlNodeType.Element, "w", "insideV", OpenXmlNamespaces.WordprocessingML);
// appendBorderAttributes(brcVert, insideVBorder);
// addOrSetBorder(_tblBorders, insideVBorder);
//}
//if (_tblBorders.ChildNodes.Count > 0)
//{
// _tblPrEx.AppendChild(_tblBorders);
//}
//set exceptions
XMLTools::XMLElement* _tblBorders = new XMLTools::XMLElement(L"w:tblBorders");
if (brcTop)
{
XMLTools::XMLElement border(L"w:top");
appendBorderAttributes(brcTop.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (brcLeft)
{
XMLTools::XMLElement border(L"w:left");
appendBorderAttributes(brcLeft.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (brcBottom)
{
XMLTools::XMLElement border(L"w:left");
appendBorderAttributes(brcBottom.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (brcRight)
{
XMLTools::XMLElement border(L"w:right");
appendBorderAttributes(brcRight.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (brcHorz)
{
XMLTools::XMLElement border(L"w:insideH");
appendBorderAttributes(brcHorz.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (brcVert)
{
XMLTools::XMLElement border(L"w:insideV");
appendBorderAttributes(brcHorz.get(), &border);
addOrSetBorder(_tblBorders, &border);
}
if (_tblBorders->GetChildCount() > 0)
{
_tblPrEx->AppendChild(*_tblBorders);
}
//---------------------------------------------------------------------------
if ( _tblPrEx->GetChildCount() > 0 )
{
_trPr->AppendChild( *(_tblPrEx) );
m_pXmlWriter->WriteString(_tblPrEx->GetXMLString());
}
//write Properties
if ( ( _trPr->GetChildCount() > 0 ) || ( _trPr->GetAttributeCount() > 0 ) )
{
m_pXmlWriter->WriteString( _trPr->GetXMLString() );

View File

@ -39,16 +39,16 @@ namespace DocFileFormat
class Tbkd : public ByteStructure
{
public:
friend class TextboxMapping;
static const int STRUCTURE_SIZE = 6;
Tbkd() : ipgd(0), itxbxs(0), dcpDepend(0), icol(0), fTableBreak(false), fColumnBreak(false), fMarked(false), fUnk(false), fTextOverflow(false)
{
}
virtual ~Tbkd()
{
}
virtual ByteStructure* ConstructObject (VirtualStreamReader* reader, int length)
@ -72,7 +72,7 @@ namespace DocFileFormat
}
private:
bool bUsed = false;
/// Except in textbox BKD, index to PGD in plfpgd that describes the page this break is on
short ipgd;
/// In textbox BKD

View File

@ -83,102 +83,102 @@ namespace DocFileFormat
{
m_document = static_cast<WordDocument*>(visited);
if (m_document)
if (!m_document) return;
m_pXmlWriter->WriteNodeBegin(L"v:textbox", true);
if (m_dxTextLeft >= 0 && m_dyTextTop >= 0 && m_dxTextRight >= 0 && m_dyTextBottom >= 0)
{
//if (m_nTBIndex < m_document->TextboxBreakPlex->Elements.size())
// return;
m_pXmlWriter->WriteNodeBegin(L"v:textbox", true);
if(m_dxTextLeft >= 0 && m_dyTextTop >= 0 && m_dxTextRight >= 0 && m_dyTextBottom >= 0)
{
m_pXmlWriter->WriteAttribute( L"inset" , FormatUtils::DoubleToWideString(m_dxTextLeft) + L"pt," +
FormatUtils::DoubleToWideString(m_dyTextTop) + L"pt," +
FormatUtils::DoubleToWideString(m_dxTextRight) + L"pt," +
FormatUtils::DoubleToWideString(m_dyTextBottom) + L"pt");
}
if (!m_sTextBoxStyle.empty())
{
m_pXmlWriter->WriteAttribute( L"style", m_sTextBoxStyle);
}
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeBegin( L"w:txbxContent" );
int cp = 0;
int cpEnd = 0;
Tbkd* bkd = NULL;
int txtbxSubdocStart =
m_document->FIB->m_RgLw97.ccpText +
m_document->FIB->m_RgLw97.ccpFtn +
m_document->FIB->m_RgLw97.ccpHdr +
m_document->FIB->m_RgLw97.ccpAtn +
m_document->FIB->m_RgLw97.ccpEdn ;
if (typeid(*_caller) == typeid(MainDocumentMapping))
{
if (m_nTBIndex < m_document->TextboxBreakPlex->Elements.size() )//file(21).doc
{
bkd = static_cast<Tbkd*>(m_document->TextboxBreakPlex->Elements[m_nTBIndex]);
}
if (m_nTBIndex + 1 < m_document->TextboxBreakPlex->CharacterPositions.size())
{
cp = txtbxSubdocStart + m_document->TextboxBreakPlex->CharacterPositions[m_nTBIndex];
cpEnd = txtbxSubdocStart + m_document->TextboxBreakPlex->CharacterPositions[m_nTBIndex + 1];
}
else if (m_nTBIndex + 1 < m_document->TextboxIndividualPlex->CharacterPositions.size())
{
//todooo сделать чище
cp = m_document->TextboxIndividualPlex->CharacterPositions[m_nTBIndex] + 2;
cpEnd = m_document->TextboxIndividualPlex->CharacterPositions[m_nTBIndex + 1];
}
}
else if ((typeid(*_caller) == typeid(HeaderMapping)) || (typeid(*_caller) == typeid(FooterMapping)))
{
txtbxSubdocStart += m_document->FIB->m_RgLw97.ccpTxbx;
bkd = static_cast<Tbkd*>(m_document->TextboxBreakPlexHeader->Elements[m_nTBIndex]);
cp = txtbxSubdocStart + m_document->TextboxBreakPlexHeader->CharacterPositions[m_nTBIndex];
cpEnd = txtbxSubdocStart + m_document->TextboxBreakPlexHeader->CharacterPositions[m_nTBIndex + 1];
}
_isTextBoxContent = true;
//convert the textbox text
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
ParagraphPropertyExceptions* papx_prev = NULL;
while (cp < cpEnd)
{
int fc = m_document->FindFileCharPos(cp);
if (fc < 0) break;
ParagraphPropertyExceptions* papx = findValidPapx( fc );
if (papx_prev && papx_prev == papx)//file(21).doc
break;
papx_prev = papx;
TableInfo tai( papx, m_document->nWordVersion );
if ( tai.fInTable )
{
//this PAPX is for a table
Table table( this, cp, ( ( tai.iTap > 0 ) ? ( 1 ) : ( 0 ) ) );
table.Convert( this );
cp = table.GetCPEnd();
}
else
{
//this PAPX is for a normal paragraph
cp = writeParagraph( cp, 0x7fffffff );
}
}
_isTextBoxContent = false;
m_pXmlWriter->WriteNodeEnd( L"w:txbxContent" );
m_pXmlWriter->WriteNodeEnd( L"v:textbox" );
m_pXmlWriter->WriteAttribute(L"inset", FormatUtils::DoubleToWideString(m_dxTextLeft) + L"pt," +
FormatUtils::DoubleToWideString(m_dyTextTop) + L"pt," +
FormatUtils::DoubleToWideString(m_dxTextRight) + L"pt," +
FormatUtils::DoubleToWideString(m_dyTextBottom) + L"pt");
}
if (!m_sTextBoxStyle.empty())
{
m_pXmlWriter->WriteAttribute(L"style", m_sTextBoxStyle);
}
m_pXmlWriter->WriteNodeEnd(L"", true, false);
m_pXmlWriter->WriteNodeBegin(L"w:txbxContent");
int cpStart = 0;
int cpEnd = 0;
Tbkd* bkd = NULL;
int txtbxSubdocStart =
m_document->FIB->m_RgLw97.ccpText +
m_document->FIB->m_RgLw97.ccpFtn +
m_document->FIB->m_RgLw97.ccpHdr +
m_document->FIB->m_RgLw97.ccpAtn +
m_document->FIB->m_RgLw97.ccpEdn;
if (typeid(*_caller) == typeid(MainDocumentMapping))
{
if (m_nTBIndex < m_document->TextboxBreakPlex->Elements.size())//file(21).doc
{
bkd = static_cast<Tbkd*>(m_document->TextboxBreakPlex->Elements[m_nTBIndex]);
}
if (m_nTBIndex + 1 < m_document->TextboxIndividualPlex->CharacterPositions.size())
{//Jukivka.doc
cpStart = txtbxSubdocStart + m_document->TextboxIndividualPlex->CharacterPositions[m_nTBIndex];
cpEnd = txtbxSubdocStart + m_document->TextboxIndividualPlex->CharacterPositions[m_nTBIndex + 1];
}
else if (m_nTBIndex + 1 < m_document->TextboxBreakPlex->CharacterPositions.size())
{
cpStart = txtbxSubdocStart + m_document->TextboxBreakPlex->CharacterPositions[m_nTBIndex];
cpEnd = txtbxSubdocStart + m_document->TextboxBreakPlex->CharacterPositions[m_nTBIndex + 1];
}
}
else if ((typeid(*_caller) == typeid(HeaderMapping)) || (typeid(*_caller) == typeid(FooterMapping)))
{
txtbxSubdocStart += m_document->FIB->m_RgLw97.ccpTxbx;
bkd = static_cast<Tbkd*>(m_document->TextboxBreakPlexHeader->Elements[m_nTBIndex]);
cpStart = txtbxSubdocStart + m_document->TextboxBreakPlexHeader->CharacterPositions[m_nTBIndex];
cpEnd = txtbxSubdocStart + m_document->TextboxBreakPlexHeader->CharacterPositions[m_nTBIndex + 1];
}
bool bUsed = bkd ? bkd->bUsed : false;
_isTextBoxContent = true;
//convert the textbox text
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
ParagraphPropertyExceptions* papx_prev = NULL;
int cp = cpStart;
while (cp < cpEnd && cp >= cpStart && !bUsed)
{
int fc = m_document->FindFileCharPos(cp);
if (fc < 0) break;
ParagraphPropertyExceptions* papx = findValidPapx(fc);
if (papx_prev && papx_prev == papx)//file(21).doc
break;
papx_prev = papx;
TableInfo tai(papx, m_document->nWordVersion);
if (tai.fInTable)
{
//this PAPX is for a table
Table table(this, cp, ((tai.iTap > 0) ? (1) : (0)));
table.Convert(this);
cp = table.GetCPEnd();
}
else
{
//this PAPX is for a normal paragraph
cp = writeParagraph(cp, 0x7fffffff);
}
}
_isTextBoxContent = false;
if (bkd)
bkd->bUsed = true;
m_pXmlWriter->WriteNodeEnd(L"w:txbxContent");
m_pXmlWriter->WriteNodeEnd(L"v:textbox");
}
}

View File

@ -39,7 +39,6 @@ namespace DocFileFormat
class TextboxMapping : public DocumentMapping
{
public:
TextboxMapping(ConversionContext* ctx, int textboxIndex, XMLTools::CStringXmlWriter* writer, IMapping* caller);
TextboxMapping(ConversionContext* ctx, XMLTools::CStringXmlWriter* writer, IMapping* caller);

View File

@ -319,7 +319,7 @@ namespace DocFileFormat
for (size_t i = 0; i < options.size(); i++)
{
ODRAW::OfficeArtFOPTEPtr & iter = options[i];
switch ( iter->opid )
switch (iter->opid)
{
case wzEquationXML:
{
@ -328,10 +328,10 @@ namespace DocFileFormat
{
m_isEquation = true;
m_isEmbedded = true;
m_embeddedData = pXml->data;
if (ParseEmbeddedEquation( m_embeddedData, m_equationXml))
if (ParseEmbeddedEquation(m_embeddedData, m_equationXml))
{
m_isEmbedded = false;
}
@ -341,74 +341,74 @@ namespace DocFileFormat
{//встроенная неведомая хуйня
ODRAW::MetroBlob* blob = dynamic_cast<ODRAW::MetroBlob*>(iter.get());
if (blob)
{
m_isBlob = true;
m_isEmbedded = true;
{
m_isBlob = true;
m_isEmbedded = true;
//if (ParseEmbeddedBlob( blob->data.first, blob->data.second)) // todoooo
//{
// m_isEmbedded = false;
//}
}
}break;
//BORDERS
//BORDERS
case ODRAW::borderBottomColor:
if (!pict->brcBottom)
{
RGBColor bottomColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( L"o:borderbottomcolor", L"#" + bottomColor.SixDigitHexCode);
RGBColor bottomColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderbottomcolor", L"#" + bottomColor.SixDigitHexCode);
}
break;
case ODRAW::borderLeftColor:
if (!pict->brcLeft)
{
RGBColor leftColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( L"o:borderleftcolor", L"#" + leftColor.SixDigitHexCode);
}
{
RGBColor leftColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderleftcolor", L"#" + leftColor.SixDigitHexCode);
}
break;
case ODRAW::borderRightColor:
if (!pict->brcRight)
{
RGBColor rightColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( L"o:borderrightcolor", L"#" + rightColor.SixDigitHexCode);
{
RGBColor rightColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:borderrightcolor", L"#" + rightColor.SixDigitHexCode);
}
break;
case ODRAW::borderTopColor:
if (!pict->brcTop)
{
RGBColor topColor( (int)iter->op, RedFirst );
m_pXmlWriter->WriteAttribute( L"o:bordertopcolor", L"#" + topColor.SixDigitHexCode);
RGBColor topColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(L"o:bordertopcolor", L"#" + topColor.SixDigitHexCode);
}
break;
//CROPPING
//CROPPING
case ODRAW::cropFromBottom:
{
{
//cast to signed integer
int cropBottom = (int)iter->op;
appendValueAttribute(m_imageData, L"cropbottom", FormatUtils::IntToWideString( cropBottom ) + L"f" );
appendValueAttribute(m_imageData, L"cropbottom", FormatUtils::IntToWideString(cropBottom) + L"f");
}
break;
case ODRAW::cropFromLeft:
{
{
//cast to signed integer
int cropLeft = (int)iter->op;
appendValueAttribute(m_imageData, L"cropleft", FormatUtils::IntToWideString( cropLeft ) + L"f" );
appendValueAttribute(m_imageData, L"cropleft", FormatUtils::IntToWideString(cropLeft) + L"f");
}
break;
case ODRAW::cropFromRight:
{
//cast to signed integer
int cropRight = (int)iter->op;
appendValueAttribute(m_imageData, L"cropright", FormatUtils::IntToWideString( cropRight ) + L"f" );
appendValueAttribute(m_imageData, L"cropright", FormatUtils::IntToWideString(cropRight) + L"f");
}
break;
case ODRAW::cropFromTop:
{
//cast to signed integer
int cropTop = (int)iter->op;
appendValueAttribute(m_imageData, L"croptop", FormatUtils::IntToWideString( cropTop ) + L"f" );
appendValueAttribute(m_imageData, L"croptop", FormatUtils::IntToWideString(cropTop) + L"f");
}
break;
//------------------------------------------------------------
//------------------------------------------------------------
case ODRAW::ePropertyId_rotation:
{
double dAngle = (double)((int)iter->op) / 65535.0;
@ -436,8 +436,8 @@ namespace DocFileFormat
}break;
case ODRAW::posrelv:
{
if (false == m_inGroup)
appendStyleProperty(strStyle, L"mso-position-vertical-relative", VMLShapeMapping::mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
if (false == m_inGroup)
appendStyleProperty(strStyle, L"mso-position-vertical-relative", VMLShapeMapping::mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
}break;
case ODRAW::groupShapeBooleanProperties:
{
@ -446,7 +446,7 @@ namespace DocFileFormat
if (booleans->fUsefBehindDocument && booleans->fBehindDocument)
{
//The shape is behind the text, so the z-index must be negative.
appendStyleProperty(strStyle, L"z-index", L"-1" );
appendStyleProperty(strStyle, L"z-index", L"-1");
}
//else if (!m_isInlinePicture)
//{
@ -458,8 +458,20 @@ namespace DocFileFormat
appendStyleProperty(strStyle, L"visibility", L"hidden");
}
}break;
case ODRAW::blipBooleanProperties:
{
ODRAW::BlipBooleanProperties * bools = (ODRAW::BlipBooleanProperties *)(iter.get());
if (bools)
{
if (bools->fUsefPictureGray && bools->fPictureGray)
appendValueAttribute(m_imageData, L"grayscale", L"t");
if (bools->fUsefPictureBiLevel && bools->fPictureBiLevel)
appendValueAttribute(m_imageData, L"bilevel", L"t");
}
}break;
default:
break;
{
}break;
}
}

View File

@ -45,6 +45,7 @@
#include "../../DesktopEditor/common/StringExt.h"
#include "../Common/FormatUtils.h"
#include "../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtFOPTE.h"
namespace DocFileFormat
{
@ -152,8 +153,8 @@ namespace DocFileFormat
bool twistDimensions = false;
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(shape, anchor, options, container->Index, twistDimensions)));
m_pXmlWriter->WriteAttribute( L"coordorigin", ( FormatUtils::IntToWideString(gsr->rcgBounds.topLeftAngle.x) + L"," + FormatUtils::IntToWideString( gsr->rcgBounds.topLeftAngle.y)));
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString(gsr->rcgBounds.size.cx) + L"," + FormatUtils::IntToWideString(gsr->rcgBounds.size.cy)));
m_pXmlWriter->WriteAttribute( L"coordorigin", ( std::to_wstring(gsr->rcgBounds.topLeftAngle.x) + L"," + std::to_wstring( gsr->rcgBounds.topLeftAngle.y)));
m_pXmlWriter->WriteAttribute( L"coordsize", ( std::to_wstring(gsr->rcgBounds.size.cx) + L"," + std::to_wstring(gsr->rcgBounds.size.cy)));
// Write wrap coords
for (size_t i = 0; i < options.size(); i++)
@ -251,7 +252,7 @@ namespace DocFileFormat
if (m_shapeId.empty())
{
m_context->_doc->GetOfficeArt()->m_uLastShapeId++;
m_shapeId = std::wstring(L"_x0000_s") + FormatUtils::IntToWideString(m_context->_doc->GetOfficeArt()->m_uLastShapeId);
m_shapeId = std::wstring(L"_x0000_s") + std::to_wstring(m_context->_doc->GetOfficeArt()->m_uLastShapeId);
}
m_pXmlWriter->WriteAttribute ( L"id", m_shapeId );
@ -291,8 +292,8 @@ namespace DocFileFormat
boost::optional<double> viewPointOriginY;
boost::optional<double> ShadowOriginX;
boost::optional<double> ShadowOriginY;
boost::optional<unsigned int> xCoord;
boost::optional<unsigned int> yCoord;
boost::optional<size_t> xCoord;
boost::optional<size_t> yCoord;
bool bStroked = true;
bool bFilled = true;
@ -312,6 +313,8 @@ namespace DocFileFormat
int nAdjValues = 0;
int nLTxID = -1;
int nProperty = 0;
std::wstring sTextboxStyle;
ODRAW::OfficeArtFOPTEPtr opSegmentInfo;
@ -564,7 +567,7 @@ namespace DocFileFormat
}break;
case ODRAW::fillFocus:
{
appendValueAttribute(&m_fill, L"focus", (FormatUtils::IntToWideString(iter->op) + L"%"));
appendValueAttribute(&m_fill, L"focus", (std::to_wstring(iter->op) + L"%"));
appendValueAttribute(&m_fill, L"focusposition", L".5, .5");
appendValueAttribute(&m_fill, L"focussize", L"");
}break;
@ -588,7 +591,7 @@ namespace DocFileFormat
if ((pFillBlip != NULL) && copyPicture(pFillBlip))
{
appendValueAttribute(&m_fill, L"r:id", std::wstring((L"rId") + FormatUtils::IntToWideString(m_nImageId)));
appendValueAttribute(&m_fill, L"r:id", std::wstring((L"rId") + std::to_wstring(m_nImageId)));
}
bPicturePresent = true;
@ -679,7 +682,7 @@ namespace DocFileFormat
BlipStoreEntry* oBlip = static_cast<BlipStoreEntry*>(m_pBlipStore->Children[index]);
if (copyPicture(oBlip))
{
appendValueAttribute(&m_imagedata, L"r:id", (std::wstring(L"rId") + FormatUtils::IntToWideString(m_nImageId)));
appendValueAttribute(&m_imagedata, L"r:id", (std::wstring(L"rId") + std::to_wstring(m_nImageId)));
}
}
bPicturePresent = true;
@ -698,43 +701,43 @@ namespace DocFileFormat
}break;
case ODRAW::pictureContrast:
{
appendValueAttribute(&m_imagedata, L"gain", (FormatUtils::IntToWideString(iter->op) + L"f"));
appendValueAttribute(&m_imagedata, L"gain", (std::to_wstring(iter->op) + L"f"));
}break;
case ODRAW::pictureBrightness:
{
appendValueAttribute(&m_imagedata, L"blacklevel", (FormatUtils::IntToWideString(iter->op) + L"f"));
appendValueAttribute(&m_imagedata, L"blacklevel", (std::to_wstring(iter->op) + L"f"));
}break;
case ODRAW::pictureGamma:
{
appendValueAttribute(&m_imagedata, L"gamma", (FormatUtils::IntToWideString(iter->op) + L"f"));
appendValueAttribute(&m_imagedata, L"gamma", (std::to_wstring(iter->op) + L"f"));
}break;
//CROPPING
case ODRAW::cropFromBottom:
{
//cast to signed integer
int cropBottom = (int)iter->op;
appendValueAttribute(&m_imagedata, L"cropbottom", FormatUtils::IntToWideString(cropBottom) + L"f");
appendValueAttribute(&m_imagedata, L"cropbottom", std::to_wstring(cropBottom) + L"f");
}
break;
case ODRAW::cropFromLeft:
{
//cast to signed integer
int cropLeft = (int)iter->op;
appendValueAttribute(&m_imagedata, L"cropleft", FormatUtils::IntToWideString(cropLeft) + L"f");
appendValueAttribute(&m_imagedata, L"cropleft", std::to_wstring(cropLeft) + L"f");
}
break;
case ODRAW::cropFromRight:
{
//cast to signed integer
int cropRight = (int)iter->op;
appendValueAttribute(&m_imagedata, L"cropright", FormatUtils::IntToWideString(cropRight) + L"f");
appendValueAttribute(&m_imagedata, L"cropright", std::to_wstring(cropRight) + L"f");
}
break;
case ODRAW::cropFromTop:
{
//cast to signed integer
int cropTop = (int)iter->op;
appendValueAttribute(&m_imagedata, L"croptop", FormatUtils::IntToWideString(cropTop) + L"f");
appendValueAttribute(&m_imagedata, L"croptop", std::to_wstring(cropTop) + L"f");
}
break;
// 3D STYLE
@ -760,22 +763,22 @@ namespace DocFileFormat
}break;
case ODRAW::c3DAmbientIntensity:
{
std::wstring intens = FormatUtils::IntToWideString((int)iter->op) + L"f";
std::wstring intens = std::to_wstring((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"brightness", intens);
}break;
case ODRAW::c3DSpecularAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
std::wstring amt = std::to_wstring((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"specularity", amt);
}break;
case ODRAW::c3DDiffuseAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
std::wstring amt = std::to_wstring((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, L"diffusity", amt);
}break;
case ODRAW::c3DKeyIntensity:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op);
std::wstring amt = std::to_wstring((int)iter->op);
appendValueAttribute(&m_3dstyle, L"lightlevel", amt);
}break;
case ODRAW::c3DExtrusionColor:
@ -841,6 +844,10 @@ namespace DocFileFormat
break;
}
}break;
case ODRAW::hspNext:
{
appendStyleProperty(sTextboxStyle, L"mso-next-textbox", std::wstring(L"_x0000_s") + std::to_wstring((unsigned int)iter->op));
}break;
case ODRAW::textBooleanProperties:
{
ODRAW::TextBooleanProperties *props = dynamic_cast<ODRAW::TextBooleanProperties*>(iter.get());
@ -850,7 +857,6 @@ namespace DocFileFormat
appendStyleProperty(sTextboxStyle, L"mso-fit-shape-to-text", L"t");
}
}break;
// Word Art
case ODRAW::gtextUNICODE:
{
@ -870,18 +876,22 @@ namespace DocFileFormat
}break;
case ODRAW::gtextSize:
{
std::wstring fontSize = FormatUtils::IntToWideString(iter->op/65535);
std::wstring fontSize = std::to_wstring(iter->op/65535);
appendStyleProperty(m_textPathStyle, L"font-size", fontSize + L"pt");
}break;
case ODRAW::gtextSpacing:
{
std::wstring spacing = FormatUtils::IntToWideString(iter->op);
std::wstring spacing = std::to_wstring(iter->op);
appendStyleProperty(m_textPathStyle, L"v-text-spacing", spacing + L"f");
}break;
case ODRAW::geometryTextBooleanProperties:
{
ODRAW::GeometryTextBooleanProperties *props = dynamic_cast<ODRAW::GeometryTextBooleanProperties*>(iter.get());
if (props->fUsegFBestFit && props->fBestFit)
if (props->fUsegFShrinkFit && props->fShrinkFit && (props->fStretch || props->fUsegFStretch))
{
appendValueAttribute(&m_textpath, L"fitshape", L"t");
}
if (props->fUsegFBestFit && props->fBestFit && (!props->fStretch || !props->fUsegFStretch))
{
appendValueAttribute(&m_textpath, L"fitshape", L"t");
}
@ -909,7 +919,7 @@ namespace DocFileFormat
}break;
default:
{
int val = iter->op;
nProperty = iter->op;
}break;
}
}
@ -918,7 +928,7 @@ namespace DocFileFormat
ODRAW::PSegmentInfo* pSI = dynamic_cast<ODRAW::PSegmentInfo*>(opSegmentInfo.get());
if (pVP && pSI)
{
ODRAW::PathParser oParser (pSI->complex.data, pVP->complex.data, m_arrGuides);
ODRAW::PathParser oParser (pSI->complex.data, pVP->complex.data, m_arrGuides, xCoord, yCoord);
std::wstring path = oParser.GetVmlPath();
if (false == path.empty())
@ -946,13 +956,13 @@ namespace DocFileFormat
if ( xCoord && yCoord )
{
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( *xCoord ) + L"," + FormatUtils::IntToWideString( *yCoord ) ));
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::SizeTToWideString( *xCoord ) + L"," + FormatUtils::SizeTToWideString( *yCoord ) ));
}
int nCode = 0;
if (pShape->GetShapeType())
{
nCode = pShape->GetShapeType()->GetTypeCode();
nCode = pShape->GetShapeType()->GetTypeCode();
}
if (DocFileFormat::msosptRoundRectangle == nCode)
@ -1036,17 +1046,17 @@ namespace DocFileFormat
if ( ViewPointX )
{
viewPoint += FormatUtils::IntToWideString( *ViewPointX ) + L"pt";
viewPoint += std::to_wstring( *ViewPointX ) + L"pt";
}
viewPoint += L",";
if ( ViewPointY)
{
viewPoint += FormatUtils::IntToWideString( *ViewPointY ) + L"pt";
viewPoint += std::to_wstring( *ViewPointY ) + L"pt";
}
viewPoint += L",";
if ( ViewPointZ)
{
viewPoint += FormatUtils::IntToWideString( *ViewPointZ ) + L"pt";
viewPoint += std::to_wstring( *ViewPointZ ) + L"pt";
}
appendValueAttribute(&m_3dstyle, L"viewpoint", viewPoint);
@ -1158,8 +1168,8 @@ namespace DocFileFormat
//Word appends a OfficeArtClientTextbox record to the container.
//This record stores the index of the textbox.
int nIndex = pTextBox->GetIndex();
if (nIndex)
int nIndex = pTextBox->m_nIndex;
if (nIndex > 0)
{
TextboxMapping textboxMapping(m_context, nIndex - 1, m_pXmlWriter, m_pCaller);
textboxMapping.SetInset(ndxTextLeft, ndyTextTop, ndxTextRight, ndyTextBottom);
@ -1170,12 +1180,6 @@ namespace DocFileFormat
}
else if( hasTextbox )
{
//Open Office textbox
//Open Office doesn't append a OfficeArtClientTextbox record to the container.
//We don't know how Word gets the relation to the text, but we assume that the first textbox in the document
//get the index 0, the second textbox gets the index 1 (and so on).
if (-1 != nLTxID)
{
TextboxMapping textboxMapping(m_context, nLTxID - 1, m_pXmlWriter, m_pCaller);
@ -1290,7 +1294,7 @@ namespace DocFileFormat
if (NULL != pShape)
{
strXmlAttr += std::wstring(L"_x0000_s");
strXmlAttr += FormatUtils::IntToWideString(pShape->GetShapeID());
strXmlAttr += std::to_wstring(pShape->GetShapeID());
}
return strXmlAttr;
@ -1317,9 +1321,9 @@ namespace DocFileFormat
top = (bottom + pAnchor->rcgBounds.topLeftAngle.y) * 0.5 - (right - pAnchor->rcgBounds.topLeftAngle.x) * 0.5;
}
strXmlFrom += FormatUtils::IntToWideString(left);
strXmlFrom += std::to_wstring(left);
strXmlFrom += L",";
strXmlFrom += FormatUtils::IntToWideString(top);
strXmlFrom += std::to_wstring(top);
}
else if (m_pSpa)
{
@ -1360,9 +1364,9 @@ namespace DocFileFormat
right = left + pAnchor->rcgBounds.size.cy;
bottom = top + pAnchor->rcgBounds.size.cx;
}
strXmlTo += FormatUtils::IntToWideString(right);
strXmlTo += std::to_wstring(right);
strXmlTo += L",";
strXmlTo += FormatUtils::IntToWideString(bottom);
strXmlTo += std::to_wstring(bottom);
}
else if (m_pSpa)
{
@ -1396,7 +1400,7 @@ namespace DocFileFormat
for (size_t i = 0; i < pWrapPolygonVertices->complex.data.size(); ++i)
{
coords += FormatUtils::IntToWideString(pWrapPolygonVertices->complex.data[i].x);
coords += std::to_wstring(pWrapPolygonVertices->complex.data[i].x);
coords += L",";
coords += FormatUtils::IntToWideString(pWrapPolygonVertices->complex.data[i].y);
coords += L",";
@ -1598,19 +1602,19 @@ namespace DocFileFormat
bounds.topLeftAngle.y = static_cast<LONG>(((anchor->Bottom + anchor->Top) * 0.5 - (anchor->Right - anchor->Left) * 0.5));
}
appendStylePropertyFirst(style, L"top", FormatUtils::IntToWideString(bounds.topLeftAngle.y));
appendStylePropertyFirst(style, L"left", FormatUtils::IntToWideString(bounds.topLeftAngle.x));
appendStylePropertyFirst(style, L"top", std::to_wstring(bounds.topLeftAngle.y));
appendStylePropertyFirst(style, L"left", std::to_wstring(bounds.topLeftAngle.x));
appendStylePropertyFirst(style, L"position", L"absolute");
if (twistDimensions)
{
appendStylePropertyFirst(style, L"width", FormatUtils::IntToWideString(bounds.size.cy));
appendStylePropertyFirst(style, L"height", FormatUtils::IntToWideString(bounds.size.cx));
appendStylePropertyFirst(style, L"width", std::to_wstring(bounds.size.cy));
appendStylePropertyFirst(style, L"height", std::to_wstring(bounds.size.cx));
}
else
{
appendStylePropertyFirst(style, L"width", FormatUtils::IntToWideString(bounds.size.cx));
appendStylePropertyFirst(style, L"height", FormatUtils::IntToWideString(bounds.size.cy));
appendStylePropertyFirst(style, L"width", std::to_wstring(bounds.size.cx));
appendStylePropertyFirst(style, L"height", std::to_wstring(bounds.size.cy));
}
}
}
@ -1713,7 +1717,7 @@ namespace DocFileFormat
switch (val)
{
case 0: return L"square";
//case 1: return L"ByPoints";
case 1: return L"tight";
case 2: return L"none";
//case 3: return L"TopBottom";
//case 3: return L"Through";
@ -2039,9 +2043,9 @@ namespace DocFileFormat
for (size_t i = 0; i < pColors->complex.data.size(); ++i)
{
if (pColors->complex.data[i].position.Fractional == 0)
result += FormatUtils::IntToWideString(pColors->complex.data[i].position.Integral);
result += std::to_wstring(pColors->complex.data[i].position.Integral);
else
result += FormatUtils::IntToWideString(pColors->complex.data[i].position.Fractional) +L"f";
result += std::to_wstring(pColors->complex.data[i].position.Fractional) +L"f";
result += L" #";
result += pColors->complex.data[i].color.sColorRGB;
@ -2296,7 +2300,7 @@ namespace DocFileFormat
m_context->_doc->GetOfficeArt()->m_uLastShapeId++;
std::wstring strId = std::wstring(L"_x0000_s") + FormatUtils::IntToWideString(m_context->_doc->GetOfficeArt()->m_uLastShapeId);
std::wstring strId = std::wstring(L"_x0000_s") + std::to_wstring(m_context->_doc->GetOfficeArt()->m_uLastShapeId);
//m_pXmlWriter->WriteAttribute ( L"id") , strId);
m_pXmlWriter->WriteAttribute ( L"o:spid", strId);
@ -2311,8 +2315,8 @@ namespace DocFileFormat
TwipsValue x2( line->xaEnd );
TwipsValue y2( line->yaEnd );
std::wstring strStart = FormatUtils::IntToWideString(line->xaStart + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaStart + primitive->ya);
std::wstring strEnd = FormatUtils::IntToWideString(line->xaEnd + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaEnd + primitive->ya);
std::wstring strStart = std::to_wstring(line->xaStart + primitive->xa) + L"," + std::to_wstring(line->yaStart + primitive->ya);
std::wstring strEnd = std::to_wstring(line->xaEnd + primitive->xa) + L"," + std::to_wstring(line->yaEnd + primitive->ya);
m_pXmlWriter->WriteAttribute(L"from", strStart);
m_pXmlWriter->WriteAttribute(L"to", strEnd);
@ -2321,13 +2325,13 @@ namespace DocFileFormat
{
if (root)
{
//strStyle += L"left:" + FormatUtils::IntToWideString( x.ToPoints()) + L"pt;";
//strStyle += L"top:" + FormatUtils::IntToWideString( y.ToPoints()) + L"pt;";
strStyle += L"width:" + FormatUtils::IntToWideString( (int)w.ToPoints()) + L"pt;";
strStyle += L"height:" + FormatUtils::IntToWideString( (int)h.ToPoints()) + L"pt;";
//strStyle += L"left:" + std::to_wstring( x.ToPoints()) + L"pt;";
//strStyle += L"top:" + std::to_wstring( y.ToPoints()) + L"pt;";
strStyle += L"width:" + std::to_wstring( (int)w.ToPoints()) + L"pt;";
strStyle += L"height:" + std::to_wstring( (int)h.ToPoints()) + L"pt;";
strStyle += L"margin-left:" + FormatUtils::IntToWideString( (int)x.ToPoints()) + L"pt;";
strStyle += L"margin-top:" + FormatUtils::IntToWideString( (int)y.ToPoints()) + L"pt;";
strStyle += L"margin-left:" + std::to_wstring( (int)x.ToPoints()) + L"pt;";
strStyle += L"margin-top:" + std::to_wstring( (int)y.ToPoints()) + L"pt;";
if (false == m_inGroup)
{
@ -2343,18 +2347,18 @@ namespace DocFileFormat
if (!yMargin.empty()) strStyle += L"mso-position-vertical-relative:" + yMargin;
}
std::wstring strSize = FormatUtils::IntToWideString(primitive->dxa) + L"," + FormatUtils::IntToWideString(primitive->dya);
std::wstring strOrigin = FormatUtils::IntToWideString(primitive->xa) + L"," + FormatUtils::IntToWideString(primitive->ya);
std::wstring strSize = std::to_wstring(primitive->dxa) + L"," + std::to_wstring(primitive->dya);
std::wstring strOrigin = std::to_wstring(primitive->xa) + L"," + std::to_wstring(primitive->ya);
m_pXmlWriter->WriteAttribute( L"coordsize", strSize);
//m_pXmlWriter->WriteAttribute( L"coordorigin"), strOrigin);
}
else
{
strStyle += L"left:" + FormatUtils::IntToWideString( primitive->xa) + L";";
strStyle += L"top:" + FormatUtils::IntToWideString( primitive->ya) + L";";
strStyle += L"width:" + FormatUtils::IntToWideString( primitive->dxa) + L";";
strStyle += L"height:" + FormatUtils::IntToWideString( primitive->dya) + L";";
strStyle += L"left:" + std::to_wstring( primitive->xa) + L";";
strStyle += L"top:" + std::to_wstring( primitive->ya) + L";";
strStyle += L"width:" + std::to_wstring( primitive->dxa) + L";";
strStyle += L"height:" + std::to_wstring( primitive->dya) + L";";
}
}
if (primitive->fillPattern == 0)
@ -2366,7 +2370,7 @@ namespace DocFileFormat
}
m_pXmlWriter->WriteAttribute( L"style", strStyle);
std::wstring strStrokeWeight = FormatUtils::IntToWideString(primitive->lineWeight / 20) + L"pt";
std::wstring strStrokeWeight = std::to_wstring(primitive->lineWeight / 20) + L"pt";
if (primitive->lineWeight > 20)
m_pXmlWriter->WriteAttribute( L"strokeweight", strStrokeWeight);
@ -2387,7 +2391,7 @@ namespace DocFileFormat
if (primitive->lineStyle > 1)
{
m_pXmlWriter->WriteNodeBegin(L"v:stroke", true );
std::wstring strDashStyle = FormatUtils::IntToWideString(primitive->lineStyle) + L" 1";
std::wstring strDashStyle = std::to_wstring(primitive->lineStyle) + L" 1";
m_pXmlWriter->WriteAttribute( L"dashstyle", strDashStyle);
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeEnd( L"v:stroke" );

View File

@ -35,7 +35,7 @@
#include "../../Common/OfficeFileErrorDescription.h"
#include "../../Common/MS-LCID.h"
#include "../../ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/SummaryInformation.h"
#include "../../ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/PropertySetStream.h"
#include "../../ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStream.h"
#include "../../DesktopEditor/common/File.h"
@ -240,17 +240,20 @@ namespace DocFileFormat
}
//------------------------------------------------------------------------------------------------------------------
POLE::Stream * Summary = NULL;
POLE::Stream * DocSummary = NULL;
POLE::Stream * Summary = NULL;
POLE::Stream * DocSummary = NULL;
m_pStorage->GetStream (L"SummaryInformation", &Summary);
m_pStorage->GetStream (L"DocumentSummaryInformation", &DocSummary);
OLEPS::PropertySetStream summary_info;
if ((Summary) && (Summary->size() > 0))
{
XLS::CFStreamPtr stream = XLS::CFStreamPtr(new XLS::CFStream(Summary));
OLEPS::SummaryInformation summary_info(stream);
int document_code_page1 = summary_info.GetCodePage(); //from software last open
XLS::CFStreamPtr stream = XLS::CFStreamPtr(new XLS::CFStream(Summary));
summary_info.read(stream);
int document_code_page1 = summary_info.GetCodePage();
if (document_code_page1 > 0)
{
@ -261,8 +264,9 @@ namespace DocFileFormat
if ((DocSummary) && (DocSummary->size() > 0))
{
XLS::CFStreamPtr stream = XLS::CFStreamPtr(new XLS::CFStream(DocSummary));
OLEPS::SummaryInformation doc_summary_info(stream);
int document_code_page2 = doc_summary_info.GetCodePage();
summary_info.read(stream, true);
int document_code_page2 = summary_info.GetCodePage();
if (document_code_page2 > 0)
{
@ -288,6 +292,8 @@ namespace DocFileFormat
nDocumentCodePage = user_codepage;
}
}
m_sXmlApp = summary_info.GetApp();
m_sXmlCore = summary_info.GetCore();
//-------------------------------------------------------------------------------------------------
try
{

View File

@ -88,7 +88,7 @@ namespace DocFileFormat
friend class OpenXmlPackage;
friend class TextboxMapping;
friend class SettingsMapping;
friend class WordprocessingDocument;
public:
WordDocument (const std::wstring & tempFolder, const int userLCID);
@ -153,6 +153,8 @@ namespace DocFileFormat
std::wstring m_sTempFolder;
std::wstring m_sTempDecryptFileName;
int m_nUserLCID;
std::wstring m_sXmlApp;
std::wstring m_sXmlCore;
POLE::Stream * WordDocumentStream; // The stream "WordDocument"
POLE::Stream * TableStream; // The stream "0Table" or "1Table"

View File

@ -72,7 +72,6 @@ namespace DocFileFormat
RegisterDocumentMacros();
RegisterVbaProject();
//output_document->get_xl_files().add_vba_project();
}
else bMacros = false;
}
@ -84,54 +83,68 @@ namespace DocFileFormat
RegisterDocument();
}
OOX::CContentTypes oContentTypes;
OOX::CPath pathDocProps = m_strOutputPath + FILE_SEPARATOR_STR + _T("docProps");
OOX::CPath pathDocProps = m_strOutputPath + FILE_SEPARATOR_STR + L"docProps";
NSDirectory::CreateDirectory(pathDocProps.GetPath());
OOX::CPath DocProps = std::wstring(_T("docProps"));
OOX::CPath DocProps = std::wstring(L"docProps");
OOX::CApp* pApp = new OOX::CApp(NULL);
if (pApp)
if (docFile->m_sXmlApp.empty())
{
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
if (sApplication.empty())
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
pApp->SetApplication(sApplication);
#if defined(INTVER)
pApp->SetAppVersion(VALUE2STR(INTVER));
#endif
pApp->SetDocSecurity(0);
pApp->SetScaleCrop(false);
pApp->SetLinksUpToDate(false);
pApp->SetSharedDoc(false);
pApp->SetHyperlinksChanged(false);
pApp->write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, oContentTypes);
delete pApp;
}
OOX::CCore* pCore = new OOX::CCore(NULL);
if (pCore)
OOX::CApp* pApp = new OOX::CApp(NULL);
if (pApp)
{
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
if (sApplication.empty())
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
pApp->SetApplication(sApplication);
#if defined(INTVER)
pApp->SetAppVersion(VALUE2STR(INTVER));
#endif
pApp->SetDocSecurity(0);
pApp->SetScaleCrop(false);
pApp->SetLinksUpToDate(false);
pApp->SetSharedDoc(false);
pApp->SetHyperlinksChanged(false);
pApp->write(pathDocProps + FILE_SEPARATOR_STR + L"app.xml", DocProps, oContentTypes);
delete pApp;
}
}
else
{
pCore->SetCreator(_T(""));
pCore->SetLastModifiedBy(_T(""));
pCore->write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, oContentTypes);
delete pCore;
}
SaveToFile(pathDocProps.GetPath(), L"app.xml", docFile->m_sXmlApp);
}
if (docFile->m_sXmlCore.empty())
{
OOX::CCore* pCore = new OOX::CCore(NULL);
if (pCore)
{
pCore->SetCreator(L"");
pCore->SetLastModifiedBy(L"");
pCore->write(pathDocProps + FILE_SEPARATOR_STR + L"core.xml", DocProps, oContentTypes);
delete pCore;
}
}
else
{
SaveToFile(pathDocProps.GetPath(), L"core.xml", docFile->m_sXmlCore);
}
RegisterDocPr();
WritePackage();
//Write main content. (word directory)
SaveToFile(pathWord, std::wstring( L"document.xml" ), DocumentXML );
SaveToFile(pathWord, std::wstring( L"fontTable.xml" ), FontTableXML );
SaveToFile(pathWord, std::wstring( L"styles.xml" ), StyleSheetXML );
SaveToFile(pathWord, std::wstring( L"footnotes.xml" ), FootnotesXML );
SaveToFile(pathWord, std::wstring( L"endnotes.xml" ), EndnotesXML );
SaveToFile(pathWord, std::wstring( L"numbering.xml" ), NumberingXML );
SaveToFile(pathWord, std::wstring( L"comments.xml" ), CommentsXML );
SaveToFile(pathWord, std::wstring( L"commentsExtended.xml"),CommentsExtendedXML );
SaveToFile(pathWord, std::wstring( L"settings.xml" ), SettingsXML );
SaveToFile(pathWord, std::wstring( L"customizations.xml" ), CommandTableXML );
SaveToFile(pathWord, L"document.xml", DocumentXML );
SaveToFile(pathWord, L"fontTable.xml", FontTableXML );
SaveToFile(pathWord, L"styles.xml", StyleSheetXML );
SaveToFile(pathWord, L"footnotes.xml", FootnotesXML );
SaveToFile(pathWord, L"endnotes.xml", EndnotesXML );
SaveToFile(pathWord, L"numbering.xml", NumberingXML );
SaveToFile(pathWord, L"comments.xml", CommentsXML );
SaveToFile(pathWord, L"commentsExtended.xml", CommentsExtendedXML );
SaveToFile(pathWord, L"settings.xml", SettingsXML );
SaveToFile(pathWord, L"customizations.xml", CommandTableXML );
if (!ImagesList.empty())
{
@ -173,12 +186,12 @@ namespace DocFileFormat
for (std::list<std::wstring>::iterator iter = HeaderXMLList.begin(); iter != HeaderXMLList.end(); ++iter)
{
SaveToFile(pathWord, ( std::wstring( L"header" ) + FormatUtils::IntToWideString(++headersCount) + std::wstring( L".xml" ) ), *iter);
SaveToFile(pathWord, ( L"header" + FormatUtils::IntToWideString(++headersCount) + L".xml"), *iter);
}
for (std::list<std::wstring>::iterator iter = FooterXMLList.begin(); iter != FooterXMLList.end(); ++iter)
{
SaveToFile(pathWord, ( std::wstring( L"footer" ) + FormatUtils::IntToWideString(++footersCount) + std::wstring( L".xml" ) ), *iter);
SaveToFile(pathWord, ( L"footer" + FormatUtils::IntToWideString(++footersCount) + L".xml" ), *iter);
}
return 0;
}

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31624.102
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "DocFormatLib.vcxproj", "{C5371405-338F-4B70-83BD-2A5CDF64F383}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x64.ActiveCfg = Debug|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x64.Build.0 = Debug|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x86.ActiveCfg = Debug|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x86.Build.0 = Debug|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.ActiveCfg = Release|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.Build.0 = Release|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x86.ActiveCfg = Release|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3EDBED06-16E0-41A4-B58C-20C41B41BE20}
EndGlobalSection
EndGlobal

View File

@ -68,12 +68,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
<IncludePath>..\..\..\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>..\..\..\Common\3dParty\boost\build\win_64\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_64\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
@ -86,7 +88,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -103,7 +105,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

View File

@ -0,0 +1,162 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "ReaderClasses.h"
namespace BinDocxRW {
TrackRevision::TrackRevision()
{
Id = NULL;
vMerge = NULL;
vMergeOrigin = NULL;
RPr = NULL;
PPr = NULL;
sectPr = NULL;
tblPr = NULL;
tblGridChange = NULL;
trPr = NULL;
tcPr = NULL;
content = NULL;
contentRun = NULL;
}
TrackRevision::~TrackRevision()
{
RELEASEOBJECT(Id);
RELEASEOBJECT(vMerge);
RELEASEOBJECT(vMergeOrigin);
RELEASEOBJECT(RPr);
RELEASEOBJECT(PPr);
RELEASEOBJECT(sectPr);
RELEASEOBJECT(tblPr);
RELEASEOBJECT(tblGridChange);
RELEASEOBJECT(trPr);
RELEASEOBJECT(tcPr);
RELEASEOBJECT(content);
RELEASEOBJECT(contentRun);
}
void TrackRevision::Write(NSStringUtils::CStringBuilder* pCStringWriter, std::wstring sName)
{
if (IsNoEmpty())
{
pCStringWriter->WriteString(L"<");
pCStringWriter->WriteString(sName);
if (NULL != Id)
{
pCStringWriter->WriteString(L" w:id=\"" + std::to_wstring(*Id) + L"\"");
}
if (!Author.empty())
{
pCStringWriter->WriteString(L" w:author=\"");
pCStringWriter->WriteEncodeXmlString(Author);
pCStringWriter->WriteString(L"\"");
}
if (!Date.empty())
{
pCStringWriter->WriteString(L" w:date=\"");
pCStringWriter->WriteEncodeXmlString(Date);
pCStringWriter->WriteString(L"\"");
}
if (!UserId.empty())
{
pCStringWriter->WriteString(L" oouserid=\"");
pCStringWriter->WriteEncodeXmlString(UserId);
pCStringWriter->WriteString(L"\"");
}
if (NULL != vMerge)
{
pCStringWriter->WriteString(L" w:vMerge=\"" + std::to_wstring(*vMerge) + L"\"");
}
if (NULL != vMergeOrigin)
{
pCStringWriter->WriteString(L" w:vMergeOrig=\"" + std::to_wstring(*vMergeOrigin) + L"\"");
}
if (NULL != RPr || NULL != PPr || NULL != sectPr || NULL != tblPr || NULL != tblGridChange || NULL != trPr || NULL != tcPr || NULL != content || NULL != contentRun)
{
pCStringWriter->WriteString(L">");
if (NULL != RPr)
{
pCStringWriter->WriteString(RPr->toXML());
}
if (NULL != PPr)
{
pCStringWriter->WriteString(L"<w:pPr>");
pCStringWriter->Write(*PPr);
pCStringWriter->WriteString(L"</w:pPr>");
}
if (NULL != sectPr)
{
pCStringWriter->WriteString(L"<w:sectPr>");
pCStringWriter->WriteString(sectPr->Write());
pCStringWriter->WriteString(L"</w:sectPr>");
}
if (NULL != tblPr)
{
pCStringWriter->WriteString(tblPr->Write());
}
if (NULL != tblGridChange)
{
pCStringWriter->WriteString(L"<w:tblGrid>");
pCStringWriter->Write(*tblGridChange);
pCStringWriter->WriteString(L"</w:tblGrid>");
}
if (NULL != trPr)
{
pCStringWriter->WriteString(L"<w:trPr>");
pCStringWriter->Write(*trPr);
pCStringWriter->WriteString(L"</w:trPr>");
}
if (NULL != tcPr)
{
pCStringWriter->WriteString(L"<w:tcPr>");
pCStringWriter->Write(*tcPr);
pCStringWriter->WriteString(L"</w:tcPr>");
}
if (NULL != content)
{
pCStringWriter->Write(*content);
}
if (NULL != contentRun)
{
pCStringWriter->Write(*contentRun);
}
pCStringWriter->WriteString(L"</");
pCStringWriter->WriteString(sName);
pCStringWriter->WriteString(L">");
}
else
{
pCStringWriter->WriteString(L"/>");
}
}
}
}

View File

@ -34,9 +34,11 @@
#include "HeaderFooterWriter.h"
#include "../../Common/DocxFormat/Source/XML/Utils.h"
#include "../../Common/DocxFormat/Source/Common/SimpleTypes_Word.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Logic/RunProperty.h"
#include "../BinWriter/BinReaderWriterDefines.h"
#include <boost/algorithm/string.hpp>
#include <boost/unordered_map.hpp>
namespace BinDocxRW {
@ -400,431 +402,7 @@ class Tabs
public:
std::vector<Tab> m_aTabs;
};
class rPr
{
private:
boost::unordered_map<std::wstring, int>& m_mapFonts;
public:
bool Bold;
bool Italic;
bool Underline;
bool Strikeout;
std::wstring FontAscii;
std::wstring FontHAnsi;
std::wstring FontAE;
std::wstring FontCS;
std::wstring FontAsciiTheme;
std::wstring FontHAnsiTheme;
std::wstring FontAETheme;
std::wstring FontCSTheme;
long FontSize;
docRGB Color;
BYTE VertAlign;
docRGB HighLight;
BYTE nHighLight;
std::wstring Shd;
std::wstring RStyle;
long Spacing;
bool DStrikeout;
bool Caps;
bool SmallCaps;
long Position;
BYTE FontHint;
bool BoldCs;
bool ItalicCs;
long FontSizeCs;
bool Cs;
bool Rtl;
std::wstring Lang;
std::wstring LangBidi;
std::wstring LangEA;
CThemeColor ThemeColor;
bool Vanish;
std::wstring Outline;
std::wstring Fill;
std::wstring Del;
std::wstring Ins;
std::wstring MoveFrom;
std::wstring MoveTo;
std::wstring rPrChange;
bool bBold;
bool bItalic;
bool bUnderline;
bool bStrikeout;
bool bFontAscii;
bool bFontHAnsi;
bool bFontAE;
bool bFontCS;
bool bFontSize;
bool bColor;
bool bVertAlign;
bool bShd;
bool bRStyle;
bool bSpacing;
bool bDStrikeout;
bool bCaps;
bool bSmallCaps;
bool bPosition;
bool bFontHint;
bool bBoldCs;
bool bItalicCs;
bool bFontSizeCs;
bool bCs;
bool bRtl;
bool bLang;
bool bLangBidi;
bool bLangEA;
bool bThemeColor;
bool bVanish;
long CompressText;
bool bDoNotWriteNullProp;
public:
rPr(boost::unordered_map<std::wstring, int>& mapFonts) : m_mapFonts(mapFonts)
{
Reset();
bDoNotWriteNullProp = false;
}
void Reset()
{
Bold = false;
Italic = false;
Underline = false;
Strikeout = false;
DStrikeout = false;
Caps = false;
SmallCaps = false;
bBold = false;
bItalic = false;
bUnderline = false;
bStrikeout = false;
bFontAscii = false;
bFontHAnsi = false;
bFontAE = false;
bFontCS = false;
bFontSize = false;
bColor = false;
bVertAlign = false;
bShd = false;
bRStyle = false;
bSpacing = false;
bDStrikeout = false;
bCaps = false;
bSmallCaps = false;
bPosition = false;
bFontHint = false;
bBoldCs = false;
bItalicCs = false;
bFontSizeCs = false;
bCs = false;
bRtl = false;
bLang = false;
bLangBidi = false;
bLangEA = false;
bThemeColor = false;
ThemeColor.Reset();
bVanish = false;
nHighLight = 0; //not set
Outline.clear();
Fill.clear();
Del.clear();
Ins.clear();
MoveFrom.clear();
MoveTo.clear();
rPrChange.clear();
CompressText = -1; //not set
}
bool IsNoEmpty()
{
return bBold || bItalic || bUnderline || bStrikeout || bFontAscii || bFontHAnsi || bFontAE || bFontCS || bFontSize || bColor || bVertAlign || nHighLight > 0 || bShd ||
bRStyle || bSpacing || bDStrikeout || bCaps || bSmallCaps || bPosition || bFontHint || bBoldCs || bItalicCs || bFontSizeCs || bCs || bRtl || bLang || bLangBidi || bLangEA || bThemeColor || bVanish ||
!Outline.empty() || !Fill.empty() || !Del.empty() || !Ins.empty() || !MoveFrom.empty() || !MoveTo.empty() || !rPrChange.empty() || !FontAsciiTheme.empty() || !FontHAnsiTheme.empty() || !FontAETheme.empty() || !FontCSTheme.empty();
}
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
{
pCStringWriter->WriteString(L"<w:rPr>");
if(bRStyle)
{
pCStringWriter->WriteString(L"<w:rStyle w:val=\"" + RStyle + L"\"/>");
}
if(bFontAscii || bFontHAnsi || bFontAE || bFontCS || bFontHint || !FontAsciiTheme.empty() || !FontHAnsiTheme.empty() || !FontAETheme.empty() || !FontCSTheme.empty())
{
std::wstring sFont = _T("<w:rFonts");
if(bFontAscii)
{
sFont += L" w:ascii=\"" + FontAscii + L"\"";
m_mapFonts[FontAscii] = 1;
}
if(bFontHAnsi)
{
sFont += L" w:hAnsi=\"" + FontHAnsi + L"\"";
m_mapFonts[FontHAnsi] = 1;
}
if(bFontCS)
{
sFont += L" w:cs=\"" + FontCS + L"\"";
m_mapFonts[FontCS] = 1;
}
if(bFontAE)
{
sFont += L" w:eastAsia=\"" + FontAE + L"\"";
m_mapFonts[FontAE] = 1;
}
if(!FontAsciiTheme.empty())
{
sFont += L" w:asciiTheme=\"" + FontAsciiTheme + L"\"";
}
if(!FontHAnsiTheme.empty())
{
sFont += L" w:hAnsiTheme=\"" + FontHAnsiTheme + L"\"";
}
if(!FontAETheme.empty())
{
sFont += L" w:eastAsiaTheme=\"" + FontAETheme + L"\"";
}
if(!FontCSTheme.empty())
{
sFont += L" w:cstheme=\"" + FontCSTheme + L"\"";
}
if(bFontHint)
{
switch(FontHint)
{
case 0: sFont += L" w:hint=\"cs\""; break;
case 2: sFont += L" w:hint=\"eastAsia\""; break;
default:sFont += L" w:hint=\"default\""; break;
}
}
sFont += _T("/>");
pCStringWriter->WriteString(sFont);
}
if (CompressText >= 0 && CompressText <= 600)
{
pCStringWriter->WriteString(L"<w:w w:val=\"" + std::to_wstring(CompressText) + L"\"/>");
}
if(bBold)
{
if(Bold)
pCStringWriter->WriteString(L"<w:b/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:b w:val=\"false\"/>");
}
if(bBoldCs)
{
if(BoldCs)
pCStringWriter->WriteString(L"<w:bCs/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:bCs w:val=\"false\"/>");
}
if(bItalic)
{
if(Italic)
pCStringWriter->WriteString(L"<w:i/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:i w:val=\"false\"/>");
}
if(bItalicCs)
{
if(ItalicCs)
pCStringWriter->WriteString(L"<w:iCs />");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:iCs w:val=\"false\"/>");
}
if(bCaps)
{
if(Caps)
pCStringWriter->WriteString(L"<w:caps/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:caps w:val=\"false\"/>");
}
if(bSmallCaps)
{
if(SmallCaps)
pCStringWriter->WriteString(L"<w:smallCaps/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:smallCaps w:val=\"false\"/>");
}
if(bStrikeout)
{
if(Strikeout)
pCStringWriter->WriteString(L"<w:strike/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:strike w:val=\"false\"/>");
}
if(bDStrikeout)
{
if(DStrikeout)
pCStringWriter->WriteString(L"<w:dstrike/>");
//else if(false == bDoNotWriteNullProp)
// pCStringWriter->WriteString(L"<w:dstrike w:val=\"false\"/>");
}
if(bVanish)
{
if(Vanish)
pCStringWriter->WriteString(L"<w:vanish/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:vanish w:val=\"false\"/>");
}
if(bColor || (bThemeColor && ThemeColor.IsNoEmpty()))
{
std::wstring sColor(L"<w:color");
if(bColor)
sColor += L" w:val=\"" + Color.ToString() + L"\"";
if(bThemeColor && ThemeColor.IsNoEmpty())
{
if(ThemeColor.Auto && !bColor)
sColor += L" w:val=\"auto\"";
if(ThemeColor.bColor)
sColor += L" w:themeColor=\"" + ThemeColor.ToStringColor() + L"\"";
if(ThemeColor.bTint)
sColor += L" w:themeTint=\"" + ThemeColor.ToStringTint() + L"\"";
if(ThemeColor.bShade)
sColor += L" w:themeShade=\"" + ThemeColor.ToStringShade() + L"\"";
}
sColor += L"/>";
pCStringWriter->WriteString(sColor);
}
if(bSpacing)
{
pCStringWriter->WriteString(L"<w:spacing w:val=\"" + std::to_wstring(Spacing) + L"\"/>");
}
if(bPosition)
{
std::wstring sPosition = L"<w:position w:val=\"" + std::to_wstring(Position) + L"\"/>";
pCStringWriter->WriteString(sPosition);
}
if(bFontSize)
{
pCStringWriter->WriteString(L"<w:sz w:val=\"" + std::to_wstring(FontSize) + L"\"/>");
}
if(bFontSizeCs)
{
//if(false == bFontSize) - Sample Doc.docx
// pCStringWriter->WriteString(L"<w:sz w:val=\"" + std::to_wstring(FontSizeCs) + L"\"/>");
pCStringWriter->WriteString(L"<w:szCs w:val=\"" + std::to_wstring(FontSizeCs) + L"\"/>");
}
if(nHighLight > 0)
{
docRGB& H = HighLight;
std::wstring sColor;
if (nHighLight == 1)
sColor = L"none";
else if(0x00 == H.R && 0x00 == H.G && 0x00 == H.B )
sColor = _T("black");
else if(0x00 == H.R && 0x00 == H.G && 0xFF == H.B )
sColor = _T("blue");
else if(0x00 == H.R && 0xFF == H.G && 0xFF == H.B )
sColor = _T("cyan");
else if(0x00 == H.R && 0x00 == H.G && 0x8B == H.B )
sColor = _T("darkBlue");
else if(0x00 == H.R && 0x8B == H.G && 0x8B == H.B )
sColor = _T("darkCyan");
else if(0xA9 == H.R && 0xA9 == H.G && 0xA9 == H.B )
sColor = _T("darkGray");
else if(0x00 == H.R && 0x64 == H.G && 0x00 == H.B )
sColor = _T("darkGreen");
else if(0x80 == H.R && 0x00 == H.G && 0x80 == H.B )
sColor = _T("darkMagenta");
else if(0x8B == H.R && 0x00 == H.G && 0x00 == H.B )
sColor = _T("darkRed");
else if(0x80 == H.R && 0x80 == H.G && 0x00 == H.B )
sColor = _T("darkYellow");
else if(0x00 == H.R && 0xFF == H.G && 0x00 == H.B )
sColor = _T("green");
else if(0xD3 == H.R && 0xD3 == H.G && 0xD3 == H.B )
sColor = _T("lightGray");
else if(0xFF == H.R && 0x00 == H.G && 0xFF == H.B )
sColor = _T("magenta");
else if(0xFF == H.R && 0x00 == H.G && 0x00 == H.B )
sColor = _T("red");
else if(0xFF == H.R && 0xFF == H.G && 0xFF == H.B )
sColor = _T("white");
else if(0xFF == H.R && 0xFF == H.G && 0x00 == H.B )
sColor = _T("yellow");
if(!sColor.empty())
{
pCStringWriter->WriteString(L"<w:highlight w:val=\"" + sColor + L"\"/>");
}
else if(g_nCurFormatVersion < 5)
{
//добавляем как shading
pCStringWriter->WriteString(L"<w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"" + H.ToString() + L"\"/>");
}
}
if(bUnderline)
{
if(Underline)
pCStringWriter->WriteString(L"<w:u w:val=\"single\"/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:u w:val=\"none\"/>");
}
if(bShd)
pCStringWriter->WriteString(Shd);
if(bVertAlign)
{
switch(VertAlign)
{
case vertalign_Baseline:
if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:vertAlign w:val=\"baseline\"/>" );
break;
case vertalign_SuperScript:pCStringWriter->WriteString(L"<w:vertAlign w:val=\"superscript\"/>" );break;
case vertalign_SubScript:pCStringWriter->WriteString(L"<w:vertAlign w:val=\"subscript\"/>" );break;
}
}
if(bRtl)
{
if(Rtl)
pCStringWriter->WriteString(L"<w:rtl/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:rtl w:val=\"false\"/>");
}
if(bCs)
{
if(Cs)
pCStringWriter->WriteString(L"<w:cs/>");
else if(false == bDoNotWriteNullProp)
pCStringWriter->WriteString(L"<w:cs w:val=\"false\"/>");
}
if(bLang || bLangBidi || bLangEA)
{
pCStringWriter->WriteString(L"<w:lang");
if(bLang)
{
pCStringWriter->WriteString(L" w:val=\"" + Lang + L"\"");
}
if(bLangBidi)
{
pCStringWriter->WriteString(L" w:bidi=\"" + LangBidi + L"\"");
}
if(bLangEA)
{
pCStringWriter->WriteString(L" w:eastAsia=\"" + LangEA + L"\"");
}
pCStringWriter->WriteString(L"/>");
}
if (!Outline.empty())
pCStringWriter->WriteString(Outline);
if (!Fill.empty())
pCStringWriter->WriteString(Fill);
if (!Del.empty())
pCStringWriter->WriteString(Del);
if (!Ins.empty())
pCStringWriter->WriteString(Ins);
if (!MoveFrom.empty())
pCStringWriter->WriteString(MoveFrom);
if (!MoveTo.empty())
pCStringWriter->WriteString(MoveTo);
if (!rPrChange.empty())
pCStringWriter->WriteString(rPrChange);
pCStringWriter->WriteString(L"</w:rPr>");
}
};
class docStyle
{
public:
@ -2398,7 +1976,8 @@ public:
}
else
{
sXml += L"<wp:inline xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
sXml += L"<wp:inline \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height) + L"\"/>";
}
@ -2470,15 +2049,19 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
{
sXml += L"<w:drawing>";
}
sXml += L"<wp:anchor xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\"\
distT=\"" + std::to_wstring(emuDistT) +
L"\" distB=\"" + std::to_wstring(emuDistB) +
L"\" distL=\"" + std::to_wstring(emuDistL) +
L"\" distR=\"" + std::to_wstring(emuDistR) +
L"\" simplePos=\"" + std::to_wstring(nSimplePos) +
L"\" relativeHeight=\"" + std::to_wstring(nRelativeHeight) +
L"\" behindDoc=\"" + std::to_wstring(nBehindDoc) +
L"\" locked=\"0\" layoutInCell=\"" + std::to_wstring(nLayoutInCell) + L"\" allowOverlap=\"1\">";
sXml += L"<wp:anchor \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
distT=\"" + std::to_wstring(emuDistT) + L"\" \
distB=\"" + std::to_wstring(emuDistB) + L"\" \
distL=\"" + std::to_wstring(emuDistL) + L"\" \
distR=\"" + std::to_wstring(emuDistR) + L"\" \
simplePos=\"" + std::to_wstring(nSimplePos) + L"\" \
relativeHeight=\"" + std::to_wstring(nRelativeHeight) + L"\" \
behindDoc=\"" + std::to_wstring(nBehindDoc) + L"\" \
locked=\"0\" \
layoutInCell=\"" + std::to_wstring(nLayoutInCell) + L"\" \
allowOverlap=\"1\">";
__int64 emuX = 0;
if(bSimplePosX)
@ -2687,6 +2270,7 @@ public:
std::wstring TableCellSpacing;
std::wstring Caption;
std::wstring Description;
std::wstring Overlap;
bool IsEmpty()
{
return Jc.empty() && TableInd.empty() && TableW.empty() && TableCellMar.empty() && TableBorders.empty() && Shd.empty() && tblpPr.empty()&& Style.empty() && Look.empty() && tblPrChange.empty() && TableCellSpacing.empty() && RowBandSize.empty() && ColBandSize.empty();
@ -2703,7 +2287,9 @@ public:
sRes += (RowBandSize);
if(!ColBandSize.empty())
sRes += (ColBandSize);
if(false == TableW.empty())
if (!Overlap.empty())
sRes += (Overlap);
if(false == TableW.empty())
sRes += (TableW);
if(false == Jc.empty())
sRes += (Jc);
@ -3009,6 +2595,7 @@ public:
}
}
};
class TrackRevision
{
public:
@ -3019,7 +2606,8 @@ public:
long* vMerge;
long* vMergeOrigin;
rPr* RPr;
OOX::Logic::CRunProperty* RPr;
NSStringUtils::CStringBuilder* PPr;
SectPr* sectPr;
CWiterTblPr* tblPr;
@ -3028,36 +2616,8 @@ public:
NSStringUtils::CStringBuilder* tcPr;
NSStringUtils::CStringBuilder* content;
NSStringUtils::CStringBuilder* contentRun;
TrackRevision()
{
Id = NULL;
vMerge = NULL;
vMergeOrigin = NULL;
RPr = NULL;
PPr = NULL;
sectPr = NULL;
tblPr = NULL;
tblGridChange = NULL;
trPr = NULL;
tcPr = NULL;
content = NULL;
contentRun = NULL;
}
~TrackRevision()
{
RELEASEOBJECT(Id);
RELEASEOBJECT(vMerge);
RELEASEOBJECT(vMergeOrigin);
RELEASEOBJECT(RPr);
RELEASEOBJECT(PPr);
RELEASEOBJECT(sectPr);
RELEASEOBJECT(tblPr);
RELEASEOBJECT(tblGridChange);
RELEASEOBJECT(trPr);
RELEASEOBJECT(tcPr);
RELEASEOBJECT(content);
RELEASEOBJECT(contentRun);
}
TrackRevision();
~TrackRevision();
bool IsNoEmpty()
{
return !Author.empty() || !Date.empty() || NULL != Id;
@ -3068,101 +2628,6 @@ public:
Write(&writer, sName);
return writer.GetData();
}
void Write(NSStringUtils::CStringBuilder* pCStringWriter, std::wstring sName)
{
if(IsNoEmpty())
{
pCStringWriter->WriteString(L"<");
pCStringWriter->WriteString(sName);
if(NULL != Id)
{
pCStringWriter->WriteString(L" w:id=\"" + std::to_wstring(*Id) + L"\"");
}
if(!Author.empty())
{
pCStringWriter->WriteString(L" w:author=\"");
pCStringWriter->WriteEncodeXmlString(Author);
pCStringWriter->WriteString(L"\"");
}
if(!Date.empty())
{
pCStringWriter->WriteString(L" w:date=\"");
pCStringWriter->WriteEncodeXmlString(Date);
pCStringWriter->WriteString(L"\"");
}
if(!UserId.empty())
{
pCStringWriter->WriteString(L" oouserid=\"");
pCStringWriter->WriteEncodeXmlString(UserId);
pCStringWriter->WriteString(L"\"");
}
if(NULL != vMerge)
{
pCStringWriter->WriteString(L" w:vMerge=\"" + std::to_wstring(*vMerge) + L"\"");
}
if(NULL != vMergeOrigin)
{
pCStringWriter->WriteString(L" w:vMergeOrig=\"" + std::to_wstring(*vMergeOrigin) + L"\"");
}
if(NULL != RPr || NULL != PPr || NULL != sectPr || NULL != tblPr || NULL != tblGridChange || NULL != trPr || NULL != tcPr || NULL != content|| NULL != contentRun)
{
pCStringWriter->WriteString(L">");
if(NULL != RPr)
{
RPr->Write(pCStringWriter);
}
if(NULL != PPr)
{
pCStringWriter->WriteString(L"<w:pPr>");
pCStringWriter->Write(*PPr);
pCStringWriter->WriteString(L"</w:pPr>");
}
if(NULL != sectPr)
{
pCStringWriter->WriteString(L"<w:sectPr>");
pCStringWriter->WriteString(sectPr->Write());
pCStringWriter->WriteString(L"</w:sectPr>");
}
if(NULL != tblPr)
{
pCStringWriter->WriteString(tblPr->Write());
}
if(NULL != tblGridChange)
{
pCStringWriter->WriteString(L"<w:tblGrid>");
pCStringWriter->Write(*tblGridChange);
pCStringWriter->WriteString(L"</w:tblGrid>");
}
if(NULL != trPr)
{
pCStringWriter->WriteString(L"<w:trPr>");
pCStringWriter->Write(*trPr);
pCStringWriter->WriteString(L"</w:trPr>");
}
if(NULL != tcPr)
{
pCStringWriter->WriteString(L"<w:tcPr>");
pCStringWriter->Write(*tcPr);
pCStringWriter->WriteString(L"</w:tcPr>");
}
if(NULL != content)
{
pCStringWriter->Write(*content);
}
if(NULL != contentRun)
{
pCStringWriter->Write(*contentRun);
}
pCStringWriter->WriteString(L"</");
pCStringWriter->WriteString(sName);
pCStringWriter->WriteString(L" >");
}
else
{
pCStringWriter->WriteString(L" />");
}
}
}
void Write(NSStringUtils::CStringBuilder* pCStringWriter, std::wstring sName);
};
}

File diff suppressed because it is too large Load Diff

View File

@ -60,9 +60,11 @@ public:
void ReadThemeColor(int length, CThemeColor& oCThemeColor);
int ReadThemeColorContent(BYTE type, long length, void* poResult);
template<typename T> int ReadTrackRevision(long length, T* poResult);
template<typename T> int ReadTrackRevision2(long length, T* poResult);
int ReadShdComplexType(BYTE type, long length, void* poResult);
private:
template<typename T> int ReadTrackRevisionInner(BYTE type, long length, T* poResult);
template<typename T> int ReadTrackRevisionInner2(BYTE type, long length, T* poResult);
};
class Binary_HdrFtrTableReader : public Binary_CommonReader
{
@ -85,11 +87,12 @@ class Binary_rPrReader : public Binary_CommonReader
protected:
Binary_CommonReader2 oBinary_CommonReader2;
Writers::FileWriter& m_oFileWriter;
boost::unordered_map<std::wstring, char>& m_mapFonts;
public:
Binary_rPrReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter);
int Read(long stLen, void* poResult);
int ReadContent(BYTE type, long length, void* poResult);
int ReadrPrChange(BYTE type, long length, void* poResult);
int ReadrPrChange2(BYTE type, long length, void* poResult);
};
class Binary_pPrReader : public Binary_CommonReader
{
@ -283,8 +286,8 @@ private:
Binary_rPrReader oBinary_rPrReader;
Binary_tblPrReader oBinary_tblPrReader;
NSStringUtils::CStringBuilder* m_pCurWriter;
rPr m_oCur_rPr;
rPr m_oMath_rPr;
OOX::Logic::CRunProperty m_oCur_rPr;
OOX::Logic::CRunProperty m_oMath_rPr;
NSStringUtils::CStringBuilder m_oCur_pPr;
BYTE m_byteLastElemType;
public:

File diff suppressed because one or more lines are too long

View File

@ -43,11 +43,11 @@ namespace Writers
class FontTableWriter
{
NSStringUtils::CStringBuilder m_oWriter;
std::wstring m_sDir;
NSFonts::IApplicationFonts* m_pApplicationFonts;
NSFonts::IFontManager* m_pFontManager;
std::wstring m_sDir;
NSFonts::IApplicationFonts* m_pApplicationFonts;
NSFonts::IFontManager* m_pFontManager;
public:
boost::unordered_map<std::wstring, int> m_mapFonts;
boost::unordered_map<std::wstring, char> m_mapFonts;
FontTableWriter(std::wstring sDir, std::wstring sFontDir, bool bNoFontDir) : m_sDir(sDir)
{
@ -72,11 +72,11 @@ namespace Writers
{
m_oWriter.WriteString(g_string_ft_Start);
//Те шрифты которые всегда пишем в FontTable
//Те шрифты которые всегда пишем в FontTable
bool bCalibri = false;
bool bTimes = false;
bool bCambria = false;
for (boost::unordered_map<std::wstring, int>::const_iterator it = m_mapFonts.begin(); it != m_mapFonts.end(); ++it)
for (boost::unordered_map<std::wstring, char>::const_iterator it = m_mapFonts.begin(); it != m_mapFonts.end(); ++it)
{
const std::wstring& sFontName = it->first;
if(_T("Calibri") == sFontName)

View File

@ -304,7 +304,8 @@ extern int g_nCurFormatVersion;
tblCaption = 17,
tblDescription = 18,
TableIndTwips = 19,
TableCellSpacingTwips = 20
TableCellSpacingTwips = 20,
tblOverlap = 21
};}
namespace c_oSer_tblpPrType{enum c_oSer_tblpPrType
{
@ -417,7 +418,18 @@ extern int g_nCurFormatVersion;
FontHAnsiTheme = 41,
FontAETheme = 42,
FontCSTheme = 43,
CompressText = 44
CompressText = 44,
SnapToGrid = 45,
Ligatures = 46,
NumSpacing = 47,
NumForm = 48,
StylisticSets = 49,
CntxtAlts = 50,
ShadowExt = 51,
Reflection = 52,
Glow = 53,
Props3d = 54,
Scene3d = 55
};}
namespace c_oSerProp_rowPrType{enum c_oSerProp_rowPrType
{
@ -597,7 +609,10 @@ extern int g_nCurFormatVersion;
arPr = 28,
fldChar = 29,
instrText = 30,
delInstrText = 31
delInstrText = 31,
linebreakClearAll = 32,
linebreakClearLeft = 33,
linebreakClearRight = 34
};}
namespace c_oSerVbaProjectTypes{enum c_oSerVbaProjectType
{
@ -1157,7 +1172,8 @@ extern int g_nCurFormatVersion;
Custom = 0,
ItemId = 1,
Uri = 2,
Content = 3
Content = 3,
ContentA = 4
};}
namespace c_oSerApp{enum c_oSerApp
{
@ -1247,7 +1263,8 @@ extern int g_nCurFormatVersion;
PictureFormPrShiftX = 64,
PictureFormPrShiftY = 65,
FormPrBorder = 70,
FormPrShd = 71
FormPrShd = 71,
TextFormPrCombWRule = 72
};}
namespace c_oSerFFData{enum c_oSerFFData
{

View File

@ -309,13 +309,14 @@ void BinaryCommonWriter::WriteShd(const ComplexTypes::Word::CShading& Shd)
if (false != Shd.m_oColor.IsInit())
WriteColor(c_oSerShdType::Color, Shd.m_oColor.get());
WriteThemeColor(c_oSerShdType::ColorTheme, Shd.m_oFill, Shd.m_oThemeFill, Shd.m_oThemeFillTint, Shd.m_oThemeFillShade);
WriteThemeColor(c_oSerShdType::ColorTheme, Shd.m_oColor, Shd.m_oThemeColor, Shd.m_oThemeTint, Shd.m_oThemeShade);
//Fill
if (false != Shd.m_oFill.IsInit())
WriteColor(c_oSerShdType::Fill, Shd.m_oFill.get());
WriteThemeColor(c_oSerShdType::FillTheme, Shd.m_oColor, Shd.m_oThemeColor, Shd.m_oThemeTint, Shd.m_oThemeShade);
WriteThemeColor(c_oSerShdType::FillTheme, Shd.m_oFill, Shd.m_oThemeFill, Shd.m_oThemeFillTint, Shd.m_oThemeFillShade);
}
void BinaryCommonWriter::WritePaddings(const nullable<SimpleTypes::CTwipsMeasure>& left, const nullable<SimpleTypes::CTwipsMeasure>& top,
const nullable<SimpleTypes::CTwipsMeasure>& right, const nullable<SimpleTypes::CTwipsMeasure>& bottom)
@ -511,7 +512,7 @@ void Binary_rPrWriter::Write_rPr(OOX::Logic::CRunProperty* rPr)
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Underline);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBOOL(SimpleTypes::underlineNone != oU.m_oVal.get().GetValue());
m_oBcw.m_oStream.WriteBYTE(oU.m_oVal.get().GetValue());
}
}
//Strikeout
@ -742,13 +743,13 @@ void Binary_rPrWriter::Write_rPr(OOX::Logic::CRunProperty* rPr)
}
}
//Vanish
if (false != rPr->m_oVanish.IsInit())
if (rPr->m_oVanish.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Vanish);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBOOL(rPr->m_oVanish->m_oVal.ToBool());
}
if (false != rPr->m_oTextOutline.IsInit())
if (rPr->m_oTextOutline.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::TextOutline);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
@ -812,6 +813,81 @@ void Binary_rPrWriter::Write_rPr(OOX::Logic::CRunProperty* rPr)
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLONG(rPr->m_oW->m_oVal->GetValue());
}
if (rPr->m_oSnapToGrid.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::SnapToGrid);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBOOL(rPr->m_oSnapToGrid->m_oVal.ToBool());
}
if (rPr->m_oLigatures.IsInit() && rPr->m_oLigatures->m_oVal.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Ligatures);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBYTE((BYTE)rPr->m_oLigatures->m_oVal->GetValue());
}
if (rPr->m_oNumSpacing.IsInit() && rPr->m_oNumSpacing->m_oVal.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::NumSpacing);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBYTE((BYTE)rPr->m_oNumSpacing->m_oVal->GetValue());
}
if (rPr->m_oNumForm.IsInit() && rPr->m_oNumForm->m_oVal.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::NumForm);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBYTE((BYTE)rPr->m_oNumForm->m_oVal->GetValue());
}
if (rPr->m_oCntxtAlts.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::CntxtAlts);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBOOL(rPr->m_oCntxtAlts->m_oVal.ToBool());
}
if (rPr->m_oShadowExt.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::ShadowExt);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
m_oBcw.m_oStream.WriteRecord1(0, *rPr->m_oShadowExt);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if (rPr->m_oReflection.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Reflection);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
m_oBcw.m_oStream.WriteRecord1(0, *rPr->m_oReflection);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if (rPr->m_oGlow.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Glow);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
m_oBcw.m_oStream.WriteRecord1(0, *rPr->m_oGlow);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if (rPr->m_oProps3d.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Props3d);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
m_oBcw.m_oStream.WriteRecord1(0, *rPr->m_oProps3d);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
if (rPr->m_oScene3d.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Scene3d);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
m_oBcw.m_oStream.WriteRecord1(0, *rPr->m_oScene3d);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
void Binary_rPrWriter::Write_rPrChange(const OOX::Logic::CRPrChange& rPrChange)
{
@ -1936,6 +2012,12 @@ void Binary_tblPrWriter::WriteTblPr(OOX::Logic::CTableProperty* p_tblPr)
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_tblPrType::tblDescription);
m_oBcw.m_oStream.WriteStringW(tblPr.m_oTblDescription->ToString2());
}
if (tblPr.m_oTblOverlap.IsInit() && tblPr.m_oTblOverlap->m_oVal.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::tblOverlap);
m_oBcw.m_oStream.WriteBYTE((BYTE)tblPr.m_oTblOverlap->m_oVal->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void Binary_tblPrWriter::WriteTblMar(const OOX::Logic::CTblCellMar& cellMar)
{
@ -6051,7 +6133,17 @@ void BinaryDocumentTableWriter::WriteRunContent(std::vector<OOX::WritingElement*
{
case SimpleTypes::brtypeColumn: nBreakType = c_oSerRunType::columnbreak; break;
case SimpleTypes::brtypePage: nBreakType = c_oSerRunType::pagebreak; break;
case SimpleTypes::brtypeTextWrapping: nBreakType = c_oSerRunType::linebreak; break;
case SimpleTypes::brtypeTextWrapping:
{
switch (pBr->m_oClear.GetValue())
{
case SimpleTypes::brclearAll: nBreakType = c_oSerRunType::linebreakClearAll; break;
case SimpleTypes::brclearLeft: nBreakType = c_oSerRunType::linebreakClearLeft; break;
case SimpleTypes::brclearRight: nBreakType = c_oSerRunType::linebreakClearRight; break;
default: nBreakType = c_oSerRunType::linebreak; break;
}
}break;
default:
break;
}
@ -6059,9 +6151,8 @@ void BinaryDocumentTableWriter::WriteRunContent(std::vector<OOX::WritingElement*
{
m_oBcw.m_oStream.WriteBYTE(nBreakType);
m_oBcw.m_oStream.WriteLONG(c_oSerPropLenType::Null);
}
break;
}
}
}break;
case OOX::et_w_cr:
{
m_oBcw.m_oStream.WriteBYTE(c_oSerRunType::cr);
@ -7956,6 +8047,12 @@ void BinaryDocumentTableWriter::WriteSdtTextFormPrComb(const ComplexTypes::Word:
m_oBcw.m_oStream.WriteStringW3(oComb.m_oFont.get());
m_oBcw.WriteItemEnd(nCurPos);
}
if (oComb.m_oWRule.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TextFormPrCombWRule);
m_oBcw.m_oStream.WriteBYTE(oComb.m_oWRule->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
}
@ -8567,7 +8664,7 @@ void BinarySettingsTableWriter::WriteMathPr(const OOX::Logic::CMathPr &pMathPr)
}
void BinarySettingsTableWriter::WriteColorSchemeMapping(const PPTX::Logic::ClrMap& oColorSchemeMapping)
{
int re_index[] = {0, 1, 2, 3, 4, 5, 10, 11, 6, 7, 8, 9, 10, 11, 10, 6, 7};
int re_index[] = {0, 1, 2, 3, 4, 5, 10, 11, 6, 7, 9, 8, 10, 11, 10, 6, 7};
int nCurPos = 0;
@ -9051,11 +9148,8 @@ void BinaryCustomsTableWriter::Write(OOX::CDocument* pDocument)
}
}
int nCurPos2 = m_oBcw.WriteItemStart(c_oSerCustoms::Content);
std::wstring sXml = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pCustomXml->m_sXmlA.c_str(), pCustomXml->m_sXmlA.length());
m_oBcw.m_oStream.WriteStringW3(sXml);
int nCurPos2 = m_oBcw.WriteItemStart(c_oSerCustoms::ContentA);
m_oBcw.m_oStream.WriteStringA(pCustomXml->m_sXmlA);
m_oBcw.WriteItemEnd(nCurPos2);
m_oBcw.WriteItemEnd(nCurPos);
@ -9310,6 +9404,9 @@ void BinaryFileWriter::intoBindoc(const std::wstring& sDir)
m_oBcw.m_oStream.EndRecord();
this->WriteTableEnd(nCurPos);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}

View File

@ -578,40 +578,51 @@ namespace BinXlsxRW{
//SharedStrings
if(pCell->m_oValue.IsInit())
{
pCell->m_oType.Init();
const std::wstring& val = pCell->m_oValue->m_sText;
if(L"TRUE" == val || L"FALSE" == val)
if (pCell->m_oType.IsInit())
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
if(L"TRUE" == val)
if (pCell->m_oType->GetValue() == SimpleTypes::Spreadsheet::celltypeSharedString)
{
pCell->m_oValue->m_sText = L"1";
aSharedStrings.push_back(pCell->m_oValue->m_sText);
pCell->m_oValue->m_sText = std::to_wstring(aSharedStrings.size() - 1);
}
else
{
pCell->m_oValue->m_sText = L"0";
}
}
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
pCell->m_oValue->m_sText = val;
}
else
{
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (0 != *pEndPtr)
pCell->m_oType.Init();
const std::wstring& val = pCell->m_oValue->m_sText;
if(L"TRUE" == val || L"FALSE" == val)
{
// Не число
aSharedStrings.push_back(val);
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
if(L"TRUE" == val)
{
pCell->m_oValue->m_sText = L"1";
}
else
{
pCell->m_oValue->m_sText = L"0";
}
}
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
pCell->m_oValue->m_sText = val;
}
else
{
pCell->m_oValue->m_sText = val;
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (0 != *pEndPtr)
{
// Не число
aSharedStrings.push_back(val);
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
}
else
{
pCell->m_oValue->m_sText = val;
}
}
}
}
@ -620,7 +631,7 @@ namespace BinXlsxRW{
pWorksheet->m_oSheetData->m_arrItems.push_back(pRow);
}
}
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL)
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL, bool bAlwaysSharedString)
{
std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*>::const_iterator itSheets = m_mapSheets.find(sheet);
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>* rows = NULL;
@ -649,6 +660,12 @@ namespace BinXlsxRW{
if(cells->find(nCol) == cells->end())
{
OOX::Spreadsheet::CCell* pNewCell = parseCreateCell(nRow, nCol, val, format);
if (bAlwaysSharedString)
{
pNewCell->m_oType.Init();
pNewCell->m_oType->SetValue(SimpleTypes::Spreadsheet::ECellTypeType::celltypeSharedString);
}
cells->insert(std::make_pair(nCol, pNewCell));
}
}
@ -707,14 +724,14 @@ namespace BinXlsxRW{
{
if(nCol1 > 1)
{
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL);
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL, true);
}
}
else
{
if(nRow1 > 1)
{
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL);
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL, true);
}
}
}
@ -751,7 +768,7 @@ namespace BinXlsxRW{
nRow = nRow1 + *val->m_idx;
nCol = nCol1;
}
parseCell(sheetFrom, nRow, nCol, *val->m_v);
parseCell(sheetFrom, nRow, nCol, *val->m_v, NULL, true);
}
}
}

View File

@ -80,7 +80,7 @@ namespace BinXlsxRW {
OOX::Spreadsheet::CWorksheet* toXlsxGetSheet(std::vector<OOX::Spreadsheet::CWorksheet*>& arWorksheets, std::map<std::wstring, OOX::Spreadsheet::CWorksheet*>& mapWorksheets, const std::wstring& sName);
void toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings);
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format, bool bAlwaysSharedString = false);
OOX::Spreadsheet::CCell* parseCreateCell(const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
void parseStrRef(const OOX::Spreadsheet::CT_StrRef* pStrRef, bool bUpdateRange, const wchar_t* cRangeName);
void parseNumRef(const OOX::Spreadsheet::CT_NumRef* pNumRef, bool bUpdateRange, const wchar_t* cRangeName);

View File

@ -14,6 +14,10 @@ include(../../Common/base.pri)
#BOOST
include($$PWD/../../Common/3dParty/boost/boost.pri)
INCLUDEPATH += ../../ASCOfficeXlsFile2/source/XlsFormat
INCLUDEPATH += ../../ASCOfficeXlsFile2/source/Common
INCLUDEPATH += ../../Common/DocxFormat/Source/XlsbFormat
DEFINES += UNICODE \
_UNICODE \
SOLUTION_ASCOFFICEDOCXFILE2 \
@ -37,6 +41,7 @@ SOURCES += \
../../XlsxSerializerCom/Writer/CSVWriter.cpp \
../../OfficeCryptReader/source/ECMACryptFile.cpp \
../../OfficeCryptReader/source/CryptTransform.cpp \
../BinReader/ReaderClasses.cpp \
../BinReader/Readers.cpp \
../BinReader/CustomXmlWriter.cpp \
../BinReader/FileWriter.cpp

View File

@ -70,8 +70,8 @@
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
<IncludePath>../../Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>../../Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>

View File

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Common\OfficeFileFormatChecker.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Common\OfficeFileFormatChecker2.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\3dParty\pole\pole.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="OdfFileTest.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Common\OfficeFileFormatChecker.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Common\OfficeFileFormatChecker2.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\3dParty\pole\pole.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="OdfFileTest.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -52,11 +52,11 @@ public:
std::wstring convert(std::wstring const & expr);
// $Лист1.$A$1 -> Лист1!$A$1
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ");
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ", bool bAbsoluteAlways = false);
std::wstring get_table_name();
//a-la convert without check formula
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true);
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true, bool bAbsoluteAlways = false);
//Sheet2.C3:Sheet2.C19 -> Sheet2!C3:C19
std::wstring convert_chart_distance(std::wstring const & expr);

View File

@ -36,6 +36,7 @@
#include"../../Common/DocxFormat/Source/XML/Utils.h"
#include "../src/docx/xlsxconversioncontext.h"
#include "../src/docx/xlsx_utils.h"
namespace cpdoccore {
namespace formulasconvert {
@ -52,30 +53,43 @@ namespace formulasconvert {
void split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out);
void replace_cells_range(std::wstring& expr, bool withTableName);
void replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways = false);
bool check_formula(std::wstring& expr);
void replace_semicolons(std::wstring& expr);
void replace_tilda(std::wstring& expr);
void replace_vertical(std::wstring& expr);
void replace_space(std::wstring& expr);
void replace_apersand(std::wstring& expr);
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator);
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName);
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways);
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways);
static std::wstring replace_named_ref_formater(boost::wsmatch const & what);
static std::wstring replace_named_ref_formater1(boost::wsmatch const & what);
//static std::wstring replace_cell_range_formater(boost::wsmatch const & what);
void replace_named_formula(std::wstring & expr, bool w = true);
void replace_named_ref(std::wstring & expr, bool w = true);
void replace_named_ref(std::wstring & expr, bool withTable = true, bool bAbsoluteAlways = false);
bool find_first_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref);
bool find_first_last_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref_first,std::wstring & ref_last);
static bool convert_with_TableName;
static std::wstring table_name_;
static bool convert_with_absolute;
static bool convert_with_TableName;
static std::wstring table_name_;
//-------------------------------------------------------------------------------------------------------------
static std::wstring replace_apersand_formater(boost::wsmatch const & what)
{
if (what[1].matched)
return L"&amp;";
else if (what[2].matched)
return what[2].str();
else if (what[3].matched)
return what[3].str();
else
return L"";
}
static std::wstring replace_semicolons_formater(boost::wsmatch const & what)
{
if (what[1].matched)
@ -128,6 +142,7 @@ namespace formulasconvert {
XmlUtils::replace_all( expr, L"PROBEL", L" ");
//XmlUtils::replace_all( expr, L"APOSTROF", L"'");
//XmlUtils::replace_all( expr, L"KAVYCHKA", L"\"");
XmlUtils::replace_all(expr, L"APERSAND", L"&");
}
static void replace_tmp(std::wstring &expr)
{
@ -172,6 +187,10 @@ namespace formulasconvert {
{
result += L"PROBEL";
}break;
case '&':
{
result += L"APERSAND";
}break;
default:
{
result += expr[pos];
@ -242,6 +261,7 @@ namespace formulasconvert {
};
bool odf2oox_converter::Impl::convert_with_TableName = true;
std::wstring odf2oox_converter::Impl::table_name_ = L"";
bool odf2oox_converter::Impl::convert_with_absolute = false;
std::unordered_map<std::wstring, int> &odf2oox_converter::Impl::mapExternalLink_ = oox::xlsx_conversion_context::mapExternalLink_;
@ -347,7 +367,6 @@ namespace formulasconvert {
std::wstring ref2 = sz == 7 ? what[6].str() : what[5].str();
XmlUtils::replace_all( sheet1, L"$", L"");
//XmlUtils::replace_all( sheet2, L"$", L"");
std::wstring result;
@ -381,6 +400,20 @@ namespace formulasconvert {
}
table_name_ = sheet1;
if (convert_with_absolute)
{
size_t col = 0, row = 0;
oox::getCellAddressInv(ref1, col, row);
ref1 = oox::getCellAddress(col, row, true);
if (false == ref2.empty())
{
oox::getCellAddressInv(ref2, col, row);
ref2 = oox::getCellAddress(col, row, true);
}
}
if (convert_with_TableName)
{
@ -413,13 +446,14 @@ namespace formulasconvert {
// [Sheet2.A1:B5] -> Sheet2!A1:B5
// [Sheet2.A1] -> Sheet2!A1
// [$'Sheet2 A'.$B2] -> 'Sheet2 A'!$B2
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName)
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
{
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
convert_with_TableName = withTableName;
convert_with_absolute = bAbsoluteAlways;
//boost::wregex complexRef(L"\\[(?:\'([^\']*)\'#){0,1}\\[{0,1}(?:\\$){0,1}([^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::(\\${0,1}[^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
boost::wregex complexRef(L"(?:(?:(?:(?:\\[\'([^\']*)\'#)|(?:\'([^\']*)\'#\\[)))|(?:\\[))\
@ -432,13 +466,14 @@ namespace formulasconvert {
&replace_named_ref_formater,
boost::match_default | boost::format_all);
}
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName)
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName, bool bAbsoluteAlways)
{
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
convert_with_TableName = withTableName;
convert_with_absolute = bAbsoluteAlways;
//boost::wregex complexRef(L"\\${0,1}([^\\.]+?){0,1}\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)(?::\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)){0,1}");
boost::wregex complexRef(L"\\[{0,1}(?:\'([^\']*)\'#){0,1}\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
@ -495,6 +530,17 @@ namespace formulasconvert {
expr = res;
}
void odf2oox_converter::Impl::replace_apersand(std::wstring& expr)
{
const std::wstring res = boost::regex_replace(
expr,
//boost::wregex(L"(;)|(?:\".*?\")|(?:'.*?')"),
boost::wregex(L"(&)|(\".*?\")|('.*?')"),
&replace_apersand_formater,
boost::match_default | boost::format_all);
expr = res;
}
// заменить вертикальную черту во всех вхождениях в фигурных скобках, но не внутри строк
void odf2oox_converter::Impl::replace_vertical(std::wstring& expr)
{
@ -531,7 +577,8 @@ namespace formulasconvert {
replace_semicolons (workstr);
replace_tilda (workstr);
replace_vertical (workstr);
replace_apersand (workstr);
if (isFormula)
{
XmlUtils::replace_all( workstr, L"FDIST(", L"_xlfn.F.DIST(");
@ -585,8 +632,6 @@ namespace formulasconvert {
boost::wregex(L"('.*?')|(\".*?\")"),
&convert_scobci, boost::match_default | boost::format_all);
//распарсить по диапазонам - одф-пробел, ик-эль-запятая
std::vector<std::wstring> distance_inp;
std::vector<std::wstring> distance_out;
@ -603,11 +648,18 @@ namespace formulasconvert {
for (size_t j = 0; j < range.size(); j++)
{
const std::string::size_type colon = range[j].find('.');
cells.push_back(range[j].substr(colon + 1));
if (sheet.size() < 1)
if (colon != std::wstring::npos)
{
sheet = range[j].substr(0, colon);
cells.push_back(range[j].substr(colon + 1));
if (sheet.empty())
{
sheet = range[j].substr(0, colon);
}
}
else
cells.push_back(range[j]);
}
std::wstring cells_out;
for (size_t j = 0; j < cells.size(); j++)
@ -621,7 +673,7 @@ namespace formulasconvert {
sheet = L"'" + sheet + L"'";
}
distance_out.push_back(sheet + L"!" + cells_out.substr(0, cells_out.size()-1));
distance_out.push_back((sheet.empty() ? L"" : (sheet + L"!")) + cells_out.substr(0, cells_out.size() - 1));
}
std::wstring result;
@ -634,7 +686,7 @@ namespace formulasconvert {
return result.substr(0, result.size() - 1);// минус последняя лишняя запятая
}
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
{
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там
@ -645,7 +697,7 @@ namespace formulasconvert {
boost::wregex(L"('.*?')|(\".*?\")"),
&convert_scobci, boost::match_default | boost::format_all);
replace_named_ref(workstr, withTableName);
replace_named_ref(workstr, withTableName, bAbsoluteAlways);
if (separator != L" ")
{
@ -660,7 +712,7 @@ namespace formulasconvert {
}
return workstr;
}
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName)
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
{
std::wstring workstr = expr;
@ -679,7 +731,7 @@ namespace formulasconvert {
&convert_scobci, boost::match_default | boost::format_all);
replace_cells_range(workstr, withTableName);
replace_cells_range(workstr, withTableName, bAbsoluteAlways);
replace_semicolons(workstr);
replace_vertical(workstr);
@ -726,13 +778,13 @@ namespace formulasconvert {
{
return impl_->split_distance_by(expr, by, out);
}
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
{
return impl_->convert_named_ref(expr, withTableName, separator);
return impl_->convert_named_ref(expr, withTableName, separator, bAbsoluteAlways);
}
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName)
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
{
return impl_->convert_named_expr(expr, withTableName);
return impl_->convert_named_expr(expr, withTableName, bAbsoluteAlways);
}
std::wstring odf2oox_converter::convert_ref(std::wstring const & expr)

View File

@ -34,6 +34,7 @@
#include <string>
#include "../CPSharedPtr.h"
#include "../xml/nodetype.h"
namespace cpdoccore {

View File

@ -32,7 +32,7 @@
#pragma once
#include "../CPOptional.h"
#include "logging.h"
#include "../logging.h"
namespace cpdoccore {
namespace common {

View File

@ -116,6 +116,7 @@ enum ElementType
typeDcDescription,
typeDcSubject,
typeDcTitle,
typeDcLanguage,
typeDrawA,
@ -449,6 +450,9 @@ enum ElementType
typeOfficeMetaKeyword,
typeOfficeMetaEditingCycles,
typeOfficeMetaEditingDuration,
typeOfficeMetaCommon,
typeOfficeMetaInitialCreator,
typeOfficeMetaTemplate,
typeDrawBase,
typeDrawG,

View File

@ -1,327 +1,330 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <string>
#include <iostream>
#include <sstream>
#include <stack>
#include <cassert>
namespace cpdoccore
{
namespace xml
{
namespace writer
{
template <class T> struct chars { };
template <>
struct chars<char>
{
static const char eq = '=';
static const char quote = '\"';
static const char space = ' ';
static const char left_brocket = '<';
static const char right_brocket = '>';
static const char slash = '/';
static const char colon = ':';
static const char amp = '&';
static const char apos = '\'';
static const char * cdata_open() { return "<![CDATA["; }
static const char * cdata_close() { return "]]>"; }
static const char * amp_str(){ return "&amp;"; }
static const char * left_brocket_str() { return "&lt;"; }
static const char * right_brocket_str() { return "&gt;"; }
static const char * apos_str() { return "&apos;"; }
static const char * quote_str() { return "&quot;"; }
};
template <>
struct chars<wchar_t>
{
static const wchar_t eq = L'=';
static const wchar_t quote = L'\"';
static const wchar_t space = L' ';
static const wchar_t left_brocket = L'<';
static const wchar_t right_brocket = L'>';
static const wchar_t slash = L'/';
static const wchar_t colon = L':';
static const wchar_t amp = L'&';
static const wchar_t apos = L'\'';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t * cdata_close() { return L"]]>"; }
static const wchar_t * amp_str(){ return L"&amp;"; }
static const wchar_t * left_brocket_str() { return L"&lt;"; }
static const wchar_t * right_brocket_str() { return L"&gt;"; }
static const wchar_t * apos_str() { return L"&apos;"; }
static const wchar_t * quote_str() { return L"&quot;"; }
};
template <class V>
class element;
//
// xml::writer class
//
template <class T>
class writer
{
public:
// writer must be bound to an ostream
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
~writer(void) { assert(elements_.empty()); }
private:
size_t level_;
std::basic_ostream<T>& os_; // output stream
bool need_header_; // have we written an XML header yet?
std::stack<element<T>*> elements_; // stack of open element tags
// write XML header, if necessary
writer& header()
{
if (need_header_)
{
// TODO
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
need_header_ = false;
}
return *this;
}
// write a single character to the output stream
writer& putc(T c)
{
os_.put(c);
return *this;
}
// write a string to the output stream
writer& puts(const T* str) {
os_ << str;
return *this;
}
template <class V>
friend class element;
};
//
// xml::element class
//
template <class T>
class element
{
public:
// create a new element tag, bound to an xml::writer
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
{
wr_.level_++;
check_parent();
wr_.header().putc('<').puts(name_.c_str());
tagopen_ = true;
wr_.elements_.push(this);
}
// close the current element tag
~element()
{
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
{
wr_.elements_.pop();
if (tagopen_)
wr_.putc(chars<T>::slash)
.putc(chars<T>::right_brocket);
else
wr_.putc(chars<T>::left_brocket)
.putc(chars<T>::slash)
.puts(name_.c_str())
.putc(chars<T>::right_brocket);
}
wr_.level_--;
}
// write an attribute for the current element
element& attr(const T* name, const T* value)
{
assert(name != 0);
assert(value != 0);
assert(tagopen_);
wr_.putc(chars<T>::space)
.puts(name)
.putc(chars<T>::eq)
.putc(chars<T>::quote);
qputs(value);
wr_.putc(chars<T>::quote);
return *this;
}
// attr() overload for std::string type
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
{
return attr(name, value.c_str());
}
// attr() function template for all streamable types
template <class V>
element& attr(const T* name, V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
attr(name, ss.str());
return *this;
}
// write text content for the current element
element& contents(const T* str)
{
assert(str != 0);
check_parent();
qputs(str);
return *this;
}
// contents() overload for std::string type
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return contents(str.c_str());
}
// contents() function template for all streamable types
template <class V>
element& contents(V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
contents(ss.str());
return *this;
}
std::basic_ostream<T>& stream()
{
check_parent();
return wr_.os_;
}
// write CDATA section
element& cdata(const T * str)
{
assert(str != 0);
check_parent();
wr_.puts(chars<T>::cdata_open());
wr_.puts(str);
wr_.puts(chars<T>::cdata_close());
return *this;
}
// cdata() overload for std::string type
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return cdata(str.c_str());
}
private:
writer<T>& wr_; // bound XML writer
//const T* name_; // name of current element
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
bool tagopen_; // is the element tag for this element still open?
// write a string quoting characters which have meaning in xml
element& qputs(const T* str)
{
for (; *str; ++str)
{
switch (*str)
{
case chars<T>::amp:
wr_.puts(chars<T>::amp_str()); break;
case chars<T>::left_brocket:
wr_.puts(chars<T>::left_brocket_str()); break;
case chars<T>::right_brocket:
wr_.puts(chars<T>::right_brocket_str()); break;
case chars<T>::apos:
wr_.puts(chars<T>::apos_str()); break;
case chars<T>::quote:
wr_.puts(chars<T>::quote_str()); break;
default:
wr_.putc(*str); break;
}
}
return *this;
}
// check to see if we have a parent tag which needs to be closed
void check_parent()
{
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
{
wr_.putc(chars<T>::right_brocket);
wr_.elements_.top()->tagopen_ = false;
}
}
};
}
}
typedef xml::writer::writer<wchar_t> xml_writer;
typedef xml::writer::element<wchar_t> xml_element;
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
#define CP_XML_STREAM() _xml_node_.stream()
#define CP_GET_XML_NODE() _xml_node_
#define CP_ATTR_NODE xml_element & _xml_node_
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
}
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <string>
#include <iostream>
#include <sstream>
#include <stack>
#include <cassert>
namespace cpdoccore
{
namespace xml
{
namespace writer
{
template <class T> struct chars { };
template <>
struct chars<char>
{
static const char eq = '=';
static const char quote = '\"';
static const char space = ' ';
static const char left_brocket = '<';
static const char right_brocket = '>';
static const char slash = '/';
static const char colon = ':';
static const char amp = '&';
static const char apos = '\'';
static const char * cdata_open() { return "<![CDATA["; }
static const char * cdata_close() { return "]]>"; }
static const char * amp_str(){ return "&amp;"; }
static const char * left_brocket_str() { return "&lt;"; }
static const char * right_brocket_str() { return "&gt;"; }
static const char * apos_str() { return "&apos;"; }
static const char * quote_str() { return "&quot;"; }
};
template <>
struct chars<wchar_t>
{
static const wchar_t eq = L'=';
static const wchar_t quote = L'\"';
static const wchar_t space = L' ';
static const wchar_t left_brocket = L'<';
static const wchar_t right_brocket = L'>';
static const wchar_t slash = L'/';
static const wchar_t colon = L':';
static const wchar_t amp = L'&';
static const wchar_t apos = L'\'';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t * cdata_close() { return L"]]>"; }
static const wchar_t * amp_str(){ return L"&"/* L"&amp;"*/; }
static const wchar_t * left_brocket_str() { return L"&lt;"; }
static const wchar_t * right_brocket_str() { return L"&gt;"; }
static const wchar_t * apos_str() { return L"&apos;"; }
static const wchar_t * quote_str() { return L"&quot;"; }
};
template <class V>
class element;
//
// xml::writer class
//
template <class T>
class writer
{
public:
// writer must be bound to an ostream
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
~writer(void) { assert(elements_.empty()); }
private:
size_t level_;
std::basic_ostream<T>& os_; // output stream
bool need_header_; // have we written an XML header yet?
std::stack<element<T>*> elements_; // stack of open element tags
// write XML header, if necessary
writer& header()
{
if (need_header_)
{
// TODO
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
need_header_ = false;
}
return *this;
}
// write a single character to the output stream
writer& putc(T c)
{
os_.put(c);
return *this;
}
// write a string to the output stream
writer& puts(const T* str) {
os_ << str;
return *this;
}
template <class V>
friend class element;
};
//
// xml::element class
//
template <class T>
class element
{
public:
// create a new element tag, bound to an xml::writer
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
{
wr_.level_++;
check_parent();
wr_.header().putc('<').puts(name_.c_str());
tagopen_ = true;
wr_.elements_.push(this);
}
// close the current element tag
~element()
{
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
{
wr_.elements_.pop();
if (tagopen_)
wr_.putc(chars<T>::slash)
.putc(chars<T>::right_brocket);
else
wr_.putc(chars<T>::left_brocket)
.putc(chars<T>::slash)
.puts(name_.c_str())
.putc(chars<T>::right_brocket);
}
wr_.level_--;
}
// write an attribute for the current element
element& attr(const T* name, const T* value)
{
assert(name != 0);
assert(value != 0);
assert(tagopen_);
wr_.putc(chars<T>::space)
.puts(name)
.putc(chars<T>::eq)
.putc(chars<T>::quote);
qputs(value);
wr_.putc(chars<T>::quote);
return *this;
}
// attr() overload for std::string type
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
{
return attr(name, value.c_str());
}
// attr() function template for all streamable types
template <class V>
element& attr(const T* name, V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
attr(name, ss.str());
return *this;
}
// write text content for the current element
element& contents(const T* str)
{
assert(str != 0);
check_parent();
qputs(str);
return *this;
}
// contents() overload for std::string type
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return contents(str.c_str());
}
// contents() function template for all streamable types
template <class V>
element& contents(V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
contents(ss.str());
return *this;
}
std::basic_ostream<T>& stream()
{
check_parent();
return wr_.os_;
}
// write CDATA section
element& cdata(const T * str)
{
assert(str != 0);
check_parent();
wr_.puts(chars<T>::cdata_open());
wr_.puts(str);
wr_.puts(chars<T>::cdata_close());
return *this;
}
// cdata() overload for std::string type
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return cdata(str.c_str());
}
private:
writer<T>& wr_; // bound XML writer
//const T* name_; // name of current element
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
bool tagopen_; // is the element tag for this element still open?
// write a string quoting characters which have meaning in xml
element& qputs(const T* str)
{
for (; *str; ++str)
{
switch (*str)
{
case chars<T>::amp:
wr_.puts(chars<T>::amp_str()); break;
case chars<T>::left_brocket:
wr_.puts(chars<T>::left_brocket_str()); break;
case chars<T>::right_brocket:
wr_.puts(chars<T>::right_brocket_str()); break;
case chars<T>::apos:
wr_.puts(chars<T>::apos_str()); break;
case chars<T>::quote:
wr_.puts(chars<T>::quote_str()); break;
default:
wr_.putc(*str); break;
}
}
return *this;
}
// check to see if we have a parent tag which needs to be closed
void check_parent()
{
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
{
wr_.putc(chars<T>::right_brocket);
wr_.elements_.top()->tagopen_ = false;
}
}
};
}
}
typedef xml::writer::writer<wchar_t> xml_writer;
typedef xml::writer::element<wchar_t> xml_element;
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
#define CP_XML_STREAM() _xml_node_.stream()
#define CP_GET_XML_NODE() _xml_node_
#define CP_ATTR_NODE xml_element & _xml_node_
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
#define CP_XML_ATTR_OPT_ENCODE_STRING(NAME, STR) if (STR)CP_XML_ATTR(NAME, XmlUtils::EncodeXmlString(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)
#define CP_XML_NODE_SIMPLE_NONS() CP_XML_NODE(std::wstring(name))
}

View File

@ -223,6 +223,7 @@ SOURCES += \
../src/odf/datatypes/drawangle.cpp \
../src/odf/datatypes/timeperiod.cpp \
../src/odf/datatypes/messagetype.cpp \
../src/odf/datatypes/stylecellprotect.cpp \
../src/docx/xlsx_conditionalFormatting.cpp \
../src/docx/xlsx_dxfs.cpp \
../src/docx/docx_content_type.cpp \
@ -488,6 +489,7 @@ HEADERS += \
../src/odf/datatypes/charttimeunit.h \
../src/odf/datatypes/timeperiod.h \
../src/odf/datatypes/messagetype.h \
./src/odf/datatypes/stylecellprotect.h \
../src/docx/docx_content_type.h \
../src/docx/docx_conversion_context.h \
../src/docx/docx_conversion_state.h \

View File

@ -134,5 +134,6 @@
#include "../src/odf/datatypes/styleprint.cpp"
#include "../src/odf/datatypes/charttimeunit.cpp"
#include "../src/odf/datatypes/drawangle.cpp"
#include "../src/odf/datatypes/messagetype.cpp""
#include "../src/odf/datatypes/timeperiod.cpp""
#include "../src/odf/datatypes/messagetype.cpp"
#include "../src/odf/datatypes/timeperiod.cpp"
#include "../src/odf/datatypes/stylecellprotect.cpp"

View File

@ -33,7 +33,7 @@
#include <iostream>
#include "conversionelement.h"
#include "logging.h"
#include "../include/logging.h"
namespace cpdoccore {
namespace oox {

View File

@ -30,9 +30,7 @@
*
*/
#include <xml/attributes.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "docx_content_type.h"
#include "namespaces.h"

View File

@ -33,7 +33,9 @@
#include <string>
#include <iosfwd>
#include <xml/xmlelement.h>
#include <vector>
#include "../../include/xml/xmlelement.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,9 +32,9 @@
#include <iostream>
#include <xml/utils.h>
#include <odf/odf_document.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/utils.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/simple_xml_writer.h"
#include "docx_conversion_context.h"
@ -49,8 +49,9 @@
#include "docx_package.h"
#include "xlsx_package.h"
#include "oox_rels.h"
#include "logging.h"
#include "../../include/logging.h"
#include "../../../DesktopEditor/common/SystemUtils.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
@ -744,7 +745,10 @@ void docx_conversion_context::end_document()
get_mediaitems()->dump_rels(notes_context_.endnotesRels(), oox::endnote_place);
output_document_->get_word_files().set_notes(notes_context_);
////////////////////////
output_document_->get_docProps_files().set_app(package::simple_element::create(L"app.xml", dump_settings_app()));
output_document_->get_docProps_files().set_core(package::simple_element::create(L"core.xml", dump_settings_core()));
for (size_t i = 0; i < charts_.size(); i++)
{
package::chart_content_ptr content = package::chart_content::create();
@ -755,10 +759,7 @@ void docx_conversion_context::end_document()
output_document_->get_word_files().add_charts(content);
}
////////////////////////////////
output_document_->get_word_files().update_rels(*this);
/////////////////////////////////////
}
void docx_conversion_context::dump_bibliography()
{
@ -814,12 +815,185 @@ void docx_conversion_context::dump_bibliography()
const std::wstring sFileRef = std::wstring(L"../customXml/item") + std::to_wstring(id) + L".xml";
output_document_->get_word_files().add_rels(relationship(sRId, sRel, sFileRef));
}
std::wstring docx_conversion_context::dump_settings_app()
{
std::wstringstream output;
CP_XML_WRITER(output)
{
CP_XML_NODE(L"Properties")
{
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties");
CP_XML_ATTR(L"xmlns:vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes");
if (!odf_document_->odf_context().DocProps().template_.empty())
{
CP_XML_NODE(L"Template")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().template_;
}
}
if (odf_document_->odf_context().DocProps().revision_)
{
CP_XML_NODE(L"TotalTime")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().revision_;
}
}
CP_XML_NODE(L"Application")
{
if (!odf_document_->odf_context().DocProps().application_.empty())
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().application_;
}
else
{
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
if (sApplication.empty())
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
CP_XML_STREAM() << sApplication;
#if defined(INTVER)
std::string s = VALUE2STR(INTVER);
CP_XML_STREAM() << L"/" << std::wstring(s.begin(), s.end());
#endif
}
}
if (odf_document_->odf_context().DocProps().page_count_)
{
CP_XML_NODE(L"Pages")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().page_count_;
}
}
if (odf_document_->odf_context().DocProps().word_count_)
{
CP_XML_NODE(L"Words")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().word_count_;
}
}
if (odf_document_->odf_context().DocProps().character_count_)
{
CP_XML_NODE(L"CharactersWithSpaces")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().character_count_;
}
}
if (odf_document_->odf_context().DocProps().non_whitespace_character_count_)
{
CP_XML_NODE(L"Characters")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().non_whitespace_character_count_;
}
}
if (odf_document_->odf_context().DocProps().paragraph_count_)
{
CP_XML_NODE(L"Paragraphs")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().paragraph_count_;
}
}
}
}
return output.str();
}
std::wstring docx_conversion_context::dump_settings_core()
{
std::wstringstream output;
CP_XML_WRITER(output)
{
CP_XML_NODE(L"cp:coreProperties")
{
CP_XML_ATTR(L"xmlns:cp", L"http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
CP_XML_ATTR(L"xmlns:xsi", L"http://www.w3.org/2001/XMLSchema-instance");
CP_XML_ATTR(L"xmlns:dc", L"http://purl.org/dc/elements/1.1/");
CP_XML_ATTR(L"xmlns:dcmitype", L"http://purl.org/dc/dcmitype/");
CP_XML_ATTR(L"xmlns:dcterms", L"http://purl.org/dc/terms/");
if (!odf_document_->odf_context().DocProps().creation_date_.empty())
{
CP_XML_NODE(L"dcterms:created")
{
CP_XML_ATTR(L"xsi:type", L"dcterms:W3CDTF");
CP_XML_STREAM() << odf_document_->odf_context().DocProps().creation_date_;
}
}
if (!odf_document_->odf_context().DocProps().dc_date_.empty())
{
CP_XML_NODE(L"dcterms:modified")
{
CP_XML_ATTR(L"xsi:type", L"dcterms:W3CDTF");
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_date_;
}
}
if (!odf_document_->odf_context().DocProps().dc_creator_.empty())
{
CP_XML_NODE(L"dc:creator")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_creator_;
}
}
if (!odf_document_->odf_context().DocProps().dc_title_.empty())
{
CP_XML_NODE(L"dc:title")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_title_;
}
}
if (!odf_document_->odf_context().DocProps().dc_subject_.empty())
{
CP_XML_NODE(L"dc:subject")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_subject_;
}
}
if (!odf_document_->odf_context().DocProps().dc_description_.empty())
{
CP_XML_NODE(L"dc:description")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_description_;
}
}
if (!odf_document_->odf_context().DocProps().dc_language_.empty())
{
CP_XML_NODE(L"dc:language")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().dc_language_;
}
}
CP_XML_NODE(L"cp:lastModifiedBy")
{
std::wstring sApplication = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvApplicationName);
if (sApplication.empty())
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
CP_XML_STREAM() << sApplication;
#if defined(INTVER)
std::string s = VALUE2STR(INTVER);
CP_XML_STREAM() << L"/" << std::wstring(s.begin(), s.end());
#endif
}
if (!odf_document_->odf_context().DocProps().keyword_.empty())
{
CP_XML_NODE(L"cp:keywords")
{
CP_XML_STREAM() << odf_document_->odf_context().DocProps().keyword_;
}
}
if (odf_document_->odf_context().DocProps().revision_)
{
CP_XML_NODE(L"cp:revision")
{
CP_XML_STREAM() << *odf_document_->odf_context().DocProps().revision_;
}
}
}
}
return output.str();
}
std::wstring docx_conversion_context::dump_settings_document()
{
std::wstringstream output(L"");
std::wstringstream output;
CP_XML_WRITER(output)
{
CP_XML_NODE(L"w:settings")
@ -1210,7 +1384,7 @@ void docx_conversion_context::start_process_style_content()
styles_context_.start();
}
void docx_conversion_context::process_section(std::wostream & strm, odf_reader::style_columns * columns)//from page layout
void docx_conversion_context::process_section(std::wostream & strm, odf_reader::style_columns *columns_page)//from page layout
{
if (root()->odf_context().pageLayoutContainer().linenumbering())
{
@ -1222,7 +1396,8 @@ void docx_conversion_context::process_section(std::wostream & strm, odf_reader::
oox::section_context::_section & section = get_section_context().get_last();
if (!columns)
odf_reader::style_columns *columns = columns_page;
//if (!columns)
{
if (const odf_reader::style_instance * secStyle = root()->odf_context().styleContainer().style_by_name(section.style_, odf_types::style_family::Section, process_headers_footers_))
{
@ -1279,20 +1454,35 @@ void docx_conversion_context::process_section(std::wostream & strm, odf_reader::
}
for (size_t i = 0; page_width > 0, i < columns->style_columns_.size(); i++)
{
odf_reader::style_column * col = dynamic_cast<odf_reader::style_column*>( columns->style_columns_[i].get());
odf_reader::style_column *col = dynamic_cast<odf_reader::style_column*>( columns->style_columns_[i].get());
if (!col) continue;
double width = page_width * (col->style_rel_width_ ? col->style_rel_width_->get_value() / 65535. : 0);
double space = col->fo_end_indent_ ? col->fo_end_indent_->get_value_unit(odf_types::length::pt) : 0;
if (i < columns->style_columns_.size() - 1)
double percent = col->style_rel_width_ ? col->style_rel_width_->get_value() : 0;
if (percent > 0x7FFE)
{
col = dynamic_cast<odf_reader::style_column*>( columns->style_columns_[i + 1].get());
space += col->fo_start_indent_ ? col->fo_start_indent_->get_value_unit(odf_types::length::pt) : 0;
//auto
break;
}
else
{
if (percent > 1000.) percent /= 100.;
double width = page_width * percent / 100.;
double space_end = col->fo_end_indent_ ? col->fo_end_indent_->get_value_unit(odf_types::length::pt) : 0;
double space_start = col->fo_start_indent_ ? col->fo_start_indent_->get_value_unit(odf_types::length::pt) : 0;
width -= space_end;
width -= space_start;
if (i < columns->style_columns_.size() - 1)
{
col = dynamic_cast<odf_reader::style_column*>(columns->style_columns_[i + 1].get());
space_start = col->fo_start_indent_ ? col->fo_start_indent_->get_value_unit(odf_types::length::pt) : 0;
}
width_space.push_back(std::make_pair(width, space_start + space_end));
}
width_space.push_back(std::make_pair(width, space));
}
}
}
@ -1467,12 +1657,12 @@ odf_reader::style_text_properties_ptr docx_conversion_context::current_text_prop
return cur;
}
void docx_conversion_context::set_page_break_after(bool val)
void docx_conversion_context::set_page_break_after(int val)
{
page_break_after_ = val;
}
bool docx_conversion_context::get_page_break_after()
int docx_conversion_context::get_page_break_after()
{
return page_break_after_ ;
}
@ -1484,12 +1674,12 @@ bool docx_conversion_context::get_page_break()
{
return page_break_;
}
void docx_conversion_context::set_page_break_before(bool val)
void docx_conversion_context::set_page_break_before(int val)
{
page_break_before_ = val;
}
bool docx_conversion_context::get_page_break_before()
int docx_conversion_context::get_page_break_before()
{
return page_break_before_;
}
@ -1937,15 +2127,8 @@ void docx_conversion_context::process_page_break_after(const odf_reader::style_i
_CP_OPT(odf_types::fo_break) fo_break_val = inst->content()->get_style_paragraph_properties()->content_.fo_break_after_;
if (fo_break_val)
{
if (fo_break_val->get_type() == odf_types::fo_break::Page)
{
set_page_break_after(true);
break;
}
else if (fo_break_val->get_type() == odf_types::fo_break::Auto)
{
break;
}
set_page_break_after(fo_break_val->get_type());
break;
}
}
inst = inst->parent();
@ -2185,35 +2368,42 @@ void docx_conversion_context::start_text_changes (const std::wstring &id)
map_current_changes_.insert(std::pair<std::wstring, text_tracked_context::_state> (id, state_add));
if (state_.in_paragraph_ && ( state_add.type == 1 || state_add.type == 2 ))
if ( state_add.type == 1 || state_add.type == 2 )
{
map_changes_iterator it = map_current_changes_.find(id);
text_tracked_context::_state &state = it->second;
std::wstring format_change = L" w:date=\"" + state.date + L"\"" +
L" w:author=\"" + state.author + L"\"" ;
finish_run();
state.active = true;
state.in_drawing = get_drawing_state_content();
if (state.type == 1)
if (state_.in_paragraph_)
{
std::wstring format_change = L" w:date=\"" + state.date + L"\"" +
L" w:author=\"" + state.author + L"\"";
output_stream() << L"<w:ins" << format_change << L" w:id=\"" << std::to_wstring(current_id_changes++) << L"\">";
}
if (state.type == 2)
{
for (size_t i = 0 ; i < state.content.size(); i++)
finish_run();
state.active = true;
state.in_drawing = get_drawing_state_content();
if (state.type == 1)
{
output_stream() << L"<w:del" << format_change << L" w:id=\"" << std::to_wstring(current_id_changes++) << L"\">";
output_stream() << state.content[i];
output_stream() << L"</w:del>";
output_stream() << L"<w:ins" << format_change << L" w:id=\"" << std::to_wstring(current_id_changes++) << L"\">";
}
map_current_changes_.erase(it);
if (state.type == 2)
{
for (size_t i = 0; i < state.content.size(); i++)
{
output_stream() << L"<w:del" << format_change << L" w:id=\"" << std::to_wstring(current_id_changes++) << L"\">";
output_stream() << state.content[i];
output_stream() << L"</w:del>";
}
map_current_changes_.erase(it);
}
}
else
{
state.in_drawing = get_drawing_state_content();
state.out_active = true;
}
}
}
@ -2240,87 +2430,104 @@ void docx_conversion_context::start_changes()
change_attr += L" w:date=\"" + state.date + L"\"";
change_attr += L" w:author=\"" + state.author + L"\"";
change_attr += L" w:id=\"" + std::to_wstring(current_id_changes++) + L"\"";
if (state.type == 1)
if (state.out_active)
{
text_tracked_context_.dumpRPrInsDel_ = L"<w:ins" + change_attr + L"/>";
}
if (state.type == 2)
{
text_tracked_context_.dumpRPrInsDel_ = L"<w:del" + change_attr + L"/>";
}
if (state.type == 3 && false == state.style_name.empty())
{
odf_reader::style_instance * styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Paragraph, false);
if (styleInst)
if (state.type == 1)
{
odf_reader::style_paragraph_properties * props = styleInst->content()->get_style_paragraph_properties();
odf_reader::style_text_properties * props_text = styleInst->content()->get_style_text_properties();
text_tracked_context_.dumpPPr_ += L"<w:pPrChange" + change_attr;
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpPPr_ += get_styles_context().paragraph_attr().str();
}
text_tracked_context_.dumpPPr_ += L">";
if (props) text_tracked_context_.dumpPPr_ += get_styles_context().paragraph_nodes().str();
if (props_text)
{
props_text->docx_convert(*this);
text_tracked_context_.dumpPPr_ += L"<w:rPr>";
text_tracked_context_.dumpPPr_ += get_styles_context().text_style().str();
text_tracked_context_.dumpPPr_ += L"</w:rPr>";
}
text_tracked_context_.dumpPPr_ += L"</w:pPrChange>";
output_stream() << L"<w:ins" + change_attr + L">";
state.active = true;
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Text, false))
if (state.type == 2)
{
text_tracked_context_.dumpRPr_ = L"<w:rPrChange" + change_attr + L">";
odf_reader::style_text_properties * props = NULL;
props = styleInst->content()->get_style_text_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpRPr_ += get_styles_context().text_style().str();
}
text_tracked_context_.dumpRPr_ += L"</w:rPrChange>";
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Table, false))
{
text_tracked_context_.dumpTblPr_ = L"<w:TblPrChange" + change_attr + L">";
odf_reader::style_table_properties * props = styleInst->content()->get_style_table_properties();
odf_reader::style_table_cell_properties * props_cell = styleInst->content()->get_style_table_cell_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpTblPr_ += get_styles_context().table_style().str();
}
text_tracked_context_.dumpTblPr_ += L"</w:TblPrChange>";
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::TableCell, false))
{
text_tracked_context_.dumpTcPr_ = L"<w:TcPrChange" + change_attr + L">";
odf_reader::style_table_cell_properties * props = styleInst->content()->get_style_table_cell_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpTcPr_ += get_styles_context().table_style().str();
}
text_tracked_context_.dumpTcPr_ += L"</w:TcPrChange>";
output_stream() << L"<w:del" + change_attr + L">";
state.active = true;
}
}
else if (state.type == 3 && state.style_name.empty())
else
{
if (state_.in_run_)
text_tracked_context_.dumpRPr_ += L"<w:rPrChange" + change_attr + L"/>";
else
text_tracked_context_.dumpPPr_ += L"<w:pPrChange" + change_attr + L"/>";
if (state.type == 1)
{
text_tracked_context_.dumpRPrInsDel_ = L"<w:ins" + change_attr + L"/>";
}
if (state.type == 2)
{
text_tracked_context_.dumpRPrInsDel_ = L"<w:del" + change_attr + L"/>";
}
if (state.type == 3 && false == state.style_name.empty())
{
odf_reader::style_instance * styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Paragraph, false);
if (styleInst)
{
odf_reader::style_paragraph_properties * props = styleInst->content()->get_style_paragraph_properties();
odf_reader::style_text_properties * props_text = styleInst->content()->get_style_text_properties();
text_tracked_context_.dumpPPr_ += L"<w:pPrChange" + change_attr;
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpPPr_ += get_styles_context().paragraph_attr().str();
}
text_tracked_context_.dumpPPr_ += L">";
if (props) text_tracked_context_.dumpPPr_ += get_styles_context().paragraph_nodes().str();
if (props_text)
{
props_text->docx_convert(*this);
text_tracked_context_.dumpPPr_ += L"<w:rPr>";
text_tracked_context_.dumpPPr_ += get_styles_context().text_style().str();
text_tracked_context_.dumpPPr_ += L"</w:rPr>";
}
text_tracked_context_.dumpPPr_ += L"</w:pPrChange>";
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Text, false))
{
text_tracked_context_.dumpRPr_ = L"<w:rPrChange" + change_attr + L">";
odf_reader::style_text_properties * props = NULL;
props = styleInst->content()->get_style_text_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpRPr_ += get_styles_context().text_style().str();
}
text_tracked_context_.dumpRPr_ += L"</w:rPrChange>";
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::Table, false))
{
text_tracked_context_.dumpTblPr_ = L"<w:TblPrChange" + change_attr + L">";
odf_reader::style_table_properties * props = styleInst->content()->get_style_table_properties();
odf_reader::style_table_cell_properties * props_cell = styleInst->content()->get_style_table_cell_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpTblPr_ += get_styles_context().table_style().str();
}
text_tracked_context_.dumpTblPr_ += L"</w:TblPrChange>";
}
else if (styleInst = root()->odf_context().styleContainer().style_by_name(state.style_name, odf_types::style_family::TableCell, false))
{
text_tracked_context_.dumpTcPr_ = L"<w:TcPrChange" + change_attr + L">";
odf_reader::style_table_cell_properties * props = styleInst->content()->get_style_table_cell_properties();
if (props)
{
props->docx_convert(*this);
text_tracked_context_.dumpTcPr_ += get_styles_context().table_style().str();
}
text_tracked_context_.dumpTcPr_ += L"</w:TcPrChange>";
}
}
else if (state.type == 3 && state.style_name.empty())
{
if (state_.in_run_)
text_tracked_context_.dumpRPr_ += L"<w:rPrChange" + change_attr + L"/>";
else
text_tracked_context_.dumpPPr_ += L"<w:pPrChange" + change_attr + L"/>";
}
}
}
}

View File

@ -523,9 +523,11 @@ public:
std::vector<std::wstring> content; //delete elements
bool active = false;
bool in_drawing = false;
bool out_active = false;
void clear()
{
out_active = false;
type = 0;
id.clear();
author.clear();
@ -793,12 +795,17 @@ public:
_rels_type_place get_type_place();
void dump_bibliography();
std::wstring dump_settings_document();
std::wstring dump_settings_app();
std::wstring dump_settings_core();
bool next_dump_page_properties_;
bool next_dump_section_;
bool last_dump_page_properties_;
int nFormFieldId_ = 0;
odf_reader::odf_document *root()
{
return odf_document_;
@ -853,11 +860,11 @@ public:
odf_reader::style_text_properties_ptr current_text_properties();
void set_page_break_after(bool val);
bool get_page_break_after();
void set_page_break_after(int val);
int get_page_break_after();
void set_page_break_before(bool val);
bool get_page_break_before();
void set_page_break_before(int val);
int get_page_break_before();
void set_page_break (bool val);
bool get_page_break ();
@ -994,7 +1001,7 @@ private:
std::vector< const odf_reader::style_text_properties*> text_properties_stack_;
}state_;
std::vector<_context_state> keep_state_;
//---------------------------------------------------------
std::wstringstream document_xml_;
std::wstringstream styles_xml_;
std::wstringstream fontTable_xml_;
@ -1006,7 +1013,7 @@ private:
std::wstringstream header_xml_;
std::wstringstream settings_xml_;
std::wstringstream meta_xml_;
//--------------------------------------------------------------
xlsx_drawing_context_handle_ptr chart_drawing_handle_;
styles_context styles_context_;
@ -1044,8 +1051,8 @@ private:
bool first_element_list_item_;
bool page_break_after_;
bool page_break_before_;
int page_break_after_; // 0 = false, 1 - column, 2 -page
int page_break_before_;
bool page_break_;
bool in_automatic_style_;

View File

@ -31,7 +31,7 @@
*/
#include "docx_drawing.h"
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "../odf/datatypes/custom_shape_types_convert.h"
namespace cpdoccore {

View File

@ -33,9 +33,6 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "oox_drawing.h"
#include "mediaitems.h"

View File

@ -509,7 +509,7 @@ docx_document::docx_document()
relationship(L"rId3", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", L"word/document.xml" )
);
rels_files_.add_rel_file( relFile );
get_rels_files().add_rel_file( relFile );
}
int docx_document::add_customXml(customXml_content_ptr customXml)
@ -523,10 +523,10 @@ void docx_document::write(const std::wstring & RootPath)
content_type_file_.content()->get_override().push_back( override_content_type(L"/word/numbering.xml",
L"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml") );
}
customXml_files_.write (RootPath);
word_files_.write (RootPath);
rels_files_.write (RootPath);
docProps_files_.write (RootPath);
customXml_files_.write (RootPath);
word_files_.write (RootPath);
get_rels_files().write (RootPath);
get_docProps_files().write (RootPath);
content_type_file_.write(RootPath);
}

View File

@ -34,8 +34,6 @@
#include <string>
#include <vector>
#include <CPSharedPtr.h>
#include "oox_rels.h"
#include "docx_content_type.h"
#include "oox_package.h"
@ -136,7 +134,7 @@ public:
void set_fontTable (element_ptr Element);
void set_numbering (element_ptr Element);
void set_settings (element_ptr Element);
bool has_numbering ();
bool has_numbering ();
void set_media (mediaitems_ptr & mediaitems_);
void set_headers_footers(headers_footers & HeadersFooters);
void set_notes (notes_context & notesContext);
@ -185,8 +183,6 @@ private:
docx_content_types_file content_type_file_;
word_files word_files_;
customXml_files customXml_files_;
rels_files rels_files_;
docProps_files docProps_files_;
};
}

View File

@ -29,11 +29,12 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include <iostream>
#include "docx_conversion_context.h"
#include "logging.h"
#include <iostream>
#include <odf/odf_document.h>
#include "../../include/logging.h"
#include "../../include/odf/odf_document.h"
#include "../odf/odfcontext.h"
namespace cpdoccore {

View File

@ -46,7 +46,12 @@ struct _rect
double x;
double y;
};
enum _anchor_rel
{
anchor_none = 0,
anchor_start = 1,
anchor_end = 2
};
struct drawing_object_description
{
bool bNotes_;
@ -58,6 +63,7 @@ struct drawing_object_description
_CP_OPT(_rect) svg_rect_;
_anchor_rel anchor_rel_;
std::wstring anchor_;
double anchor_x_;
double anchor_y_;

View File

@ -32,7 +32,7 @@
#include "hyperlinks.h"
#include <xml/utils.h>
#include "../../include/xml/utils.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#include "measuredigits.h"
#include <boost/lexical_cast.hpp>
#include <logging.h>
#include "../../include/logging.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {

View File

@ -34,14 +34,14 @@
#include <boost/regex.hpp>
#include <xml/utils.h>
#include "../../include/xml/utils.h"
#include "../../Common/DocxFormat/Source/Base/Base.h"
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../../Common/DocxFormat/Source/Base/Base.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../DesktopEditor/common/Directory.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../../DesktopEditor/common/Directory.h"
#include "../../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
namespace oox {

View File

@ -30,10 +30,9 @@
*
*/
#include "../../include/xml/simple_xml_writer.h"
#include "oox_chart_axis.h"
#include <xml/simple_xml_writer.h>
#include "oox_title.h"
#include "oox_chart_shape.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPSharedPtr.h>
#include "../../include/CPOptional.h"
#include "../../include/CPSharedPtr.h"
#include "oox_chart_shape.h"

View File

@ -32,7 +32,7 @@
#include <vector>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "oox_rels.h"
#include "oox_chart_context.h"

View File

@ -32,10 +32,10 @@
#pragma once
#include "oox_package.h"
#include <CPNoncopyable.h>
#include "../../include/CPNoncopyable.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include "../../include/CPScopedPtr.h"
#include "../../include/CPSharedPtr.h"
#include "oox_title.h"
#include "oox_plot_area.h"
@ -75,9 +75,12 @@ public:
}
void set_3D_chart(bool val)
{
for (size_t i = 0 ; i < plot_area_.charts_.size(); i++)
for (size_t i = 0 ; i < plot_area_.charts_.size(); ++i)
{
plot_area_.charts_[i]->is3D_ = val;
for (size_t j = 0; j < plot_area_.charts_[i]->series_.size(); ++j)
plot_area_.charts_[i]->series_[j]->is3D_ = val;
}
}
void set_externalData(const std::wstring & href);

View File

@ -32,11 +32,9 @@
#include <boost/functional.hpp>
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "oox_chart_legend.h"
#include "oox_chart_shape.h"
namespace cpdoccore {

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include "oox_layout.h"

View File

@ -34,13 +34,13 @@
#include <boost/algorithm/string.hpp>
#include <boost/ref.hpp>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "../odf/style_text_properties.h"
#include "xlsx_utils.h"
#include "oox_chart_series.h"
#include "../formulasconvert/formulasconvert.h"
#include "../../formulasconvert/formulasconvert.h"
#include "oox_chart_shape.h"
@ -58,6 +58,7 @@ oox_chart_series::oox_chart_series()
iSymbolMarkerType_ = 0;
bCacheOnly_ = false;
labelPosEnabled_ = true;
is3D_ = false;
}
void oox_chart_series::setName(const std::wstring &value)
{
@ -571,10 +572,30 @@ void oox_bar_series::oox_serialize(std::wostream & _Wostream)
CP_XML_NODE(L"c:ser")
{
oox_serialize_common(CP_XML_STREAM());
if (is3D_)
{
CP_XML_NODE(L"c:shape")
{
switch (iSolidType.get_value_or(0))
{
case 1: CP_XML_ATTR(L"val", L"cylinder"); break;
case 2: CP_XML_ATTR(L"val", L"cone"); break;
case 3: CP_XML_ATTR(L"val", L"pyramid"); break;
case 0:
default: CP_XML_ATTR(L"val", L"box"); break;
}
}
}
}
}
}
void oox_bar_series::set_properties(std::vector<odf_reader::_property> g)
{
oox_chart_series::set_properties(g);
odf_reader::GetProperty(g, L"solid-type", iSolidType);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_CP_PTR(oox_chart_series) oox_line_series::create()

View File

@ -32,7 +32,7 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include "../odf/chart_objects.h"
#include "oox_chart_values.h"
@ -55,6 +55,8 @@ public:
virtual void oox_serialize(std::wostream & _Wostream) = 0;
bool is3D_;
bool labelPosEnabled_;
_oox_chart_values values_[5]; //cat, common, x, y, bubble,
@ -78,6 +80,8 @@ public:
odf_reader::chart::series content_;
virtual void set_properties(std::vector<odf_reader::_property> g) {}
//extLst (Chart Extensibility) §21.2.2.64
//idx (Index) §21.2.2.84
//order (Order) §21.2.2.128
@ -95,7 +99,11 @@ public:
static oox_series_ptr create();
virtual void set_properties(std::vector<odf_reader::_property> g);
virtual void oox_serialize(std::wostream & _Wostream);
_CP_OPT(int) iSolidType;
};
//cat (Category Axis Data) §21.2.2.24
//errBars (Error Bars) §21.2.2.55

View File

@ -30,8 +30,7 @@
*
*/
#include <boost/functional.hpp>
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "oox_chart_shape.h"
#include "oox_drawing.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include "../odf/chart_objects.h"
#include "oox_drawing_fills.h"

View File

@ -32,7 +32,7 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include "../../include/CPOptional.h"
namespace cpdoccore {

View File

@ -33,9 +33,9 @@
#include "oox_conversion_context.h"
#include <iostream>
#include <xml/utils.h>
#include <odf/odf_document.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/utils.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/simple_xml_writer.h"
#include "../odf/odfcontext.h"
#include "../odf/style_text_properties.h"
@ -44,7 +44,7 @@
namespace cpdoccore {
namespace oox
{
void forms_context::start_element (int type)
void forms_context::start_element (_form_type type)
{
current_state_.clear();

View File

@ -60,15 +60,32 @@ namespace odf_reader
typedef boost::shared_ptr<office_element> office_element_ptr;
};
namespace oox {
namespace oox
{
enum _form_type
{
formNone = 0,
formButton = 1,
formLabel = 2,
formCheckbox = 3,
formCombobox = 4,
formListbox = 5,
formDateTime = 6,
formSpin = 7,
formScroll = 8,
formFrame = 9,
formImage = 10,
formText = 11
};
class forms_context
{
public:
struct _state
{
std::wstring id;
std::wstring name;
int type = 0; //enum?
_form_type type;
std::wstring label;
std::wstring uuid;
std::wstring value;
@ -78,7 +95,7 @@ public:
void clear()
{
type = 0;
type = formNone;
id.clear();
name.clear();
label.clear();
@ -90,7 +107,7 @@ public:
};
forms_context(){}
void start_element (int type);
void start_element (_form_type type);
void set_id (const std::wstring& id);
void set_name (const std::wstring& name);
void set_label (const std::wstring& label);

View File

@ -29,10 +29,7 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "oox_data_labels.h"
#include "oox_chart_shape.h"

View File

@ -36,9 +36,9 @@
#include <vector>
#include <boost/noncopyable.hpp>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include <xml/attributes.h>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include "../../include/xml/attributes.h"
namespace cpdoccore {

View File

@ -33,8 +33,7 @@
#include <boost/algorithm/string.hpp>
#include "oox_drawing.h"
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "../odf/datatypes/custom_shape_types_convert.h"
using namespace cpdoccore;

View File

@ -33,9 +33,6 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "mediaitems.h"
#include "oox_drawing_fills.h"

View File

@ -32,7 +32,7 @@
#include "oox_drawing_fills.h"
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,12 +32,9 @@
#pragma once
#include <string>
#include <CPOptional.h>
#include <CPSharedPtr.h>
#include "../odf/datatypes/lengthorpercent.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#include "oox_layout.h"
#include <boost/functional.hpp>
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include "../odf/style_text_properties.h"
namespace cpdoccore {

View File

@ -32,8 +32,6 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "../odf/chart_objects.h"

View File

@ -34,14 +34,14 @@
#include <boost/ref.hpp>
#include <utf8cpp/utf8.h>
#include "../../include/utf8cpp/utf8.h"
#include "mediaitems.h"
#include "../../DesktopEditor/common/File.h"
#include "../../DesktopEditor/common/SystemUtils.h"
#include "../../DesktopEditor/graphics/pro/Image.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../Common/DocxFormat/Source/Base/Base.h"
#include "../../../DesktopEditor/common/File.h"
#include "../../../DesktopEditor/common/SystemUtils.h"
#include "../../../DesktopEditor/graphics/pro/Image.h"
#include "../../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../../Common/DocxFormat/Source/Base/Base.h"
namespace cpdoccore {
namespace oox {
@ -312,8 +312,11 @@ simple_element_ptr simple_element::create(const std::wstring & FileName, const s
return boost::make_shared<simple_element>(FileName, Content);
}
//-----------------------------------------------------------------------------------------------
docProps_files::docProps_files()
{
void core_file::write(const std::wstring & RootPath)
}
std::wstring docProps_files::create_core()
{
std::wstringstream resStream;
@ -321,16 +324,13 @@ void core_file::write(const std::wstring & RootPath)
L"xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\" "
L"xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" >";
//resStream << L"<dc:creator>ONLYOFFICE</dc:creator>";
//resStream << L"<cp:lastModifiedBy>ONLYOFFICE</cp:lastModifiedBy>";
resStream << L"<cp:revision>1</cp:revision>";
resStream << L"</cp:coreProperties>";
simple_element elm(L"core.xml", resStream.str());
elm.write(RootPath);
return resStream.str();
}
void app_file::write(const std::wstring & RootPath)
std::wstring docProps_files::create_app()
{
std::wstringstream resStream;
@ -348,33 +348,31 @@ void app_file::write(const std::wstring & RootPath)
#endif
resStream << L"</Application></Properties>";
simple_element elm(L"app.xml", resStream.str());
elm.write(RootPath);
return resStream.str();
}
////////////
docProps_files::docProps_files()
void docProps_files::set_app(element_ptr Element)
{
app_ = Element;
}
void docProps_files::set_core(element_ptr Element)
{
core_ = Element;
}
void docProps_files::write(const std::wstring & RootPath)
{
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"docProps";
NSDirectory::CreateDirectory(path.c_str());
NSDirectory::CreateDirectory(path.c_str());
core_.write(path);
app_.write(path);
if (!core_) core_ = simple_element::create(L"core.xml", create_core());
if (!app_) app_ = simple_element::create(L"app.xml", create_app());
core_->write(path);
app_->write(path);
}
////////////
//---------------------------------------------------------------------------------------------------
media::media(mediaitems_ptr & _mediaitems, NSFonts::IApplicationFonts *pAppFonts) : mediaItems_(_mediaitems), appFonts_(pAppFonts)
{
}
void media::write(const std::wstring & RootPath)
{
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"media";

View File

@ -29,12 +29,13 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef _CPDOCCORE_OOX_PACKAGE_H_75f74d15
#define _CPDOCCORE_OOX_PACKAGE_H_75f74d15
#pragma once
#include <vector>
#include <CPSharedPtr.h>
#include <CPNoncopyable.h>
#include "../../include/CPSharedPtr.h"
#include "../../include/CPNoncopyable.h"
#include "../../include/CPOptional.h"
#include "docx_content_type.h"
#include "oox_rels.h"
@ -192,39 +193,35 @@ public:
static _CP_PTR(chart_content) create();
private:
std::wstringstream content_;
rels_file_ptr rels_;
rels_file_ptr rels_;
};
//------------------------------------------------------------------------
class document : public element
{
public:
virtual content_types_file & get_content_types_file() = 0;
};
class core_file : public element
{
public:
virtual void write(const std::wstring & RootPath);
};
class app_file : public element
{
public:
virtual void write(const std::wstring & RootPath);
};
class docProps_files : public element
{
public:
docProps_files();
public:
virtual void write(const std::wstring & RootPath);
void set_app(element_ptr Element);
void set_core(element_ptr Element);
virtual void write(const std::wstring & RootPath);
private:
core_file core_;
app_file app_;
std::wstring create_app();
std::wstring create_core();
element_ptr core_;
element_ptr app_;
};
class document : public element
{
public:
virtual content_types_file & get_content_types_file() = 0;
docProps_files & get_docProps_files() { return docProps_files_; }
rels_files & get_rels_files() { return rels_files_; }
private:
docProps_files docProps_files_;
rels_files rels_files_;
};
class media : public element
@ -269,4 +266,3 @@ private:
} // namespace oox
} // namespace cpdoccore
#endif

View File

@ -33,14 +33,15 @@
#include "oox_plot_area.h"
#include <random>
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../../include/xml/simple_xml_writer.h"
#include <boost/algorithm/string.hpp>
#include "../odf/style_text_properties.h"
#include "oox_chart_shape.h"
#include "../../ASCOfficeOdfFile/src/odf/datatypes/chartclass.h"
#include "../odf/datatypes/chartclass.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,6 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "oox_types_chart.h"
#include "oox_chart_axis.h"

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