Compare commits

..

1827 Commits

Author SHA1 Message Date
51ca6f0ef2 fix docxrenderer enum set 2022-07-11 10:26:35 +03:00
5d97b35ba4 fix build 2022-07-11 10:00:51 +03:00
2bdc1e4a6d fix write application tag 2022-07-11 09:01:21 +03:00
787379808e Merge pull request #977 from ONLYOFFICE/feature/docx_renderer
Feature/docx renderer
2022-07-11 00:47:48 +05:00
9a658a2818 Fix compilation with old compilers 2022-07-10 22:41:47 +03:00
079d80adcb Refactoring 6. 2022-07-10 19:27:29 +03:00
8ec5685786 . 2022-07-10 09:40:44 +03:00
769ab7b238 Refactoring zlib export 2022-07-09 15:46:46 +03:00
2a28ba7060 . 2022-07-09 10:35:23 +03:00
eaabba0860 . 2022-07-09 10:33:48 +03:00
f892022232 . 2022-07-09 10:24:00 +03:00
dfa93c344c Create Pict.cpp 2022-07-08 17:14:16 +03:00
adfc2ef30d office 2003 xml -> docx (with fix errors format) 2022-07-08 17:13:29 +03:00
f8549eaa13 Refactoring 5. Aded support for different types of text underlines. 2022-07-08 16:31:30 +03:00
fc280b1cd6 [android] Update to kotlin 1.7 2022-07-08 10:48:21 +03:00
fc8784c540 Fix excel crash (preinit js context in thread) 2022-07-06 22:44:53 +03:00
17fe15948a [android] Update gradle plugin and jvmTarget 2022-07-06 16:19:14 +03:00
38f11a9f4a fix bug #57904 2022-07-05 14:24:58 +03:00
ea43991901 fix bug #57968 2022-07-05 14:24:12 +03:00
a469bad6e3 Possible fix for the right border problem. 2022-07-04 10:36:46 +03:00
51781066b6 fix bug #57858 2022-07-01 13:14:16 +03:00
393baf5265 Refactoring 4. 2022-06-30 21:31:51 +03:00
aa6dd092f7 Added shading support. 2022-06-30 21:18:50 +03:00
00e47257e1 Fixed an issue with calculating the right border of the line. Added a correction constant for each font. 2022-06-30 21:18:50 +03:00
01911afb0f Refactoring 3. 2022-06-30 21:18:50 +03:00
fe3e7357d5 Refactoring 2. Improved calculation of the right border of the text. 2022-06-30 21:18:50 +03:00
541c90eacf Refactoring. 2022-06-30 21:18:49 +03:00
4641c135e7 Added support for shape according to the new standard. Fixed problem with extra spaces. Code refactoring. 2022-06-30 21:18:49 +03:00
5c403b39eb Added graphics detection: underline, strikethrough, and text highlighting in color. 2022-06-30 21:18:49 +03:00
1ba6c9b73f minor changes 2022-06-30 21:18:49 +03:00
2ede1b0d65 Fixed problem with merging of mixed text. Improved vertical and horizontal text alignment. Some problems were identified (todo). The interaction between the shape and the paragraph has been worked out. 2022-06-30 21:18:49 +03:00
3e5c005714 Fixed an problem with measuring a line with a long space. 2022-06-30 21:18:49 +03:00
217c5157e1 Added BuildByTypeShapeLine() 2022-06-30 21:18:49 +03:00
6783e79c15 Attempted to rewrite BuildByTypePlainParagraph(). Conclusion - I should use shapes instead of frames. 2022-06-30 21:18:49 +03:00
7f3a658611 Fix problem with spaces. 2022-06-30 21:18:49 +03:00
25a10fb642 DocxRenderer: Added support for TextAssociationType PlainParagraph. 2022-06-30 21:18:49 +03:00
189cb94892 fix bug #57904 2022-06-30 18:43:47 +03:00
974b0cc984 [android] Refactoring build gradle files 2022-06-30 14:24:04 +03:00
a202a87a67 x2t - binary - convert doc->docx in embedded 2022-06-30 13:23:03 +03:00
7e33da3883 fix bug #56786 2022-06-30 12:34:39 +03:00
040c6abdef Fix the problem with save/load text vertical alignment 2022-06-29 19:46:27 +03:00
118bd98f4f [android] Fix bug 57786 2022-06-29 14:36:22 +03:00
df69792402 fix bug #57835 2022-06-29 09:35:08 +03:00
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
b59980bd62 Merge pull request #964 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-22 21:51:13 +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
213b4ddf64 Merge pull request #958 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-10 15:54:17 +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
fd08ef00c3 Merge pull request #956 from ONLYOFFICE/release/v7.2.0
Fix compilation
2022-06-10 08:36:04 +03:00
fee2eb653f Fix compilation 2022-06-10 08:35:07 +03:00
85d7b5063e Merge pull request #955 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-10 08:27:41 +03:00
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
ce06cd0c4c Merge pull request #951 from ONLYOFFICE/release/v7.2.0
Refactoring ooxmlsignature library
2022-06-09 16:46:24 +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
e5e30596f0 Merge pull request #950 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-06-08 17:24:32 +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
0af7c8b984 Merge pull request #946 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-05-28 22:11:28 +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
e6c7efc0d5 Merge pull request #941 from ONLYOFFICE/release/v7.2.0
Release/v7.2.0
2022-05-26 18:18:33 +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
15ccea0306 Merge pull request #775 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53582
2021-11-16 19:39:54 +03:00
d1f99b7018 Refactoring 2021-11-16 19:39:39 +03:00
1a3191216a fix bug #53582 2021-11-16 19:32:42 +03:00
6f447ee939 Support relative paths to fonts in font_selection.bin 2021-11-16 19:31:26 +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
7414003d86 Merge pull request #774 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53499
2021-11-15 20:02:15 +03:00
b5d2b40acb fix bug #53499 2021-11-15 20:01:15 +03:00
ea6c30e2bd common script 2021-11-15 18:55:05 +03:00
b18a789e99 Merge pull request #773 from ONLYOFFICE/fix/v7.0.0-ppt
fix bug #53086
2021-11-15 17:38:06 +03:00
8e67aa129e fix bug #53086 2021-11-15 17:35:07 +03:00
e447369665 Merge pull request #772 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53539
2021-11-15 16:24:13 +03:00
1e8e50e0a8 fix bug #53539 2021-11-15 16:14:21 +03:00
3e3aa0352d [xlsb] add table formula, fix defined names 2021-11-15 15:28:04 +03:00
dc84658b7f Merge pull request #771 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53582
2021-11-15 14:57:47 +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
74bbbfd0e9 Refactoring gitignore 2021-11-13 20:13:39 +03:00
5645f15c58 Working with EMF+ records 2021-11-12 20:34:04 +03:00
47e72c2210 Rename module & fix bugs 2021-11-12 18:19:45 +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
81db77330f Merge pull request #769 from ONLYOFFICE/fix/v7.0.0-ppt
fix bug #53666
2021-11-12 17:17:09 +03:00
e68e8ba644 fix bug #53666 2021-11-12 16:16:31 +03:00
2f4ae5ebc8 [xlsb] fix shared formula, add new Ftab functions 2021-11-12 14:43:19 +03:00
cfa3ad151e Refactoring hash method 2021-11-12 12:55:38 +03:00
95fc2c2e94 Working with EMF+ records 2021-11-11 20:29:47 +03:00
d0e5d86243 Fix bug 53586 2021-11-11 19:43:33 +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
27a93dc070 Merge pull request #767 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-11-11 10:29:05 +03:00
069a9f3d3a fix bug #53538. 2021-11-10 22:36:36 +03:00
b0062b6135 Working with EMF+ records 2021-11-10 21:26:06 +03:00
56cfa9d57d fix part of 53538. Text replaces to '_' 2021-11-10 20:20:58 +03:00
30d3472b62 test GetGlyphs 2021-11-10 17:19:13 +03:00
e475ed88fa fix bug #53582 2021-11-10 11:58:26 +03:00
f1271da9aa Merge pull request #766 from ONLYOFFICE/fix/v7.0.0-ppt
fix bug #53591. Some text has broken yet. But crush fixed
2021-11-10 10:02:15 +03:00
f9cfdd85ca fix bug #53591. Some text has broken yet. But crush fixed 2021-11-09 21:41:41 +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
c8e5debf80 Add GetLimitsY method to fontmanager 2021-11-09 12:25:26 +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
c8eb931b92 Add missed define 2021-11-08 20:14:08 +03:00
5d3c3ce818 Working with EMF+ records 2021-11-08 20:11:24 +03:00
9ed41ccb67 Fix bug #53544
Handle placeholders for text fields in case when several fields have the same key
2021-11-08 20:11:03 +03:00
05f0c63e40 Fix bug #53518
Fix the problem with writing placeholders
2021-11-08 20:11:03 +03:00
f5c80ed236 Fix bug #53222
Fully rework writing the text value of the form fields in PDF
2021-11-08 20:11:03 +03:00
f9f0a7896f Merge pull request #764 from ONLYOFFICE/fix/v7.0.0-ppt
fix win build
2021-11-08 18:30:10 +03:00
56a0d29f10 fix win build 2021-11-08 18:28:56 +03:00
eecf99373f Merge pull request #762 from ONLYOFFICE/fix/v7.0.0-ppt
Fix/v7.0.0 ppt
2021-11-08 18:10:11 +03:00
ef970a6009 Merge remote-tracking branch 'origin/feature/ppt_7' into fix/v7.0.0-ppt 2021-11-08 18:08:57 +03:00
fc91e7b9ce refactoring 2021-11-08 18:00:30 +03:00
bd0feeadeb Merge pull request #761 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-11-08 17:45:05 +03:00
eeb982cb64 fix bug #53555 2021-11-08 17:44:00 +03:00
1c5a0bd0f4 fix memory pImageData 2021-11-08 14:10:11 +03:00
7c380c7bae fix bug #53552 2021-11-08 13:34:38 +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
baa03b2bfa Fix memory leak 2021-11-06 09:43:23 +03:00
90609cc515 trying to fix 52374. a:rPr corrected 2021-11-03 19:23:46 +03:00
d5da22e62b [android] Add formats 2021-11-03 17:24:02 +03:00
0294266863 [xlsb] add Table (records, unions and fill inside objects) 2021-11-03 16:29:45 +03:00
fc612032fd Fix bug 52637 2021-11-03 10:52:37 +03:00
dd1757e777 fix part of 52374. Animation tav tm problem and empty last conds 2021-11-02 21:35:21 +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
140802ac66 Merge pull request #760 from ONLYOFFICE/fix/v7.0.0-fix-bugs
Fix/v7.0.0 fix bugs
2021-11-02 17:02:52 +03:00
a6b459923e fix bug #53379 2021-11-02 17:01:44 +03:00
b86f0cc869 for bug #53435 2021-11-02 16:45:49 +03:00
c82c994184 fix bug #53435 2021-11-02 12:04:38 +03:00
06f3e4562a For bug #53323
Remove additional space for drop-down list button, because it causes layout problems for right-aligned drop-down lists
2021-11-02 11:50:40 +03:00
68e99604f7 Merge pull request #758 from ONLYOFFICE/fix/v7.0.0-fix-bugs
fix bug #53400
2021-11-02 11:44:07 +03:00
17ec7bc611 fix bug #53400 2021-11-02 11:42:57 +03:00
d5189a952a [xlsb] add AUTOFILTER (only records and unions) 2021-11-02 00:42:23 +03:00
85cfd2bf70 fix part of 52374. It was added second chance to convert of animation. 2021-11-01 22:01:30 +03:00
904eece17a Add GetFontBySymbol method to interface IApplicationFonts 2021-11-01 19:52:04 +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
ab1bd76a48 Fix bug #53270
Fix the problem with images form when saving to PDF
2021-10-31 23:29:12 +03:00
2746b35e12 Fix the problem with placeholders for text fields with specified maxCharacters parameter 2021-10-31 23:29:12 +03:00
6b755c03d3 Fix the problem with drawing border around text form
Also fix the problem with calculating the position of glyphs for text form with comb option enabled
2021-10-31 23:29:12 +03:00
4d9c7a4c01 Implement horizontal text align for text forms with com option enabled 2021-10-31 23:29:12 +03:00
5d7042746f Fix bug #53245
Fix the problem with rendering text fields to PDF with comb option enabled
2021-10-31 23:29:12 +03:00
f583be5ee4 Fix bug #53227
Add ability to set a placeholder for text forms, combo boxes and drop down lists
2021-10-31 23:29:12 +03:00
0870527a82 Implement ability to set a placeholder for comboxes and dropdown lists 2021-10-31 23:29:12 +03:00
ac70b849ca Implement ability to set placeholder text for text forms 2021-10-31 23:29:12 +03:00
4f529461f5 Worker version 2021-10-31 20:52:40 +03:00
ed261400d1 Fix typo 2021-10-31 15:04:27 +03:00
0ef7b83ec9 Add native support hash method for office 2021-10-31 14:55:13 +03:00
3cb19a4ceb Merge branch 'feature/xlsb2' into feature/xlsb3 2021-10-30 13:06:07 +03:00
1c91c72039 Fix ios build 2021-10-30 11:59:49 +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
ba9423c5ff Add project for hash.js module 2021-10-29 16:42:19 +03:00
1e9e2ab603 Merge branch 'release/v7.0.0' into develop 2021-10-29 16:19:54 +03:00
a2b318f6fb Merge pull request #754 from ONLYOFFICE/fix/v.7.0.0-fix-bugs
Fix/v.7.0.0 fix bugs
2021-10-29 16:17:55 +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
2bcaff66bf for bug #53395 2021-10-28 16:55:36 +03:00
17b25167b1 xps fix change font 2021-10-28 13:57:17 +03:00
0f2e6a251e fix part of #52374. Correct text and trying to fix nodeType 2021-10-27 22:40:01 +03:00
3267e7e0fc Fix android build 2021-10-27 21:44:26 +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
be358da524 fix bug #53304 2021-10-27 16:10:41 +03:00
8044c5157c fix bug #53379 2021-10-27 14:49:03 +03:00
7a05534142 fix part of #52374 2021-10-26 22:37:23 +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
537fbfb5e8 fix part of 52374. cahrset == 128 problem. 2021-10-25 19:36:13 +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
a42d8eb10a [android] Fix library name 2021-10-25 15:31:13 +03:00
0c4f285410 Merge pull request #753 from ONLYOFFICE/android_build
[android] Fix android build
2021-10-25 12:43:18 +03:00
dece8bdcba Fix ios build 2021-10-23 14:55:14 +03:00
6eedc2a2f9 [android] Fix android build 2021-10-23 12:25:37 +03:00
e2c0d814bb Working with EMF+ records 2021-10-22 20:28:41 +03:00
044e501b69 fix #52749 2021-10-22 19:26:19 +03:00
5d2b5c92d5 Fix ios build with new clang 2021-10-22 17:32:20 +03:00
c3b7d3de8b add DumpLine 2021-10-22 16:55:18 +03:00
0d20ab0378 Refactoring 2021-10-22 16:18:05 +03:00
29a65be954 fix bug #53032 2021-10-22 15:15:13 +03:00
b89180a549 [xlsb] add ext for styles (fill objects) 2021-10-22 14:49:05 +03:00
0e4f194269 Fix ios build 2021-10-22 12:03:17 +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
8fe6e1ce23 for bug 53032 2021-10-22 10:13:57 +03:00
f5332a8b59 Fix problem with writing streams to xml 2021-10-22 10:08:57 +03:00
65076f0a5e Refactoring .pro file 2021-10-21 23:29:10 +03:00
eeb325b8ad Fix typo 2021-10-21 23:14:20 +03:00
7c836c61a0 Fix build 2021-10-21 23:06:08 +03:00
2dea9f2096 Fix curl command 2021-10-21 21:36:15 +03:00
c0d4bcd16a Fix build without terminal colors 2021-10-21 21:18:07 +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
53f766271f fix bug #53233 2021-10-21 13:52:28 +03:00
8950b3535a [xlsb] add ext for conditionalFormatting, fix bugs 2021-10-20 23:20:37 +03:00
9db42c3494 trying to fix 52749 2021-10-20 18:43:08 +03:00
b4701ac83c develop new GetGlyphs 2021-10-20 18:09:29 +03:00
2a32233d13 fix #52046 2021-10-20 11:40:27 +03:00
ec9e3d098f Merge pull request #752 from ONLYOFFICE/fix/v7.0.0-fix-bugs2
fix bug #53032
2021-10-20 10:37:39 +03:00
e65851ef3b fix bug #53032 2021-10-20 10:36:36 +03:00
f5837dcf44 Fix build android 2021-10-20 09:54:16 +03:00
40dba648f1 add media inside RoundTripMasters 2021-10-19 23:10:12 +03:00
9e58de380e Merge remote-tracking branch 'origin/release/v7.0.0' into develop 2021-10-19 21:06:11 +03:00
b9fd01d632 Fix build 2021-10-19 20:55:09 +03:00
f15b5cd463 Merge pull request #750 from ONLYOFFICE/fix/v7.0.0-fix-bugs2
for bug #52781
2021-10-19 20:14:55 +03:00
efde950a11 for bug #52781 2021-10-19 20:13:58 +03:00
df5140532d Added reading of EMF records+ 2021-10-19 19:36:27 +03:00
5c61f9e6f1 trying to fix 52046 2021-10-19 18:39:29 +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
c1fd29423c fix slideMasters. Now we can convert presentation as before. Layouts are old. 2021-10-18 18:40:11 +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
de9f4a9814 remove RoundTrips layout. Trying to repair presentation 2021-10-15 22:50:32 +03:00
87d864527b Implement filled picture forms 2021-10-15 22:44:55 +03:00
a862facf6a Add ability to save picture value to picture forms
Also improve writing appearance of picture form in PDF
2021-10-15 22:44:55 +03:00
11291cba06 Handle autofit for multilined forms in PDF 2021-10-15 22:44:55 +03:00
b881f02a02 Handle align to center and right side for multiline forms
Also fix the problem with vertical shift and spacing between lines for multiline forms for better compatibility with AdobeReader
2021-10-15 22:44:55 +03:00
4385caa969 First variant of calculating line breaks for multiline form 2021-10-15 22:44:55 +03:00
087594e557 Handle horizontal align for text forms when saving to PDF 2021-10-15 22:44:55 +03:00
133a05542f Fix problem with non initialized text align in the forms
Also fix saving picture forms for now AdobeReader shows special picture sign
2021-10-15 22:44:55 +03:00
3703cde00a Rework writing parameters of a TrueType font 2021-10-15 22:44:55 +03:00
903ae550d0 Implement new parameters and work around checkboxes 2021-10-15 22:44:55 +03:00
bb31a9733a Fix problems with RadioButtons 2021-10-15 22:44:55 +03:00
42b4cdf733 Work on checkboxes 2021-10-15 22:44:55 +03:00
55b2fff256 Rework writing default appearances 2021-10-15 22:44:55 +03:00
36bb26c9fe Add ability to write non-cid True Type font
Also move field resources to AcroForm record
2021-10-15 22:44:55 +03:00
6285a59b43 Rework saving field with the same field name in PDF 2021-10-15 22:44:55 +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
2e28ca5550 delete some old file. Ready for removing roundtrips layouts 2021-10-15 18:27:19 +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
a9a7dce495 Merge pull request #748 from ONLYOFFICE/fix/v.7.0.0-fix-bugs
fix bug #53116
2021-10-14 12:38:52 +03:00
9099a04b2d fix build linux 2021-10-14 12:36:41 +03:00
af246c553e . 2021-10-14 12:27:09 +03:00
fd0b734a2b fix bug #53116 2021-10-14 12:00:51 +03:00
3d18db25e3 Merge pull request #747 from ONLYOFFICE/gradle_7
[android] Migrate to gradle 7
2021-10-14 11:52:26 +03:00
42e515dfec . 2021-10-14 11:08:50 +03:00
dae7dac2d5 Merge pull request #746 from ONLYOFFICE/fix/3thparty-gitignore
Add to ignore downloaded sources of curl and openssl projects
2021-10-14 11:06:18 +03:00
a519bcf0c4 Add to ignore downloaded sources of curl and openssl projects 2021-10-14 11:05:11 +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
14c0a2a7c0 add Round Trip Notes masters 2021-10-13 21:36:20 +03:00
06f6278e59 Merge pull request #745 from ONLYOFFICE/fix/v.7.0.0-fix-bugs
Fix/v.7.0.0 fix bugs
2021-10-13 19:30:21 +03:00
77b206a62c for bug #52767 2021-10-13 19:29:15 +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
74359e39a8 Merge branch 'fix/v6.5.0-fix-bugs' into fix/v.7.0.0-fix-bugs 2021-10-13 10:36:21 +03:00
6f01769c4d fix build 2021-10-13 10:32:35 +03:00
531b4ba0dc [x2t] Fix conversion to oform 2021-10-13 00:24:59 +03:00
d003dd8310 add master and clrMap RoundTrips. Correct handout and layouts 2021-10-12 22:50:33 +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
c58817fc18 add base slideMasters 2021-10-11 22:42:17 +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
0c1c2b4c2e for bug #37564 2021-10-11 12:54:28 +03:00
8008ff2e29 fix bug #44721 2021-10-11 11:20:53 +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
24acbd309a return to classic write theme. Add layouts and their _rels 2021-10-08 18:38:02 +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
23f7029703 Merge pull request #740 from ONLYOFFICE/fix/v6.5.0-fix-bugs
Fix/v6.5.0 fix bugs
2021-10-08 08:51:53 +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
8c212908bd fix bug #52560 2021-10-07 19:08:05 +03:00
5bc07126a9 pdf identifyMem fix 2021-10-07 18:40:11 +03:00
19420e98d4 fix bug #53001 2021-10-07 14:04:25 +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
fe50098db7 Trying to use pptx classes 2021-10-06 23:15:41 +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
37a554f1f9 fix bug #52978 2021-10-06 16:54:00 +03:00
fbd9eba8bd Write all RoundTripThemes. It was already before, but now it with new classes 2021-10-06 13:35:23 +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
272a270bc8 Merge remote-tracking branch 'origin/master' into release/v6.5.0 2021-10-01 14:46:00 +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
ffdb21583e Merge pull request #738 from ONLYOFFICE/fix/v6.5.0-fix-bugs
add lcid for xls(sheet)
2021-09-30 17:00:34 +03:00
9bce904409 add lcid for xls(sheet) 2021-09-30 16:58:44 +03:00
c5c78fce18 Merge pull request #737 from ONLYOFFICE/fix/v6.5.0-fix-bugs
xlsx_flat convert
2021-09-30 15:14:32 +03:00
0e6e32d4da Merge branch hotfix/v6.4.1 into release/v6.5.0 2021-09-30 12:13:49 +00:00
5de83dc86a Merge branch hotfix/v6.4.1 into develop 2021-09-30 12:13:42 +00:00
16238f5e80 xlsx flat convert 2021-09-30 14:59:12 +03:00
9d520219ae Merge pull request #733 from ONLYOFFICE/fix/v6.5.0-fix-bugs
fix bug #52754
2021-09-30 14:37:56 +03:00
9e342b93cf fix bug #52754
convert xmlSpreadsheet20003->xlsx without bin_t
add cell horizontal aligment center_continuous
2021-09-30 14:36:24 +03: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
be1d417639 [x2t] Fix docm->dotm conversion 2021-09-29 23:16:35 +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
9acd562c20 Merge pull request #731 from ONLYOFFICE/fix/v6.5.0-fix-bugs
.
2021-09-29 09:57:04 +03:00
17126e2f6a . 2021-09-29 09:54:21 +03:00
c36a6d8ce2 Merge pull request #730 from ONLYOFFICE/fix/v6.5.0-fix-bugs
fix bug #52767
2021-09-28 20:21:33 +03:00
3fd3940119 fix bug #52767
add format xls sheet
2021-09-28 20:20:32 +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
38a2f8535f Merge pull request #727 from ONLYOFFICE/fix/v6.5.0-fix-bugs
oform
2021-09-28 11:33:53 +03:00
e310954222 oform 2021-09-28 11:32:38 +03:00
d1488f6a0a Merge pull request #724 from ONLYOFFICE/fix/v6.5.0-fix-bugs-ppt
disable RoundTripTheme
2021-09-27 21:08:32 +03:00
497b201dc1 new theme from master RoundTrip 2021-09-27 18:38:54 +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
2440bf68a5 correct some not ziped RoundTrips 2021-09-27 16:35:20 +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
288b0dcb90 Fix bug with GetProperty method 2021-09-26 16:39:43 +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
94059919d7 special RoundTrip commit for saving zip 2021-09-24 17:02:19 +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
65c35b9af7 Implement background color for forms in PDF
Also implement new parameters for text forms and picture forms in PDF
2021-09-24 14:17:16 +03:00
bee3ff541a Rework PDFWriter on new CFieldInfo class 2021-09-24 14:17:16 +03:00
9b64445e3e Rework CFormFieldInfo class and add new parameters 2021-09-24 14:17:16 +03:00
00802528e5 Update for PDFWriter 2021-09-24 14:17:16 +03:00
e4c1384bbd Add empty functions for future work on field keys 2021-09-24 14:17:16 +03:00
817b90418f Implement AutoFit option when saving form to PDF 2021-09-24 14:17:16 +03:00
ba57308120 disable RoundTripTheme 2021-09-24 11:50:31 +03:00
df6fb494be Merge pull request #719 from ONLYOFFICE/fix/v6.5.0-fix-bugs3
Fix/v6.5.0 fix bugs3
2021-09-23 18:06:27 +03:00
931e19048b fix bug #52688 2021-09-23 18:02:43 +03:00
e5e090f385 Added scrolling in the record editing widget 2021-09-22 23:55:00 +03:00
f5fb1cd5a7 Special version with writting RoundTrips to custom folder 2021-09-22 23:33:48 +03:00
63f6e16664 Add RoundTripExtractor 2021-09-22 17:23:20 +03:00
709360930a fix . 2021-09-22 17:17:34 +03:00
6c2b1bf1a9 fix bug #52667 2021-09-22 16:14:58 +03:00
a705625321 All RoundTrips were rewritten 2021-09-22 14:26:10 +03:00
bf75cfab48 add RoundTrip records 2021-09-22 12:06:13 +03:00
83bf58cb93 [xlsb] add SheetProtection, TableParts, SortState parsing (records and
fill inner objects)
2021-09-22 11:03:10 +03:00
3bfb4d4f29 rewrite WriteRoundTripSlideMasters, but without _rels 2021-09-22 00:12:53 +03:00
d4fd9314bc Merge branch 'feature/ppt_7' of https://github.com/ONLYOFFICE/core into feature/ppt_7 2021-09-21 20:39:28 +03:00
0937f5ef8f Trying to add RoundTrip slideMasters 2021-09-21 18:40:54 +03:00
d2a3c8b139 Correct writting RoundTrip theme. Rewritting... 2021-09-21 15:30:51 +03:00
39765a5a61 Collect all RoundTrip for themes. Rewritting... 2021-09-21 14:41:23 +03:00
b75eeaefe6 Merge pull request #718 from ONLYOFFICE/fix/v6.5.0-fix-bugs-ppt
Fix/v6.5.0 fix bugs ppt
2021-09-21 09:22:25 +03:00
ff0f86b4ba Merge branch 'feature/ppt_7' of https://github.com/ONLYOFFICE/core into feature/ppt_7 2021-09-20 19:51:30 +03:00
83feb20265 Special version with ppt record's tree 2021-09-20 18:34:48 +03:00
07711ba4d1 Merge branch 'fix/v6.5.0-fix-bugs-ppt' into feature/ppt_7 2021-09-20 12:14:53 +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
1d1054d762 Merge remote-tracking branch 'origin/fix/v6.5.0-fix-bugs-ppt' into feature/ppt_7 2021-09-17 12:59:52 +03:00
8a29a3e9e4 Merge branch 'release/v6.5.0' into develop 2021-09-17 11:56:03 +03:00
a0ebe7acb3 Merge remote-tracking branch 'origin/hotfix/v6.4.1' into release/v6.5.0 2021-09-17 11:45:17 +03:00
154f9691a3 [android] Clean code 2021-09-17 10:14:52 +03:00
78e4a4e92b Refactoring 2021-09-16 22:27:25 +03:00
996b85951d [android][all] Migrate version gradle plugin to 7 2021-09-16 18:39:23 +03:00
2ace756da4 Merge pull request #715 from ONLYOFFICE/fix/v6.5.0-fix-bugs1
fix bug #52422
2021-09-16 14:17:40 +03:00
d964cb3d37 fix bug #52422 2021-09-16 14:16:24 +03:00
4ac1c8c928 some debug stuff 2021-09-15 21:45:26 +03:00
d1ac7c9e34 add roundTrip Layout 2021-09-15 17:21:58 +03:00
abed5269b2 [xlsb] add parsing SheetData object 2021-09-15 14:24:27 +03:00
9267fc8aeb Merge branch 'fix/v6.5.0-fix-bugs-ppt' of https://github.com/ONLYOFFICE/core into fix/v6.5.0-fix-bugs-ppt 2021-09-15 10:41:46 +03:00
1fcc07708b Revert "Correct RoundTrip theme.xml for Note and Handout"
This reverts commit b451472ba3.
2021-09-15 10:41:30 +03:00
0455514ea9 Added the ability to create a text record 2021-09-14 22:20:43 +03:00
fb5c459e05 Starting roundTrip Layout 2021-09-14 16:38:28 +03:00
c5d85bc2b9 Correct and rewrite roundTrip theme 2021-09-14 16:23:34 +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
b451472ba3 Correct RoundTrip theme.xml for Note and Handout 2021-09-13 17:32:46 +03:00
0a702d44e4 replace grepPaths() to PPT Converter.h/cpp 2021-09-13 12:41:50 +03:00
14f0249708 rewrite grepPaths() std -> boost 2021-09-10 18:15:52 +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
4813f1d07a Removed unnecessary theme/_rels/ 2021-09-08 15:17:28 +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
9728a2277b correct RoundTripTheme layouts 2021-09-07 18:44:31 +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
35bd761c9c Merge pull request #711 from ONLYOFFICE/fix/v6.5.0-fix-bugs
Fix/v6.5.0 fix bugs
2021-09-06 17:35:20 +03:00
78bc7afa13 Merge remote-tracking branch 'origin/fix/v6.4.1-fix-bugs2' into fix/v6.5.0-fix-bugs 2021-09-06 17:33:26 +03:00
8742086a0a fix bug #52344 2021-09-06 17:32:41 +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
30264e12d1 Merge pull request #710 from ONLYOFFICE/fix/v6.5.0-fix-bugs
.
2021-09-03 17:29:16 +03:00
3c19d5e26e . 2021-09-03 17:26:35 +03:00
7b0b4b9cd9 Merge pull request #709 from ONLYOFFICE/fix/v6.5.0-fix-bugs
fix merge
2021-09-03 17:17:40 +03:00
9ba942e3a1 fix merge 2021-09-03 17:16:09 +03:00
84b3883a1f Merge remote-tracking branch 'origin/hotfix/v6.4.1' into release/v6.5.0 2021-09-03 17:02:35 +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
53b55326be Merge remote-tracking branch 'origin/hotfix/v6.4.1' into develop 2021-09-01 07:59:02 +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
ce43301d5f Merge branch release/v6.4.0 into develop 2021-08-26 13:50:47 +00: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
9098f18db2 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-08-23 10:24:30 +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
d36c3aeea3 fix protection read 2021-08-19 12:15:50 +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
78cd4ed710 fix bad drawing part in smartarts;
fix circles smartart
2021-08-16 16:10:23 +03:00
c06c0ad088 clip stack (debug needed) 2021-08-16 15:10:18 +03:00
fb28aadbb9 clientData & fLocksText 2021-08-16 11:45:47 +03:00
cb86631775 Merge pull request #689 from ONLYOFFICE/release/v6.4.0
Release/v6.4.0
2021-08-16 09:37:27 +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
5d917b93e3 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-08-12 18:49:22 +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
660acc4e0b Merge branch hotfix/v6.3.2 into develop 2021-08-10 12:23:11 +00: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
a1a81a808c fix build 2021-08-07 09:18:03 +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
2056d81343 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-08-05 19:52:23 +03:00
d4de820fa3 xps external and internal links 2021-08-05 14:30:22 +03:00
1078df18f8 . 2021-08-04 15:01:26 +03:00
3729083e3e Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-08-04 14:51:56 +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
8d143b8682 Merge pull request #674 from ONLYOFFICE/feature/v8_inspector_xx
Support v8 inspector
2021-07-30 17:01:31 +03:00
4bb6c8554c refactoring 2021-07-30 16:59:15 +03:00
2dc8038257 temp file 2021-07-30 14:39:14 +03:00
af184659f3 restored v8.pri and ixwebsocket sources 2021-07-30 14:06:49 +03:00
7698d47e09 finalized check for 'silent' breakpoints 2021-07-30 13:58:09 +03:00
bfa4e0a5d0 found workaround with setting breakpoints 2021-07-30 01:20:11 +03:00
92519a5d62 added readme 2021-07-29 21:30:56 +03:00
e78bc7ea57 cleaned the code up 2021-07-29 19:09:30 +03:00
9746b63f46 removed redundunt code from inspector 2021-07-29 18:48:16 +03:00
458c9ba638 fixed pause on breakpoints and steps 2021-07-29 18:23:04 +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
cab34310bf tested v8-debug - it also works fine 2021-07-27 23:53:19 +03:00
9b8d805ea9 cleaner and still working version 2021-07-27 23:31:53 +03:00
9cf28e70e0 works and looks as Oleg wanted 2021-07-27 21:26:22 +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
37f5bdcaf5 fully working version 2021-07-27 11:31:58 +03:00
ec9a1802bf working version 2021-07-26 19:55:52 +03:00
5214162718 general compilation and optimization glyphs 2021-07-26 18:37:49 +03:00
c92847d254 check for logging long message added 2021-07-26 15:11:02 +03:00
6a0d882178 very bad desing, needs to be rewritten. but it works 2021-07-26 00:58:39 +03:00
086212209f trial works 2021-07-25 23:20:27 +03:00
5490140a02 version with server out of inspector. it does not work, commiting just in case, to not lose it 2021-07-24 23:26:30 +03:00
37402ebb39 [x2t] Set m_bMacro flag according to nFormatTo 2021-07-24 19:48:20 +03:00
89c2322393 experimental 2021-07-23 18:53:32 +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
6aa9b0518b removed shutting the server down from the inspector
also added temporary logging to server
2021-07-22 13:35:32 +03:00
f47f27890c one pic for a page 2021-07-22 11:55:55 +03:00
bb8ce719b7 Refactoring 2021-07-22 11:10:51 +03:00
02d93007d4 Move inspector files to v8_use_inspector section 2021-07-22 10:37:19 +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
cdbf82ab7e . 2021-07-21 10:54:16 +03:00
9f57fdb739 removed file checking 2021-07-21 00:59:34 +03:00
2dc209afcc added shutting the server down and a file to control debug 2021-07-21 00:43:46 +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
0e9fc9329d deleted scriptholder class 2021-07-20 14:03:21 +03:00
a3d95d67c5 cleaned the code up 2021-07-20 13:56:23 +03:00
af3cf7f33a added counting the number of inspectors in single thread
js code can call c++ code, that can again call js code, thus creating more than one inspector in single thread
it leaded to creating multiple servers that attempted to listen on the single port and failed
to distribute ports between inspectors counting of inspectors amount in each thread was added
now several inspectors in single thread gain unique ports
2021-07-19 23:24:44 +03:00
7393a8220b . 2021-07-19 23:08:13 +03:00
18063bbbbf Refactoring and added recording of the remaining records in Emf 2021-07-19 21:50:31 +03:00
e00e309662 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-07-19 19:04:46 +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
2567e61944 [x2t] Fix VbaProject reading from Editor.bin 2021-07-19 14:20:07 +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
1ee41654a2 added new files to js_base.pri 2021-07-19 03:12:08 +03:00
a1a0feb432 fine version with test sample in main.cpp 2021-07-19 02:25:45 +03:00
9372226d5c preliminary working version 2021-07-19 01:42:47 +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
f8a9135f93 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-07-17 16:30:21 +03:00
e13a95fa0a . 2021-07-17 10:09:22 +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
e4f9cf881b fix bug #49667 2021-07-16 11:20:11 +03:00
79283a087a [xlsb] add BOOKVIEWS, BUNDLESHS unions and dependent records & structures 2021-07-16 10:54:36 +03:00
79882d03af [x2t] Add AVS_OFFICESTUDIO_FILE_OTHER_ODF to convert to any odf format; Split AVS_OFFICESTUDIO_FILE_DOCUMENT_PACKAGE format into parts; Add macro param to changeForm 2021-07-15 20:05:54 +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
26e5889be5 Refactoring 2021-07-13 11:57:27 +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
b32d52bb85 repaired inspector client
i even more shamefully forgot to schedule pause before script execution
2021-07-12 13:55:04 +03:00
2e3a753280 modified .pro file so the project could be build for testing
also repaired Inspector: i shamefully forgot to initialize isolate pointer and logging flag
2021-07-12 12:44:51 +03:00
f81b269215 removed unused code 2021-07-11 18:52:01 +03:00
9f9a19e84b added comments, restructured code a bit 2021-07-11 18:31:38 +03:00
633f2b56f9 made fine .pri file for inspector usage 2021-07-11 18:30:57 +03:00
0ba261fa11 commited annoying ixwebsocket_internal.cpp 2021-07-11 13:19:55 +03:00
e3b71d57fc modified a bit v8.pri and ixwebsocket_internal
CIXWebsocket now prints error info to std::cerr and closes itself on destruction
2021-07-11 13:13:06 +03:00
a6f8b7c7ac deleted main.cpp from v8.pri 2021-07-11 12:56:35 +03:00
f542483beb added v8_use_inspector to v8.pri 2021-07-11 10:54:08 +03:00
a67b397491 project finalized, but not tested yet
a lot of code to make cleaner and better
2021-07-11 00:32:06 +03:00
495493ee59 moved runScript implementation into CJSContextPrivate
also slightly modified server
2021-07-10 21:32:17 +03:00
b3dec6066a connected CJSContextPrivate and CInspectorClient
declared CInspectorClient as a friend of CJSContextPrivate so client could use its runScript method later
forward declared CJSContextPrivate before CInspectorClient so client can store pointer to CJSContextPrivate inside
2021-07-10 16:26:15 +03:00
4a0ae7eff3 made isolate locking macros in utils
now depending on V8_DEBUG_MULTITHREADED define utils methods may lock or not isolate they use
also added namespaces and changed class names to conventional
2021-07-10 16:10:16 +03:00
16f55bc01a entering isolate scope removed from utils
utils are renamed into single thread utils so it's indicated that
they should access isolate only from single thread, and thus inspector
should be single-threaded, as it is now with boost::beast server realization
2021-07-10 15:13:50 +03:00
c309339666 Major refactoring 2021-07-09 22:29:16 +03:00
539d7b1356 slightly modified inspector 2021-07-09 18:04:51 +03:00
3185ca0f36 [XlsbFormat] fix build 2021-07-09 17:36:04 +03:00
4dd2aa8df6 x2t - doc & write protection 2021-07-09 15:10:05 +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
3eb5c21b10 preliminary working (at least, on my machine) version
comments and namespaces to add, logging to implement, some other features to be done.
but it works and might be tested.
2021-07-08 18:16:57 +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
f02690c3fe Developing... 2021-07-04 21:35:53 +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
0fb91dc2f8 Merge remote-tracking branch 'origin/release/v6.4.0' into develop 2021-07-02 10:44:38 +03:00
8a39c5470e build wasm 2021-07-01 18:22:00 +03:00
6174e93a7c Fix v8 crash with bad script 2021-07-01 17:37:10 +03:00
08d55a40ff null pointer exception fix 2021-07-01 17:15:17 +03:00
ca716c5b7d Fix string creating 2021-07-01 17:02:03 +03:00
ed9bb79889 Add zlib for ixwebsocket 2021-07-01 15:29:31 +03:00
1747439048 wasm JBig2 2021-06-30 18:47:19 +03:00
419d0ba99a draws smth 2021-06-30 17:47:07 +03:00
9a91fac28c . 2021-06-30 13:55:26 +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
17de9d8da0 Refactorng 2021-06-29 08:59:34 +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
8c560d638d Rename libnetwork => libkernel_network (conflict with system) 2021-06-27 10:53:04 +03:00
1541e891b4 Fix build on macos 2021-06-27 09:46:52 +03:00
daf2f1a20f Merge pull request #646 from ONLYOFFICE/feature/nativeRefactoring
Feature/native refactoring
2021-06-26 22:14:59 +03:00
fa7690a239 Refactoring (add network library) 2021-06-26 22:11:52 +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
4a621f44c2 Refactoring (network library & kernel) 2021-06-25 17:10:05 +03:00
2b29a23b26 [DocxFormatLib][XlsbFormat] add BaseRecords, biff12 stream parser and working with sharedStrings.bin 2021-06-25 16:32:35 +03:00
2e20dd9058 Repair FontAssistant for support core-ext (deprecated class) 2021-06-25 10:53:02 +03:00
13f125f508 Merge remote-tracking branch 'origin/release/v6.4.0' into feature/nativeRefactoring 2021-06-25 10:45:23 +03:00
c025e51106 Merge pull request #645 from ONLYOFFICE/feature/webscoket
Feature/webscoket
2021-06-25 10:16:56 +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
b48fd55607 Refactoring 2021-06-20 20:13:46 +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
4603f6db84 . 2021-06-15 19:28:27 +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
985a4b41dc . 2021-06-13 08:12:02 +03:00
5be7c96319 . 2021-06-12 16:47:49 +03:00
b3a9d8d07d . 2021-06-12 08:21:23 +03:00
e9944e0147 . 2021-06-11 20:09:54 +03:00
3f0bb334ed adding icu 2021-06-11 17:48:52 +03:00
0363867177 smart arts 2021-06-11 17:10:37 +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
f26de54016 Fix bug 50799 2021-06-09 18:00:28 +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
2c2e74d182 Merge remote-tracking branch 'remotes/origin/release/v6.4.0' into develop 2021-06-01 18:56:36 +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
7d4f6a24d6 Merge pull request #627 from ONLYOFFICE/release/v6.4.0
Release/v6.4.0
2021-05-31 19:40:59 +03:00
3e7519ff4f create graphics 2021-05-31 14:45:59 +03:00
f9e7e8c91f Fix includes 2021-05-31 10:16:07 +03:00
b686c743c2 Implement class for picture field 2021-05-31 10:04:56 +03:00
971611603b Implement drawing border for field and special border for text-comb fields 2021-05-30 19:27:11 +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
953af5b6b1 [network] add upload file/data external (curl) 2021-05-17 22:05:54 +03:00
4e761e9f1d 14
Function section of math conversation
2021-05-17 11:45:23 +03:00
4929328d7f [common][network] separate FileTransporter for 2 interfaces FileDownloader and FileUploader for client. Add UploadData, UploadFile, DownloadFile function on inside classes 2021-05-14 21:10:15 +03:00
c71da950ee [Common] add network lib 2021-05-13 18:43:25 +03:00
62e0ca27d1 scaling fix, little refactoring 2021-05-13 16:28:07 +03:00
8123b8d899 Merge branch 'feature/webscoket' of https://github.com/ONLYOFFICE/core into feature/webscoket 2021-05-11 18:47:56 +03:00
828112bc48 [websocket] default ixwebsocket 2021-05-11 18:47:23 +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
fd3c746db2 [3dParty] fix curl build ios 2021-05-07 14:38:47 +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
40e05fcb72 [3dParty][webscoket] add mac support 2021-05-04 16:35:13 +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
e8657eff2a [3dParty][socket] add support ixwebsocket for win64 2021-04-23 15:19:05 +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
55766a4b7a [3dParty][websocket] fix include/lib openssl 2021-04-19 14:14:11 +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
e18873cfa6 [3dParty][websocket] fix includes 2 2021-04-16 01:24:24 +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
7cbfe8eea4 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into feature/webscoket 2021-04-14 12:59:52 +03:00
ae784a8e29 [3dParty][websocket] fix socketrocket name 2021-04-13 20:14:33 +03:00
6d5e9a6835 [3dParty][websocket] fix build scripts 2021-04-13 19:57:36 +03:00
819dd7b55f Rename Common/3dParty/socketRocket/socketRocket.pri to Common/3dParty/socketrocket/socketrocket.pri 2021-04-13 19:29:04 +03:00
ea281eb57c fix
little radial fix
2021-04-13 14:15:39 +03:00
157934032e [3dParty][websocket] build openssl and ixwebsocket for ios 2021-04-12 22:21:13 +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
e0278e4b13 [websocket][interface] refactoring code 2 2021-04-07 19:08:16 +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
32d9962dd1 [websocket][interface] refactoring code 2021-04-06 21:07:53 +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
261430fdf9 [3dParty][lib] add build socketRocket for ios & mac 2021-04-02 19:06:13 +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
948f3b5e09 [websocket][ios] add wrappers 2021-03-25 11:17:12 +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
5984794ca5 [3dParty][mobile] add build scripts curl, openssl, ixwebsocket 2021-03-17 19:06:31 +03:00
b725ab4d75 added test trinagle gradient
still buggy
2021-03-17 18:31:07 +03:00
3da2f58ce7 [android][editors] add upload image by curl 2021-03-16 21:05:20 +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
65b243b19f [android][editors] add async loadUrlImage, reconnect after 2 sec, some feature 2021-03-12 15:15:33 +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
723badfdab [android][editors] add websocket support 2021-02-26 15:03:07 +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
8973 changed files with 1374132 additions and 481371 deletions

61
.gitignore vendored
View File

@ -1,41 +1,4 @@
build/
dictionaries/
LicenceManager/
Common/boost_1_58_0
Common/3dParty/boost/boost_1_58_0
Common/3dParty/boost/boost.data
Common/3dParty/boost/ios
Common/3dParty/boost/osx
Common/3dParty/icu/icu
Common/3dParty/icu/win_64
Common/3dParty/icu/win_32
Common/3dParty/icu/linux_64
Common/3dParty/icu/linux_32
Common/3dParty/icu/mac_64
Common/3dParty/icu/ios
Common/3dParty/icu/android
Common/3dParty/icu/mac-build
Common/3dParty/cef/win_64
Common/3dParty/cef/win_32
Common/3dParty/cef/linux_64
Common/3dParty/cef/linux_32
Common/3dParty/cef/mac_64
Common/3dParty/curl/win_64
Common/3dParty/curl/win_32
Common/3dParty/curl/linux_64
Common/3dParty/curl/linux_32
Common/3dParty/curl/mac_64
Common/3dParty/v8/.cipd
Common/3dParty/v8/.gclient
Common/3dParty/v8/.gclient_entries
Common/3dParty/v8/v8
Common/3dParty/v8/depot_tools
Common/3dParty/v8/win_64
Common/3dParty/v8/win_32
Common/3dParty/v8/linux_64
Common/3dParty/v8/linux_32
Common/3dParty/v8/mac_64
Common/3dParty/openssl/openssl
**/core_build
**/Release
**/Debug
@ -50,15 +13,7 @@ Thumbs.db
*.xcuserstate
*.xcuserdatad
**/Makefile.*
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2.idl
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2.tlb
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2.h
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2_i.c
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2_p.c
ASCOfficeXlsFile2/win32/dlldata.c
OfficeUtils/win32/OfficeUtilsLib/OfficeUtilsLib/ReadMe.txt
X2tConverter/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile
X2tConverter/Common/DocxFormat/DocxFormatLib/Makefile
**/Makefile
*.7z
*.obj
*.pdb
@ -71,3 +26,17 @@ X2tConverter/Common/DocxFormat/DocxFormatLib/Makefile
*.dat
*.txt
*.log
*.ipch
*.ipch
*.ipch
*.db-wal
*.db-shm
*.db
*.opendb
DesktopEditor/fontengine/js/common/freetype-2.10.4

View File

@ -100,9 +100,6 @@ namespace DocFileFormat
typedef std::pair <int, int> Int_Pair;
static const int gc_nZeroWidth = 222;
#define ENCODING_UTF16 1200
#define ENCODING_WINDOWS_1250 1250
#define ENCODING_UTF8 65001

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

@ -61,7 +61,7 @@ namespace DocFileFormat
namespace DocFileFormat
{
_UINT32 Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
_UINT32 Converter::Convert(WordDocument* doc, WordprocessingDocument* docx)
{
if (!doc || !docx) return S_FALSE;
@ -81,21 +81,9 @@ namespace DocFileFormat
}
//write document.xml and the header and footers
MainDocumentMapping mainDocMapping( &context, progress );
MainDocumentMapping mainDocMapping( &context);
doc->Convert( &mainDocMapping );
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 810000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 810000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
//Write numbering.xml
if (doc->listTable)
{
@ -103,129 +91,42 @@ namespace DocFileFormat
doc->listTable->Convert( &numberingMapping );
}
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 850000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 850000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 875000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 875000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
//write the footnotes
FootnotesMapping footnotesMapping( &context );
doc->Convert( &footnotesMapping );
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 900000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 900000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
//write the endnotes
EndnotesMapping endnotesMapping( &context );
doc->Convert( &endnotesMapping );
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 925000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 925000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
//write the comments
CommentsMapping commentsMapping( &context );
doc->Convert( &commentsMapping );
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 950000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 950000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
//write settings.xml at last because of the rsid list
if (doc->DocProperties)
{
SettingsMapping settingsMapping( &context );
doc->DocProperties->Convert( &settingsMapping );
}
if ( progress != NULL )
{
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 975000 );
short cancel = 0;
progress->OnProgressEx( progress->caller, DOC_ONPROGRESSEVENT_ID, 975000, &cancel );
if ( cancel != 0 )
{
return S_FALSE;
}
}
return S_OK;
}
_UINT32 Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
_UINT32 Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, bool &bMacros)
{
WordDocument doc(progress, m_sTempFolder, m_nUserLCID);
WordDocument doc(m_sTempFolder, m_nUserLCID);
WordprocessingDocument docx(strDstDirectory, &doc);
_UINT32 result = doc.LoadDocument(strSrcFile, password);
if (result == 0)
{
result = Convert(&doc, &docx, progress);
result = Convert(&doc, &docx);
if (result == 0)
{
docx.SaveDocument(bMacros);
if (progress)progress->OnProgress(progress->caller, DOC_ONPROGRESSEVENT_ID, 1000000);
short cancel = 0;
if (progress)progress->OnProgressEx(progress->caller, DOC_ONPROGRESSEVENT_ID, 1000000, &cancel);
if (0 != cancel)
{
return S_FALSE;
}
result = docx.SaveDocument(bMacros);
}
}

View File

@ -34,8 +34,6 @@
#include <string>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
struct ProgressCallback;
namespace DocFileFormat
{
class WordDocument;
@ -50,9 +48,9 @@ namespace DocFileFormat
std::wstring m_sTempFolder;
int m_nUserLCID;
_UINT32 LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
_UINT32 LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, bool &bMacros);
private:
_UINT32 Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
_UINT32 Convert(WordDocument* doc, WordprocessingDocument* docx);
};
}

View File

@ -52,9 +52,9 @@ namespace DocFileFormat
m_bInternalXmlWriter = false;
_writeWebHidden = false;
_isSectionPageBreak = 0;
_isTextBoxContent = false;
m_context->_docx->_isSectionPageBreak = 0;
//--------------------------------------------
_embeddedObject = false;
}
@ -68,11 +68,12 @@ namespace DocFileFormat
m_bInternalXmlWriter = false;
_writeWebHidden = false;
_isSectionPageBreak = 0;
_isTextBoxContent = false;
_embeddedObject = false;
_cacheListNum = -1;
m_context->_docx->_isSectionPageBreak = 0;
}
DocumentMapping::~DocumentMapping()
@ -115,7 +116,7 @@ namespace DocFileFormat
{
if ((fc >= m_document->ListPlex->CharacterPositions[i-1]) && (fc_end <= m_document->ListPlex->CharacterPositions[i]))
{
ListNumCache* listNum = dynamic_cast<ListNumCache*> (m_document->ListPlex->Elements[i-1]);
ListNumCache* listNum = dynamic_cast<ListNumCache*> (m_document->ListPlex->Elements[i - 1]);
return listNum->value;
}
@ -233,7 +234,7 @@ namespace DocFileFormat
}
//-----------------------------------------------------------
//_cacheListNum = getListNumCache(fc, fcEnd);
_isSectionPageBreak = 0;
m_context->_docx->_isSectionPageBreak = 0;
if (sectionEnd)
{
// this is the last paragraph of this section
@ -244,7 +245,7 @@ namespace DocFileFormat
ParagraphPropertiesMapping oMapping(m_pXmlWriter, m_context, m_document, paraEndChpx, isBidi, findValidSepx(cpEnd), _sectionNr);
papx->Convert(&oMapping);
_isSectionPageBreak = oMapping.get_section_page_break();
m_context->_docx->_isSectionPageBreak = oMapping.get_section_page_break();
}
++_sectionNr;
@ -360,8 +361,10 @@ namespace DocFileFormat
RELEASEOBJECT(chpxFcs);
RELEASEOBJECT(chpxs);
return cpEnd++;
return (std::max)(cp, cpEnd); //ralph_scovile.doc
}
void DocumentMapping::writeParagraphRsid (const ParagraphPropertyExceptions* papx)
@ -515,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];
@ -535,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)
{
@ -823,9 +828,9 @@ namespace DocFileFormat
}
else if (TextMark::PageBreakOrSectionMark == code)
{
if (_isSectionPageBreak == 0 || _isSectionPageBreak == 2)
if (m_context->_docx->_isSectionPageBreak == 0 || m_context->_docx->_isSectionPageBreak == 2)
{
_isSectionPageBreak = -1;
m_context->_docx->_isSectionPageBreak = -1;
writeTextElement(text, textType);
@ -914,22 +919,26 @@ namespace DocFileFormat
//<w:sym w:font="Symbol" w:char="F062"/>
m_pXmlWriter->WriteNodeBegin(L"w:sym", true);
m_pXmlWriter->WriteAttribute(L"w:font", FormatUtils::XmlEncode(s.FontName));
m_pXmlWriter->WriteAttribute(L"w:char", FormatUtils::XmlEncode(s.HexValue));
m_pXmlWriter->WriteNodeEnd(L"", true);
if (false == s.HexValue.empty()) //09FluGuide.doc - поврежденный
{
m_pXmlWriter->WriteNodeBegin(L"w:sym", true);
if (false == s.FontName.empty()) // ??? default
m_pXmlWriter->WriteAttribute(L"w:font", FormatUtils::XmlEncode(s.FontName));
m_pXmlWriter->WriteAttribute(L"w:char", FormatUtils::XmlEncode(s.HexValue));
m_pXmlWriter->WriteNodeEnd(L"", true);
}
}
else if ((TextMark::DrawnObject == code) && fSpec)
{
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;
@ -1303,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);
@ -1380,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;
@ -1391,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:
@ -1424,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:
@ -1444,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 );
@ -1466,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;
@ -1788,7 +1787,11 @@ namespace DocFileFormat
{
if ((m_document->FootnoteReferenceCharactersPlex != NULL) && (m_document->FootnoteReferenceCharactersPlex->IsCpExists(cp)))
{
FootnoteDescriptor* desc = dynamic_cast<FootnoteDescriptor*>(m_document->FootnoteReferenceCharactersPlex->Elements[_footnoteNr]);
FootnoteDescriptor* desc = NULL;
if (_footnoteNr < m_document->FootnoteReferenceCharactersPlex->Elements.size())
desc = dynamic_cast<FootnoteDescriptor*>(m_document->FootnoteReferenceCharactersPlex->Elements[_footnoteNr]);
if ((desc) && (false == desc->bUsed))
{
desc->bUsed = true;

View File

@ -154,7 +154,7 @@ namespace DocFileFormat
int _endnoteNr;
int _commentNr;
bool _isTextBoxContent;
int _isSectionPageBreak; //0 - not set, 1 -page break, 2 - continues, -1 - already
// int _isSectionPageBreak; //0 - not set, 1 -page break, 2 - continues, -1 - already
bool _writeWebHidden;
std::wstring _writeAfterRun;
std::wstring _lastOLEObject;

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

@ -34,9 +34,8 @@
namespace DocFileFormat
{
MainDocumentMapping::MainDocumentMapping (ConversionContext* ctx, const ProgressCallback* ffCallBack) : DocumentMapping( ctx, this ), m_ffCallBack(NULL)
MainDocumentMapping::MainDocumentMapping (ConversionContext* ctx) : DocumentMapping( ctx, this )
{
m_ffCallBack = ffCallBack;
}
MainDocumentMapping::~MainDocumentMapping()
@ -52,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
@ -168,24 +166,6 @@ namespace DocFileFormat
cp = m_document->FIB->m_RgLw97.ccpText;
}
if (m_ffCallBack)
{
if (( (unsigned int) cp > (progressStep * index) ) && (m_ffCallBack))
{
double progress = ( double( 800000 - 500000 ) / m_document->FIB->m_RgLw97.ccpText * cp );
m_ffCallBack->OnProgress (m_ffCallBack->caller, DOC_ONPROGRESSEVENT_ID, long( 500000 + progress ));
short bCancel = 0;
m_ffCallBack->OnProgressEx (m_ffCallBack->caller, DOC_ONPROGRESSEVENT_ID, long( 500000 + progress ), &bCancel);
if (0 != bCancel)
return;
++index;
}
}
}
//write the section properties of the body with the last SEPX

View File

@ -41,12 +41,9 @@ namespace DocFileFormat
class MainDocumentMapping : public DocumentMapping
{
public:
MainDocumentMapping (ConversionContext* ctx, const ProgressCallback* ffCallBack);
MainDocumentMapping (ConversionContext* ctx);
virtual ~MainDocumentMapping();
virtual void Apply (IVisitable* visited);
private:
const ProgressCallback* m_ffCallBack;
};
}

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

@ -393,8 +393,15 @@ namespace DocFileFormat
//read from pcd.fc to fcEnd
int cb = fcEnd - (int)pcd.fc;
if (cb <= 0)
break;
if (cb == 0) //ralph_scovile.doc
{
if (pcd.cpEnd - pcd.cpStart < 2) // com2010_0624pl01.doc
cb = pcdFcEnd - (int)pcd.fc;
if (cb <= 0)
break;
}
else if (cb < 0)
break;
if (!ReadSymbolsBuffer((int)pcd.fc, cb, pcd.code_page, word, encodingChars))
break;

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)
{
@ -114,23 +114,23 @@ namespace DocFileFormat
TC80 oTC80;
oTC80.ftsWidth = Global::dxa;
oTC80.wWidth = 3190;
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)
{
@ -111,6 +106,18 @@ namespace DocFileFormat
bPresentDefTable = true;
SprmTDefTable tdef(iter->Arguments, iter->argumentsSize);
bool bUseWidth = true;
for (size_t j = 0; j < tdef.rgTc80.size(); ++j)
{ // 1bc0f6c0-b226-4bcb-912c-e7f97b009d8a.doc
// Технические_Требования_1_287_ДИТ.DOC
if (tdef.rgTc80[j].horzMerge == 0 && tdef.rgTc80[j].wWidth < 1)
{
bUseWidth = false;
break;
}
}
int cc = tdef.numberOfColumns;
_tGrid = tdef.rgdxaCenter;
@ -172,33 +179,23 @@ namespace DocFileFormat
_gridSpan = 1;
nComputedCellWidths += (tdef.rgdxaCenter[ _cellIndex + 1] - tdef.rgdxaCenter[ 0 ]);
nComputedCellWidth += tdef.rgTc80[ _cellIndex].wWidth > 1 ? tdef.rgTc80[ _cellIndex].wWidth : (tdef.rgdxaCenter[ _cellIndex + 1] - tdef.rgdxaCenter[ _cellIndex ]);
//Технические_Требования_1_287_ДИТ.DOC
nComputedCellWidth += bUseWidth ? tdef.rgTc80[ _cellIndex].wWidth :
(tdef.rgdxaCenter[ _cellIndex + 1] - tdef.rgdxaCenter[ _cellIndex ]);
}
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];
@ -237,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;
@ -248,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];
@ -265,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];
@ -278,7 +271,6 @@ namespace DocFileFormat
}
}
break;
case sprmTFitText:
{ //Autofit
unsigned char first = iter->Arguments[0];
@ -290,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];
@ -307,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++)
@ -348,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
@ -394,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,491 +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"");
bool bLayoutFixed = true;
//layoutType.SetValue(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:
{ //justification
appendValueElement( _tblPr, L"jc" , FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ), true );
}
break;
case sprmTWidthIndent:
{ //indent
tblIndent = FtsWWidth_Indent(iter->Arguments).wWidth;
// tblIndent = FormatUtils::BytesToInt16( iter->Arguments, 1, iter->argumentsSize );
}
break;
case sprmTIstd:
case sprmTIstdPermute:
{ //style
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:
{ //bidi
appendValueElement( _tblPr, L"bidiVisual", FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ), true );
}
break;
case sprmOldTTlp:
case sprmTTlp:
{ //table look
appendValueElement( _tblPr, L"tblLook", FormatUtils::IntToFormattedWideString( FormatUtils::BytesToInt16( iter->Arguments, 2, iter->argumentsSize ), L"%04x" ), true );
}
break;
case sprmTFAutofit:
{//autofit
layoutType.SetValue(L"fixed");
if ( iter->Arguments[0] == 1 )
{
layoutType.SetValue( L"auto" );
bLayoutFixed = false;
}
}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:
{ //row count
appendValueElement( _tblPr, L"tblStyleRowBandSize", iter->Arguments[0], true );
}
break;
case sprmTCVertBands:
{ //col count
appendValueElement( _tblPr, L"tblStyleColBandSize", iter->Arguments[0], true );
}
break;
case sprmTFNoAllowOverlap:
{ //overlap
std::wstring tblOverlapVal = std::wstring( L"overlap");
if ( iter->Arguments[0] )
{
tblOverlapVal = std::wstring( L"never");
}
appendValueElement( _tblPr, L"tblOverlap", tblOverlapVal, true );
}
break;
case sprmOldTSetShd :
case sprmTSetShdTable :
{ //shading
appendShading( _tblPr, ShadingDescriptor( iter->Arguments, iter->argumentsSize ) );
}
break;
case sprmTTableBorders80:
{ //borders 80 exceptions
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;
//border exceptions
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;
//floating table properties
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;
}
}
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 );
}
//indent
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 );
}
//append floating props
if ( tblpPr.GetAttributeCount() > 0 )
{
_tblPr->AppendChild( tblpPr );
}
//set borders
if ( brcTop != NULL )
{
XMLTools::XMLElement topBorder( L"w:top");
appendBorderAttributes( brcTop, &topBorder );
addOrSetBorder( _tblBorders, &topBorder );
}
if ( brcLeft != NULL )
{
XMLTools::XMLElement leftBorder( L"w:left");
appendBorderAttributes( brcLeft, &leftBorder );
addOrSetBorder( _tblBorders, &leftBorder );
}
if ( brcBottom != NULL )
{
XMLTools::XMLElement bottomBorder( L"w:bottom");
appendBorderAttributes( brcBottom, &bottomBorder );
addOrSetBorder( _tblBorders, &bottomBorder );
}
if ( brcRight != NULL )
{
XMLTools::XMLElement rightBorder( L"w:right");
appendBorderAttributes( brcRight, &rightBorder );
addOrSetBorder( _tblBorders, &rightBorder );
}
if ( brcHorz != NULL )
{
XMLTools::XMLElement insideHBorder( L"w:insideH");
appendBorderAttributes( brcHorz, &insideHBorder );
addOrSetBorder( _tblBorders, &insideHBorder );
}
if ( brcVert != NULL )
{
XMLTools::XMLElement insideVBorder( L"w:insideV");
appendBorderAttributes( brcVert, &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 );
//write Properties
if ( ( _tblPr->GetChildCount() > 0 ) || ( _tblPr->GetAttributeCount() > 0 ) )
{
m_pXmlWriter->WriteString( _tblPr->GetXMLString() );
}
//append the grid
_tblGrid = new XMLTools::XMLElement( L"w:tblGrid");
//Если _grid состоит из одних DocFormatUtils::gc_nZeroWidth и layout != "fixed", значит это doc полученный нами при конвертации из html. Таблицу размеров писать не нужно
bool bWriteGridCol = false;
if (true == bLayoutFixed)
bWriteGridCol = true;
else
{
for ( size_t i = 0, nSize = _grid->size(); i < nSize; i++ )
{
if(_grid->at(i) % DocFileFormat::gc_nZeroWidth != 0)
{
bWriteGridCol = true;
break;
appendValueElement(_tblPr, L"tblStyle", id, true);
}
}
}
if (true == bWriteGridCol)
}break;
case sprmTFBiDi:
case sprmTFBiDi90:
{
for ( size_t i = 0; i < _grid->size(); i++ )
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)
{
XMLTools::XMLElement gridCol( L"w:gridCol");
XMLTools::XMLAttribute gridColW( L"w:w", FormatUtils::IntToWideString( _grid->at( i ) ) );
gridCol.AppendAttribute( gridColW );
_tblGrid->AppendChild( gridCol );
layoutType.SetValue(L"auto");
}
}
}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(_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);
m_pXmlWriter->WriteString( _tblGrid->GetXMLString() );
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];
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:
{
const int size = 8;
unsigned char brc[size];
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:
{
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;
}
}
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;
@ -427,7 +427,8 @@ namespace DocFileFormat
}break;
case ODRAW::posrelh:
{
appendStyleProperty(strStyle, L"mso-position-horizontal-relative", VMLShapeMapping::mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
if (false == m_inGroup)
appendStyleProperty(strStyle, L"mso-position-horizontal-relative", VMLShapeMapping::mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
}break;
case ODRAW::posv:
{
@ -435,7 +436,8 @@ namespace DocFileFormat
}break;
case ODRAW::posrelv:
{
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:
{
@ -444,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)
//{
@ -456,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,8 @@ 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;
case ODRAW::fillType:
@ -587,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;
@ -602,12 +606,14 @@ namespace DocFileFormat
}break;
case ODRAW::fillOpacity:
{
appendValueAttribute(&m_fill, L"opacity", (FormatUtils::IntToWideString(iter->op) + L"f"));
double opa = (iter->op / pow((double)2, (double)16));
appendValueAttribute(&m_fill, L"opacity", FormatUtils::DoubleToFormattedWideString(opa, L"%.2f"));
}
break;
case ODRAW::fillBackOpacity:
{
appendValueAttribute(&m_fill, L"o:opacity2", (FormatUtils::IntToWideString(iter->op) + L"f"));
double opa = (iter->op / pow((double)2, (double)16));
appendValueAttribute(&m_fill, L"o:opacity2", FormatUtils::DoubleToFormattedWideString(opa, L"%.2f"));
}break;
// SHADOW
case ODRAW::shadowType:
@ -652,8 +658,14 @@ namespace DocFileFormat
}break;
case ODRAW::shadowStyleBooleanProperties:
{
//ODRAW::ShadowStyleBooleanProperties
ODRAW::ShadowStyleBooleanProperties* booleans = dynamic_cast<ODRAW::ShadowStyleBooleanProperties*>(iter.get());
if (booleans)
{
if (booleans->fUsefShadow && booleans->fShadow)
{
bShadow = true;
}
}
}break;
// OLE
case ODRAW::pictureId:
@ -670,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;
@ -689,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
@ -751,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:
@ -832,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());
@ -841,7 +857,6 @@ namespace DocFileFormat
appendStyleProperty(sTextboxStyle, L"mso-fit-shape-to-text", L"t");
}
}break;
// Word Art
case ODRAW::gtextUNICODE:
{
@ -861,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");
}
@ -900,7 +919,7 @@ namespace DocFileFormat
}break;
default:
{
int val = iter->op;
nProperty = iter->op;
}break;
}
}
@ -909,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())
@ -937,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)
@ -1020,13 +1039,6 @@ namespace DocFileFormat
appendValueAttribute(&m_shadow, L"origin", FormatUtils::DoubleToWideString(*ShadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(*ShadowOriginY));
}
// write shadow
if (m_shadow.GetAttributeCount() > 0)
{
appendValueAttribute(&m_shadow, L"on", bShadow ? L"t" : L"f" );
m_pXmlWriter->WriteString(m_shadow.GetXMLString());
}
//write the viewpoint
if ( ViewPointX || ViewPointY || ViewPointZ )
{
@ -1034,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);
@ -1095,6 +1107,13 @@ namespace DocFileFormat
{
m_pXmlWriter->WriteString(m_fill.GetXMLString());
}
// write shadow
if (m_shadow.GetAttributeCount() > 0)
{
appendValueAttribute(&m_shadow, L"on", bShadow ? L"t" : L"f");
m_pXmlWriter->WriteString(m_shadow.GetXMLString());
}
// write imagedata
if (m_imagedata.GetAttributeCount())
{
@ -1149,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);
@ -1161,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);
@ -1281,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;
@ -1308,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)
{
@ -1351,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)
{
@ -1387,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",";
@ -1589,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));
}
}
}
@ -1704,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";
@ -1762,7 +1775,7 @@ namespace DocFileFormat
//за текстом (The shape is behind the text, so the z-index must be negative.)
m_isInlineShape = false;
if (false == bZIndex && false == m_inGroup)
if (false == bZIndex/* && false == m_inGroup*/) // Пример.doc
{
appendStyleProperty(oStyle, L"z-index", FormatUtils::IntToWideString(-zIndex - 0x7ffff));
bZIndex = true;
@ -1817,7 +1830,7 @@ namespace DocFileFormat
}
}
if (nRelH < 0 && m_pSpa)
if (nRelH < 0 && m_pSpa && false == m_inGroup)
{
//if (m_pSpa->bx == TEXT && bZIndex)
//{
@ -1830,7 +1843,7 @@ namespace DocFileFormat
else if (m_pSpa->bx == TEXT)
appendStyleProperty(oStyle, L"mso-position-horizontal-relative", mapHorizontalPositionRelative(msoprhText));
}
if (nRelV < 0 && m_pSpa)
if (nRelV < 0 && m_pSpa && false == m_inGroup)
{
//if (m_pSpa->by == TEXT && bZIndex)
//{
@ -2029,8 +2042,12 @@ namespace DocFileFormat
std::wstring result;
for (size_t i = 0; i < pColors->complex.data.size(); ++i)
{
result += FormatUtils::IntToWideString((int)pColors->complex.data[i].dPosition);
result += L"f #";
if (pColors->complex.data[i].position.Fractional == 0)
result += std::to_wstring(pColors->complex.data[i].position.Integral);
else
result += std::to_wstring(pColors->complex.data[i].position.Fractional) +L"f";
result += L" #";
result += pColors->complex.data[i].color.sColorRGB;
result += L";";
}
@ -2283,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);
@ -2298,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);
@ -2308,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)
{
@ -2330,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)
@ -2353,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);
@ -2374,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"
@ -80,7 +80,7 @@ namespace DocFileFormat
254, 437,//PC 437
255, 850//OEM
};
WordDocument::WordDocument (const ProgressCallback* pCallFunc, const std::wstring & sTempFolder, const int userLCID) :
WordDocument::WordDocument (const std::wstring & sTempFolder, const int userLCID) :
m_PieceTable(NULL), WordDocumentStream(NULL), TableStream(NULL), DataStream(NULL), FIB(NULL),
Text(NULL), RevisionAuthorTable(NULL), FontTable(NULL), BookmarkNames(NULL), AutoTextNames(NULL),
IndividualFootnotesPlex(NULL), FootnoteReferenceCharactersPlex(NULL), IndividualEndnotesPlex(NULL),
@ -93,7 +93,6 @@ namespace DocFileFormat
AnnotationOwners(NULL), DocProperties(NULL), listFormatOverrideTable(NULL), headerAndFooterTable(NULL),
AnnotStartPlex(NULL), AnnotEndPlex(NULL), encryptionHeader(NULL)
{
m_pCallFunc = pCallFunc;
m_sTempFolder = sTempFolder;
m_nUserLCID = userLCID;
@ -241,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)
{
@ -262,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)
{
@ -289,6 +292,8 @@ namespace DocFileFormat
nDocumentCodePage = user_codepage;
}
}
m_sXmlApp = summary_info.GetApp();
m_sXmlCore = summary_info.GetCore();
//-------------------------------------------------------------------------------------------------
try
{
@ -315,21 +320,7 @@ namespace DocFileFormat
BookmarkAnnotNames = new StringTable<WideString> (TableStream, FIB->m_FibWord97.fcSttbfAtnBkmk, FIB->m_FibWord97.lcbSttbfAtnBkmk, nWordVersion, true);
if (m_pCallFunc)
{
m_pCallFunc->OnProgress (m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 100000);
SHORT bCancel = 0;
m_pCallFunc->OnProgressEx(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 100000, &bCancel);
if (bCancel)
{
Clear();
return AVS_ERROR_FILEFORMAT;
}
}
// Read all needed PLCFs
// Read all needed PLCFs
if (FIB->m_RgLw97.ccpFtn > 0)
{
FootnoteReferenceCharactersPlex = new Plex<FootnoteDescriptor>(FootnoteDescriptor::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcffndRef, FIB->m_FibWord97.lcbPlcffndRef, nWordVersion);
@ -422,20 +413,6 @@ namespace DocFileFormat
ListPlex = new Plex<ListNumCache> (ListNumCache::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfBteLvc, FIB->m_FibWord97.lcbPlcfBteLvc, nWordVersion);
if (m_pCallFunc)
{
m_pCallFunc->OnProgress(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 200000 );
SHORT bCancel = 0;
m_pCallFunc->OnProgressEx(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 200000, &bCancel);
if (bCancel)
{
Clear();
return AVS_ERROR_FILEFORMAT;
}
}
// Read the FKPs
AllPapxFkps = FormattedDiskPagePAPX::GetAllPAPXFKPs (FIB, WordDocumentStream, TableStream, DataStream);
AllChpxFkps = FormattedDiskPageCHPX::GetAllCHPXFKPs (FIB, WordDocumentStream, TableStream);
@ -452,19 +429,6 @@ namespace DocFileFormat
AnnotationOwners = new AnnotationOwnerList (FIB, TableStream);
}
if (m_pCallFunc)
{
m_pCallFunc->OnProgress(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 300000 );
SHORT bCancel = 0;
m_pCallFunc->OnProgressEx(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 300000, &bCancel);
if (bCancel)
{
Clear();
return AVS_ERROR_FILEFORMAT;
}
}
if (FontTable)
{
std::unordered_map<int, int> fonts_charsets;
@ -556,20 +520,6 @@ namespace DocFileFormat
std::sort (AllPapxVector->begin(), AllPapxVector->end());
if (m_pCallFunc)
{
m_pCallFunc->OnProgress(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 400000 );
SHORT bCancel = 0;
m_pCallFunc->OnProgressEx(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 400000, &bCancel);
if (bCancel)
{
Clear();
return AVS_ERROR_FILEFORMAT;
}
}
//build a dictionary of all SEPX
if ( !SectionPlex->Elements.empty() )
{
@ -594,20 +544,6 @@ namespace DocFileFormat
}
}
if (m_pCallFunc)
{
m_pCallFunc->OnProgress(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 500000 );
SHORT bCancel = 0;
m_pCallFunc->OnProgressEx(m_pCallFunc->caller, DOC_ONPROGRESSEVENT_ID, 500000, &bCancel);
if (bCancel)
{
Clear();
return AVS_ERROR_FILEFORMAT;
}
}
return 0;
}
bool WordDocument::LoadDocumentFlat()

View File

@ -58,7 +58,6 @@
#include "EndnoteDescriptor.h"
#include "FieldCharacter.h"
#include "IVisitable.h"
#include "../Common/Callback.h"
namespace CRYPT
{
@ -89,10 +88,10 @@ namespace DocFileFormat
friend class OpenXmlPackage;
friend class TextboxMapping;
friend class SettingsMapping;
friend class WordprocessingDocument;
public:
WordDocument (const ProgressCallback* pCallFunc, const std::wstring & tempFolder, const int userLCID);
WordDocument (const std::wstring & tempFolder, const int userLCID);
virtual ~WordDocument();
_UINT32 LoadDocument(const std::wstring & fileName, const std::wstring & password);
@ -154,9 +153,9 @@ namespace DocFileFormat
std::wstring m_sTempFolder;
std::wstring m_sTempDecryptFileName;
int m_nUserLCID;
std::wstring m_sXmlApp;
std::wstring m_sXmlCore;
const ProgressCallback* m_pCallFunc;
POLE::Stream * WordDocumentStream; // The stream "WordDocument"
POLE::Stream * TableStream; // The stream "0Table" or "1Table"
POLE::Stream * DataStream; // The stream called "Data"

View File

@ -49,9 +49,10 @@ namespace DocFileFormat
WordprocessingDocument::~WordprocessingDocument()
{
_isSectionPageBreak = 0;
}
void WordprocessingDocument::SaveDocument(bool &bMacros)
_UINT32 WordprocessingDocument::SaveDocument(bool &bMacros)
{
std::wstring pathWord = m_strOutputPath + FILE_SEPARATOR_STR + L"word" ;
NSDirectory::CreateDirectory( pathWord );
@ -71,7 +72,6 @@ namespace DocFileFormat
RegisterDocumentMacros();
RegisterVbaProject();
//output_document->get_xl_files().add_vba_project();
}
else bMacros = false;
}
@ -83,54 +83,66 @@ 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;
#if defined(INTVER)
std::string s = VALUE2STR(INTVER);
sApplication += L"/" + std::wstring(s.begin(), s.end());
#endif
pApp->m_sApplication = sApplication;
pApp->SetDefaults();
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())
{
@ -172,12 +184,13 @@ 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

@ -76,9 +76,11 @@ namespace DocFileFormat
std::list<std::wstring> FooterXMLList;
public:
int _isSectionPageBreak; //0 - not set, 1 -page break, 2 - continues, -1 - already
WordprocessingDocument(const std::wstring & _docxDirectory, const WordDocument* _docFile);
virtual ~WordprocessingDocument();
void SaveDocument(bool &bMacros);
_UINT32 SaveDocument(bool &bMacros);
};
}

View File

@ -34,7 +34,7 @@
#include "../DocDocxConverter/Converter.h"
#include "../../OfficeUtils/src/OfficeUtils.h"
_UINT32 COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack)
_UINT32 COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros)
{
_UINT32 hr = 0;
@ -43,12 +43,12 @@ _UINT32 COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::w
docToDocx.m_sTempFolder = m_sTempFolder;
docToDocx.m_nUserLCID = m_nUserLCID;
hr= docToDocx.LoadAndConvert(docFile, docxDirectory, password, ffCallBack, bMacros);
hr= docToDocx.LoadAndConvert(docFile, docxDirectory, password, bMacros);
return hr;
}
_UINT32 COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack )
_UINT32 COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName)
{
return 0;
}

View File

@ -29,8 +29,7 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef DOC_FORMAT_LIB
#define DOC_FORMAT_LIB
#pragma once
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
@ -38,8 +37,6 @@
#include "../../DesktopEditor/common/ASCVariant.h"
struct ProgressCallback;
class COfficeDocFile
{
public:
@ -49,9 +46,8 @@ public:
std::wstring m_sTempFolder;
int m_nUserLCID;
_UINT32 LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack = NULL);
_UINT32 SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack = NULL);
_UINT32 LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros);
_UINT32 SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName);
};
#endif //DOC_FORMAT_LIB

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

@ -45,7 +45,7 @@ namespace Writers
m_nCount++;
std::wstring sCustomXmlDir = m_sDir + FILE_SEPARATOR_STR;
sCustomXmlDir += OOX::FileTypes::CustomXmlProps.DefaultDirectory().GetPath();
sCustomXmlDir += OOX::FileTypes::CustomXml.DefaultDirectory().GetPath();
std::wstring sCustomXmlRelsDir = sCustomXmlDir + FILE_SEPARATOR_STR + L"_rels";
@ -54,7 +54,7 @@ namespace Writers
NSFile::CFileBinary::SaveToFile(sCustomXmlDir + FILE_SEPARATOR_STR + sCustomXMLPropsFilename, sCustomXmlPropertiesContent);
OOX::CContentTypes& oContentTypes = *m_pDrawingConverter->GetContentTypes();
oContentTypes.Registration( OOX::FileTypes::CustomXmlProps.OverrideType(), OOX::FileTypes::CustomXmlProps.DefaultDirectory(), sCustomXMLPropsFilename );
oContentTypes.Registration( OOX::FileTypes::CustomXmlProps.OverrideType(), OOX::FileTypes::CustomXml.DefaultDirectory(), sCustomXMLPropsFilename );
std::wstring sCustomXmlFilename;
sCustomXmlFilename = OOX::FileTypes::CustomXml.DefaultFileName().GetBasename() + std::to_wstring(m_nCount);
@ -81,7 +81,7 @@ namespace Writers
oCustomXMLProps.m_oShemaRefs->m_arrItems.push_back(pShemaRef);
std::wstring sCustomXmlPropsDir = m_sDir + FILE_SEPARATOR_STR;
sCustomXmlPropsDir += OOX::FileTypes::CustomXmlProps.DefaultDirectory().GetPath();
sCustomXmlPropsDir += OOX::FileTypes::CustomXml.DefaultDirectory().GetPath();
NSDirectory::CreateDirectories(sCustomXmlPropsDir);
std::wstring sCustomXMLPropsFilename = OOX::FileTypes::CustomXmlProps.DefaultFileName().GetBasename();
sCustomXMLPropsFilename += std::to_wstring(m_nCount) + OOX::FileTypes::CustomXmlProps.DefaultFileName().GetExtention();

View File

@ -53,7 +53,8 @@ FileWriter::FileWriter(std::wstring sDirOutput,std::wstring sFontDir, bool bNoFo
m_pComments (NULL),
m_pApp (NULL),
m_pCore (NULL),
m_pCustomProperties (NULL)
m_pCustomProperties (NULL),
m_pCurrentSettings (NULL)
{
}
FileWriter::~FileWriter()
@ -61,6 +62,8 @@ FileWriter::~FileWriter()
RELEASEOBJECT(m_pApp);
RELEASEOBJECT(m_pCore);
RELEASEOBJECT(m_pCustomProperties);
m_pCurrentSettings = NULL;
}
void FileWriter::Write()
{

View File

@ -61,6 +61,7 @@ namespace OOX
{
class CApp;
class CCore;
class CSettings;
}
namespace PPTX
{
@ -80,7 +81,7 @@ namespace Writers
numbering(sDirOutput),
footnotes(sDirOutput),
endnotes(sDirOutput),
settings(sDirOutput, headers_footers),
settings(sDirOutput),
comments(sDirOutput),
web_settings(sDirOutput)
{}
@ -167,6 +168,7 @@ namespace Writers
BinDocxRW::CComments* m_pComments;
OOX::CApp* m_pApp;
OOX::CCore* m_pCore;
OOX::CSettings* m_pCurrentSettings;
PPTX::CustomProperties* m_pCustomProperties;
bool m_bGlossaryMode = false;

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 {
@ -382,107 +384,6 @@ public:
}
};
class Shd
{
public:
BYTE Value;
docRGB Color;
docRGB Fill;
CThemeColor ThemeColor;
CThemeColor ThemeFill;
bool bValue = false;
bool bColor = false;
bool bThemeColor = false;
bool bThemeFill = false;
bool bFill = false;
Shd(){}
std::wstring ToString()
{
std::wstring sShd;
if(bValue || bColor || (bThemeColor && ThemeColor.IsNoEmpty()) || (bThemeFill && ThemeFill.IsNoEmpty()))
{
sShd += L"<w:shd";
if(bValue)
{
switch(Value)
{
case SimpleTypes::shdClear : sShd += L" w:val=\"clear\""; break;
case SimpleTypes::shdDiagCross : sShd += L" w:val=\"diagCross\""; break;
case SimpleTypes::shdDiagStripe : sShd += L" w:val=\"diagStripe\""; break;
case SimpleTypes::shdHorzCross : sShd += L" w:val=\"horzCross\""; break;
case SimpleTypes::shdHorzStripe : sShd += L" w:val=\"horzStripe\""; break;
case SimpleTypes::shdNil : sShd += L" w:val=\"nil\""; break;
case SimpleTypes::shdPct10 : sShd += L" w:val=\"pct10\""; break;
case SimpleTypes::shdPct12 : sShd += L" w:val=\"pct12\""; break;
case SimpleTypes::shdPct15 : sShd += L" w:val=\"pct15\""; break;
case SimpleTypes::shdPct20 : sShd += L" w:val=\"pct20\""; break;
case SimpleTypes::shdPct25 : sShd += L" w:val=\"pct25\""; break;
case SimpleTypes::shdPct30 : sShd += L" w:val=\"pct30\""; break;
case SimpleTypes::shdPct35 : sShd += L" w:val=\"pct35\""; break;
case SimpleTypes::shdPct37 : sShd += L" w:val=\"pct37\""; break;
case SimpleTypes::shdPct40 : sShd += L" w:val=\"pct40\""; break;
case SimpleTypes::shdPct45 : sShd += L" w:val=\"pct45\""; break;
case SimpleTypes::shdPct5 : sShd += L" w:val=\"pct5\""; break;
case SimpleTypes::shdPct50 : sShd += L" w:val=\"pct50\""; break;
case SimpleTypes::shdPct55 : sShd += L" w:val=\"pct55\""; break;
case SimpleTypes::shdPct60 : sShd += L" w:val=\"pct60\""; break;
case SimpleTypes::shdPct62 : sShd += L" w:val=\"pct62\""; break;
case SimpleTypes::shdPct65 : sShd += L" w:val=\"pct65\""; break;
case SimpleTypes::shdPct70 : sShd += L" w:val=\"pct70\""; break;
case SimpleTypes::shdPct75 : sShd += L" w:val=\"pct75\""; break;
case SimpleTypes::shdPct80 : sShd += L" w:val=\"pct80\""; break;
case SimpleTypes::shdPct85 : sShd += L" w:val=\"pct85\""; break;
case SimpleTypes::shdPct87 : sShd += L" w:val=\"pct87\""; break;
case SimpleTypes::shdPct90 : sShd += L" w:val=\"pct90\""; break;
case SimpleTypes::shdPct95 : sShd += L" w:val=\"pct95\""; break;
case SimpleTypes::shdReverseDiagStripe : sShd += L" w:val=\"reverseDiagStripe\""; break;
case SimpleTypes::shdSolid : sShd += L" w:val=\"solid\""; break;
case SimpleTypes::shdThinDiagCross : sShd += L" w:val=\"thinDiagCross\""; break;
case SimpleTypes::shdThinDiagStripe : sShd += L" w:val=\"thinDiagStripe\""; break;
case SimpleTypes::shdThinHorzCross : sShd += L" w:val=\"thinHorzCross\""; break;
case SimpleTypes::shdThinHorzStripe : sShd += L" w:val=\"thinHorzStripe\""; break;
case SimpleTypes::shdThinReverseDiagStripe : sShd += L" w:val=\"thinReverseDiagStripe\""; break;
case SimpleTypes::shdThinVertStripe : sShd += L" w:val=\"thinVertStripe\""; break;
case SimpleTypes::shdVertStripe : sShd += L" w:val=\"vertStripe\""; break;
default : sShd += L" w:val=\"solid\""; break;
}
}
if (bColor)
sShd += L" w:color=\"" + Color.ToString() + L"\"";
if (bFill)
sShd += L" w:fill=\"" + Fill.ToString() + L"\"";
if(bThemeColor && ThemeColor.IsNoEmpty())
{
if(ThemeColor.Auto && !bFill)
sShd += L" w:fill=\"auto\"";
if(ThemeColor.bColor)
sShd += L" w:themeFill=\"" + ThemeColor.ToStringColor() + L"\"";
if(ThemeColor.bTint)
sShd += L" w:themeFillTint=\"" + ThemeColor.ToStringTint() + L"\"";
if(ThemeColor.bShade)
sShd += L" w:themeFillShade=\"" + ThemeColor.ToStringShade() + L"\"";
}
if(bThemeFill && ThemeFill.IsNoEmpty())
{
if(ThemeFill.Auto && !bColor)
sShd += L" w:color=\"auto\"";
if(ThemeFill.bColor)
sShd += L" w:themeColor=\"" + ThemeFill.ToStringColor() + L"\"";
if(ThemeFill.bTint)
sShd += L" w:themeTint=\"" + ThemeFill.ToStringTint() + L"\"";
if(ThemeFill.bShade)
sShd += L" w:themeShade=\"" + ThemeFill.ToStringShade() + L"\"";
}
sShd += L"/>";
}
return sShd;
}
};
class Tab
{
public:
@ -501,424 +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;
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();
}
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(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)
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:
@ -984,10 +468,10 @@ public:
std::wstring sType;
switch(byteType)
{
case styletype_Character: sType = _T("character");break;
case styletype_Numbering: sType = _T("numbering");break;
case styletype_Table: sType = _T("table");break;
default: sType = _T("paragraph");break;
case styletype_Character: sType = _T("character");break;
case styletype_Numbering: sType = _T("numbering");break;
case styletype_Table: sType = _T("table");break;
default: sType = _T("paragraph");break;
}
if(!Id.empty())
{
@ -1009,12 +493,31 @@ public:
sStyle += L">";
pCStringWriter->WriteString(sStyle);
if(!Aliases.empty())
if(!Name.empty())
{
pCStringWriter->WriteString(L"<w:name w:val=\"" + Name + L"\"/>");
}
if (!Aliases.empty())
{
pCStringWriter->WriteString(L"<w:aliases w:val=\"");
pCStringWriter->WriteEncodeXmlString(Aliases);
pCStringWriter->WriteString(L"\"/>");
}
if (!BasedOn.empty())
{
pCStringWriter->WriteString(L"<w:basedOn w:val=\"" + BasedOn + L"\"/>");
}
if (!NextId.empty())
{
pCStringWriter->WriteString(L"<w:next w:val=\"" + NextId + L"\"/>");
}
if (!Link.empty())
{
pCStringWriter->WriteString(L"<w:link w:val=\"");
pCStringWriter->WriteEncodeXmlString(Link);
pCStringWriter->WriteString(L"\"/>");
}
if(bautoRedefine)
{
if(autoRedefine)
@ -1022,17 +525,44 @@ public:
else
pCStringWriter->WriteString(L"<w:autoRedefine val=\"false\"/>");
}
if(!Name.empty())
if (bhidden)
{
pCStringWriter->WriteString(L"<w:name w:val=\"" + Name + L"\"/>");
if (hidden)
pCStringWriter->WriteString(L"<w:hidden/>");
else
pCStringWriter->WriteString(L"<w:hidden val=\"false\"/>");
}
if(!BasedOn.empty())
if (buiPriority)
{
pCStringWriter->WriteString(L"<w:basedOn w:val=\"" + BasedOn + L"\"/>");
pCStringWriter->WriteString(L"<w:uiPriority w:val=\"" + std::to_wstring(uiPriority) + L"\"/>");
}
if(!NextId.empty())
if (bsemiHidden)
{
pCStringWriter->WriteString(L"<w:next w:val=\"" + NextId + L"\"/>");
if (semiHidden)
pCStringWriter->WriteString(L"<w:semiHidden/>");
else
pCStringWriter->WriteString(L"<w:semiHidden val=\"false\"/>");
}
if (bunhideWhenUsed)
{
if (unhideWhenUsed)
pCStringWriter->WriteString(L"<w:unhideWhenUsed/>");
else
pCStringWriter->WriteString(L"<w:unhideWhenUsed val=\"false\"/>");
}
if (bqFormat)
{
if (qFormat)
pCStringWriter->WriteString(L"<w:qFormat/>");
else
pCStringWriter->WriteString(L"<w:qFormat val=\"false\"/>");
}
if (blocked)
{
if (locked)
pCStringWriter->WriteString(L"<w:locked/>");
else
pCStringWriter->WriteString(L"<w:locked val=\"false\"/>");
}
if(bpersonal)
{
@ -1055,61 +585,17 @@ public:
else
pCStringWriter->WriteString(L"<w:personalReply val=\"false\"/>");
}
if(!Link.empty())
{
pCStringWriter->WriteString(L"<w:link w:val=\"");
pCStringWriter->WriteEncodeXmlString(Link);
pCStringWriter->WriteString(L"\"/>");
}
if(blocked)
{
if(locked)
pCStringWriter->WriteString(L"<w:locked/>");
else
pCStringWriter->WriteString(L"<w:locked val=\"false\"/>");
}
if(bqFormat)
{
if(qFormat)
pCStringWriter->WriteString(L"<w:qFormat/>");
else
pCStringWriter->WriteString(L"<w:qFormat val=\"false\"/>");
}
if(buiPriority)
{
pCStringWriter->WriteString(L"<w:uiPriority w:val=\"" + std::to_wstring(uiPriority) + L"\"/>");
}
if(bhidden)
{
if(hidden)
pCStringWriter->WriteString(L"<w:hidden/>");
else
pCStringWriter->WriteString(L"<w:hidden val=\"false\"/>");
}
if(bsemiHidden)
{
if(semiHidden)
pCStringWriter->WriteString(L"<w:semiHidden/>");
else
pCStringWriter->WriteString(L"<w:semiHidden val=\"false\"/>");
}
if(bunhideWhenUsed)
{
if(unhideWhenUsed)
pCStringWriter->WriteString(L"<w:unhideWhenUsed/>");
else
pCStringWriter->WriteString(L"<w:unhideWhenUsed val=\"false\"/>");
}
if(!TextPr.empty())
{
pCStringWriter->WriteString(TextPr);
}
if(!ParaPr.empty())
{
pCStringWriter->WriteString(L"<w:pPr>");
pCStringWriter->WriteString(ParaPr);
pCStringWriter->WriteString(L"</w:pPr>");
}
if(!TextPr.empty())
{
pCStringWriter->WriteString(TextPr);
}
if(!TablePr.empty())
pCStringWriter->WriteString(TablePr);
if(!RowPr.empty())
@ -1364,14 +850,6 @@ public:
{
pCStringWriter->WriteString(L" w:color=\"" + Color.ToString() + L"\"");
}
if(bSize)
{
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(Size) + L"\"");
}
if(bSpace)
{
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(Space) + L"\"");
}
if(bThemeColor && ThemeColor.IsNoEmpty())
{
if(ThemeColor.Auto && !bColor)
@ -1392,6 +870,14 @@ public:
pCStringWriter->WriteString(L" w:themeShade=\"" + ThemeColor.ToStringShade() + L"\"");
}
}
if(bSize)
{
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(Size) + L"\"");
}
if(bSpace)
{
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(Space) + L"\"");
}
pCStringWriter->WriteString(L"/>");
}
else
@ -1441,18 +927,18 @@ public:
}
void Write(NSStringUtils::CStringBuilder* pCStringWriter, bool bCell)
{
if(bLeft)
oLeft.Write(L"w:left", pCStringWriter, bCell);
if(bTop)
oTop.Write(L"w:top", pCStringWriter, bCell);
if(bRight)
oRight.Write(L"w:right", pCStringWriter, bCell);
if(bLeft)
oLeft.Write(L"w:left", pCStringWriter, bCell);
if(bBottom)
oBottom.Write(L"w:bottom", pCStringWriter, bCell);
if(bInsideV)
oInsideV.Write(L"w:insideV", pCStringWriter, bCell);
if(bRight)
oRight.Write(L"w:right", pCStringWriter, bCell);
if(bInsideH)
oInsideH.Write(L"w:insideH", pCStringWriter, bCell);
if(bInsideV)
oInsideV.Write(L"w:insideV", pCStringWriter, bCell);
if(bBetween)
oBetween.Write(L"w:between", pCStringWriter, bCell);
}
@ -2490,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"\"/>";
}
@ -2562,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)
@ -2779,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();
@ -2795,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);
@ -3101,6 +2595,7 @@ public:
}
}
};
class TrackRevision
{
public:
@ -3111,7 +2606,8 @@ public:
long* vMerge;
long* vMergeOrigin;
rPr* RPr;
OOX::Logic::CRunProperty* RPr;
NSStringUtils::CStringBuilder* PPr;
SectPr* sectPr;
CWiterTblPr* tblPr;
@ -3120,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;
@ -3160,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

@ -38,8 +38,8 @@
namespace OOX
{
class CComments;
class CSettingsCustom;
class CSettings;
}
namespace BinDocxRW {
@ -56,25 +56,26 @@ class Binary_CommonReader2 : public Binary_CommonReader
public:
Binary_CommonReader2(NSBinPptxRW::CBinaryFileReader& poBufferedStream);
docRGB ReadColor();
void ReadColor2(SimpleTypes::CHexColor<>& color);
void ReadHexColor(SimpleTypes::CHexColor<> *pColor);
void ReadThemeColor(int length, CThemeColor& oCThemeColor);
int _ReadThemeColor(BYTE type, long length, void* poResult);
int ReadThemeColorContent(BYTE type, long length, void* poResult);
template<typename T> int ReadTrackRevision(long length, T* poResult);
int ReadShd(BYTE type, long length, void* 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
{
Writers::FileWriter& m_oFileWriter;
CComments* m_pComments;
int nCurType;
int nCurHeaderType;
public:
Writers::HeaderFooterWriter& m_oHeaderFooterWriter;
Binary_HdrFtrTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, CComments* pComments);
Binary_HdrFtrTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter);
int Read();
int ReadHdrFtrContent (BYTE type, long length, void* poResult);
int ReadHdrFtrFEO (BYTE type, long length, void* poResult);
@ -86,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
{
@ -241,10 +243,13 @@ class Binary_SettingsTableReader : public Binary_CommonReader
Binary_rPrReader m_oBinary_rPrReader;
Writers::SettingWriter& m_oSettingWriter;
Writers::FileWriter& m_oFileWriter;
OOX::CSettingsCustom& m_oSettingsCustom;
OOX::CSettingsCustom* m_pSettingsCustom;
public:
Binary_SettingsTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, OOX::CSettingsCustom& oSettingsCustom);
Binary_SettingsTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, OOX::CSettingsCustom* pSettingsCustom);
int Read();
int ReadDocProtect(BYTE type, long length, void* poResult);
int ReadWriteProtect(BYTE type, long length, void* poResult);
int ReadSettings(BYTE type, long length, void* poResult);
int ReadCompat(BYTE type, long length, void* poResult);
int ReadCompatSetting(BYTE type, long length, void* poResult);
@ -281,18 +286,17 @@ 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:
CComments* m_pComments;
Writers::ContentWriter& m_oDocumentWriter;
Writers::MediaWriter& m_oMediaWriter;
bool m_bUsedParaIdCounter;
Binary_DocumentTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, Writers::ContentWriter& oDocumentWriter, CComments* pComments);
Binary_DocumentTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, Writers::ContentWriter& oDocumentWriter);
~Binary_DocumentTableReader();
int Read();
@ -480,12 +484,11 @@ public:
class Binary_NotesTableReader : public Binary_CommonReader
{
Writers::FileWriter& m_oFileWriter;
CComments* m_pComments;
bool m_bIsFootnote;
nullable<SimpleTypes::CDecimalNumber<>> m_oId;
nullable<SimpleTypes::CFtnEdn<>> m_oType;
public:
Binary_NotesTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, CComments* pComments, bool bIsFootnote);
Binary_NotesTableReader(NSBinPptxRW::CBinaryFileReader& poBufferedStream, Writers::FileWriter& oFileWriter, bool bIsFootnote);
int Read();
int ReadNotes(BYTE type, long length, void* poResult);
int ReadNote(BYTE type, long length, void* poResult);

View File

@ -36,55 +36,28 @@
namespace Writers
{
static std::wstring g_string_set_Start = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><w:settings xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\">");
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults>");
static std::wstring g_string_set_End = _T("</w:settings>");
class SettingWriter
{
std::wstring m_sDir;
NSStringUtils::CStringBuilder m_oSettingWriter;
HeaderFooterWriter& m_oHeaderFooterWriter;
public:
SettingWriter(std::wstring sDir, HeaderFooterWriter& oHeaderFooterWriter):m_sDir(sDir),m_oHeaderFooterWriter(oHeaderFooterWriter)
SettingWriter(std::wstring sDir) : m_sDir(sDir)
{
}
void Write(bool bGlossary = false)
{
Prepare();
OOX::CPath filePath = m_sDir + FILE_SEPARATOR_STR + L"word" + (bGlossary ? (FILE_SEPARATOR_STR + std::wstring(L"glossary")) : L"") + FILE_SEPARATOR_STR + L"settings.xml";
NSFile::CFileBinary oFile;
oFile.CreateFileW(filePath.GetPath());
oFile.WriteStringUTF8(g_string_set_Start);
oFile.WriteStringUTF8(m_oSettingWriter.GetData());
oFile.WriteStringUTF8(g_string_set_Default);
oFile.WriteStringUTF8(g_string_set_End);
oFile.CloseFile();
}
void AddSetting(std::wstring sSetting)
{
m_oSettingWriter.WriteString(sSetting);
}
void Prepare()
{
if(BinDocxRW::g_nCurFormatVersion < 5)
{
bool bevenAndOddHeaders = false;
for(size_t i = 0, length = m_oHeaderFooterWriter.m_aHeaders.size(); i < length; ++i)
{
HdrFtrItem* pHeader = m_oHeaderFooterWriter.m_aHeaders[i];
if(SimpleTypes::hdrftrEven == pHeader->eType)
bevenAndOddHeaders = true;
}
for(size_t i = 0, length = m_oHeaderFooterWriter.m_aFooters.size(); i < length; ++i)
{
HdrFtrItem* pFooter = m_oHeaderFooterWriter.m_aFooters[i];
if(SimpleTypes::hdrftrEven == pFooter->eType)
bevenAndOddHeaders = true;
}
if(bevenAndOddHeaders)
AddSetting(L"<w:evenAndOddHeaders/>");
}
}
};
}

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

@ -47,10 +47,6 @@ const int heightrule_AtLeast = 0x00;
const int heightrule_Auto = 0x01;
const int heightrule_Exact = 0x02;
const int vertalign_Baseline = 0;
const int vertalign_SuperScript = 1;
const int vertalign_SubScript = 2;
const int align_Right = 0;
const int align_Left = 1;
const int align_Center = 2;
@ -304,7 +300,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
{
@ -416,7 +413,19 @@ extern int g_nCurFormatVersion;
FontAsciiTheme = 40,
FontHAnsiTheme = 41,
FontAETheme = 42,
FontCSTheme = 43
FontCSTheme = 43,
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
{
@ -596,7 +605,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
{
@ -864,7 +876,10 @@ extern int g_nCurFormatVersion;
BookFoldPrinting = 15,
BookFoldPrintingSheets = 16,
BookFoldRevPrinting = 17,
SpecialFormsHighlight = 18
SpecialFormsHighlight = 18,
DocumentProtection = 19,
WriteProtection = 20
};}
namespace c_oSer_MathPrType{enum c_oSer_SettingsType
{
@ -1153,7 +1168,8 @@ extern int g_nCurFormatVersion;
Custom = 0,
ItemId = 1,
Uri = 2,
Content = 3
Content = 3,
ContentA = 4
};}
namespace c_oSerApp{enum c_oSerApp
{
@ -1243,7 +1259,8 @@ extern int g_nCurFormatVersion;
PictureFormPrShiftX = 64,
PictureFormPrShiftY = 65,
FormPrBorder = 70,
FormPrShd = 71
FormPrShd = 71,
TextFormPrCombWRule = 72
};}
namespace c_oSerFFData{enum c_oSerFFData
{
@ -1302,4 +1319,46 @@ extern int g_nCurFormatVersion;
Flags2 = 5,
Flags3 = 6
};}
namespace c_oDocProtect {
enum c_oDocProtect
{
AlgorithmName = 0,
Edit = 1,
Enforcment = 2,
Formatting = 3,
HashValue = 4,
SaltValue = 5,
SpinCount = 6,
AlgIdExt = 7,
AlgIdExtSource = 8,
CryptAlgorithmClass = 9,
CryptAlgorithmSid = 10,
CryptAlgorithmType = 11,
CryptProvider = 12,
CryptProviderType = 13,
CryptProviderTypeExt = 14,
CryptProviderTypeExtSource = 15
};
}
namespace c_oWriteProtect {
enum c_oWriteProtect
{
AlgorithmName = 0,
Recommended = 1,
HashValue = 2,
SaltValue = 3,
SpinCount = 4,
AlgIdExt = 7,
AlgIdExtSource = 8,
CryptAlgorithmClass = 9,
CryptAlgorithmSid = 10,
CryptAlgorithmType = 11,
CryptProvider = 12,
CryptProviderType = 13,
CryptProviderTypeExt = 14,
CryptProviderTypeExtSource = 15
};
}
}

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,8 @@
#include "../../Common/DocxFormat/Source/DocxFormat/HeaderFooter.h"
#include "../../Common/DocxFormat/Source/DocxFormat/App.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Core.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Footnote.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Endnote.h"
namespace NSBinPptxRW
{
@ -548,6 +550,8 @@ namespace BinDocxRW
void WriteColorSchemeMapping(const PPTX::Logic::ClrMap& oColorSchemeMapping);
void WriteCompat(const OOX::Settings::CCompat& oCompat);
void WriteCompatSetting(const OOX::Settings::CCompatSetting& oCompatSetting);
void WriteDocumentProtection(const OOX::Settings::CDocProtect& oDocProtect);
void WriteWriteProtection(const OOX::Settings::CWriteProtection& oWriteProtection);
};
class BinaryNotesTableWriter
{

View File

@ -516,8 +516,7 @@ namespace BinXlsxRW{
{
pWorksheet = new OOX::Spreadsheet::CWorksheet(NULL);
pWorksheet->m_oSheetFormatPr.Init();
pWorksheet->m_oSheetFormatPr->m_oDefaultRowHeight.Init();
pWorksheet->m_oSheetFormatPr->m_oDefaultRowHeight->SetValue(15);
pWorksheet->m_oSheetFormatPr->m_oDefaultRowHeight = 15.;
pWorksheet->m_oPageMargins.Init();
pWorksheet->m_oPageMargins.Init();
pWorksheet->m_oPageMargins->m_oLeft.Init();
@ -579,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;
}
}
}
}
@ -621,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;
@ -650,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));
}
}
@ -708,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);
}
}
}
@ -752,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

@ -48,6 +48,8 @@
#include "../../Common/DocxFormat/Source/DocxFormat/App.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Core.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Endnote.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Footnote.h"
int BinDocxRW::g_nCurFormatVersion = 0;
@ -476,7 +478,7 @@ bool BinDocxRW::CDocxSerializer::getXmlContent(NSBinPptxRW::CBinaryFileReader& o
{
long nLength = oBufferedStream.GetLong();
Writers::ContentWriter oTempContentWriter;
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter, m_pCurFileWriter->m_pComments);
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter);
oBinary_DocumentTableReader.ReadDocumentContentOut(nLength);
sOutputXml = oTempContentWriter.m_oContent.GetData();
@ -564,7 +566,7 @@ bool BinDocxRW::CDocxSerializer::getXmlContentElem(OOX::EElementType eType, NSBi
{
long nLength = oBufferedStream.GetLong();
Writers::ContentWriter oTempContentWriter;
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter, m_pCurFileWriter->m_pComments);
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter);
if(OOX::et_m_oMathPara == eType)
{
@ -610,3 +612,32 @@ bool BinDocxRW::CDocxSerializer::unpackageFile(const std::wstring& sSrcFileName,
return file.unpackage(sSrcFileName, sDstPath);
}
bool BinDocxRW::CDocxSerializer::convertFlat(const std::wstring& sSrcFileName, const std::wstring& sDstPath)
{
OOX::CDocxFlat docxflat(sSrcFileName);
if (false == docxflat.m_pDocument.IsInit())
return false;
OOX::CDocx docx;
if (docxflat.m_pDocument.IsInit())
{
NSCommon::smart_ptr<OOX::File> file = docxflat.m_pDocument.GetPointer(); file.AddRef();
docx.Add(file);
docx.m_oMain.document = docxflat.m_pDocument.GetPointer();
}
if (docxflat.m_pApp.IsInit())
{
NSCommon::smart_ptr<OOX::File> file(docxflat.m_pApp.GetPointer()); file.AddRef();
docx.Add(file);
}
if (docxflat.m_pCore.IsInit())
{
NSCommon::smart_ptr<OOX::File> file(docxflat.m_pCore.GetPointer()); file.AddRef();
docx.Add(file);
}
//docxflat.m_oBgPict.GetPointer();
return docx.Write(sDstPath);
}

View File

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

View File

@ -42,7 +42,6 @@
#include "ChartWriter.h"
#include "../BinReader/DefaultThemeWriter.h"
//#include "../../Common/DocxFormat/Source/XlsxFormat/Chart/Chart.h"
namespace BinXlsxRW{
int g_nCurFormatVersion = 0;
@ -99,16 +98,16 @@ namespace BinXlsxRW{
BinXlsxRW::BinaryFileReader oBinaryFileReader;
return oBinaryFileReader.ReadFile(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions, m_bIsMacro);
}
_UINT32 CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
_UINT32 CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
{
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
NSFonts::IFontManager* pFontManager = pFontPicker->get_FontManager();
NSFonts::IFontManager* pFontManager = pFontPicker->get_FontManager();
DocWrapper::FontProcessor fp;
fp.setFontManager(pFontManager);
NSFontCutter::CEmbeddedFontsManager* pEmbeddedFontsManager = NULL;
if(false == m_sEmbeddedFontsDir.empty())
if (false == m_sEmbeddedFontsDir.empty())
{
NSDirectory::CreateDirectory(m_sEmbeddedFontsDir);
@ -121,12 +120,12 @@ namespace BinXlsxRW{
//pEmbeddedFontsManager добавляются все цифры
//для заголовков
pEmbeddedFontsManager->CheckFont(_T("Calibri"), pFontManager);
pEmbeddedFontsManager->CheckString(std::wstring(_T("ABCDEFGHIJKLMNOPQRSTUVWXYZ")));
pEmbeddedFontsManager->CheckString(std::wstring(_T("ABCDEFGHIJKLMNOPQRSTUVWXYZ")));
//дополнение для ошибок "#NULL!", "#DIV/0!"...
pEmbeddedFontsManager->CheckString(std::wstring(_T("#!/?")));
pEmbeddedFontsManager->CheckString(std::wstring(_T("#!/?")));
//дополнение для num форматов по умолчанию с id от 0 до 49
pEmbeddedFontsManager->CheckString(std::wstring(_T(".%E+-():")));
pEmbeddedFontsManager->CheckString(std::wstring(_T(".%E+-():")));
}
NSBinPptxRW::CDrawingConverter oOfficeDrawingConverter;
@ -140,7 +139,19 @@ namespace BinXlsxRW{
RELEASEOBJECT(pFontPicker);
return result;
}
bool CXlsxSerializer::saveChart(NSBinPptxRW::CBinaryFileReader* pReader, long lLength, NSCommon::smart_ptr<OOX::File> &file, const int& nChartNumber)
_UINT32 CXlsxSerializer::xml2Xlsx(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions)
{
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
NSBinPptxRW::CDrawingConverter oDrawingConverter;
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"xl");
oDrawingConverter.SetSrcPath(strFileInDir, 2);
BinXlsxRW::BinaryFileReader oBinaryFileReader;
return oBinaryFileReader.Xml2Xlsx(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions, m_bIsMacro);
}
bool CXlsxSerializer::saveChart(NSBinPptxRW::CBinaryFileReader* pReader, long lLength, NSCommon::smart_ptr<OOX::File> &file)
{
if (NULL == pReader) return false;
if (NULL == m_pExternalDrawingConverter) return false;
@ -181,7 +192,7 @@ namespace BinXlsxRW{
NSCommon::smart_ptr<OOX::Spreadsheet::CChartFile> chart_file = file.smart_dynamic_cast<OOX::Spreadsheet::CChartFile>();
if (chart_file.IsInit())
{
sFileName = L"chart" + std::to_wstring(nChartNumber) + L".xml";
sFileName = L"chart" + std::to_wstring(chart_file->GetGlobalNumber()) + L".xml";
bResult = (0 == oBinaryChartReader.ReadCT_ChartFile(lLength, chart_file.GetPointer()));
@ -217,7 +228,7 @@ namespace BinXlsxRW{
NSCommon::smart_ptr<OOX::Spreadsheet::CChartExFile> chartEx_file = file.smart_dynamic_cast<OOX::Spreadsheet::CChartExFile>();
if (chartEx_file.IsInit())
{
sFileName = L"chartEx" + std::to_wstring(nChartNumber) + L".xml";
sFileName = L"chartEx" + std::to_wstring(chartEx_file->GetGlobalNumber()) + L".xml";
bResult = (0 == oBinaryChartReader.ReadCT_ChartExFile(lLength, chartEx_file.GetPointer()));

View File

@ -59,13 +59,11 @@ namespace BinXlsxRW {
public:
CXlsxSerializer();
~CXlsxSerializer();
static void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
_UINT32 loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
_UINT32 saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
bool saveChart (NSBinPptxRW::CBinaryFileReader* pReader, long lLength, NSCommon::smart_ptr<OOX::File> &file, const int& nChartNumber);
_UINT32 saveToFile (const std::wstring& sDstPath, const std::wstring& sSrcFileName, const std::wstring& sXMLOptions);
//------------------------------------------------
static void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
void setFontDir (const std::wstring& sFontDir);
void setEmbeddedFontsDir(const std::wstring& sEmbeddedFontsDir);
@ -73,6 +71,9 @@ namespace BinXlsxRW {
void setIsNoBase64 (bool val);
void setMacroEnabled (bool val);
_UINT32 xml2Xlsx (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
bool saveChart (NSBinPptxRW::CBinaryFileReader* pReader, long lLength, NSCommon::smart_ptr<OOX::File> &file);
bool writeChartXlsx (const std::wstring& sDstFile, NSCommon::smart_ptr<OOX::File> &file);
bool hasPivot (const std::wstring& sSrcPath);
};

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 {
@ -358,12 +358,12 @@ void docx_serialize_shape_child(std::wostream & strm, _docx_drawing & val)
}
void docx_serialize_group_child(std::wostream & strm, _docx_drawing & val)
{
std::wstring name_node = L"wpg:wgp";
if (val.inGroup)name_node = L"wpg:grpSp";
std::wstring node_name = L"wpg:wgp";
if (val.inGroup)node_name = L"wpg:grpSp";
CP_XML_WRITER(strm)
{
CP_XML_NODE(name_node)
CP_XML_NODE(node_name)
{
CP_XML_NODE(L"wpg:cNvGrpSpPr")
{

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

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