Compare commits

...

1044 Commits

Author SHA1 Message Date
950482095c fix bug #76358 2025-09-02 10:11:09 +03:00
8ca89ca9b7 [android] Update icu path, enable resource shrinking 2025-09-02 08:21:01 +03:00
da705edfb8 fix bug #76472 2025-09-01 17:03:24 +03:00
2ed318df0f fix bug #76417 2025-09-01 15:41:29 +03:00
771ee80ec5 fix bug #71797 2025-09-01 13:12:46 +03:00
4ddf4521c4 fix macros in embedded 2025-09-01 12:41:04 +03:00
1491bd8802 Merge pull request 'Fix bugs' (#429) from fix/fb2-html-hwp into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/429
2025-08-29 10:12:51 +00:00
e7de9af0e0 Fix build 2025-08-28 19:33:34 +03:00
703ec47e67 Merge pull request 'fix bug #76433' (#428) from fix/bug76433 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/428
2025-08-28 15:07:44 +00:00
708e37d0a5 Merge pull request 'Fix bug 45529' (#427) from fix/rtfFormat into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/427
2025-08-28 15:06:51 +00:00
e11b946d62 fix bug #76433 2025-08-28 21:05:16 +06:00
331401ea86 Fix bug 45529 2025-08-28 18:02:53 +03:00
40809ea3c2 fix build 2025-08-28 15:34:21 +03:00
b79001a9fd Merge branch 'fix/ofd' into fix/fb2-html-hwp 2025-08-28 14:57:02 +03:00
49d4b5c1d2 Merge remote-tracking branch 'origin/fix/html-bugs' into fix/fb2-html-hwp 2025-08-28 14:56:12 +03:00
fa513eb83f Merge remote-tracking branch 'origin/fix/hwp-bugs' into fix/fb2-html-hwp 2025-08-28 14:55:56 +03:00
e84e0a6ce8 Merge branch 'fix/fb2' into fix/fb2-html-hwp 2025-08-28 14:55:43 +03:00
13158b2956 Merge pull request 'fix bug #76439' (#422) from fix/bug76439 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/422
2025-08-28 11:22:22 +00:00
9e8beb5651 Merge pull request 'fix/bug56564' (#425) from fix/bug56564 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/425
2025-08-28 11:20:43 +00:00
711e80e62c Merge pull request 'Fix bug 76484, 76443' (#426) from fix/bug-76484 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/426
2025-08-28 10:28:36 +00:00
3404aab782 Fix bug 76484 2025-08-28 12:10:22 +03:00
9c3ba26fab fix/bug56564 2025-08-28 11:38:17 +03:00
02f4c10cd6 Merge branch 'fix/bug56564' of git.onlyoffice.com:ONLYOFFICE/core into fix/bug56564 2025-08-28 11:30:09 +03:00
0d912533bf fix/bug56564 2025-08-28 11:30:06 +03:00
066793921b revert 518a38e178
revert fix/bug56564

fix bug with uncorrected table of contents
2025-08-28 08:29:11 +00:00
9b2b7263c2 revert 518a38e178
revert fix/bug56564

fix bug with uncorrected table of contents
2025-08-28 08:25:05 +00:00
31c28903d6 Merge pull request 'Fix bug 56419' (#423) from fix/rtfFormat into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/423
2025-08-27 22:46:36 +00:00
518a38e178 fix/bug56564
fix bug with uncorrected table of contents
2025-08-27 22:39:10 +03:00
631c2d4490 Fix bug 56419 2025-08-27 22:04:15 +03:00
0d0003ad5a fix bug #76439 2025-08-27 19:12:03 +06:00
eb3bedd840 Fix build with xcode 14- 2025-08-27 13:55:11 +03:00
0e9db67173 Merge pull request 'Fix bug 76416' (#421) from fix/bug-76416 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/421
2025-08-27 09:18:46 +00:00
1a65242d46 Fix build 2025-08-27 12:04:48 +03:00
30da4b631f Fix build 2025-08-26 16:07:41 +03:00
a988e6741c Merge branch 'release/v9.1.0' of https://git.onlyoffice.com/ONLYOFFICE/core into release/v9.1.0 2025-08-26 09:56:18 +03:00
29c2239df2 Fix build 2025-08-26 09:56:07 +03:00
0d7ddfb580 Merge pull request 'Fix bug 56063' (#420) from fix/rtfFormat into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/420
2025-08-26 06:03:47 +00:00
a7b5866bc6 Fix bug in HWP 2025-08-26 08:44:29 +03:00
8bbb21263d Fix build 2025-08-25 22:53:43 +03:00
a652bd6591 Fix bug 56063 2025-08-25 16:19:02 +03:00
78532c27cf Fix bug 76416 2025-08-25 16:01:47 +03:00
63d3999072 Fix build with c++17 2025-08-22 23:50:22 +03:00
d055522aa0 Merge branch 'feature/libheif' into release/v9.1.0 2025-08-22 22:33:26 +03:00
c5e63a8d26 fix bug #76396 2025-08-22 16:23:28 +03:00
e56da8e641 Add ios and android libheif support 2025-08-22 13:15:44 +04:00
ba63cfc622 Merge pull request 'feature/custom-sysroot' (#417) from feature/custom-sysroot into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/417
2025-08-22 07:50:56 +00:00
7486182be7 Merge pull request 'release/v9.1.0' (#416) from release/v9.1.0 into feature/custom-sysroot
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/416
2025-08-22 07:41:42 +00:00
6f171bd5d7 Merge pull request 'Fix bug 57050' (#415) from fix/rtfFormat into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/415
2025-08-21 16:39:09 +00:00
dad2fdd3e0 Fix prev 2025-08-21 19:38:49 +03:00
48bc54311c Fix bug 57050 2025-08-21 19:08:37 +03:00
a71b7ec6e7 Fix pro file path 2025-08-21 17:07:56 +03:00
292e6b0431 Merge pull request 'fix/fix-bugs' (#414) from fix/fix-bugs into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/414
2025-08-21 13:52:17 +00:00
5649de0877 Merge remote-tracking branch 'origin/fix/bug73365' into fix/fix-bugs 2025-08-21 16:50:07 +03:00
7aa2056785 Merge branch 'fix/bug73365' of git.onlyoffice.com:ONLYOFFICE/core into fix/bug73365 2025-08-21 14:29:40 +03:00
b1c8969ede fix/bug73365
fix bug when after conversion text move to next column. Also detect and fix a new bug, when we have explicit break column but break is happening early
2025-08-21 14:28:47 +03:00
d3805e81d7 Refactoring win arm build 2025-08-20 17:43:39 +03:00
8171939be6 Merge pull request 'fix/rtfFormat' (#411) from fix/rtfFormat into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/411
2025-08-19 13:19:54 +00:00
5178de4254 Fix bug 75790 2025-08-19 15:49:48 +03:00
f3ee3c8c91 Fix image size in HWP format 2025-08-19 12:16:12 +03:00
e108591a7e Fix bug #74898 2025-08-19 12:15:09 +03:00
29f1dc454b Fix bug #73730 2025-08-19 11:42:46 +03:00
b534907bc9 Remove checkout 2025-08-19 10:16:18 +03:00
b957d3aeea Fix build 2025-08-18 23:07:48 +03:00
520c345f00 Merge branch 'release/v9.1.0' of https://git.onlyoffice.com/ONLYOFFICE/core into release/v9.1.0 2025-08-18 21:52:43 +03:00
08ce05e5d3 Fix windows build 2025-08-18 21:52:32 +03:00
a8125114de fix bug #76361 (add custom xml in pptx) 2025-08-18 21:50:39 +03:00
13a4986eb7 Merge pull request 'fix/bug-with-break-column' (#410) from fix/bug-with-break-column into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/410
2025-08-18 10:40:53 +00:00
62003d97bb revert 98af93c631
revert fix/bug-with-break-columns

update comments
2025-08-18 10:40:37 +00:00
3e0a88a487 fix/bug-with-break-columns
update comments
2025-08-18 13:36:58 +03:00
1969229659 fix/bug-with-break-columns
update comments
2025-08-18 13:31:19 +03:00
98af93c631 fix/bug-with-break-columns
update comments
2025-08-18 13:25:23 +03:00
a4ebe56f28 Fix/bug73365
fix bug with convert from docx to odt
2025-08-17 10:18:47 +03:00
247b90ce1a Merge pull request 'feature/win-arm64' (#408) from feature/win-arm64 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/408
2025-08-16 11:14:01 +00:00
aef05de075 Merge pull request 'Switch to mac framework builds' (#400) from feature/mac-frameworks into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/400
2025-08-16 11:12:57 +00:00
5b12d7fff3 Fix boost build 2025-08-14 22:23:52 +03:00
4223f9c265 Change major ver of icu 2025-08-14 18:23:18 +03:00
9e60a7e3ab Fix build for boost 2025-08-14 17:58:05 +03:00
5de9bd7e67 For bug 75790 extra underline 2025-08-14 16:49:55 +03:00
dacde4c593 fix bug #76316 2025-08-14 13:46:25 +03:00
97385c3f37 fix bug #76313 2025-08-14 11:23:35 +03:00
edd17cd7c3 Fix for win_arm64 2025-08-13 21:28:33 +03:00
e373adf717 Merge pull request 'fix/fix-bugs-9.1' (#407) from fix/fix-bugs-9.1 into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/407
2025-08-13 13:48:07 +00:00
2ad1771333 fix bug with break columns
Clear comment text_elements.cpp

(cherry picked from commit e01517714c)
2025-08-13 16:46:14 +03:00
73f40edc7e Fix bug with break columns
clear all comments into code

(cherry picked from commit 3f7edeec4f)
2025-08-13 16:46:08 +03:00
182a3cea90 Fix bug with columns break
Fix bug with convert from odf to docx

(cherry picked from commit 688632c373)
2025-08-13 16:45:54 +03:00
72f0b0403e Fix for Linux 2025-08-13 16:19:47 +04:00
3d5d871911 Merge branch 'develop' into fix/bug73365 2025-08-13 14:16:58 +03:00
1fbffa673c fix/bug73365 2025-08-13 11:42:59 +03:00
06c47b07ec Remove usage of C++17 features in heif code 2025-08-13 11:38:12 +04:00
e2bcf62cc4 Fix for windows 2025-08-13 11:36:10 +04:00
f5a91c33b5 Fix line break and tab bug 2025-08-12 19:12:23 +03:00
79ab0bc04b Change gitignore files 2025-08-12 19:08:56 +03:00
242aa2c9d6 Merge pull request 'Fix bug with columns break' (#406) from fix/bug-with-break-columns into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/406
2025-08-12 12:27:57 +00:00
e01517714c fix bug with break columns
Clear comment text_elements.cpp
2025-08-12 12:24:11 +03:00
3f7edeec4f Fix bug with break columns
clear all comments into code
2025-08-12 12:16:40 +03:00
9cef29c201 Fix for unix 2025-08-11 18:52:51 +04:00
688632c373 Fix bug with columns break
Fix bug with convert from odf to docx
2025-08-11 17:03:03 +03:00
c86387c015 Merge branch 'feature/mac-frameworks' into feature/libheif 2025-08-11 16:26:32 +04:00
e8f7720387 Move libs and includes to heif.pri 2025-08-11 16:26:17 +04:00
4ea504f688 Fix bug #76165 2025-08-11 00:31:40 +03:00
c3dd5c8fc9 Add heif directory to 3dParty 2025-08-09 00:15:39 +04:00
6e1357f276 fix bug #76039
(cherry picked from commit 53d5f4517b)
2025-08-08 17:22:58 +03:00
fee71647a9 fix bug #74231
(cherry picked from commit 03e21d19f1)
2025-08-08 17:22:43 +03:00
6c516b7ce2 fix bug #74142
(cherry picked from commit cd05b830b1)
2025-08-08 17:22:32 +03:00
53d5f4517b fix bug #76039 2025-08-08 09:59:00 +03:00
03e21d19f1 fix bug #74231 2025-08-07 17:59:21 +03:00
cd05b830b1 fix bug #74142 2025-08-07 13:39:44 +03:00
bf05a63db0 Merge branch hotfix/v9.0.4 into develop 2025-08-06 08:28:20 +00:00
bc96c82ff9 Merge branch hotfix/v9.0.4 into master 2025-08-05 14:08:27 +00:00
4187522006 fix bug #70515 2025-08-05 11:27:20 +03:00
a82cf375b7 Fixed a color bug in OFD 2025-08-04 17:54:26 +03:00
81f057ba78 Merge branch 'hotfix/v9.0.4' into feature/libheif 2025-08-04 17:47:50 +04:00
c2a733f465 Fixed PageBlock positioning in OFD 2025-08-04 14:45:28 +03:00
fcd7818675 Add test for heif 2025-08-04 12:51:33 +03:00
baf8321c61 Fix bug 57586 (up version for fonts selection) 2025-08-02 21:33:34 +03:00
826bd168ad fix bug #74266 2025-08-01 15:51:04 +03:00
b1dff84b1b fix bug #74757 2025-08-01 15:32:24 +03:00
c65460e49b . 2025-08-01 15:30:40 +03:00
f5fa14a230 Merge branch 'develop' of git.onlyoffice.com:ONLYOFFICE/core into develop 2025-08-01 13:23:45 +03:00
db744e6fdc fix bug #76172 2025-08-01 13:23:19 +03:00
a15156fcb3 Merge remote-tracking branch 'origin/hotfix/v9.0.4' into develop 2025-08-01 13:13:23 +03:00
dbc54e5879 Fix typo 2025-08-01 12:33:09 +03:00
2a09e2ef67 Merge pull request 'Fix bug #76008' (#404) from fix/bug-76008 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/404
2025-07-31 19:27:02 +00:00
17534abdda Fix bug #76008 2025-07-31 22:16:41 +03:00
e4a7cf63c9 Added support for Annotations in OFD 2025-07-31 21:04:31 +03:00
0eadce28da fix bug #74757 2025-07-31 15:51:45 +03:00
29c53f751b Merge pull request 'fix bug #76186' (#402) from fix/bug76186 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/402
2025-07-31 12:17:57 +00:00
6500e65edc fix bug #76186 2025-07-31 18:13:52 +06:00
e8ecb2cdfb Fix bug 57586 2025-07-31 12:27:49 +03:00
3046b1557f Update gitignore 2025-07-31 11:25:31 +03:00
fbf4ef22d8 Fix remove MEOptions 2025-07-31 11:23:14 +03:00
628908e96c Merge remote-tracking branch 'origin/fix/pdf-rtl' into develop 2025-07-30 16:40:22 +03:00
78df0b3780 Fix emscripten 2025-07-30 16:35:55 +03:00
d8c0e9b68d Merge remote-tracking branch 'origin/develop' into fix/pdf-rtl
# Conflicts:
#	DesktopEditor/graphics/commands/AnnotField.cpp
#	DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js
#	DesktopEditor/graphics/pro/js/wasm/src/drawingfile_test.cpp
#	PdfFile/PdfWriter.cpp
#	PdfFile/SrcReader/PdfAnnot.cpp
2025-07-30 16:30:59 +03:00
df8f8636b6 Fix MEOptions to 21 widget and 11 parent 2025-07-30 16:20:57 +03:00
5722599351 fix bug #76106 2025-07-30 15:09:53 +03:00
f4489a3926 for bug #76151 2025-07-29 18:08:30 +03:00
91f27bf771 fix bug #76151 2025-07-29 17:21:32 +03:00
eb3daff8d6 fix bug #70652 2025-07-28 19:01:26 +03:00
6d707ebae2 Fix decode 2025-07-28 13:28:20 +03:00
bab8da0475 Change framework versions to A 2025-07-28 10:54:50 +04:00
66501ab353 Fixed a problem with text rendering in OFD 2025-07-26 18:58:32 +03:00
a865901405 Fix bug 57586 2025-07-25 11:21:08 +03:00
c1987b196e Fix Stamp InRect 2025-07-25 09:31:46 +03:00
8899966508 Add use fonts folder to builder 2025-07-24 14:50:08 +03:00
41dc23ce53 Add Release/Debug libs 2025-07-24 12:10:26 +03:00
3a555aa223 fix bug #76084 2025-07-24 09:58:08 +03:00
2168216009 Fix meta drawingfile 2025-07-23 17:16:00 +03:00
13b42d71e2 Write OMetadata for all annots 2025-07-23 17:11:35 +03:00
58cd88a93f OMetadata for all annots 2025-07-23 17:03:45 +03:00
4dc1d88bc9 Fix Java wrapper for mac frameworks 2025-07-21 19:21:51 +04:00
ef2d554265 Return AP for readAnnotationsInfoFromBinary 2025-07-21 16:08:26 +03:00
2d08404f72 ctWidgetsInfo add to readAnnotationsInfoFromBinary 2025-07-21 13:10:55 +03:00
cd6c4c56c3 . 2025-07-21 11:45:33 +03:00
96f7de8534 Add executable rights 2025-07-20 15:20:37 +03:00
dba4be73dd Add support woff2 fonts 2025-07-20 14:53:35 +03:00
f3101fd2ec fix bug #76021 2025-07-18 18:45:36 +03:00
08716fc4ce fix bug #75800 2025-07-18 16:59:16 +03:00
986125a3e6 fix bug #76005 2025-07-18 16:29:32 +03:00
b655a4e109 Merge remote-tracking branch 'origin/fix/pdf-copy-paste' into develop 2025-07-18 16:14:07 +03:00
7ce6602951 Merge remote-tracking branch 'origin/feature/pdf-redact' into fix/pdf-copy-paste 2025-07-18 16:12:09 +03:00
f45b3ba0da Fix DA in SetFont 2025-07-18 14:24:27 +03:00
5ec24525b8 Not need AP 2025-07-18 13:25:11 +03:00
0c601c1c82 Redact read font from DA 2025-07-18 12:02:20 +03:00
c7d3e5df14 Fix python wrapper 2025-07-18 12:05:57 +04:00
2351b1f052 Link statically with ICU on framework builds 2025-07-18 12:05:57 +04:00
b93ea3bb41 Add support for mac framework builds 2025-07-18 12:05:57 +04:00
697f604fc4 . 2025-07-18 10:25:34 +03:00
a817cd54d5 Fix static build 2025-07-17 20:11:46 +03:00
1fc61459b8 Fixed a numbering bug in html 2025-07-17 18:06:58 +03:00
e1b3474a06 Create Redact 2025-07-17 17:57:16 +03:00
041325b440 Merge pull request 'For bug 70337' (#397) from fix/docx-renderer into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/397
2025-07-17 12:26:02 +00:00
064a04a600 Fix bug #38609 2025-07-17 15:18:21 +03:00
df4e1445f6 fix bug #75800 2025-07-17 10:36:02 +03:00
cc6132cd77 For bug 70337
Fix shape rotation and negative position for pdf editor
2025-07-16 19:08:01 +03:00
c7a209048f Merge pull request 'feature/add-xls-writing' (#396) from feature/add-xls-writing into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/396
2025-07-16 12:27:45 +00:00
a359060684 Merge remote-tracking branch 'origin/hotfix/v9.0.4' into fix/pdf-copy-paste 2025-07-16 12:14:51 +03:00
08fafaa655 fix formula writing 2025-07-15 19:18:08 +06:00
57923e4266 Merge pull request 'Fix bug 75958' (#395) from fix/bug-75958 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/395
2025-07-15 09:32:15 +00:00
b488623e81 Fix bug 75958 2025-07-15 12:11:33 +03:00
2462074f63 Merge branch 'develop' into feature/add-xls-writing 2025-07-15 13:11:37 +06:00
5e121188d8 Merge pull request 'Fix bugs 75871, 75897' (#394) from fix/bug-75871 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/394
2025-07-15 06:49:52 +00:00
114f9a0da3 Fix build for gcc 5.4.1 2025-07-15 00:01:49 +03:00
7c4b85600d Fix sst writing 2025-07-14 19:14:56 +06:00
48e2defbcd Fix bug 75897 2025-07-14 15:55:17 +03:00
07bd804009 Merge pull request 'Refactoring the hwpx parser' (#393) from fix/HWP into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/393
2025-07-14 11:50:21 +00:00
348fc71e1c Merge pull request 'Fix bug #75723' (#392) from fix/bug-75723 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/392
2025-07-14 11:49:43 +00:00
d123b0f610 fix bug #75882 2025-07-14 14:29:50 +03:00
13e30bf918 Fix bug 75871 2025-07-14 12:54:33 +03:00
e74a96884c Fix multy sheet writing 2025-07-14 15:44:41 +06:00
c67d87b1f0 Fix split button AP 2025-07-14 12:05:54 +03:00
1e73aed4a5 Merge branch 'develop' into feature/add-xls-writing 2025-07-14 13:11:35 +06:00
63da89d846 Merge pull request 'hotfix/v9.0.4' (#391) from hotfix/v9.0.4 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/391
2025-07-12 06:44:47 +00:00
9f223deee7 fix row conversion 2025-07-11 20:55:58 +06:00
d49789ea19 Removed dbcells writing 2025-07-11 20:55:32 +06:00
738583d0d4 Fix empty document writing 2025-07-11 18:55:15 +06:00
47a1e26ff5 Fix build 2025-07-11 14:24:06 +03:00
ecca7a5cdd Add default values for xls records 2025-07-11 14:47:35 +06:00
407993cd40 fix bug #73585 2025-07-11 11:05:39 +03:00
7e5d3bb3eb fix bug #75841 2025-07-11 09:20:57 +03:00
381daebcb9 . 2025-07-10 19:21:27 +03:00
7e6d6b407c Merge pull request 'Fix metadata xlst conversion' (#390) from fix/metadata-conversion into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/390
2025-07-10 15:43:16 +00:00
5e9f0d762a Fix metadata xlst conversion 2025-07-10 21:41:22 +06:00
f5ddf8c6ce Fix build 2025-07-10 18:27:15 +03:00
4f95713790 Fix bug #75723 2025-07-10 16:15:10 +03:00
337847f606 Fixed a tab bug in hwpx 2025-07-10 13:51:56 +03:00
a84491cf74 Fix param type 2025-07-10 13:36:06 +03:00
689eaddd5b fix bug #75885 2025-07-09 21:05:46 +03:00
2cc56a9f9f fix bug #75880 2025-07-09 20:56:05 +03:00
33c6640ce0 fix bug #75754 2025-07-09 18:15:26 +03:00
e6e93549c9 Merge remote-tracking branch 'origin/hotfix/v9.0.4' into fix/HWP 2025-07-09 15:47:38 +03:00
00e5c8bd2e Fixed a bug with glued text in hwpx 2025-07-09 15:46:06 +03:00
ae063b3d41 Merge pull request 'Fix bug 75687' (#389) from fix/pre9.0.4 into hotfix/v9.0.4
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/389
2025-07-09 08:32:03 +00:00
01d6a7d090 Add message for arm64 building 2025-07-08 18:30:59 +03:00
98c998b3ee Refactoring 2025-07-08 15:07:40 +03:00
f6c8356684 Merge branch hotfix/v9.0.3 into master 2025-07-08 11:37:44 +00:00
880951a611 Refactoring 2025-07-08 14:24:44 +03:00
2895f829e3 Refactoring ZipFolder 2025-07-08 14:24:28 +03:00
671b88d8bc Add ibXF writing 2025-07-08 15:58:44 +06:00
c0ba4267d2 Fix for arm 2025-07-07 22:58:32 +03:00
29355d337b Fix encode 2025-07-07 18:01:25 +03:00
6f7a414888 Merge branch hotfix/v9.0.2 into develop 2025-07-07 14:38:42 +00:00
031fc7517b Merge pull request 'hotfix/v9.0.2' (#388) from hotfix/v9.0.2 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/388
2025-07-07 12:59:29 +00:00
a040e89ae5 Merge branch 'develop' into feature/add-xls-writing 2025-07-07 13:09:31 +06:00
e025ae2779 Refactoring 2025-07-06 22:53:38 +03:00
21ca48c6f6 Fir bug 75101 2025-07-04 23:08:11 +03:00
ec906774dd Fix bug 75101 2025-07-04 23:04:18 +03:00
e17b99554d Fix Split mode 2025-07-04 19:40:08 +03:00
09ac9f8609 add mandatory formatting writing 2025-07-04 21:25:30 +06:00
97178ae328 Merge pull request 'fix images' (#387) from fix/fix-bugs-9.0.3 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/387
2025-07-04 14:33:59 +00:00
1dc8990c9d fix images 2025-07-04 17:31:44 +03:00
f68825c6d3 Merge pull request 'For bug 75781' (#386) from fix/pdf-button into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/386
2025-07-04 12:42:28 +00:00
4770a2b22b Fix bug 75687 2025-07-04 14:27:16 +03:00
dda00c3b18 Fix get MK.RI & MK.IX 2025-07-04 14:18:04 +03:00
156578ca82 Fix base64 image 2025-07-04 14:16:48 +03:00
2ec63f2cb7 Change ChangeFullNameAnnot 2025-07-04 12:26:42 +03:00
62d2deaefb Add featHdr writing 2025-07-04 15:00:26 +06:00
fbed837a47 Fix change parrent FullName 2025-07-04 10:59:33 +03:00
0715c0c5a5 Fix merge prefix name 2025-07-04 10:53:00 +03:00
103c8dd575 Fix return errors 2025-07-03 20:45:30 +03:00
5dc5a200b8 Merge pull request 'Fix HWP bugs' (#385) from fix/HWP-bugs into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/385
2025-07-03 17:18:28 +00:00
23008b3737 Fix bug #75718 2025-07-03 19:43:13 +03:00
03f490047d Merge pull request 'fix/fix-bugs-9.0.3' (#384) from fix/fix-bugs-9.0.3 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/384
2025-07-03 16:12:58 +00:00
36454f4c6e Fix bug #75679 2025-07-03 18:52:52 +03:00
34e1dabefb fix bug #75722 2025-07-03 18:37:03 +03:00
3d39d5837f Fixed unnecessary strikethrough in hwp conversion 2025-07-03 17:58:31 +03:00
a6efd8a374 Fix bug #75673 2025-07-03 17:39:25 +03:00
3bfa3643e6 . 2025-07-03 16:36:19 +03:00
453e17ac0e Fix xls writing 2025-07-03 19:03:13 +06:00
88620dc8cd Merge pull request 'fix bug #75733' (#383) from fix/fix-bugs-9.0.3 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/383
2025-07-03 11:35:06 +00:00
cc9b00329e fix bug #75733 2025-07-03 14:17:49 +03:00
88c84ad577 Fix loading dicts for hyphenation 2025-07-02 23:06:18 +00:00
ee22e8e8b4 Merge pull request 'Fix bug 55007' (#380) from fix/bug-55007 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/380
2025-07-02 15:56:14 +00:00
1756d58c6d Merge pull request 'Fix bug 75688' (#381) from fix/bug-75688 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/381
2025-07-02 15:44:05 +00:00
ecab418202 Fix bug 75688 2025-07-02 16:51:09 +03:00
d3430ace10 Add worksheet filepos writing 2025-07-02 18:08:15 +06:00
10a6f6e617 fix bug #75568 2025-07-02 14:04:02 +03:00
8c6a26895b Add read from memory 2025-07-02 13:22:30 +03:00
5142536e17 Add worksheet pos collecting 2025-07-01 21:47:46 +06:00
fd05f3b16d fix bug #75551 2025-07-01 17:18:46 +03:00
e0840e73d2 . 2025-07-01 17:00:40 +03:00
ae2918ec71 fix ShortXLUnicodeString writing 2025-07-01 18:36:07 +06:00
17369e8bee fix bug #75568 2025-07-01 12:30:41 +03:00
3047a9fb47 Fix bug 55007 2025-07-01 12:19:18 +03:00
1495581b00 Merge remote-tracking branch 'origin/fix/pdf-copy-ap' into develop 2025-07-01 11:42:38 +03:00
6c2fce16a8 Merge remote-tracking branch 'origin/develop' into fix/pdf-copy-ap 2025-07-01 11:41:07 +03:00
58be006bb9 fix bug #75635 2025-07-01 11:37:15 +03:00
6c2a8205ec Fix m_bSplit 2025-07-01 11:07:39 +03:00
29cee43448 Add split mode for PdfWriter 2025-07-01 10:46:38 +03:00
0154543b01 Remove temp file 2025-06-30 16:25:28 +03:00
3e2dee5719 Fix heif encode 2025-06-30 16:13:03 +03:00
8b4fe95291 Merge pull request 'Fix bugs 75101, 75574' (#379) from fix/bug-75101 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/379
2025-06-30 11:03:08 +00:00
c25f8cc204 Fix heif image convert 2025-06-30 13:51:05 +03:00
010d1ce4c9 PDF Write TU for parent field 2025-06-30 13:48:39 +03:00
6ac9349ccb Fix bug 75574 2025-06-30 13:33:19 +03:00
c3bf7ad49b Fix bug 75101 2025-06-30 11:13:56 +03:00
b5d56d1d6d Fix build 2025-06-29 11:27:02 +03:00
d3aae6dfcb Add heif decode and encode 2025-06-29 10:08:51 +03:00
fb07c0c468 Add xls_writer 2025-06-27 21:10:21 +06:00
327d00bacf Merge branch 'develop' into feature/add-xls-writing 2025-06-27 14:30:49 +06:00
fe0d95009c Merge pull request 'fix bug #69371' (#378) from fix/bug69371 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/378
2025-06-26 14:29:06 +00:00
bcc5f67ec8 Merge branch hotfix/v9.0.2 into master 2025-06-26 12:55:22 +00:00
9200c29d42 Merge branch 'develop' into feature/add-xls-writing 2025-06-26 17:03:58 +06:00
c13027c9d1 fix bug #69371 2025-06-26 16:43:29 +06:00
6acb9855a1 For bug 74201 2025-06-26 12:48:51 +03:00
1619e421f2 . 2025-06-25 18:20:20 +03:00
2b1e5faef9 Added tabulation support in HWP 2025-06-25 17:38:26 +03:00
ea214f942f Add dbQueryExt writin 2025-06-25 15:41:22 +06:00
ccbff8d8da Merge branch 'develop' into feature/add-xls-writing 2025-06-25 14:15:44 +06:00
1cd72ab988 Fix for 64 bit 2025-06-24 22:26:46 +03:00
63937e706e Merge remote-tracking branch 'origin/hotfix/v9.0.3' into develop 2025-06-24 19:23:51 +03:00
54a903d2e7 fix bug #74484 2025-06-24 18:56:47 +03:00
e48fab418d Merge pull request 'For bug 71235' (#377) from fix/bug-71235 into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/377
2025-06-24 14:41:58 +00:00
537304ad24 add querytable writing 2025-06-24 19:14:23 +06:00
fa9e3cb48e For bug 71235 2025-06-24 12:34:05 +03:00
d362999e2a Add custom sysroot in base.pri 2025-06-24 10:47:06 +03:00
6e73b593ba fix bug #75443 2025-06-24 09:59:21 +03:00
46fbf81b4d [x2t] Fix typo 2025-06-23 19:36:13 +03:00
519a93ecaf Merge pull request '[x2t] Add oformAsPdf to params.xml to override checker format' (#376) from fix/oformAsPdf2 into hotfix/v9.0.2
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/376
2025-06-23 16:15:07 +00:00
90ded6788f [x2t] Add oformAsPdf to params.xml to override checker format 2025-06-23 19:01:04 +03:00
1f4a420d35 Add dcon writing 2025-06-23 20:39:43 +06:00
087146ce77 Merge pull request 'fix bugs' (#373) from fix/OOXml2Odt into hotfix/v9.0.1
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/373
2025-06-23 13:27:05 +00:00
b4ac2a9515 Merge pull request 'for bug #75064' (#374) from for/bug75064 into fix/OOXml2Odt
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/374
2025-06-23 13:23:15 +00:00
d11e0492f2 Add bookExt writing 2025-06-23 17:09:12 +06:00
4b3c4242f6 Add theme writing 2025-06-23 15:33:42 +06:00
482a821974 fix text in controls xlsx 2025-06-21 16:42:56 +03:00
2e1538b3dc Merge branch 'fix/pre9.0.1' into hotfix/v9.0.1 2025-06-21 10:20:55 +03:00
48ec45c1dd Add metadata writing 2025-06-20 20:59:37 +06:00
809ed63ca0 for bug #75064 2025-06-20 17:10:17 +03:00
91badde27d Add mdblock writing 2025-06-20 18:26:22 +06:00
618b1a9ca8 Add MDTInfo writing 2025-06-20 15:35:28 +06:00
95d523370d Merge pull request 'Fix bug 71235' (#372) from fix/bug-71235 into fix/pre9.0.1
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/372
2025-06-20 09:27:56 +00:00
a2768af989 Fix DW 2025-06-20 11:44:36 +03:00
85e8d253a9 Add userBview writing 2025-06-20 14:34:10 +06:00
d4e623f277 Fix WritePrivateDictionary 2025-06-20 11:07:57 +03:00
827dc4c1b9 Merge branch 'develop' into feature/add-xls-writing 2025-06-19 20:52:27 +06:00
5d033bef69 fix bugs 2025-06-19 17:07:15 +03:00
18e22f0f05 Add autofilter12 writing 2025-06-19 19:56:05 +06:00
426cd08d57 Refactoring 2025-06-19 16:18:03 +03:00
d1a64d29c0 Fix WriteCharsets
In this case, the SID is our assigned ushCode glyph on the entry in the page content stream
2025-06-19 15:28:59 +03:00
b8053ae388 Merge remote-tracking branch 'origin/fix/pre9.0.1' into develop 2025-06-19 13:44:30 +03:00
c56cfaf71f Add dfttext writing 2025-06-19 15:12:24 +06:00
2680fd7073 Merge branch 'fix/fix-bugs-9.0' into fix/pre9.0.1 2025-06-19 12:12:23 +03:00
cfdeca436b fix bug #75232 2025-06-19 12:06:36 +03:00
db3769eb13 WritePrivateDictionary 2025-06-18 16:42:10 +03:00
e5fcbcf5f3 Add dropbar writing 2025-06-18 19:26:48 +06:00
6d4ff364b3 nsid 2025-06-18 14:57:25 +03:00
8a9277d1d8 Add MEOptions 2025-06-18 13:49:50 +03:00
f3d3755a31 Add axm writing 2025-06-18 16:44:17 +06:00
ffab501ce9 Add seriesformat writing 2025-06-18 15:25:05 +06:00
74b21f5b4c Merge branch release/v9.0.0 into master 2025-06-18 09:23:26 +00:00
3e9d3bed35 Merge pull request 'fix/fix-bugs-9.0' (#370) from fix/fix-bugs-9.0 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/370
2025-06-17 15:35:44 +00:00
8ddb6e7f05 for bug #75064 2025-06-17 18:33:18 +03:00
db9fd85f22 Add dataformat writing 2025-06-17 21:21:29 +06:00
e54e8d7a8a fix bug #74263 2025-06-17 16:38:32 +03:00
8e0e1203c6 Complete CharStringType2Interpreter 2025-06-17 15:38:40 +03:00
9a74609366 Add axes writing 2025-06-17 16:52:32 +06:00
d9f24ca635 Merge pull request 'Fix bug 73392' (#369) from fix/bug-73392 into fix/pre9.0.1
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/369
2025-06-17 09:33:50 +00:00
ebddab233c Fix bug 73392 2025-06-17 12:25:00 +03:00
0bdd7f098d for bug #75177 2025-06-17 11:58:13 +03:00
efadc23a50 Create CharStringType2Interpreter 2025-06-17 11:06:09 +03:00
36db67cba3 Fix bug 74031 2025-06-17 02:33:31 +03:00
c9e5320ea3 Merge pull request 'For bug 75249' (#368) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/368
2025-06-16 16:57:49 +00:00
58f12dbbee For bug 75249 2025-06-16 19:47:39 +03:00
1656d0dd6d Merge pull request 'fix/fix-bugs-9.0' (#367) from fix/fix-bugs-9.0 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/367
2025-06-16 15:02:01 +00:00
39090a2423 fix bug #74447 2025-06-16 17:56:49 +03:00
8241d85596 fix bug #70421 2025-06-16 16:52:57 +03:00
8ebc312dc7 Merge pull request 'Fix bug 75259' (#366) from fix/bug-75259 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/366
2025-06-16 13:30:21 +00:00
aaf744353f Add dat writing 2025-06-16 19:29:39 +06:00
4cff6dfe57 Fix bug 75259 2025-06-16 16:21:29 +03:00
15ee6ecf91 Merge remote-tracking branch 'origin/release/v9.0.0' into fix/bug-71235 2025-06-16 14:46:06 +03:00
67a5b7f087 Add frame writing 2025-06-16 17:04:24 +06:00
c6e2ad0fef Merge pull request 'Fix bugs 75158, 66505' (#365) from fix/bug-75158 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/365
2025-06-16 10:57:32 +00:00
5b9141ce1d Fix bug 66505
In pdf, child field actions become parent - this applies to date format, text field format and placeholder
2025-06-16 13:48:36 +03:00
502312fe20 Fix bug 75158 2025-06-16 12:55:01 +03:00
a10b8ee6fb Merge pull request 'Fix bug 74554' (#364) from fix/bug-74554 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/364
2025-06-16 09:21:27 +00:00
7c6cd1107d Fix bug 74554 2025-06-16 12:08:45 +03:00
05be4876e8 Fix build 2025-06-13 15:30:29 +03:00
d9806dfbc8 Merge pull request 'Fix HWP/HWPX bugs' (#363) from fix/hwp into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/363
2025-06-13 06:13:46 +00:00
00e9d050ae Fixed a bug in reading HWP 2025-06-13 01:53:41 +03:00
405a2c1f59 Fix bug in HWP/HWPX with breaks 2025-06-13 01:05:20 +03:00
d287fc016e Fix bug #73665 2025-06-13 01:04:32 +03:00
383a616c97 For bug #73683 2025-06-12 23:28:06 +03:00
4e272d8ecf Refactoring 2025-06-12 21:44:21 +03:00
f6900b5d11 Fixed a bug in reading HWP 2025-06-12 21:43:58 +03:00
0a7a3c3a99 Fix bug 73477 2025-06-12 21:07:47 +03:00
556ea0dce4 Merge pull request 'fix/fix-bugs-9.0' (#362) from fix/fix-bugs-9.0 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/362
2025-06-12 13:13:54 +00:00
62dde72acc shape props for controls xlsx in binary 2025-06-12 16:09:30 +03:00
5e45f5fb09 fix bug #75177 2025-06-12 09:53:51 +03:00
750b28d866 Add Attachedlabel writing 2025-06-11 20:51:44 +06:00
33b246b9da Fix bug 75176 2025-06-11 17:26:12 +03:00
6c8e053bb2 Fix bug #73728 2025-06-11 14:48:32 +03:00
db7ebc5765 Add ld writing 2025-06-11 17:44:00 +06:00
84462ab1da Merge pull request 'Fix bug 75102' (#361) from fix/bug-75102 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/361
2025-06-11 11:08:25 +00:00
7cb08f3a87 Fix bug #75154 2025-06-11 13:54:25 +03:00
16b28e60a4 Fix remove name of Fields 2025-06-11 13:52:00 +03:00
8ac1c4d158 Add series list writing 2025-06-11 16:39:25 +06:00
5f78402f2a Fix bug 75102 2025-06-11 13:01:50 +03:00
fa80e4913f Create CharStringType2Flattener 2025-06-11 11:46:26 +03:00
aa5012928c Merge pull request 'Fix bug 75101' (#360) from fix/bug-75101 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/360
2025-06-10 18:04:47 +00:00
c0f5336a5a For bug 75012 2025-06-10 20:19:01 +03:00
646f2ca6b1 Fix bug 75101 2025-06-10 20:11:55 +03:00
18f92b56ba Merge branch 'develop' into feature/add-xls-writing 2025-06-10 18:13:13 +06:00
bc34a76127 Fix bug 75045 2025-06-10 15:13:04 +03:00
ad5670cde7 Merge pull request 'fix/bug74531' (#359) from fix/bug74531 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/359
2025-06-10 11:29:27 +00:00
b09fc50b62 for bug #74531 2025-06-10 17:19:39 +06:00
b04f9bda4a For bug #73716 2025-06-10 14:11:39 +03:00
046b39478a Merge pull request 'Fix md bugs' (#358) from fix/md into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/358
2025-06-10 10:39:04 +00:00
4e59cac4cd Fix bug #74982 2025-06-10 13:02:56 +03:00
0d79f941b9 Fixed a bug with the calculation of style in html 2025-06-10 12:02:35 +03:00
d69d71ec07 Create CPrimitiveWriter 2025-06-10 11:42:30 +03:00
0ebc0da7b2 Merge pull request 'fix/fix-bugs-v9.0' (#357) from fix/fix-bugs-v9.0 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/357
2025-06-10 06:34:54 +00:00
3db0662c14 fix bug #75069 2025-06-10 09:19:03 +03:00
49477554a4 Merge pull request 'Fix crash on destroying inserted graphics object' (#356) from fix/insert-image into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/356
2025-06-09 18:23:22 +00:00
55e758e3f8 Merge pull request 'for bug #75011' (#355) from for/bug75011 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/355
2025-06-09 17:38:26 +00:00
c11171fbf2 Fix crash on destroying inserted graphics object 2025-06-09 21:20:27 +04:00
8c4fc0d94c fix bug #74677 2025-06-09 18:23:28 +03:00
e6570a6ccc for bug #75011 2025-06-09 17:58:46 +03:00
ecda52ae5c fix reading xml 2025-06-09 17:50:11 +03:00
5df1ec97c3 Merge branch 'release/v9.0.0' into fix/bug74531 2025-06-09 17:54:17 +06:00
78577f70e5 fix bug #74531 2025-06-09 17:49:11 +06:00
78e20f5358 Merge pull request 'Fix bug 75044' (#353) from fix/bug-75044 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/353
2025-06-09 10:12:48 +00:00
dba3b263e6 For bug 75044
Fix rotate stamp with CropBox
Fix invisible background radiobutton with Beveled/Inset border
2025-06-09 12:59:47 +03:00
40ce56d7f8 Fix bug 75044 2025-06-09 11:48:14 +03:00
33864a1a1e [x2t] Fix <cp IX="0"></cp> reading; For bug 74677 2025-06-08 13:20:10 +03:00
602879432a fix bug #74501 2025-06-07 11:42:01 +03:00
cbc36b0b0a Merge pull request 'Fix bug #74743' (#352) from fix/bug-74743 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/352
2025-06-07 04:19:25 +00:00
dfc4048630 Fix bug #74743 2025-06-07 06:31:46 +03:00
adc2930f0b Merge pull request 'Fix HWP bugs' (#350) from fix/hwp into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/350
2025-06-06 19:16:07 +00:00
599566c5e2 Create CCFFWriter 2025-06-06 17:15:37 +03:00
17c1e0a2bb fix bug #75000 2025-06-06 16:19:52 +03:00
462523cfa5 fix bug #74736 2025-06-06 16:11:13 +03:00
fcdbdff42f fix bug #75006 2025-06-06 15:09:11 +03:00
e7b231feed Fix type overflow 2025-06-06 14:49:08 +03:00
3264e0764e Merge pull request 'Fix memory leaks and implement FreeEmbedObject' (#349) from feature/free_native_object into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/349
2025-06-06 08:52:50 +00:00
5f4cfa5bdf Merge pull request 'Fix button R/D AP' (#351) from fix/pdf-button into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/351
2025-06-06 08:49:58 +00:00
b159b76018 Fix button R/D AP 2025-06-06 11:43:32 +03:00
a006479964 Fix CStream::ReadOffset 2025-06-06 11:29:46 +03:00
2012fef748 Fix bug #73706 2025-06-05 23:47:41 +03:00
c8288b8b7b Fix bug #74897 2025-06-05 20:39:11 +03:00
7f31f40843 fix bug #74750 2025-06-05 19:23:20 +03:00
414b376f04 Fix bug #73685 2025-06-05 19:10:22 +03:00
10427d151d Merge pull request 'fix/bug74880' (#348) from fix/bug74880 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/348
2025-06-05 15:40:20 +00:00
8e9198f307 fix bug 2025-06-05 18:35:59 +03:00
a3399b3119 fix bug #74490 2025-06-05 18:24:52 +03:00
646bbd405f For CCFFReader 2025-06-05 17:53:19 +03:00
04663e7653 Merge pull request 'feature/docx-renderer-merge' (#347) from feature/docx-renderer-merge into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/347
2025-06-05 14:06:58 +00:00
240b78b0a6 Merge branch 'feature/docx-renderer' into feature/docx-renderer-merge 2025-06-05 17:02:55 +03:00
9a147d9817 Fix cast to int in bin points of vector graphics 2025-06-05 16:44:53 +03:00
e20231dc88 For CCFFReader 2025-06-05 16:21:18 +03:00
9c7d4e6d90 Merge pull request 'Fix bug 74843' (#345) from fix/bug-74843 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/345
2025-06-05 12:32:48 +00:00
c936c4419c fix prev commit 2025-06-05 15:23:17 +03:00
622617d16d fix bug#74880 2025-06-05 15:13:40 +03:00
1daaaad842 Fix bug with pathW pathH 2025-06-05 15:07:49 +03:00
4d9744190e Fix bug 74843 2025-06-05 15:03:16 +03:00
575e45a0b2 Complete COpenTypeReader, Create CCFFReader 2025-06-05 14:45:04 +03:00
e9e88f616b fix bug #73486 2025-06-05 13:29:22 +03:00
ee67e5dbc5 Fix rId correction for any shapes 2025-06-05 13:22:18 +03:00
c53f6fe09f Fix count shapes 2025-06-05 12:31:47 +03:00
624e5477ae Fix bug 2025-06-04 21:16:06 +03:00
5938d38219 Fix bug 74739 2025-06-04 19:56:19 +03:00
6cc0b5e215 Fix bug with required length 2025-06-04 19:04:37 +03:00
3d9045e0d4 Read Head, MaxP, HHea, HMtx 2025-06-04 18:55:02 +03:00
01e1cb14bf Rewrite len writting 2025-06-04 18:54:52 +03:00
011e2a8592 Fix missprint 2025-06-04 18:44:45 +03:00
b3e297bb08 Add a record in AdvancedCommand function 2025-06-04 18:39:43 +03:00
68e10572f1 Merge pull request 'Fix hwp bugs' (#343) from fix/hwp into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/343
2025-06-04 15:22:44 +00:00
ae1266d506 Fix bug #74910 2025-06-04 18:17:16 +03:00
b86dfb8d90 Fix bug #74888 2025-06-04 17:54:26 +03:00
fd9d46fc3c Update AdvancedCommand 2025-06-04 17:37:20 +03:00
c53009ee3d Refactoring and support binary shapes inside own pdf 2025-06-04 15:49:13 +03:00
02a845d451 Merge remote-tracking branch 'origin/release/v9.0.0' into fix/bug-71235
# Conflicts:
#	DesktopEditor/graphics/pro/js/wasm/src/drawingfile_test.cpp
2025-06-04 13:25:38 +03:00
b380692fe5 Merge pull request 'Fix bug 74890' (#341) from fix/bug-74890 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/341
2025-06-04 10:11:57 +00:00
8123c0e409 Fix bug 74890 2025-06-04 13:03:36 +03:00
cae981891b Fix repassword pdf 2025-06-04 11:54:45 +03:00
49fad86617 Merge pull request 'Fix pdf edit' (#340) from fix/pdf-edit into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/340
2025-06-04 07:25:56 +00:00
feb3c7af90 Fix pdf edit without changes is copy 2025-06-04 10:06:15 +03:00
0f169b1491 Add marR marL
and add AddCompleteBinBase64 funtion
2025-06-04 03:28:31 +03:00
22e89be7a3 Fix ToBin function 2025-06-04 02:31:47 +03:00
ced5bb6c71 fix bug #74742 2025-06-03 18:23:40 +03:00
26cb45ceaa fix bug #74740 2025-06-03 18:00:09 +03:00
9091f12828 Merge pull request 'For bug 74676' (#339) from fix/bug-74676 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/339
2025-06-03 13:13:17 +00:00
500cf8fca3 For bug 74676 2025-06-03 16:10:17 +03:00
b17b3dec40 For bug 74676 2025-06-03 16:09:55 +03:00
57b854355e Merge pull request 'Fix bugs 74727, 74842' (#338) from fix/bug-74554 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/338
2025-06-03 12:39:31 +00:00
2d758b155d fix bug #74747 2025-06-03 14:20:09 +03:00
29c81f7653 Fix test 2025-06-03 14:07:30 +03:00
d86afbe693 Merge pull request 'Fix html and md' (#337) from fix/html into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/337
2025-06-03 10:21:36 +00:00
b9120f5c29 Improved styles for inserting code into md 2025-06-03 12:59:09 +03:00
49841da755 For bug 74727 2025-06-03 12:29:39 +03:00
76bed5ae36 Fixed a bug with the definition of encoding in html 2025-06-03 11:32:45 +03:00
4451768f4e For bug 74625 2025-06-03 00:17:16 +03:00
102fdb83bc Fix bug 74659 2025-06-02 21:10:42 +03:00
a5f5a2921f Merge remote-tracking branch 'origin/release/v9.0.0' into fix/bug-74554 2025-06-02 17:59:32 +03:00
353f8ddbac Fib button delete AP 2025-06-02 17:55:38 +03:00
916f293c89 . 2025-06-02 17:43:57 +03:00
f6e214b0c3 Merge pull request 'Fix bug 74431' (#336) from fix/bug-74431 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/336
2025-06-02 13:25:06 +00:00
4f63982e2f Fix bug 74431
x2t doctrenderer and edit use the same CPdfFile instance
2025-06-02 16:17:57 +03:00
f570c88d29 Merge pull request 'Fix bug 74424' (#335) from fix/bug-74424 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/335
2025-06-02 10:17:30 +00:00
10e6664313 Fix bug 74424
LoadFromMemory memory is copied
MergePages memory is either taken or freed
2025-06-02 12:45:35 +03:00
00a82a7693 Merge pull request 'Fix bug #74782' (#333) from fix/html into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/333
2025-06-02 09:07:39 +00:00
0dfe7c8dcc Merge pull request 'Fix hwpx bugs' (#334) from fix/hwp into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/334
2025-06-02 09:07:11 +00:00
04b54cf980 Merge pull request 'Pdf fix bugs' (#332) from pdf/fix-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/332
2025-05-30 19:52:13 +00:00
56b09897d7 Fix bug #74782 2025-05-30 20:01:13 +03:00
e3e49b4497 Merge pull request 'fix conversion overstrike' (#331) from fix/MathOOXml2Odf into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/331
2025-05-30 14:17:50 +00:00
4f31164447 edit the size calculation 2025-05-30 16:47:34 +03:00
5179739cf6 Fix bug 65928 2025-05-30 16:44:18 +03:00
d044959b0d fix conversion overstrike 2025-05-30 16:13:13 +03:00
3886951671 [JSC] Fix memory leaks due to pending exceptions 2025-05-30 13:16:09 +04:00
326fe32013 Fix Link border 2025-05-30 10:58:57 +03:00
344a0caf37 Fix bug 73947 2025-05-30 10:20:21 +03:00
bed33af917 for binary vsdx 2025-05-29 18:14:31 +03:00
777eb2697d Fix build 2025-05-29 18:07:39 +03:00
a824e9c25d Merge branch 'release/v9.0.0' into fix/hwp 2025-05-29 17:28:58 +03:00
6402c0cb73 [V8] Add FreeEmbedObject function 2025-05-29 17:15:23 +04:00
14df0d2b58 fix bug #74780 2025-05-29 16:00:23 +03:00
29c01ac9c9 [V8] Fix memory leaks with weak handles 2025-05-29 16:56:17 +04:00
cc9cb8ca05 for bug #74487 2025-05-29 15:03:44 +03:00
ba77ddc78e Fix button delete icon 2025-05-29 13:10:44 +03:00
03463ee0e4 Merge remote-tracking branch 'origin/release/v9.0.0' into develop 2025-05-29 12:34:25 +03:00
32cfb4f71b Merge remote-tracking branch 'origin/fix/customs' into release/v9.0.0 2025-05-29 12:29:52 +03:00
243cc43771 fix bug #74488 2025-05-29 12:28:55 +03:00
daf8fb9dd7 Fix bug #73716 2025-05-28 20:46:32 +03:00
a90422c3a7 Merge pull request 'Fixed scale calculation for embedded emfs in emfplus' (#329) from fix/metafile into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/329
2025-05-28 14:33:29 +00:00
16e7528cff Fixed scale calculation for embedded emfs in emfplus 2025-05-28 17:07:02 +03:00
ae71fefd92 [V8] Fix tests 2025-05-28 17:24:17 +04:00
8be104e3c1 Merge pull request 'Fix bugs 65813, 74529, 74727' (#328) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/328
2025-05-28 11:58:51 +00:00
fbcb387f51 Fix bug 65813 2025-05-28 14:52:41 +03:00
c4eb6ef445 Fix write strings 2025-05-28 13:11:22 +03:00
4754569381 Fix bug 74727 2025-05-28 11:51:47 +03:00
44948c850e Merge pull request 'fix/Tensor-luminosity-gradient' (#326) from fix/Tensor-luminosity-gradient into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/326
2025-05-27 18:38:41 +00:00
3163177b89 Fix gradient drawing 2025-05-27 21:21:20 +03:00
66513e895f Merge pull request 'For bug #8257' (#325) from fix/metafile into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/325
2025-05-27 17:43:27 +00:00
8bcf2ee154 Merge pull request 'Fix bug #74694' (#324) from fix/html into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/324
2025-05-27 17:42:28 +00:00
7d9e756f3f For bug #8257 2025-05-27 20:19:17 +03:00
b2d28a7185 Fix bug #74694 2025-05-27 20:01:50 +03:00
f285120de5 Fix tile in ToBin function 2025-05-27 20:00:14 +03:00
5f56a0d2d7 Fix misprint 2025-05-27 17:22:21 +03:00
79bb238b5f [JSC] Add FreeEmbedObject function 2025-05-27 18:14:29 +04:00
8c6baa9c0b Fix bugs 2025-05-27 16:50:51 +03:00
5c2171db93 js_internal tests rework
in favor of easier debugging on different platforms
2025-05-27 17:15:28 +04:00
e73b1e2db2 Fix images in ToBin function 2025-05-27 14:18:34 +03:00
1a62f01cf7 Fix bug 74529 2025-05-27 13:42:54 +03:00
b518d5642f Merge pull request 'Fin button form rotate' (#323) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/323
2025-05-27 06:46:28 +00:00
e9dcafed07 Add GetFillColor method 2025-05-27 02:05:51 +03:00
9bd79e2752 Fix boolean operations 2025-05-27 02:05:24 +03:00
77f363f737 add operator == and != in agg::rgba8 2025-05-27 02:04:54 +03:00
3a866d2f55 Add generations for dictionaries 2025-05-26 21:29:11 +03:00
3b8b1cff55 Fix rgb values 2025-05-26 21:20:47 +03:00
a96d51bad2 Develop ToBin metohod for images 2025-05-26 20:53:43 +03:00
1eb681992e Fix bug #73684 2025-05-26 18:19:51 +03:00
c140c6ef6a Fix ToBin function 2025-05-26 18:02:56 +03:00
8c5a8fd7bc Fix bug #73683 2025-05-26 17:56:29 +03:00
0d148f0efa Fin button form rotate 2025-05-26 17:32:28 +03:00
9395c14324 For bug #73666 2025-05-26 17:15:08 +03:00
3bd151445d Fixed missing empty paragraphs in hwp/hwpx conversion 2025-05-26 16:43:51 +03:00
90b0b667ce Fix bug #73575 2025-05-26 16:36:34 +03:00
c741cc4bba Merge pull request 'Fix html bugs' (#322) from fix/html-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/322
2025-05-26 13:16:59 +00:00
c58203cdc1 Merge pull request 'Fix pdf bugs' (#321) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/321
2025-05-26 10:19:29 +00:00
e56f807826 Fix bug 74615 2025-05-26 13:04:12 +03:00
ef3a93cb13 Fix bug 74616 2025-05-26 12:15:03 +03:00
fa55bd4c95 . 2025-05-26 11:13:39 +03:00
62a4de7a1d . 2025-05-26 10:34:59 +03:00
a85d77b493 Merge pull request 'adding size calculation' (#319) from feature/SizeMath into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/319
2025-05-26 07:22:01 +00:00
57b2cc5436 Fix typo 2025-05-25 23:33:11 +03:00
5894736c2a Fixed the merge conflict 2025-05-25 22:52:30 +03:00
fa407297c7 Merge branch 'release/v9.0.0' into fix/html-bugs 2025-05-25 22:42:15 +03:00
3d77b1d8c6 Fix bug #73904 2025-05-25 21:44:24 +03:00
fc2aca59aa Fix luminosity drawing 2025-05-25 14:29:00 +03:00
0b79502804 Developing ToBin functions 2025-05-24 22:22:50 +03:00
ab893e371c Fix bug #73573 2025-05-24 22:04:54 +03:00
5174ea0ce6 More developing ToBin function 2025-05-24 16:31:15 +03:00
44bb82919f Fix ToBin function 2025-05-24 00:13:11 +03:00
e2021faa33 adding size calculation 2025-05-23 22:28:44 +03:00
3ac479ccdc Fix bug #73698 2025-05-23 18:58:43 +03:00
9a4dd96072 Fix ListBox rotate 2025-05-23 17:53:27 +03:00
3e9afa1d15 Merge pull request 'fix bug #74531' (#318) from fix/bug74531 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/318
2025-05-23 14:46:22 +00:00
1c9e394549 fix bug #74531 2025-05-23 20:42:25 +06:00
f8a901e2d0 Rotate form 2025-05-23 17:04:56 +03:00
59cd16f300 Merge pull request 'Fix pdf bugs' (#316) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/316
2025-05-23 06:52:19 +00:00
b063c4af35 Merge branch 'release/v9.0.0' into fix/customs 2025-05-22 17:27:54 +03:00
5942b88c8d Merge pull request 'release/v9.0.0' from release/v9.0.0 into feature/docx-renderer 2025-05-22 14:13:11 +00:00
9f50c9d660 Fix bug 74581
Fix inheritable page attributes
2025-05-22 13:59:53 +03:00
942480d895 Create COpenTypeReader 2025-05-22 13:01:48 +03:00
e16972f410 . 2025-05-22 11:38:59 +03:00
77855a12e9 fix bug #74247 2025-05-22 11:28:52 +03:00
cc8c771f61 Fix build on linux 2025-05-22 11:00:48 +03:00
31e5d626ca vsdx in ole 2025-05-21 19:27:10 +03:00
5067d33c84 fix binary xlsx 2025-05-21 19:24:00 +03:00
931b66e038 Create FontCFFWriter 2025-05-21 18:15:25 +03:00
cb9dce54a7 Merge pull request 'release/v9.0.0' from release/v9.0.0 into feature/docx-renderer 2025-05-21 14:31:21 +00:00
5892c2fa1b Developing ToBin method 2025-05-21 17:30:03 +03:00
d50ee7467e Add crt chart types writing 2025-05-21 19:40:59 +06:00
6b3173e65f Merge pull request 'fix/bug74095' (#313) from fix/bug74095 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/313
2025-05-21 13:19:31 +00:00
65fc2852ec . 2025-05-20 18:21:22 +03:00
f51fb711b4 Fix Strings count & PrivateDictStart 2025-05-20 17:58:50 +03:00
d15ac8b84f Add axis parent writing 2025-05-20 20:06:59 +06:00
00176a0425 Add chartformats wriging 2025-05-20 19:23:50 +06:00
14f0a757ac Add series data writing 2025-05-20 17:30:22 +06:00
0385087f98 Fix prev commit 2025-05-20 13:44:38 +03:00
7b51ade6f5 Improved image size calculation in hwp/hwpx conversion 2025-05-20 13:38:48 +03:00
49bd1657ab Merge remote-tracking branch 'origin/release/v9.0.0' into fix/bug-71235 2025-05-20 13:34:22 +03:00
366b122c51 editing the conversion of diacritics and text 2025-05-20 13:30:38 +03:00
d50f2b3ccc Fixed a bug with text margins in hwp/hwpx conversion 2025-05-20 13:08:22 +03:00
f7110040b1 . 2025-05-20 12:44:56 +03:00
8ff979c2e9 Fix bugs in hwp/hwpx conversion 2025-05-19 16:46:22 +03:00
e4a69da400 Fixed a bug with image transformation in hwpx/hwp 2025-05-19 16:45:41 +03:00
9b24261b2b Add sxviewlink wriging 2025-05-19 18:04:46 +06:00
211f151346 Add chartSheet writing 2025-05-19 14:58:19 +06:00
adc9445231 For bug 73837 2025-05-19 10:21:21 +03:00
6c8cbec6ba Add worbook stream writing 2025-05-16 21:04:58 +06:00
9507e3b3f2 Fixed a bug with image positioning in HWP 2025-05-16 17:59:16 +03:00
a49951f392 Merge pull request 'Fix memory leak' (#312) from fix/bug-73947 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/312
2025-05-16 14:07:49 +00:00
3963f1fcef For bug 73947 2025-05-16 17:02:02 +03:00
755a357e3d Add sheetExt writing 2025-05-16 17:55:57 +06:00
2a7256eb48 Add customview binary writing 2025-05-16 17:17:47 +06:00
41e0b5fe83 ConvertToOrigin for vsdx 2025-05-15 19:22:20 +03:00
5caf111308 Merge pull request 'Fix getReader' (#311) from fix/pdf-split into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/311
2025-05-15 14:09:03 +00:00
7e7265827d Fix getReader 2025-05-15 17:06:41 +03:00
65829b6e96 Merge branch 'release/v9.0.0' of https://git.onlyoffice.com/ONLYOFFICE/core into release/v9.0.0 2025-05-15 16:04:51 +03:00
e10aa90618 Realize pdf split/merge in native js wrapper 2025-05-15 16:04:29 +03:00
5210ffbd50 . 2025-05-15 15:43:41 +03:00
9b45589937 fix bug 2025-05-15 14:03:45 +03:00
9c9ac53475 Merge pull request 'Fix bug 74294' (#310) from fix/bug-74294 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/310
2025-05-15 07:57:12 +00:00
d70c26f5ce . 2025-05-15 10:28:36 +03:00
0e8c37c293 Add supbook writing 2025-05-14 21:16:18 +06:00
284d54f456 Fix bug #74441 2025-05-14 17:16:52 +03:00
6070cd54e2 Fix bug 74450 2025-05-14 17:11:16 +03:00
5fd6709d04 for bug #74435 2025-05-14 17:01:32 +03:00
0424b92b04 Refactoring 2025-05-14 16:58:42 +03:00
923f39fada Fix bug 74294 2025-05-14 16:45:35 +03:00
6b6118ffcc fix bug #74435 2025-05-14 16:41:24 +03:00
84de7e98be for bug #73678 2025-05-14 16:33:56 +03:00
906aace0df Fix bug #73486 2025-05-14 16:29:35 +03:00
3fbb430b7f Merge pull request 'fix bug #74140' (#308) from fix/bug74140 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/308
2025-05-13 17:37:02 +00:00
c2de8a822a read themes in incorrect vsdx 2025-05-13 20:35:14 +03:00
490180dbba Add new extensions 2025-05-13 18:15:49 +03:00
d928151fdb Merge pull request 'Fix bugs 74314, 74420' (#309) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/309
2025-05-13 14:07:48 +00:00
c63a8adbb3 Fix bug 74420 2025-05-13 15:16:01 +03:00
a7e647d58a fix bug #74140 2025-05-13 18:14:42 +06:00
b7062837c8 fix bug #70991 2025-05-13 14:53:00 +03:00
f7a46174ad Fix bug 74314 2025-05-13 14:32:07 +03:00
992bc0095f [android] Add MD format 2025-05-13 10:49:09 +03:00
bf67498f3e Mark params for opening file as default 2025-05-13 10:27:46 +03:00
c4676f1b28 Merge pull request 'Fix bug #74141' (#306) from fix/bug74141 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/306
2025-05-12 18:33:05 +00:00
b4c9184a0d Merge pull request 'Fix bug 74168' (#307) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/307
2025-05-12 15:32:02 +00:00
748b5d061b Fix bug 74168 2025-05-12 18:28:22 +03:00
ea15b54837 Fix bug #73907 2025-05-12 17:42:12 +03:00
9d19af8749 Fix bug 74168 2025-05-12 17:05:14 +03:00
05cef3635c Refactoring 2025-05-12 14:49:14 +03:00
1b03e3e71f Fix bug #74141 2025-05-12 17:34:15 +06:00
d15d681659 for bug #70752 2025-05-12 14:04:40 +03:00
58189602cc Fix bug #73990 2025-05-12 06:23:30 +03:00
6fd19e7618 for bug #71673 2025-05-08 11:28:57 +03:00
dbfdfcb202 Merge pull request 'Fix pdf bugs' (#305) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/305
2025-05-07 15:51:57 +00:00
bf00185275 Add SXSRC binary writing 2025-05-07 21:24:14 +06:00
801b5e604e Fix bug 74372 2025-05-07 17:26:58 +03:00
6ed57dae6c Add pivot cache definition writing 2025-05-07 16:33:41 +06:00
cb34481460 Fix bug 74364 2025-05-07 13:12:48 +03:00
a1ff4a8de2 Merge pull request 'Fix pdf bugs' (#304) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/304
2025-05-06 17:52:56 +00:00
d82f9a4d7a Merge pull request 'fix defined names binary conversion' (#303) from fix/binary-conversion into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/303
2025-05-06 13:50:30 +00:00
6d9d709183 Fix bug 74357 2025-05-06 15:16:12 +03:00
3f317a6d1f fix defined names binary conversion 2025-05-06 17:44:50 +06:00
c2c085f57d Checkbox with text color 2025-05-06 14:02:44 +03:00
5719444c94 fix bug #74289 2025-05-06 13:20:53 +03:00
2c5d36d618 fix bug #74324 2025-05-06 10:47:34 +03:00
36d8b8afe9 Merge pull request 'Fix bug #73314' (#302) from fix/bug73314 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/302
2025-05-06 07:39:14 +00:00
0f6cd18603 Merge pull request 'Added md file conversion' (#300) from feature/md2html into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/300
2025-05-05 19:12:38 +00:00
32c22eee70 Merge pull request 'Fix bug 74294, 74244' (#301) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/301
2025-05-05 13:19:39 +00:00
cea739dc2c Fix test 2025-05-05 16:12:10 +03:00
4a769c1faa Fix bug 74294 2025-05-05 15:46:25 +03:00
a77f612973 Added md to html conversion in x2t 2025-05-05 15:13:07 +03:00
198e878eb5 for bug #74280 2025-05-05 14:56:54 +03:00
0942bc78ab fix bug #74290 2025-05-05 13:14:35 +03:00
ca53d3d035 fix bug #71673 2025-05-01 08:34:01 +03:00
a4f271d7b0 Merge pull request 'Fix bug #74258' (#296) from fix/bug74258 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/296
2025-05-01 04:21:44 +00:00
c99b304ec2 Fix bug 74312 2025-04-30 18:17:21 +03:00
1b032f3d74 Improved styling when converting md file to html 2025-04-30 18:15:41 +03:00
db57d253d9 Merge pull request 'Fix bugs 74268, 74307' (#298) from fix/pdf-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/298
2025-04-30 13:23:38 +00:00
8e64dcc5a4 Fix build & bug 2025-04-30 15:10:06 +03:00
b48909edaa Fix test 2025-04-30 14:00:30 +03:00
1bfb055a50 Fix bug 74307 2025-04-30 13:58:58 +03:00
149d3a2030 Fix bug 74268 2025-04-30 13:04:25 +03:00
8bad09ea5a Merge pull request 'Fix originalIndex with SplitPages' (#297) from fix/pdf-split into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/297
2025-04-30 09:23:52 +00:00
91656095fa Fix originalIndex with SplitPages 2025-04-30 12:20:11 +03:00
9e89e48c07 Fix bug #74258 2025-04-30 14:47:40 +06:00
1e2b91e77f Developing 2025-04-29 17:36:09 +03:00
fe89b146d7 Merge branch 'fix/SMCustomShape' into fix/customs 2025-04-29 17:00:50 +03:00
1c5bd6cbab Merge pull request 'Fix bug 74279' (#295) from fix/x2ttester into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/295
2025-04-29 13:43:41 +00:00
8ba7535fc8 fix bug #74281 2025-04-29 16:42:02 +03:00
038fa50194 Fix bug 74279 2025-04-29 14:58:38 +03:00
c94a294317 Merge pull request 'Fix SplitPages with changes' (#294) from fix/pdf-split into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/294
2025-04-29 10:53:41 +00:00
d220685cff Fix delete annot with split changes 2025-04-29 13:32:48 +03:00
edae000326 Fix index split pages 2025-04-29 12:53:40 +03:00
2cbc83b389 Test split with changes 2025-04-29 11:02:51 +03:00
d05afa3106 fix bug #74254 2025-04-28 18:44:15 +03:00
de56349019 fix bug #74171 2025-04-28 18:20:13 +03:00
821f9cacd0 for vsdx binary 2025-04-28 18:04:37 +03:00
eb472e27b4 add PIVOTEX writing 2025-04-28 18:40:36 +06:00
4f38f17bd1 Fix build 2025-04-28 14:56:07 +03:00
9f4a145b48 Fix SaveToMemory 2025-04-28 14:12:49 +03:00
51aed7ae53 Add PIVOTIVD- PIVOTLI writing 2025-04-28 15:47:20 +06:00
eaa0bbf047 Merge pull request 'For bug 74253' (#293) from fix/bug-74253 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/293
2025-04-28 09:00:58 +00:00
e78391c68b For bug 74253 2025-04-28 11:29:09 +03:00
109a5fe2b4 Split with changes 2025-04-28 10:40:06 +03:00
a908c42910 Added md file conversion to html 2025-04-27 19:20:17 +03:00
ecf59a75a7 Add pivotView writing 2025-04-25 18:57:23 +06:00
36b7400e0e Merge pull request 'Fix use of DR in forms' (#292) from fix/pdf-merge into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/292
2025-04-25 09:51:20 +00:00
a19bf4bedd for bug#74095 2025-04-25 12:38:40 +03:00
8318535aae Fix use of DR in forms 2025-04-25 12:19:55 +03:00
9039ff53db Add fngroups writing 2025-04-25 14:52:32 +06:00
b53b2859de Add lblWriting 2025-04-24 20:58:14 +06:00
fe1372882e Add Hfpicture writing 2025-04-24 19:38:47 +06:00
34e0b7e69a Add record12 writing 2025-04-24 18:22:50 +06:00
21f5e09237 [android] Add OFDFile 2025-04-24 14:42:45 +03:00
de9c51a2db for bug #74054 2025-04-24 13:10:22 +03:00
f42079a55f . 2025-04-24 11:10:04 +03:00
5e0b5b6e34 fix bug #74054 2025-04-24 10:42:59 +03:00
9b87eba66b Fix xp builds 2025-04-24 07:01:49 +03:00
09f2db26e0 Fix jsc build 2025-04-24 06:56:09 +03:00
aa038179cc . 2025-04-23 21:38:52 +03:00
856ae09f69 Add sortdatafilter writing 2025-04-23 21:04:59 +06:00
c09d5197b7 Merge pull request 'Fix MergePages' (#291) from fix/pdf-merge into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/291
2025-04-23 14:01:51 +00:00
c6f616d42e Fix MovePage for merge pages 2025-04-23 16:38:31 +03:00
28f2e14bce Add autofilter binary writing 2025-04-23 18:49:34 +06:00
e74199b3d2 Developing
but grid span is not working for now
2025-04-23 14:50:04 +03:00
dcc208257e Fix length of stream not ref 2025-04-23 14:14:05 +03:00
b8d9ba3b1d Add dcon writing 2025-04-23 16:08:28 +06:00
cc369ffbcb Merge pull request 'Added OFD format' (#287) from feature/OFD into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/287
2025-04-23 09:29:56 +00:00
93018caf09 Merge pull request 'Fix bug 74175' (#290) from fix/bug-74175 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/290
2025-04-23 08:52:17 +00:00
d80d6c4168 Fix bug 74175 2025-04-23 11:10:49 +03:00
5360487954 Fix bug with unregistered version 2025-04-23 10:18:19 +03:00
5fe6dd8730 Add extsst binary writing 2025-04-22 20:13:40 +06:00
cd73ab58b1 Merge pull request 'Fix bug 74165' (#289) from fix/bug-74165 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/289
2025-04-22 14:10:46 +00:00
1119fd4307 Fix bug 74165 2025-04-22 16:26:42 +03:00
0769a5ed3b Merge pull request 'Fix pdf bugs' (#288) from fix/pdf-merge into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/288
2025-04-22 12:30:12 +00:00
82ad23840f Fix bug 74164 2025-04-22 14:36:51 +03:00
5cb971d600 Fix FakePage resources 2025-04-22 13:35:40 +03:00
c66cb32dde Added a restriction on the scope of files in OFD format. 2025-04-22 13:29:16 +03:00
ab573cf9ba Merge branch 'develop' into feature/add-xls-writing 2025-04-22 14:57:43 +06:00
ab62a3ebcf Improved work with text when converting OFD format 2025-04-22 11:19:43 +03:00
04d3e94dcc Fix bug 74157 2025-04-22 11:01:57 +03:00
1c4462e2e9 Fix bug 74159 2025-04-22 09:39:18 +03:00
91dc5b8582 Fix null EncodeGID 2025-04-21 18:18:18 +03:00
e9cf55f8db Restore old version of test 2025-04-21 18:17:00 +03:00
43fc84e6ef Merge pull request 'feature/docbuilderpy' (#286) from feature/docbuilderpy into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/286
2025-04-21 15:15:19 +00:00
5a8bd3f8ce DrawTextToRenderer for Unicode 2025-04-21 17:17:30 +03:00
84dda72a13 Fix DR 2025-04-21 17:11:38 +03:00
92902724a0 Add SharedStringsWriting 2025-04-21 20:01:53 +06:00
7e116dbd41 Add bundlesheet writing 2025-04-21 15:06:55 +06:00
5819c36cee Merge branch hotfix/v8.3.3 into release/v9.0.0 2025-04-21 09:03:56 +00:00
c964ed7d58 Merge branch hotfix/v8.3.3 into develop 2025-04-21 09:03:54 +00:00
88db7ec840 Merge branch hotfix/v8.3.3 into master 2025-04-21 09:03:52 +00:00
b5b9d948b9 fix bug #74091 2025-04-21 11:26:38 +03:00
b456a094ee Add xfext writing 2025-04-21 14:24:55 +06:00
72ac94412d Merge pull request 'UndoMergePages' (#285) from fix/merge-pages into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/285
2025-04-21 08:15:44 +00:00
4125e698d6 Fix build 2025-04-20 02:33:48 +03:00
7c2a95202c Merge pull request 'release/v9.0.0' (#284) from release/v9.0.0 into feature/OFD
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/284
2025-04-19 14:38:42 +00:00
c3527ad8d4 Added OFD format to OfficeChecker 2025-04-19 17:24:14 +03:00
9fe692b048 Refactoring 2025-04-19 16:57:31 +03:00
df66cbbca9 add visio theme elements 2025-04-18 18:19:39 +03:00
d877278d8d Refactor API calls in docbuilder_test.py 2025-04-18 17:27:35 +03:00
a19dc86ea9 Add tablestyles writing 2025-04-18 19:50:05 +06:00
62ba3fa029 Add formatting binary writing 2025-04-18 19:02:23 +06:00
58c2fa783e Add xf binary writing 2025-04-18 17:47:05 +06:00
41a4edb223 Merge pull request 'Fix bug 74090' (#283) from fix/bug-74090 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/283
2025-04-18 08:40:10 +00:00
0979902167 Fix bug 74090 2025-04-18 11:35:24 +03:00
20618403b6 Add UndoMergePages 2025-04-18 10:20:36 +03:00
131efd2eaa Add array and Call-based methods 2025-04-17 23:42:27 +03:00
678101f7e4 Add window1 binary writing 2025-04-17 20:54:48 +06:00
17fb69ee8a Add protection writing to global substream 2025-04-17 18:13:45 +06:00
0833c97c99 add globals substream writing 2025-04-16 20:18:43 +06:00
8871c785dd new odf math semantic 2025-04-16 16:51:51 +03:00
5d64c7c6e7 Add note records writing 2025-04-16 19:39:06 +06:00
8bbdb30419 Merge pull request 'Feature Split/Merge pdf' (#282) from feature/pdf-page into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/282
2025-04-16 11:24:55 +00:00
15370bcbce Merge remote-tracking branch 'origin/release/v9.0.0' into feature/pdf-page
# Conflicts:
#	DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js
2025-04-16 14:15:21 +03:00
0f3ef78362 Add protection binary writing 2025-04-16 15:45:22 +06:00
48c9a001dd Fix button icon in AP 2025-04-16 12:10:40 +03:00
4c806b07a2 Remove exit from context on builder.ExecuteCommand 2025-04-16 11:37:24 +03:00
fa65a546da Merge branch hotfix/v8.3.3 into master 2025-04-16 07:32:32 +00:00
6a75bc62f0 Fix build for win32 platform 2025-04-15 21:46:53 +03:00
6cb7e763d3 Improved rendering of text in OFD format and refactoring 2025-04-15 19:31:32 +03:00
0d55fddd02 Merge remote-tracking branch 'origin/hotfix/v8.3.3' into release/v9.0.0 2025-04-15 17:37:15 +03:00
1dfb9bff3a Merge pull request 'fix bug #74037' (#281) from fix/bug74037 into hotfix/v8.3.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/281
2025-04-15 14:36:41 +00:00
4dd15a8e80 Add IsNeedCMap 2025-04-15 17:23:00 +03:00
bd60a20b91 fix bug #74037 2025-04-15 19:52:26 +06:00
bd7914e7c7 fix bug #70716 2025-04-15 14:42:26 +03:00
c7fa85602d Fix bugs 2025-04-15 14:35:49 +03:00
809effa5df fix bug #73705 2025-04-15 10:46:03 +03:00
1a54c8f8b9 Merge branch 'develop' into feature/add-xls-writing 2025-04-15 13:05:01 +06:00
2f42eb6c42 Merge remote-tracking branch 'origin/hotfix/v8.3.3' into release/v9.0.0 2025-04-14 16:53:53 +03:00
641a505cf8 Merge pull request 'fix bug #73391' (#280) from fix/bug73391 into hotfix/v8.3.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/280
2025-04-14 13:49:30 +00:00
f5f3d2572e Add PrefixForm for rename same full names 2025-04-14 15:53:51 +03:00
68992278ce fix bug #73391 2025-04-14 15:49:07 +06:00
95476fc998 Fix build 2025-04-13 10:20:21 +03:00
c503044fc9 [android] Add support ODG 2025-04-11 17:00:28 +03:00
4bef318bd6 . 2025-04-11 16:29:23 +03:00
6546ae3fd9 Merge pull request 'Fix bug 73997' (#279) from fix/bug-73997 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/279
2025-04-11 13:16:34 +00:00
ac300f57a6 MaxLen separately for field and parent 2025-04-11 16:09:29 +03:00
c7a4edec03 . 2025-04-11 15:02:03 +03:00
aaeb745ad3 Fix create Annot not as ref 2025-04-11 13:05:43 +03:00
0a85051119 Fix bug 73997 2025-04-11 12:32:04 +03:00
85c60f172c Fix add not supported annots 2025-04-11 11:19:22 +03:00
7a9c57038e . 2025-04-11 10:18:19 +03:00
888f67dab2 fix bug #70741 2025-04-11 10:18:06 +03:00
87a9b92fea Improved rendering of text in OFD format and refactoring 2025-04-10 18:05:38 +03:00
185be63b27 Add STREAM_FILTER_ALREADY_DECODE 2025-04-10 16:50:50 +03:00
7cd7b03b89 Add nMaxID 2025-04-10 15:50:01 +03:00
3fe4c2ac21 Add getPagesInfo 2025-04-10 10:48:05 +03:00
776569ca81 fix xfrm 2025-04-09 20:03:25 +03:00
7b264e940d Merge Outlines two files 2025-04-09 15:38:21 +03:00
160e99ab90 . 2025-04-09 15:06:00 +03:00
6988009971 fix bug #73902 2025-04-09 15:05:34 +03:00
66bed0e286 fix vsdt_bin 2025-04-09 11:54:08 +03:00
36aae7a6ab Merge pull request 'fix bug #73914' (#278) from fix/bug73914 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/278
2025-04-09 07:20:18 +00:00
3f42678932 fix bug #73914 2025-04-08 20:57:25 +06:00
4bd0a53c9e Improved OFD format conversion 2025-04-08 17:43:28 +03:00
e9162eb230 add ansi to vsdx binary 2025-04-08 13:34:48 +03:00
44684c462e fix vsdx binary 2025-04-07 18:11:00 +03:00
9aa6bceddf Fix bug with non-nullptr conttext 2025-04-07 17:05:56 +03:00
6d6f87cae6 Add worksheet substream wrting 2025-04-07 19:41:34 +06:00
3d9a783d46 fix globals writing 2025-04-07 18:31:40 +06:00
21028c2ca5 Merge pull request 'hotfix/v8.3.3' (#276) from hotfix/v8.3.3 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/276
2025-04-07 11:58:23 +00:00
81be9c1c1f Merge pull request 'hotfix/v8.3.3' (#275) from hotfix/v8.3.3 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/275
2025-04-07 11:57:57 +00:00
21451d83e4 add to binary 2025-04-07 14:01:59 +03:00
21ec043636 Fix merge Fields AcroForm 2025-04-07 13:24:33 +03:00
83e6e5971c Merge remote-tracking branch 'origin/release/v9.0.0' into feature/pdf-page
# Conflicts:
#	DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js
#	PdfFile/OnlineOfficeBinToPdf.cpp
#	PdfFile/PdfEditor.cpp
#	PdfFile/PdfFile.cpp
#	PdfFile/PdfFile.h
#	PdfFile/SrcReader/PdfAnnot.cpp
#	PdfFile/SrcReader/PdfAnnot.h
#	PdfFile/SrcWriter/Document.cpp
#	PdfFile/SrcWriter/Document.h
#	PdfFile/test/test.cpp
2025-04-07 11:35:37 +03:00
8c16766e9f Merge branch 'develop' into feature/add-xls-writing 2025-04-07 13:14:58 +06:00
aeb78a561e Merge pull request 'feature/clang' (#274) from feature/clang into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/274
2025-04-06 10:38:04 +00:00
75c0dde6d2 Refactoring 2025-04-06 13:36:24 +03:00
2cb34822cd Rename config value with code style 2025-04-06 13:26:49 +03:00
e5c7a043be Refactoring 2025-04-06 13:22:47 +03:00
b8cdfa9b36 Merge pull request 'Create radiobutton and Checkbox' (#273) from feature/forms into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/273
2025-04-04 14:47:19 +00:00
7893197071 Merge remote-tracking branch 'origin/release/v9.0.0' into feature/forms 2025-04-04 17:24:52 +03:00
f2bda6c81a Fix Adobe bug radiobutton BG 2025-04-04 17:23:50 +03:00
c8ca725523 Add hlink writing 2025-04-04 17:53:24 +06:00
3d2cb819d5 Merge pull request 'fix bug #73815' (#270) from fix/bug73815 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/270
2025-04-04 11:37:41 +00:00
b0b99dec3e add test 2025-04-04 14:21:04 +03:00
3c2fd33c7a Merge pull request 'FIx bug #73451' (#272) from fix/bug73451 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/272
2025-04-04 10:44:44 +00:00
f9062d7d38 Merge pull request 'Fix bug #73585' (#271) from fix/bug73585 into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/271
2025-04-04 10:44:33 +00:00
ddb544ce34 Chenges all AP.N.Yes when delete annot 2025-04-04 11:48:45 +03:00
f441ec5c35 Testing clang build 2025-04-04 08:56:02 +03:00
d7a8c30461 Fix name of AP.N.Yes 2025-04-03 17:33:47 +03:00
25fa05b701 add condfmts union writing 2025-04-03 20:17:58 +06:00
6f66b0c533 Add condfmt12 writing 2025-04-03 19:59:03 +06:00
e8bb81b88e fix bug #73815 2025-04-03 15:21:38 +06:00
99252cc950 fix bug 2025-04-02 19:47:58 +03:00
bf89efd471 Add cf12 writing 2025-04-02 22:00:58 +06:00
fee4394d3f Update radiobutton Opt choice 2025-04-02 18:13:18 +03:00
8f14a0f30b Fix cf writing 2025-04-02 20:26:21 +06:00
744d90e655 [x2t] Fix typo 2025-04-02 16:38:15 +03:00
494b7b52cb Add dxfn12 writing 2025-04-02 17:54:32 +06:00
e5d6f5df47 Add dxfn struct writing 2025-04-02 16:41:21 +06:00
6f1ffaad40 Merge branch 'develop' into feature/add-xls-writing 2025-04-02 15:17:33 +06:00
e76398db01 Add cond fmt records writing 2025-04-01 21:08:05 +06:00
5692732901 Rename Yes AP 2025-04-01 18:03:16 +03:00
1aaec18152 Fix Cirle radiobutton 2025-04-01 16:06:20 +03:00
266425e817 Fix radiobutton AP 2025-04-01 15:42:39 +03:00
5b8549db9d Write style checked symbol 2025-04-01 12:08:10 +03:00
7c9ae624e9 Fix build for c++11 2025-04-01 11:46:33 +03:00
8f0a4ebfc9 Merge branch hotfix/v8.3.2 into release/v9.0.0 2025-04-01 08:34:23 +00:00
cafdb1d2a5 Merge branch hotfix/v8.3.2 into develop 2025-04-01 08:34:19 +00:00
06bfb07f0d Merge branch hotfix/v8.3.2 into master 2025-04-01 08:34:17 +00:00
e3c60a6b05 Fix bug in text command renderer 2025-04-01 11:30:43 +03:00
4a03b8cc4a Develop text cells tables building
in progress
2025-04-01 10:49:46 +03:00
34f36cefc3 Delete apValue 2025-04-01 10:07:16 +03:00
5a0d23f6af Add better line splittig 2025-04-01 06:06:43 +03:00
652940657c Update textcommandrenderer 2025-04-01 05:08:56 +03:00
7ceefa54cb Improved OFD format conversion 2025-04-01 00:39:17 +03:00
e4188148ba Create DrawCheckBoxSquare 2025-03-31 18:00:10 +03:00
a92bf23081 Fix EBorderType 2025-03-31 15:42:54 +03:00
1d9230b731 Create DrawCheckBoxCircle 2025-03-31 15:27:17 +03:00
421f5bb0f2 Add window binary writing 2025-03-31 15:43:12 +06:00
d2b5299b99 Fix ResetTextFormField 2025-03-31 11:41:11 +03:00
29c8e185ca Fix ExportValue from parent 2025-03-28 17:31:56 +03:00
61640a9a06 Add celltable writing 2025-03-28 19:13:13 +06:00
723e4713fd Crate parents for widget 2025-03-28 14:02:01 +03:00
87f0835010 Add formula writing 2025-03-28 17:00:25 +06:00
7e235780fc Merge pull request 'Feature pdf forms' (#269) from feature/forms into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/269
2025-03-27 14:11:51 +00:00
cfbed19648 Merge pull request 'Fix bug #73694' (#268) from fix/bug73694 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/268
2025-03-27 11:55:55 +00:00
eb71d95944 Merge branch 'develop' into feature/add-xls-writing 2025-03-27 16:30:56 +06:00
0e09d4ab7a Fix bug #73694 2025-03-27 16:23:39 +06:00
eb37cabb4e Fix write Action 2025-03-27 12:43:02 +03:00
4b611b304b Read/Write parent field actions 2025-03-27 11:36:43 +03:00
cab887c161 Refactoring 2025-03-26 15:37:33 +03:00
b1b4c0e5ff Merge pull request 'release/v9.0.0' (#267) from release/v9.0.0 into feature/docx-renderer 2025-03-26 11:10:54 +00:00
c5e6fb69c8 Edit merged annots 2025-03-26 14:06:29 +03:00
af5feabdac Merge pull request 'Fix missing header' (#266) from fix/missing-header into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/266
2025-03-26 10:55:35 +00:00
716cbd42b2 Fix missing header 2025-03-26 13:50:27 +03:00
c5cd520bfe Merge pull request 'release/v9.0.0' (#265) from release/v9.0.0 into feature/docx-renderer 2025-03-26 10:34:26 +00:00
f0dbf92bde Refactoring 2025-03-26 13:32:44 +03:00
1d27cc61f4 Add simple cells writing 2025-03-26 16:24:26 +06:00
eebe3f321a Delete merged object 2025-03-25 17:24:33 +03:00
f535cef848 Add dimensions writing 2025-03-25 20:20:00 +06:00
7ad49a5650 Add headerFooter & columns writing 2025-03-25 18:14:24 +06:00
71201f4446 Add new lines groupping algo 2025-03-25 14:48:02 +03:00
3ad2fff67b Add page setup binary writing 2025-03-25 15:53:51 +06:00
66b56360da Add BOF writing 2025-03-25 14:47:44 +06:00
925c40aa80 Added OFD rendering to the renderer 2025-03-24 18:34:04 +03:00
b6741a504f Fix delete indirect objects 2025-03-24 17:41:26 +03:00
e8f88ab20d Add globals xls writing 2025-03-24 18:42:03 +06:00
3522897670 . 2025-03-24 13:21:24 +03:00
6973cb4c54 Merge remote-tracking branch 'origin/hotfix/v8.3.3' into release/v9.0.0 2025-03-24 13:14:04 +03:00
fedf33e2c2 Fix AP_N_Yes for radiobutton 2025-03-24 13:11:12 +03:00
9e52adeb53 Merge pull request 'feature/SMCustomShape' (#262) from feature/SMCustomShape into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/262
2025-03-24 10:05:16 +00:00
aed320e57a Fix build 2025-03-24 09:12:42 +03:00
caa34c540a Add CObjectsManager 2025-03-21 16:58:43 +03:00
b67ed51103 AddTest 2025-03-21 16:04:03 +03:00
cf91b46ea7 . 2025-03-21 15:27:18 +03:00
7857106d76 Fix bug #73585 2025-03-21 13:43:19 +05:00
44d76014bf Add nStartRefID to Editor 2025-03-20 18:52:59 +03:00
dad19380a2 Merge remote-tracking branch 'origin/release/v9.0.0' into feature/vs 2025-03-20 14:36:55 +03:00
23410ccbf9 Merge pull request 'feature/add-direct-xlst-xlsb-conversion' (#260) from feature/add-direct-xlst-xlsb-conversion into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/260
2025-03-20 11:34:44 +00:00
64c74192c7 FIx bug #73451 2025-03-20 16:09:36 +05:00
ce129fe49d Fix pane conversion 2025-03-20 17:08:25 +06:00
ed0f4f9e5e Fix cond fmts formula conversion 2025-03-20 16:27:31 +06:00
d8f9aab1ed Merge branch 'release/v9.0.0' into feature/add-direct-xlst-xlsb-conversion 2025-03-20 13:25:09 +06:00
37fc9784a7 Fix conditional formating conversion 2025-03-19 19:21:58 +06:00
7252d29579 Improved pars of the OFD format structure 2025-03-19 15:47:49 +03:00
051169b0f5 Merge remote-tracking branch 'origin/release/v9.0.0' into feature/vs 2025-03-19 10:42:46 +03:00
6a4ba5ec8d fix bug #73554 2025-03-19 10:39:55 +03:00
3ec47d195e Refactoring 2025-03-18 16:17:59 +03:00
d620a53cd0 Fix drawingfile 2025-03-18 13:32:06 +03:00
df0528c69f Fix nStartRefID 2025-03-18 12:35:52 +03:00
49da36637d Fix unique ID objects 2025-03-18 11:49:43 +03:00
850fd21f09 Merge remote-tracking branch 'origin/release/v9.0.0' into feature/vs 2025-03-18 09:43:02 +03:00
fdc374256a Merge branch 'hotfix/v8.3.2' into release/v9.0.0 2025-03-18 09:42:31 +03:00
ed12f6766d Merge remote-tracking branch 'origin/hotfix/v8.3.2' into feature/vs 2025-03-18 09:41:23 +03:00
4e7ccd2506 Add nStartRefID 2025-03-17 18:09:07 +03:00
b7a335ef83 Merge branch 'release/v9.0.0' into feature/add-direct-xlst-xlsb-conversion 2025-03-17 15:42:21 +06:00
2d0bb82f41 refactoring 2025-03-15 15:01:50 +03:00
005b790e14 . 2025-03-15 11:14:36 +03:00
2a5d7a78a3 Fix merge pages 2025-03-14 10:56:41 +03:00
16c77add4d visio crypt, template, macros, plugins 2025-03-13 19:23:34 +03:00
684e83f0f3 Merge branch 'hotfix/v8.3.2' into release/v9.0.0 2025-03-13 15:52:33 +03:00
16023ed916 . 2025-03-12 19:08:23 +03:00
561221102e fix bug #73509 2025-03-12 16:59:27 +03:00
71f164b029 Merge pull request 'Fix bug 73484' (#250) from fix/x2ttester into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/250
2025-03-12 07:13:03 +00:00
a438ae3d2e . 2025-03-11 22:06:23 +03:00
7edb3bd141 Merge remote-tracking branch 'origin/hotfix/v8.3.2' into release/v9.0.0 2025-03-11 20:51:21 +03:00
18b8e3ed7c Fix bug 73484 2025-03-11 20:12:42 +03:00
daf6dd5af2 Developing TextCommandRederer 2025-03-11 17:40:17 +03:00
52de014e14 Fix empty Opt 2025-03-11 15:51:16 +03:00
adea12d9f7 Parent Opt with pair string 2025-03-11 14:52:17 +03:00
3a8601c354 Ff separately parent and widget 2025-03-11 13:23:38 +03:00
86c994d0a0 Fix test 2025-03-11 12:03:08 +03:00
ba1597a8d5 Create AddEditPage 2025-03-11 12:02:23 +03:00
84ecffa75e Added a parse of the basic structure and text in word format 2025-03-11 11:06:07 +03:00
d83cbfc031 Merge remote-tracking branch 'origin/hotfix/v8.3.2' into release/v9.0.0 2025-03-10 20:11:19 +03:00
9b8f01b293 Fix logic 2025-03-10 17:17:26 +03:00
7a3815bc5f Add CryptoPP to drawingfile 2025-03-10 15:40:16 +03:00
08ae28224f conversion of functions 2025-03-10 14:54:58 +03:00
4d23382c92 Added a parse of the basic structure of the OFD format 2025-03-10 14:21:25 +03:00
e1274dadea . 2025-03-08 08:36:37 +03:00
4342c245c5 Merge remote-tracking branch 'origin/release/v9.0.0' into feature/vs 2025-03-07 14:35:58 +03:00
52602f902e Merge pull request 'fix bug #73437' (#247) from fix/bug73437 into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/247
2025-03-07 11:35:29 +00:00
56179f70bf add binary vsdx 2025-03-07 14:34:34 +03:00
9cde3dc699 fix bug #73437 2025-03-07 17:28:54 +06:00
8791f446b7 Add PdfWriter to build drawingfile 2025-03-06 18:16:14 +03:00
bd838daa90 Merge pull request 'Feature forms' (#246) from feature/forms into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/246
2025-03-06 07:10:18 +00:00
484d9342ac Merge remote-tracking branch 'origin/release/v9.0.0' into feature/forms 2025-03-06 09:12:10 +03:00
e1c1ff3eb4 Fix pages from arrPageIndex 2025-03-05 18:02:48 +03:00
d76dddeda6 Fix test 2025-03-05 17:54:47 +03:00
1830a1103a Fix SplitPages 2025-03-05 15:40:12 +03:00
631f498532 Create OMetadata 2025-03-05 14:12:58 +03:00
4957b61033 SplitPages in PdfReader 2025-03-05 13:31:38 +03:00
462556599f Build drawingfile 2025-03-04 18:49:04 +03:00
a7551f69eb Fix formula with blank value conversion 2025-03-04 21:22:36 +06:00
7a1c1be599 remove unused function 2025-03-04 15:37:49 +06:00
0796745158 Add PdfWriter to drawingfile 2025-03-03 19:14:08 +03:00
06cc67a925 add pars and conversion sm in custom shape 2025-03-03 14:43:41 +03:00
55cae3d38c fix table formula conversion 2025-03-03 16:58:13 +06:00
fc540fdf5f Merge remote-tracking branch 'origin/feature/add-direct-xlst-xlsb-conversion' into feature/vs 2025-03-01 21:09:10 +03:00
3c60ee114c Fix bug with hor ver lines 2025-03-01 14:20:45 +03:00
8165c6ffde Fix bug 2025-02-28 17:38:08 +03:00
7dc753a868 Develop base table logic 2025-02-28 17:23:40 +03:00
ea475e2828 Fixed bugs in hwp conversion 2025-02-28 15:42:49 +03:00
06a287dffe fix shared strings fonts conversion 2025-02-28 17:42:29 +06:00
6e6ffbf604 Create AddPDF 2025-02-28 14:03:47 +03:00
3d58a8565a Fix definded names conversion 2025-02-28 16:54:38 +06:00
9ed356c103 fix empty cells conversion 2025-02-28 14:38:04 +06:00
b20cdcd107 Merge branch 'develop' into feature/add-direct-xlst-xlsb-conversion 2025-02-28 13:12:52 +06:00
c1f29d5317 Fix bug #73314 2025-02-27 20:13:08 +05:00
4d4a67b15a Create AddFromFile and AddFromMemory 2025-02-27 17:45:12 +03:00
cca89624c6 Merge remote-tracking branch 'origin/feature/add-direct-xlst-xlsb-conversion' into feature/vs 2025-02-27 16:00:36 +03:00
258890352a Fix getAnnotationsInfo 2025-02-26 17:55:29 +03:00
09567e225e Fix shared strings conversion 2025-02-26 18:34:22 +06:00
62dbbc6d0d Fix CPdfReader functions 2025-02-26 15:18:18 +03:00
4085f58b09 Fix CPdfReader functions 2025-02-25 17:48:42 +03:00
5cb7ad11e4 Updating the calculation of styles in hwp format and bug fixes 2025-02-25 15:40:12 +03:00
f5d2ff992a Fix worksheetProp conversion 2025-02-25 18:09:10 +06:00
f28dc0a36a Create CPdfReaderContext 2025-02-24 15:47:03 +03:00
79145ad0c7 Merge branch 'develop' into feature/add-direct-xlst-xlsb-conversion 2025-02-24 16:46:51 +06:00
54c0943754 Add sheet&table names pre reading for formulas 2025-02-21 19:30:10 +06:00
49a40fa841 MergePages SplitPages commands 2025-02-20 17:39:10 +03:00
f9662752f7 Merge remote-tracking branch 'origin/fix/pdf-copy-ap' into feature/pdf-page
# Conflicts:
#	PdfFile/PdfFile.cpp
#	PdfFile/PdfFile.h
#	PdfFile/SrcWriter/Document.cpp
#	PdfFile/SrcWriter/Document.h
2025-02-20 15:19:54 +03:00
7eb0892ab9 Fix DR AcroForm MergePages 2025-02-20 14:56:34 +03:00
bb65d1a90b Add connections conversion 2025-02-20 17:53:40 +06:00
0136530b93 Merge branch 'develop' into feature/add-direct-xlst-xlsb-conversion 2025-02-20 13:51:33 +06:00
edcd907749 Fix MergePages 2025-02-19 17:51:10 +03:00
e1b13913ac Fix EditPdf 2025-02-19 11:38:55 +03:00
9f3ab7cc29 Create MergePages 2025-02-18 16:00:57 +03:00
229b263a9f Fix AcroForm SplitPage 2025-02-17 18:07:17 +03:00
9757220019 Merge branch 'develop' into feature/add-direct-xlst-xlsb-conversion 2025-02-17 17:07:33 +06:00
028157d2ef Fix AcroForm 2025-02-14 17:36:31 +03:00
bc0a582bf6 Fix pivot conversion 2025-02-14 19:57:08 +06:00
3428537113 Add table conversion 2025-02-14 17:29:45 +06:00
d09ab5ecfe Only text fo apValue 2025-02-14 12:16:11 +03:00
8bc887142c Return fontInfo for readAnnotAP 2025-02-14 11:51:33 +03:00
af4e0243d2 XRef write to stream 2025-02-14 11:07:27 +03:00
4de7ba4e52 Fix Skip Action GoTo another Page 2025-02-13 18:04:00 +03:00
e7a7400801 Add ext conversion 2025-02-13 19:16:16 +06:00
feeb471aad Add drawing & comments conversion 2025-02-13 17:49:54 +06:00
600d2a6ac5 Fix build 2025-02-13 11:44:21 +03:00
cd102c738f Choice widget Opt only Parent 2025-02-13 11:37:28 +03:00
70be48fec3 Test SplitPage 2025-02-13 11:11:11 +03:00
c60ff31fd4 Fix Resources ref 2025-02-13 10:13:44 +03:00
7c1636a33e add hyperlinks conversion 2025-02-12 20:17:03 +06:00
3ec3aa8575 add protection & mergeCells conversion 2025-02-12 16:38:51 +06:00
3227b91a7c Add cond format conversion 2025-02-12 14:20:22 +06:00
826d3fc678 Fix build 2025-02-11 17:55:09 +03:00
ec0ed4d2f0 Unique obj split pages 2025-02-11 17:23:08 +03:00
ed63f9cf29 Fix row cords conversion 2025-02-11 19:40:31 +06:00
7556d0859d Fix shared fmla conversion 2025-02-11 17:32:56 +06:00
fff7f4e63f Test SplitPages 2025-02-11 13:47:26 +03:00
68c9d3cfa5 Add logic for one color gradient 2025-02-10 20:58:02 +03:00
7e8e4586ca Create SplitPage 2025-02-10 18:34:57 +03:00
6411aed137 Fix shared formula conversion 2025-02-10 21:33:10 +06:00
bbb9165a99 Add logic for luminocity gradient 2025-02-10 18:06:32 +03:00
17fe60ecdc Add color mixing in gradient render 2025-02-10 18:05:43 +03:00
650a5c4c1f Add simple worksheet xlsb writing 2025-02-10 16:12:16 +06:00
662f318d6b add workbook conversion 2025-02-07 15:39:51 +06:00
9352721ec4 Fix copy Stamp InRect 2025-02-07 10:44:31 +03:00
eb751507c0 Add worksheet direct conversion method 2025-02-07 13:32:02 +06:00
e2df5a8ab0 Fix C&IC FreeText 2025-02-06 11:58:24 +03:00
ec01f4a77e Create String Index 2025-02-06 11:16:49 +03:00
d196a15a0e Change xlst->xlsb conversion 2025-02-05 20:06:59 +06:00
8a86347eb6 Fix build 2025-02-05 13:56:51 +03:00
d6675bb981 Merge remote-tracking branch 'origin/release/v8.3.0' into fix/pdf-copy-ap 2025-02-05 12:52:01 +03:00
eba03f9833 Merge remote-tracking branch 'origin/fix/pdf-copy-paste' into fix/pdf-copy-ap 2025-02-05 12:13:05 +03:00
e7a462fb60 Fix actual pos MovePage 2025-02-04 13:10:54 +03:00
ef1fc051d5 Set better indents for alignment 2025-02-03 14:50:49 +03:00
daa90eee79 Shape coverage possible fix 2025-02-03 14:42:22 +03:00
f253eb5448 Fix build 2025-02-03 13:58:08 +03:00
a7457fd058 Merge branch 'release/v8.3.0' 2025-02-03 13:54:01 +03:00
aeb657ef25 Fix MovePage 2025-01-31 14:53:23 +03:00
a9b225782d Create MovePage 2025-01-31 13:38:29 +03:00
6791799fcb Write Top DICT 2025-01-30 17:14:45 +03:00
b46df522e9 Copy AP 2025-01-30 15:27:33 +03:00
a03e397234 Read/Write Top DICT 2025-01-29 18:38:44 +03:00
c2eb402ebf Fix readAnnotationsInfoFromBinary 2025-01-28 12:01:22 +03:00
dabedf6121 Fix test Text 2025-01-28 11:12:35 +03:00
4db56e4536 Add lminosity gradient to test case 2025-01-28 11:03:29 +03:00
99224aecb9 Add fill color for tensor patch gradient 2025-01-28 11:02:01 +03:00
dd02c9594b Fix ctAnnotField 2025-01-28 10:20:48 +03:00
894f88e475 Separation of common parts into functions 2025-01-27 18:54:09 +03:00
ba46a97bde Create readAnnotationsInfoFromBinary 2025-01-27 13:52:54 +03:00
dcf8f0fb01 Header and Name Index 2025-01-24 17:51:50 +03:00
d04146db5b Create CIDFontType0C 2025-01-23 17:51:48 +03:00
5a7d3de597 Fix bug with width of border 2025-01-23 14:32:54 +03:00
6cb6631d1a Update table logic 2025-01-23 14:10:35 +03:00
1a3ce88654 Develop tables 2025-01-23 13:02:10 +03:00
037879ca65 Add more style logic in tables 2025-01-22 18:06:14 +03:00
cabecb0116 Improved the speed of html format conversion 2025-01-17 17:31:25 +03:00
1632 changed files with 64707 additions and 14526 deletions

1
Common/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/module.version

View File

@ -4,6 +4,7 @@ CORE_BOOST_LIBS = $$PWD/build/$$CORE_BUILDS_PLATFORM_PREFIX/lib
core_ios:CONFIG += disable_enum_constexpr_conversion
core_android:CONFIG += disable_enum_constexpr_conversion
core_mac:CONFIG += disable_enum_constexpr_conversion
core_linux_clang:CONFIG += disable_enum_constexpr_conversion
core_android {
INCLUDEPATH += $$PWD/build/android/include
@ -25,14 +26,21 @@ bundle_xcframeworks {
}
}
core_win_arm64 {
DEFINES += MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS=0
}
core_windows {
VS_VERSION=140
VS_DEBUG=
VS_ARCH=x64
core_debug:VS_DEBUG=gd-
core_win_32:VS_ARCH=x32
core_win_arm64:VS_ARCH=a64
vs2019:VS_VERSION=142
DEFINES += BOOST_USE_WINDOWS_H BOOST_WINAPI_NO_REDECLARATIONS
BOOST_POSTFIX = -vc$${VS_VERSION}-mt-$${VS_DEBUG}$${VS_ARCH}-1_72
core_boost_libs:LIBS += -L$$CORE_BOOST_LIBS -llibboost_system$$BOOST_POSTFIX -llibboost_filesystem$$BOOST_POSTFIX

2
Common/3dParty/brotli/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
brotli/
module.version

View File

@ -0,0 +1,9 @@
SRC_DIR = $$PWD/brotli/c
DEFINES += FT_CONFIG_OPTION_USE_BROTLI
INCLUDEPATH += \
$$SRC_DIR/include
SOURCES += $$files($$SRC_DIR/common/*.c)
SOURCES += $$files($$SRC_DIR/dec/*.c)
#SOURCES += $$files($$SRC_DIR/enc/*.c)

20
Common/3dParty/brotli/make.py Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python
import sys
import os
sys.path.append("../../../../build_tools/scripts")
import base
def clear_module():
if base.is_dir("brotli"):
base.delete_dir_with_access_error("brotli")
return
base.check_module_version("1", clear_module)
# fetch harfbuzz
if not base.is_dir("brotli"):
base.cmd("git", ["clone", "https://github.com/google/brotli.git"])
os.chdir("brotli")
base.cmd("git", ["checkout", "a47d7475063eb223c87632eed806c0070e70da29"])
os.chdir("../")

View File

@ -84,7 +84,7 @@ public:
/* fonts */
const char *fonts_paths[NUM_EXAMPLES] = {
"C:/Windows/Fonts/arial.ttf",
"C:/Windows/Fonts/calibri.ttf",
//"C:/Windows/Fonts/arial.ttf",
"C:/Users/korol/AppData/Local/Microsoft/Windows/Fonts/ArabicTest.ttf",
"C:/Windows/Fonts/simsun.ttc"
@ -95,7 +95,7 @@ const char *num_glyph_types[NUM_GLYPH_TYPES] = {"UNCLASSIFIED", "BASE_GLYPH", "L
/* tranlations courtesy of google */
const char *texts[NUM_EXAMPLES] = {
"hello",
"fi",
"لا لآ لأ لا",
"懶惰的姜貓"
};
@ -107,7 +107,7 @@ const hb_direction_t text_directions[NUM_EXAMPLES] = {
};
const int text_skip[NUM_EXAMPLES] = {
1,
0,
0,
1,
};
@ -435,6 +435,11 @@ static void print_layout_info_using_private_api(hb_blob_t *blob)
/* end of private API use */
#endif
struct hb_feature_test {
hb_tag_t tag;
uint32_t value;
};
int main(int argc, char *argv[])
{
// hb_blob_t* blobFileTest = hb_blob_create_from_file("C:/Windows/Fonts/calibri.ttf");
@ -499,28 +504,34 @@ int main(int argc, char *argv[])
hb_buffer_set_language(buf, hb_language_from_string(languages[i], strlen(languages[i])));
// hb_buffer_set_cluster_level (buf, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES);
// hb_buffer_set_cluster_level (buf, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
hb_buffer_set_cluster_level(buf, HB_BUFFER_CLUSTER_LEVEL_CHARACTERS);
hb_buffer_set_cluster_level(buf, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES);
#if 0
#define userfeatures_count 4
hb_feature_t userfeatures[userfeatures_count];
hb_tag_t tags[] = {
HB_TAG('l','i','g','a'),
HB_TAG('c','l','i','g'),
HB_TAG('d','l','i','g'),
HB_TAG('h','l','i','g'),
};
for (int f = 0; f < userfeatures_count; f++)
{
userfeatures[f].tag = tags[f];
userfeatures[f].value = 1;
userfeatures[f].start = HB_FEATURE_GLOBAL_START;
userfeatures[f].end = HB_FEATURE_GLOBAL_END;
}
#else
#define userfeatures_count 0
hb_feature_t *userfeatures = NULL;
#endif
hb_feature_test features[] {
{HB_TAG('r','l','i','g'), 1},
{HB_TAG('l','i','g','a'), 0},
{HB_TAG('c','l','i','g'), 1},
{HB_TAG('h','l','i','g'), 1},
{HB_TAG('d','l','i','g'), 1},
{HB_TAG('k','e','r','n'), 2},
{0, 0}
};
int userfeatures_count = 0;
hb_feature_t userfeatures[100];
hb_feature_test* current_feature = features;
while (current_feature->tag != 0)
{
if (current_feature->value != 2)
{
userfeatures[userfeatures_count].tag = current_feature->tag;
userfeatures[userfeatures_count].value = current_feature->value;
userfeatures[userfeatures_count].start = HB_FEATURE_GLOBAL_START;
userfeatures[userfeatures_count].end = HB_FEATURE_GLOBAL_END;
userfeatures_count++;
}
current_feature++;
}
/* Layout the text */
hb_buffer_add_utf8(buf, texts[i], strlen(texts[i]), 0, strlen(texts[i]));
@ -531,7 +542,7 @@ int main(int argc, char *argv[])
// const char*const pHbShapers[] = { "graphite2", "coretext_aat", "ot", "fallback", nullptr };
// bool ok = hb_shape_full(hb_ft_font[i], buf, userfeatures, userfeatures_count, pHbShapers);
hb_shape(hb_ft_font[i], buf, userfeatures, userfeatures_count);
hb_shape(hb_ft_font[i], buf, (userfeatures_count != 0) ? userfeatures : NULL, userfeatures_count);
unsigned int glyph_count;
hb_glyph_info_t *glyph_info = hb_buffer_get_glyph_infos(buf, &glyph_count);

4
Common/3dParty/heif/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
x265_git
libde265
libheif
ios-cmake

View File

@ -0,0 +1,42 @@
DEFINES += LIBHEIF_STATIC_BUILD
HEIF_BUILDS_PLATFORM_PREFIX = $$CORE_BUILDS_PLATFORM_PREFIX
core_ios : xcframework_platform_ios_simulator {
HEIF_BUILDS_PLATFORM_PREFIX = ios_simulator
}
HEIF_BUILD_PATH = $$PWD/libheif/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX
INCLUDEPATH += \
$$PWD/libheif/libheif/api \
$$HEIF_BUILD_PATH # for heif_version.h
core_windows {
core_debug {
BUILD_TYPE = Debug
} else {
BUILD_TYPE = Release
}
LIBS += \
-L$$PWD/x265_git/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/$$BUILD_TYPE -lx265-static \
-L$$PWD/libde265/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/libde265/$$BUILD_TYPE -llibde265 \
-L$$HEIF_BUILD_PATH/libheif/$$BUILD_TYPE -lheif
}
core_linux | core_android {
# we need to wrap x265 and de265 libraries in `whole-archive` flags to avoid "undefined symbol" errors when later linking with graphics.so
LIBS += \
-Wl,--whole-archive \
-L$$PWD/x265_git/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX -lx265 \
-L$$PWD/libde265/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/libde265 -lde265 \
-Wl,--no-whole-archive \
-L$$HEIF_BUILD_PATH/libheif -lheif
}
core_mac | core_ios {
LIBS += \
-L$$PWD/x265_git/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX -lx265 \
-L$$PWD/libde265/build/$$HEIF_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX/libde265 -lde265 \
-L$$HEIF_BUILD_PATH/libheif -lheif
}

View File

@ -12,7 +12,7 @@
#include "StaticFunctions.h"
#include "ConstValues.h"
#define DEFAULT_FONT_SIZE 14
#define DEFAULT_FONT_SIZE 12
namespace NSCSS
{
@ -49,6 +49,8 @@ namespace NSCSS
if (!oElement.m_sId.empty())
m_sId += L'+' + oElement.m_sId;
m_arParentsStyles.insert(oElement.m_arParentsStyles.begin(), oElement.m_arParentsStyles.end());
return *this;
}
@ -69,6 +71,8 @@ namespace NSCSS
m_oDisplay = oElement.m_oDisplay;
m_oTransform = oElement.m_oTransform;
m_arParentsStyles = oElement.m_arParentsStyles;
return *this;
}
@ -109,7 +113,8 @@ namespace NSCSS
bool CCompiledStyle::Empty() const
{
return m_oBackground.Empty() && m_oBorder.Empty() && m_oFont.Empty() &&
m_oMargin.Empty() && m_oPadding.Empty() && m_oText.Empty() && m_oDisplay.Empty();
m_oMargin.Empty() && m_oPadding.Empty() && m_oText.Empty() &&
m_oDisplay.Empty() && m_oTransform.Empty();
}
void CCompiledStyle::AddPropSel(const std::wstring& sProperty, const std::wstring& sValue, const unsigned int unLevel, const bool& bHardMode)
@ -314,6 +319,7 @@ namespace NSCSS
}
//BORDER TOP
CASE(L"border-top"):
CASE(L"mso-border-top-alt"):
{
m_oBorder.SetTopSide(pPropertie.second, unLevel, bHardMode);
break;
@ -335,6 +341,7 @@ namespace NSCSS
}
//BORDER RIGHT
CASE(L"border-right"):
CASE(L"mso-border-right-alt"):
{
m_oBorder.SetRightSide(pPropertie.second, unLevel, bHardMode);
break;
@ -356,6 +363,7 @@ namespace NSCSS
}
//BORDER bottom
CASE(L"border-bottom"):
CASE(L"mso-border-bottom-alt"):
{
m_oBorder.SetBottomSide(pPropertie.second, unLevel, bHardMode);
break;
@ -377,6 +385,7 @@ namespace NSCSS
}
//BORDER LEFT
CASE(L"border-left"):
CASE(L"mso-border-left-alt"):
{
m_oBorder.SetLeftSide(pPropertie.second, unLevel, bHardMode);
break;
@ -435,6 +444,11 @@ namespace NSCSS
m_oDisplay.SetVAlign(pPropertie.second, unLevel, bHardMode);
break;
}
CASE(L"white-space"):
{
m_oDisplay.SetWhiteSpace(pPropertie.second, unLevel, bHardMode);
break;
}
//TRANSFORM
CASE(L"transform"):
{
@ -521,7 +535,7 @@ namespace NSCSS
{
return m_sId;
}
bool CCompiledStyle::HaveThisParent(const std::wstring &wsParentName) const
{
return m_arParentsStyles.end() != m_arParentsStyles.find(wsParentName);

View File

@ -1,9 +1,6 @@
#ifndef CCOMPILEDSTYLE_H
#define CCOMPILEDSTYLE_H
#include "CssCalculator_global.h"
#include "ConstValues.h"
#include <map>
#include <set>
#include <vector>

View File

@ -13,14 +13,9 @@ namespace NSCSS
delete m_pInternal;
}
CCompiledStyle CCssCalculator::GetCompiledStyle(const std::vector<CNode> &arSelectors) const
bool CCssCalculator::CalculateCompiledStyle(std::vector<CNode>& arSelectors) const
{
return m_pInternal->GetCompiledStyle(arSelectors);
}
bool CCssCalculator::GetCompiledStyle(CCompiledStyle &oStyle, const std::vector<CNode> &arSelectors) const
{
return m_pInternal->GetCompiledStyle(oStyle, arSelectors);
return m_pInternal->CalculateCompiledStyle(arSelectors);
}
std::wstring CCssCalculator::CalculateStyleId(const CNode& oNode)
@ -63,6 +58,11 @@ namespace NSCSS
return m_pInternal->GetDpi();
}
bool CCssCalculator::HaveStylesById(const std::wstring& wsId) const
{
return m_pInternal->HaveStylesById(wsId);
}
void CCssCalculator::ClearPageData()
{
m_pInternal->ClearPageData();

View File

@ -2,10 +2,8 @@
#define CCSSCALCULATOR_H
#include "CssCalculator_global.h"
#include "CCompiledStyle.h"
#include "ConstValues.h"
#include <iostream>
#include <map>
#include "StyleProperties.h"
#include "CNode.h"
#include <vector>
namespace NSCSS
@ -19,8 +17,7 @@ namespace NSCSS
CCssCalculator();
~CCssCalculator();
CCompiledStyle GetCompiledStyle(const std::vector<CNode> &arSelectors) const;
bool GetCompiledStyle(CCompiledStyle& oStyle, const std::vector<CNode> &arSelectors) const;
bool CalculateCompiledStyle(std::vector<CNode>& arSelectors) const;
std::wstring CalculateStyleId(const CNode& oNode);
bool CalculatePageStyle(NSProperties::CPage& oPageData, const std::vector<CNode> &arSelectors);
@ -35,6 +32,8 @@ namespace NSCSS
std::wstring GetEncoding() const;
unsigned short int GetDpi() const;
bool HaveStylesById(const std::wstring& wsId) const;
void ClearPageData();
void ClearEmbeddedStyles();
void ClearAllowedStyleFiles();

View File

@ -2,8 +2,6 @@
#include <string>
#include <vector>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <numeric>
@ -186,7 +184,7 @@ namespace NSCSS
}
#endif
const CElement* CStyleStorage::FindElement(const std::wstring& wsSelector)
const CElement* CStyleStorage::FindElement(const std::wstring& wsSelector) const
{
if (wsSelector.empty())
return nullptr;
@ -472,7 +470,7 @@ namespace NSCSS
}
}
const CElement* CStyleStorage::FindSelectorFromStyleData(const std::wstring& wsSelector, const std::map<std::wstring, CElement*>& mStyleData)
const CElement* CStyleStorage::FindSelectorFromStyleData(const std::wstring& wsSelector, const std::map<std::wstring, CElement*>& mStyleData) const
{
std::map<std::wstring, CElement*>::const_iterator itFound = mStyleData.find(wsSelector);
@ -488,6 +486,95 @@ namespace NSCSS
{}
#ifdef CSS_CALCULATOR_WITH_XHTML
bool CCssCalculator_Private::CalculateCompiledStyle(std::vector<CNode>& arSelectors)
{
if (arSelectors.empty())
return false;
if (L"#text" == arSelectors.back().m_wsName)
{
if (arSelectors.size() > 1 && arSelectors.back().m_pCompiledStyle->Empty())
*arSelectors.back().m_pCompiledStyle += *(arSelectors.end() - 2)->m_pCompiledStyle;
if(arSelectors.crend() != std::find_if(arSelectors.crbegin(), arSelectors.crend(),
[](const CNode& oNode){ return IsTableElement(oNode.m_wsName); }))
{
arSelectors.back().m_pCompiledStyle->m_oBackground.Clear();
arSelectors.back().m_pCompiledStyle->m_oBorder.Clear();
}
return true;
}
const std::map<std::vector<CNode>, CCompiledStyle>::iterator oItem = m_mUsedStyles.find(arSelectors);
if (oItem != m_mUsedStyles.end())
{
arSelectors.back().SetCompiledStyle(new CCompiledStyle(oItem->second));
return true;
}
arSelectors.back().m_pCompiledStyle->SetDpi(m_nDpi);
unsigned int unStart = 0;
std::vector<CNode>::const_reverse_iterator itFound = std::find_if(arSelectors.crbegin(), arSelectors.crend(), [](const CNode& oNode){ return !oNode.m_pCompiledStyle->Empty(); });
if (itFound != arSelectors.crend())
unStart = itFound.base() - arSelectors.cbegin();
std::vector<std::wstring> arNodes = CalculateAllNodes(arSelectors, unStart);
std::vector<std::wstring> arPrevNodes;
bool bInTable = false;
for (size_t i = 0; i < unStart; ++i)
{
if (!bInTable)
bInTable = IsTableElement(arSelectors[i].m_wsName);
else
break;
}
for (size_t i = unStart; i < arSelectors.size(); ++i)
{
if (0 != i)
*arSelectors[i].m_pCompiledStyle += *arSelectors[i - 1].m_pCompiledStyle;
arSelectors[i].m_pCompiledStyle->AddParent(arSelectors[i].m_wsName);
if (!bInTable)
bInTable = IsTableElement(arSelectors[i].m_wsName);
if (bInTable)
{
arSelectors[i].m_pCompiledStyle->m_oBackground.Clear();
arSelectors[i].m_pCompiledStyle->m_oBorder.Clear();
}
arSelectors[i].m_pCompiledStyle->AddStyle(arSelectors[i].m_mAttributes, i + 1);
for (const CElement* oElement : FindElements(arNodes, arPrevNodes))
arSelectors[i].m_pCompiledStyle->AddStyle(oElement->GetStyle(), i + 1);
if (!arSelectors[i].m_wsStyle.empty())
arSelectors[i].m_pCompiledStyle->AddStyle(arSelectors[i].m_wsStyle, i + 1, true);
// Скидываем некоторые внешние стили, которые внутри таблицы переопределяются
if (bInTable && i < arSelectors.size() - 1)
{
arSelectors[i].m_pCompiledStyle->m_oFont.GetLineHeight().Clear();
arSelectors[i].m_pCompiledStyle->m_oPadding.Clear();
arSelectors[i].m_pCompiledStyle->m_oMargin.Clear();
}
}
arSelectors.back().m_pCompiledStyle->SetID(CalculateStyleId(arSelectors.back()));
if (!arSelectors.back().m_pCompiledStyle->Empty())
m_mUsedStyles[arSelectors] = *arSelectors.back().m_pCompiledStyle;
return true;
}
void CCssCalculator_Private::SetPageData(NSProperties::CPage &oPage, const std::map<std::wstring, std::wstring> &mData, unsigned int unLevel, bool bHardMode)
{
//TODO:: пересмотреть данный метод
@ -505,11 +592,11 @@ namespace NSCSS
}
#endif
std::vector<std::wstring> CCssCalculator_Private::CalculateAllNodes(const std::vector<CNode> &arSelectors)
std::vector<std::wstring> CCssCalculator_Private::CalculateAllNodes(const std::vector<CNode> &arSelectors, unsigned int unStart)
{
std::vector<std::wstring> arNodes;
for (std::vector<CNode>::const_reverse_iterator oNode = arSelectors.rbegin(); oNode != arSelectors.rend(); ++oNode)
for (std::vector<CNode>::const_reverse_iterator oNode = arSelectors.rbegin(); oNode != arSelectors.rend() - unStart; ++oNode)
{
if (!oNode->m_wsName.empty())
arNodes.push_back(oNode->m_wsName);
@ -620,6 +707,16 @@ namespace NSCSS
FindPrevAndKindElements(pFoundName, arNextNodes, arFindedElements, wsName, arClasses);
}
const CElement* pFoundAll = m_oStyleStorage.FindElement(L"*");
if (nullptr != pFoundAll)
{
if (!pFoundAll->Empty())
arFindedElements.push_back(pFoundAll);
FindPrevAndKindElements(pFoundAll, arNextNodes, arFindedElements, wsName, arClasses);
}
if (arFindedElements.size() > 1)
{
std::sort(arFindedElements.rbegin(), arFindedElements.rend(),
@ -631,79 +728,6 @@ namespace NSCSS
}
#ifdef CSS_CALCULATOR_WITH_XHTML
CCompiledStyle CCssCalculator_Private::GetCompiledStyle(const std::vector<CNode>& arSelectors)
{
if (arSelectors.empty())
return CCompiledStyle();
CCompiledStyle oStyle;
GetCompiledStyle(oStyle, arSelectors);
return oStyle;
}
bool CCssCalculator_Private::GetCompiledStyle(CCompiledStyle &oStyle, const std::vector<CNode> &arSelectors)
{
if (arSelectors.empty())
return false;
const std::map<std::vector<CNode>, CCompiledStyle>::iterator oItem = m_mUsedStyles.find(arSelectors);
if (oItem != m_mUsedStyles.end())
{
oStyle = oItem->second;
return true;
}
oStyle.SetDpi(m_nDpi);
std::vector<std::wstring> arNodes = CalculateAllNodes(arSelectors);
std::vector<std::wstring> arPrevNodes;
bool bInTable = false;
for (size_t i = 0; i < arSelectors.size(); ++i)
{
oStyle.AddParent(arSelectors[i].m_wsName);
if (!bInTable)
bInTable = IsTableElement(arSelectors[i].m_wsName);
if (bInTable)
{
oStyle.m_oBackground.Clear();
oStyle.m_oBorder.Clear();
}
CCompiledStyle oTempStyle;
oTempStyle.AddStyle(arSelectors[i].m_mAttributes, i + 1);
for (const CElement* oElement : FindElements(arNodes, arPrevNodes))
oTempStyle.AddStyle(oElement->GetStyle(), i + 1);
if (!arSelectors[i].m_wsStyle.empty())
oTempStyle.AddStyle(arSelectors[i].m_wsStyle, i + 1, true);
oStyle += oTempStyle;
// Скидываем некоторые внешние стили, которые внутри таблицы переопределяются
if (bInTable && i < arSelectors.size() - 1)
{
oStyle.m_oFont.GetLineHeight().Clear();
oStyle.m_oPadding.Clear();
oStyle.m_oMargin.Clear();
}
}
oStyle.SetID(CalculateStyleId(arSelectors.back()));
if (!oStyle.Empty())
m_mUsedStyles[arSelectors] = oStyle;
return true;
}
std::wstring CCssCalculator_Private::CalculateStyleId(const CNode& oNode)
{
return oNode.m_wsName + ((!oNode.m_wsClass.empty()) ? L'.' + oNode.m_wsClass : L"") + ((oNode.m_wsId.empty()) ? L"" : L'#' + oNode.m_wsId) + L'-' + std::to_wstring(++m_nCountNodes);
@ -766,6 +790,11 @@ namespace NSCSS
return m_nDpi;
}
bool CCssCalculator_Private::HaveStylesById(const std::wstring& wsId) const
{
return nullptr != m_oStyleStorage.FindElement(L'#' + wsId);
}
void CCssCalculator_Private::ClearEmbeddedStyles()
{
m_oStyleStorage.ClearEmbeddedStyles();
@ -910,4 +939,11 @@ inline static std::wstring StringifyValue(const KatanaValue* oValue)
return str;
}
inline static bool IsTableElement(const std::wstring& wsNameTag)
{
return L"td" == wsNameTag || L"tr" == wsNameTag || L"table" == wsNameTag ||
L"tbody" == wsNameTag || L"thead" == wsNameTag || L"tfoot" == wsNameTag ||
L"th" == wsNameTag;
}

View File

@ -37,7 +37,7 @@ namespace NSCSS
void ClearPageData();
#endif
const CElement* FindElement(const std::wstring& wsSelector);
const CElement* FindElement(const std::wstring& wsSelector) const;
private:
typedef struct
{
@ -77,7 +77,7 @@ namespace NSCSS
void GetOutputData(KatanaOutput* oOutput, std::map<std::wstring, CElement*>& mStyleData);
const CElement* FindSelectorFromStyleData(const std::wstring& wsSelector, const std::map<std::wstring, CElement*>& mStyleData);
const CElement* FindSelectorFromStyleData(const std::wstring& wsSelector, const std::map<std::wstring, CElement*>& mStyleData) const;
};
class CCssCalculator_Private
@ -102,8 +102,7 @@ namespace NSCSS
~CCssCalculator_Private();
#ifdef CSS_CALCULATOR_WITH_XHTML
CCompiledStyle GetCompiledStyle(const std::vector<CNode> &arSelectors);
bool GetCompiledStyle(CCompiledStyle& oStyle, const std::vector<CNode> &arSelectors);
bool CalculateCompiledStyle(std::vector<CNode>& arSelectors);
std::wstring CalculateStyleId(const CNode& oNode);
bool CalculatePageStyle(NSProperties::CPage& oPageData, const std::vector<CNode> &arSelectors);
@ -111,7 +110,7 @@ namespace NSCSS
void ClearPageData();
#endif
std::vector<std::wstring> CalculateAllNodes(const std::vector<CNode>& arSelectors);
std::vector<std::wstring> CalculateAllNodes(const std::vector<CNode>& arSelectors, unsigned int unStart = 0);
std::vector<const CElement*> FindElements(std::vector<std::wstring>& arNodes, std::vector<std::wstring>& arNextNodes);
void AddStyles(const std::string& sStyle);
@ -123,6 +122,8 @@ namespace NSCSS
std::wstring GetEncoding() const;
unsigned short int GetDpi() const;
bool HaveStylesById(const std::wstring& wsId) const;
void ClearEmbeddedStyles();
void ClearAllowedStyleFiles();
void ClearStylesFromFile(const std::wstring& wsFilePath);

View File

@ -1,19 +1,58 @@
#include "CNode.h"
#ifdef CSS_CALCULATOR_WITH_XHTML
#include "CCompiledStyle.h"
#endif
namespace NSCSS
{
CNode::CNode()
#ifdef CSS_CALCULATOR_WITH_XHTML
: m_pCompiledStyle(new CCompiledStyle())
#endif
{}
CNode::CNode(const CNode& oNode)
: m_wsName(oNode.m_wsName), m_wsClass(oNode.m_wsClass), m_wsId(oNode.m_wsId),
m_wsStyle(oNode.m_wsStyle), m_mAttributes(oNode.m_mAttributes)
{
#ifdef CSS_CALCULATOR_WITH_XHTML
m_pCompiledStyle = new CCompiledStyle();
*m_pCompiledStyle = *oNode.m_pCompiledStyle;
#endif
}
CNode::CNode(const std::wstring& wsName, const std::wstring& wsClass, const std::wstring& wsId)
: m_wsName(wsName), m_wsClass(wsClass), m_wsId(wsId)
#ifdef CSS_CALCULATOR_WITH_XHTML
, m_pCompiledStyle(new CCompiledStyle())
#endif
{}
CNode::~CNode()
{
#ifdef CSS_CALCULATOR_WITH_XHTML
if (nullptr != m_pCompiledStyle)
delete m_pCompiledStyle;
#endif
}
bool CNode::Empty() const
{
return m_wsName.empty() && m_wsClass.empty() && m_wsId.empty() && m_wsStyle.empty();
}
#ifdef CSS_CALCULATOR_WITH_XHTML
void CNode::SetCompiledStyle(CCompiledStyle* pCompiledStyle)
{
if (nullptr != m_pCompiledStyle)
delete m_pCompiledStyle;
m_pCompiledStyle = new CCompiledStyle();
*m_pCompiledStyle = *pCompiledStyle;
}
#endif
void CNode::Clear()
{
m_wsName .clear();

View File

@ -7,6 +7,9 @@
namespace NSCSS
{
#ifdef CSS_CALCULATOR_WITH_XHTML
class CCompiledStyle;
#endif
class CNode
{
public:
@ -16,12 +19,21 @@ namespace NSCSS
std::wstring m_wsStyle; // Стиль тэга
std::map<std::wstring, std::wstring> m_mAttributes; // Остальные аттрибуты тэга
#ifdef CSS_CALCULATOR_WITH_XHTML
CCompiledStyle *m_pCompiledStyle;
#endif
public:
CNode();
CNode(const CNode& oNode);
CNode(const std::wstring& wsName, const std::wstring& wsClass, const std::wstring& wsId);
~CNode();
bool Empty() const;
#ifdef CSS_CALCULATOR_WITH_XHTML
void SetCompiledStyle(CCompiledStyle* pCompiledStyle);
#endif
void Clear();
std::vector<std::wstring> GetData() const;

View File

@ -1328,8 +1328,14 @@ namespace NSCSS
// DISPLAY
CDisplay::CDisplay()
: m_oDisplay(L"inline", 0)
{}
{
m_eWhiteSpace.SetMapping({{L"normal", EWhiteSpace::Normal },
{L"nowrap", EWhiteSpace::Nowrap },
{L"pre", EWhiteSpace::Pre },
{L"pre-line", EWhiteSpace::Pre_Line},
{L"pre-wrap", EWhiteSpace::Pre_Wrap}},
EWhiteSpace::Normal);
}
void CDisplay::Equation(CDisplay &oFirstDisplay, CDisplay &oSecondDisplay)
{
@ -1342,6 +1348,8 @@ namespace NSCSS
CString::Equation(oFirstDisplay.m_oHAlign, oSecondDisplay.m_oHAlign);
CString::Equation(oFirstDisplay.m_oDisplay, oSecondDisplay.m_oDisplay);
CEnum::Equation(oFirstDisplay.m_eWhiteSpace, oSecondDisplay.m_eWhiteSpace);
}
bool CDisplay::SetX(const std::wstring &wsValue, unsigned int unLevel, bool bHardMode)
@ -1405,6 +1413,11 @@ namespace NSCSS
return m_oDisplay.SetValue(wsValue, NSConstValues::DISPLAY_VALUES, unLevel, bHardMode);
}
bool CDisplay::SetWhiteSpace(const std::wstring& wsValue, unsigned int unLevel, bool bHardMode)
{
return m_eWhiteSpace.SetValue(wsValue, unLevel, bHardMode);
}
const CDigit& CDisplay::GetX() const
{
return m_oX;
@ -1440,34 +1453,42 @@ namespace NSCSS
return m_oDisplay;
}
const CEnum& CDisplay::GetWhiteSpace() const
{
return m_eWhiteSpace;
}
bool CDisplay::Empty() const
{
return m_oX.Empty() && m_oY.Empty() && m_oWidth.Empty() && m_oHeight.Empty() &&
m_oHeight.Empty() && m_oVAlign.Empty() && m_oDisplay.Empty();
m_oHeight.Empty() && m_oVAlign.Empty() && m_oDisplay.Empty() &&
(m_eWhiteSpace.Empty() || m_eWhiteSpace == EWhiteSpace::Normal);
}
CDisplay &CDisplay::operator+=(const CDisplay &oDisplay)
{
m_oX += oDisplay.m_oX;
m_oY += oDisplay.m_oY;
m_oWidth = oDisplay.m_oWidth;
m_oHeight = oDisplay.m_oHeight;
m_oHAlign += oDisplay.m_oHAlign;
m_oVAlign += oDisplay.m_oVAlign;
m_oDisplay += oDisplay.m_oDisplay;
m_oX += oDisplay.m_oX;
m_oY += oDisplay.m_oY;
m_oWidth = oDisplay.m_oWidth;
m_oHeight = oDisplay.m_oHeight;
m_oHAlign += oDisplay.m_oHAlign;
m_oVAlign += oDisplay.m_oVAlign;
m_oDisplay += oDisplay.m_oDisplay;
m_eWhiteSpace += oDisplay.m_eWhiteSpace;
return *this;
}
bool CDisplay::operator==(const CDisplay &oDisplay) const
{
return m_oX == oDisplay.m_oX &&
m_oY == oDisplay.m_oY &&
m_oWidth == oDisplay.m_oWidth &&
m_oHeight == oDisplay.m_oHeight &&
m_oHAlign == oDisplay.m_oHAlign &&
m_oVAlign == oDisplay.m_oVAlign &&
m_oDisplay == oDisplay.m_oDisplay;
return m_oX == oDisplay.m_oX &&
m_oY == oDisplay.m_oY &&
m_oWidth == oDisplay.m_oWidth &&
m_oHeight == oDisplay.m_oHeight &&
m_oHAlign == oDisplay.m_oHAlign &&
m_oVAlign == oDisplay.m_oVAlign &&
m_oDisplay == oDisplay.m_oDisplay &&
m_eWhiteSpace == oDisplay.m_eWhiteSpace.ToInt();
}
// STROKE

View File

@ -328,6 +328,15 @@ namespace NSCSS
};
// PROPERTIES
typedef enum
{
Normal,
Nowrap,
Pre,
Pre_Line,
Pre_Wrap
} EWhiteSpace;
class CDisplay
{
public:
@ -347,6 +356,8 @@ namespace NSCSS
bool SetDisplay(const std::wstring& wsValue, unsigned int unLevel, bool bHardMode = false);
bool SetWhiteSpace(const std::wstring& wsValue, unsigned int unLevel, bool bHardMode = false);
const CDigit& GetX() const;
const CDigit& GetY() const;
const CDigit& GetWidth() const;
@ -357,6 +368,8 @@ namespace NSCSS
const CString& GetDisplay() const;
const CEnum& GetWhiteSpace() const;
bool Empty() const;
CDisplay& operator+=(const CDisplay& oDisplay);
@ -371,6 +384,8 @@ namespace NSCSS
CString m_oVAlign;
CString m_oDisplay;
CEnum m_eWhiteSpace;
};
class CStroke

View File

@ -22,10 +22,10 @@ namespace NSCSS
: m_oStyle(oStyle), m_bIsPStyle(bIsPStyle)
{}
bool CheckArrays(const std::vector<std::wstring>& arInitial, const std::set<std::wstring>& arFirst, const std::set<std::wstring>& arSecond)
bool CheckArrays(const std::vector<std::wstring>& arInitial, const std::set<std::wstring>& arFirst, const std::set<std::wstring>& arSecond)
{
std::unordered_set<std::wstring> arInitialSet(arInitial.begin(), arInitial.end());
std::vector<std::wstring> arCommonElements1;
std::vector<std::wstring> arCommonElements2;
@ -470,9 +470,6 @@ namespace NSCSS
int nSpace{0};
if (NULL != pPadding && !pPadding->Empty() && !pPadding->Zero())
nSpace = pPadding->ToInt(NSCSS::Point);
return L"w:val=\"" + wsStyle + L"\" w:sz=\"" + std::to_wstring(nWidth) + + L"\" w:space=\"" + std::to_wstring(nSpace) + L"\" w:color=\"" + wsColor + L"\"";
}
@ -559,7 +556,7 @@ namespace NSCSS
if (oXmlElement.Empty())
return false;
m_sStyle += oXmlElement.GetPStyle(true);
return true;
}

View File

@ -15,6 +15,10 @@
#include "../../../UnicodeConverter/UnicodeConverter.h"
#include "../../../HtmlFile2/src/StringFinder.h"
#if defined(CreateDirectory)
#undef CreateDirectory
#endif
static std::string nonbreaking_inline = "|a|abbr|acronym|b|bdo|big|cite|code|dfn|em|font|i|img|kbd|nobr|s|small|span|strike|strong|sub|sup|tt|";
static std::string empty_tags = "|area|base|basefont|bgsound|br|command|col|embed|event-source|frame|hr|image|img|input|keygen|link|menuitem|meta|param|source|spacer|track|wbr|";
static std::string preserve_whitespace = "|pre|textarea|script|style|";
@ -68,10 +72,10 @@ static std::wstring htmlToXhtml(std::string& sFileContent, bool bNeedConvert)
{
if (bNeedConvert)
{ // Определение кодировки
std::string sEncoding = NSStringFinder::FindPropety(sFileContent, "charset", {"="}, {";", "\\n", "\\r", " ", "\""}).m_sValue;
std::string sEncoding = NSStringFinder::FindProperty(sFileContent, "charset", {"="}, {";", "\\n", "\\r", " ", "\"", "'"}).m_sValue;
if (sEncoding.empty())
sEncoding = NSStringFinder::FindPropety(sFileContent, "encoding", {"="}, {";", "\\n", "\\r", " "}).m_sValue;
sEncoding = NSStringFinder::FindProperty(sFileContent, "encoding", {"="}, {";", "\\n", "\\r", " "}).m_sValue;
if (!sEncoding.empty() && !NSStringFinder::Equals("utf-8", sEncoding))
{
@ -210,7 +214,7 @@ static void ReadMht(const std::string& sMhtContent, std::map<std::string, std::s
NSStringFinder::TFoundedData<char> oData;
// Content-Type
oData = NSStringFinder::FindPropety(sMhtContent, "content-type", {":"}, {";", "\\n", "\\r"});
oData = NSStringFinder::FindProperty(sMhtContent, "content-type", {":"}, {";", "\\n", "\\r"});
const std::string sContentType{oData.m_sValue};
if (sContentType.empty())
@ -226,18 +230,18 @@ static void ReadMht(const std::string& sMhtContent, std::map<std::string, std::s
unCharsetBegin = oData.m_unEndPosition;
// name
// std::string sName = NSStringFinder::FindPropety(sMhtContent, "name", {"="}, {";", "\\n", "\\r"}, 0, unLastPosition);
// std::string sName = NSStringFinder::FindProperty(sMhtContent, "name", {"="}, {";", "\\n", "\\r"}, 0, unLastPosition);
// unContentPosition = std::max(unContentPosition, unLastPosition);
// Content-Location
oData = NSStringFinder::FindPropety(sMhtContent, "content-location", {":"}, {";", "\\n", "\\r"});
oData = NSStringFinder::FindProperty(sMhtContent, "content-location", {":"}, {";", "\\n", "\\r"});
std::string sContentLocation{oData.m_sValue};
if (!oData.Empty())
unContentPosition = std::max(unContentPosition, oData.m_unEndPosition);
// Content-ID
oData = NSStringFinder::FindPropety(sMhtContent, "content-id", {":"}, {";", "\\n", "\\r"});
oData = NSStringFinder::FindProperty(sMhtContent, "content-id", {":"}, {";", "\\n", "\\r"});
std::string sContentID{oData.m_sValue};
if (!oData.Empty())
@ -251,7 +255,7 @@ static void ReadMht(const std::string& sMhtContent, std::map<std::string, std::s
sContentLocation = "cid:" + sContentID;
// Content-Transfer-Encoding
oData = NSStringFinder::FindPropety(sMhtContent, "content-transfer-encoding", {":"}, {";", "\\n", "\\r"});
oData = NSStringFinder::FindProperty(sMhtContent, "content-transfer-encoding", {":"}, {";", "\\n", "\\r"});
const std::string sContentEncoding{oData.m_sValue};
if (!oData.Empty())
@ -265,7 +269,7 @@ static void ReadMht(const std::string& sMhtContent, std::map<std::string, std::s
if (std::string::npos != unCharsetEnd && unCharsetBegin < unCharsetEnd)
{
sCharset = NSStringFinder::FindPropety(sMhtContent.substr(unCharsetBegin, unCharsetEnd - unCharsetBegin), "charset", {"="}, {";", "\\n", "\\r"}).m_sValue;
sCharset = NSStringFinder::FindProperty(sMhtContent.substr(unCharsetBegin, unCharsetEnd - unCharsetBegin), "charset", {"="}, {";", "\\n", "\\r"}).m_sValue;
NSStringFinder::CutInside<std::string>(sCharset, "\"");
}
@ -337,7 +341,7 @@ static std::string mhtTohtml(const std::string& sFileContent)
NSStringUtils::CStringBuilderA oRes;
// Поиск boundary
NSStringFinder::TFoundedData<char> oData{NSStringFinder::FindPropety(sFileContent, "boundary", {"="}, {"\\r", "\\n", "\""})};
NSStringFinder::TFoundedData<char> oData{NSStringFinder::FindProperty(sFileContent, "boundary", {"="}, {"\\r", "\\n", "\""})};
size_t nFound{oData.m_unEndPosition};
std::string sBoundary{oData.m_sValue};
@ -436,17 +440,17 @@ static void substitute_xml_entities_into_text(std::string& text)
}
// After running through Gumbo, the values of type "&#1;" are replaced with the corresponding code '0x01'
// Since the attribute value does not use control characters (value <= 0x1F),
// Since the attribute value does not use control characters (value <= 0x09),
// then just delete them, otherwise XmlUtils::CXmlLiteReader crashes on them.
// bug#73486
static void remove_control_symbols(std::string& text)
{
std::string::iterator itFound = std::find_if(text.begin(), text.end(), [](char chValue){ return chValue <= 0x1F; });
std::string::iterator itFound = std::find_if(text.begin(), text.end(), [](unsigned char chValue){ return chValue <= 0x09; });
while (itFound != text.end())
{
itFound = text.erase(itFound);
itFound = std::find_if(itFound, text.end(), [](char chValue){ return chValue <= 0x1F; });
itFound = std::find_if(itFound, text.end(), [](unsigned char chValue){ return chValue <= 0x09; });
}
}
@ -489,6 +493,7 @@ static void build_doctype(GumboNode* node, NSStringUtils::CStringBuilderA& oBuil
oBuilder.WriteString("<!DOCTYPE ");
oBuilder.WriteString(node->v.document.name);
std::string pi(node->v.document.public_identifier);
remove_control_symbols(pi);
if ((node->v.document.public_identifier != NULL) && !pi.empty())
{
oBuilder.WriteString(" PUBLIC \"");
@ -509,6 +514,10 @@ static void build_attributes(const GumboVector* attribs, NSStringUtils::CStringB
GumboAttribute* at = static_cast<GumboAttribute*>(attribs->data[i]);
std::string sVal(at->value);
std::string sName(at->name);
remove_control_symbols(sVal);
remove_control_symbols(sName);
atts.WriteString(" ");
bool bCheck = false;
@ -569,6 +578,7 @@ static void prettyprint_contents(GumboNode* node, NSStringUtils::CStringBuilderA
if (child->type == GUMBO_NODE_TEXT)
{
std::string val(child->v.text.text);
remove_control_symbols(val);
substitute_xml_entities_into_text(val);
// Избавление от FF
@ -608,6 +618,7 @@ static void prettyprint(GumboNode* node, NSStringUtils::CStringBuilderA& oBuilde
}
std::string tagname = get_tag_name(node);
remove_control_symbols(tagname);
if (NodeIsUnprocessed(tagname))
return;

View File

@ -0,0 +1,43 @@
import os
import glob
import json
import subprocess
curDirectory = os.path.dirname(os.path.realpath(__file__))
dictionatiesDirectory = curDirectory + "/../../../../../dictionaries"
all_dictionaties = {}
for dir in glob.glob(dictionatiesDirectory + "/*"):
if not os.path.isdir(dir):
continue
dictionaryName = os.path.basename(dir)
configFile = dictionatiesDirectory + "/" + dictionaryName + "/" + dictionaryName + ".json"
if not os.path.isfile(configFile):
continue
isHyphen = False
hyphenFile = dictionatiesDirectory + "/" + dictionaryName + "/hyph_" + dictionaryName + ".dic"
if os.path.isfile(hyphenFile):
isHyphen = True
with open(configFile, 'r', encoding='utf-8') as file:
data = json.loads(file.read())
for lang in data["codes"]:
all_dictionaties[str(lang)] = {
"name": dictionaryName,
"hyphen": isHyphen
}
content = ""
content += "#define DictionaryRec_count " + str(len(all_dictionaties)) + "\n"
content += "typedef struct {\n"
content += " const char* m_name;\n"
content += " int m_lang;\n"
content += "} DictionaryRec;\n\n"
content += "static const DictionaryRec Dictionaries[DictionaryRec_count] = {\n"
for lang in all_dictionaties:
info = all_dictionaties[lang]
content += " { \"" + info["name"] + "\", " + str(lang) + " },\n"
content += "};\n"
with open("./records.h", 'w', encoding='utf-8') as f:
f.write(content)

View File

@ -0,0 +1,73 @@
#define DictionaryRec_count 65
typedef struct {
const char* m_name;
int m_lang;
} DictionaryRec;
static const DictionaryRec Dictionaries[DictionaryRec_count] = {
{ "ar", 1025 },
{ "ar", 2049 },
{ "ar", 3073 },
{ "ar", 4097 },
{ "ar", 5121 },
{ "ar", 6145 },
{ "ar", 7169 },
{ "ar", 8193 },
{ "ar", 9217 },
{ "ar", 10241 },
{ "ar", 11265 },
{ "ar", 12289 },
{ "ar", 13313 },
{ "ar", 14337 },
{ "ar", 15361 },
{ "ar", 16385 },
{ "az_Latn_AZ", 1068 },
{ "bg_BG", 1026 },
{ "ca_ES", 1027 },
{ "ca_ES_valencia", 2051 },
{ "cs_CZ", 1029 },
{ "da_DK", 1030 },
{ "de_AT", 3079 },
{ "de_CH", 2055 },
{ "de_DE", 1031 },
{ "el_GR", 1032 },
{ "en_AU", 3081 },
{ "en_CA", 4105 },
{ "en_GB", 2057 },
{ "en_US", 1033 },
{ "en_ZA", 7177 },
{ "es_ES", 3082 },
{ "eu_ES", 1069 },
{ "fr_FR", 1036 },
{ "gl_ES", 1110 },
{ "hr_HR", 1050 },
{ "hu_HU", 1038 },
{ "id_ID", 1057 },
{ "it_IT", 1040 },
{ "kk_KZ", 1087 },
{ "ko_KR", 1042 },
{ "lb_LU", 1134 },
{ "lt_LT", 1063 },
{ "lv_LV", 1062 },
{ "mn_MN", 1104 },
{ "nb_NO", 1044 },
{ "nl_NL", 1043 },
{ "nl_NL", 2067 },
{ "nn_NO", 2068 },
{ "oc_FR", 1154 },
{ "pl_PL", 1045 },
{ "pt_BR", 1046 },
{ "pt_PT", 2070 },
{ "ro_RO", 1048 },
{ "ru_RU", 1049 },
{ "sk_SK", 1051 },
{ "sl_SI", 1060 },
{ "sr_Cyrl_RS", 10266 },
{ "sr_Latn_RS", 9242 },
{ "sv_SE", 1053 },
{ "tr_TR", 1055 },
{ "uk_UA", 1058 },
{ "uz_Cyrl_UZ", 2115 },
{ "uz_Latn_UZ", 1091 },
{ "vi_VN", 1066 },
};

View File

@ -1,4 +1,4 @@
ICU_MAJOR_VER = 58
ICU_MAJOR_VER = 74
core_windows {
exists($$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/icu) {
@ -20,8 +20,15 @@ core_linux {
core_mac {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/include
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicuuc.$${ICU_MAJOR_VER}.dylib
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicudata.$${ICU_MAJOR_VER}.dylib
ICU_LIBS_PATH_MAC = $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build
bundle_dylibs {
LIBS += $$ICU_LIBS_PATH_MAC/libicudata.a
LIBS += $$ICU_LIBS_PATH_MAC/libicui18n.a
LIBS += $$ICU_LIBS_PATH_MAC/libicuuc.a
} else {
LIBS += $$ICU_LIBS_PATH_MAC/libicuuc.$${ICU_MAJOR_VER}.dylib
LIBS += $$ICU_LIBS_PATH_MAC/libicudata.$${ICU_MAJOR_VER}.dylib
}
}
core_ios {

View File

@ -1,7 +1,5 @@
#!/bin/bash
ICU_VERSION="58"
ICU_DIR="$PWD/icu"
ICU_SOURCE="${ICU_DIR}/source"
@ -47,8 +45,6 @@ defines_utypes=(
function prebuild() {
svn export http://source.icu-project.org/repos/icu/tags/release-${ICU_VERSION}/icu4c/ ${ICU_DIR} --native-eol LF
echo "===== REMOVING data from bundle ====="
#Data bundle reduction

4
Common/3dParty/md/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
md4c
# Except this file
!.gitignore

View File

@ -0,0 +1,13 @@
#!/usr/bin/env python
import sys
sys.path.append('../../../../build_tools/scripts')
import config
import base
import os
base_directory = os.getcwd()
if not base.is_dir("md4c"):
base.cmd("git", ["clone", "https://github.com/mity/md4c.git"])
base.cmd_in_dir("md4c", "git", ["checkout", "481fbfbdf72daab2912380d62bb5f2187d438408"])

View File

@ -0,0 +1,105 @@
#include "md2html.h"
#include "md4c/src/md4c-html.h"
#include "../../../DesktopEditor/common/File.h"
namespace Md
{
void ToHtml(const MD_CHAR* pValue, MD_SIZE uSize, void* pData)
{
if (NULL != pData)
(*(std::string*)pData).append(pValue, uSize);
}
std::string ConvertMdStringToHtml(const std::string& sMdString)
{
std::string sData;
md_html(sMdString.c_str(), sMdString.length(), ToHtml, &sData, 0, 0);
return sData;
}
void ToHtmlFile(const MD_CHAR* pValue, MD_SIZE uSize, void* pData)
{
if (NULL != pData)
((NSFile::CFileBinary*)pData)->WriteFile(pValue, uSize);
}
void WriteBaseHtmlStyles(NSFile::CFileBinary& oFile)
{
oFile.WriteStringUTF8(L"<style>");
// Main styles
oFile.WriteStringUTF8(L"* { font-family: Arial; color:black; white-space:pre; }");
oFile.WriteStringUTF8(L"p { margin: 0 0 10px; display: block; }");
oFile.WriteStringUTF8(L"a { color: #0553c1; text-decoration: underline; } a:visited { color: #954f72; text-decoration: underline; }");
oFile.WriteStringUTF8(L"ul { margin-top: 0; margin-bottom: 10px; }");
oFile.WriteStringUTF8(L"img { vertical-align: middle; }");
// Styles for tables
oFile.WriteStringUTF8(L"table { margin-bottom: 20px; width: 100%; max-width: 100%; border-spacing:0; border-collapse: collapse; border-color: gray;}");
oFile.WriteStringUTF8(L"thead { display: table-header-group; vertical-align: middle; }");
oFile.WriteStringUTF8(L"tr { display: table-row; }");
oFile.WriteStringUTF8(L"th { text-align: left; display: table-cell; font-weight: bold; }");
oFile.WriteStringUTF8(L"table thead tr th { vertical-align: bottom; border-bottom: 2px solid #ddd; }");
oFile.WriteStringUTF8(L"table thead tr th, table tbody tr th, table thead tr td, table tbody tr td { padding 8px; line-height: 1.4; vertical-align: top; border-top: 1px solid #ddd; }");
oFile.WriteStringUTF8(L"table > caption + thead > tr > th, table > colgroup + thead > tr > th, table > thead > tr > th, table > caption + thead > tr > td, table > colgroup + thead > tr > td, table > thead > tr > td { border-top: 0; }");
// Styles for blockquote
oFile.WriteStringUTF8(L"blockquote { border-left: 3px solid #e9e9e9; margin: 1.5em 0; padding: 0.5em 10px 0.5em 24px; font-size: 1.25rem; display: block; margin-top: 8pt; font-style: italic; color: #404040; }");
// Styles for code
oFile.WriteStringUTF8(L"code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; }");
oFile.WriteStringUTF8(L"pre code { padding: 0px; white-space: pre-wrap; border-radius: 0; background-color: #f5f5f5; color:black; }");
oFile.WriteStringUTF8(L"pre { display: block; padding: 9.5px; margin: 0 0 10px; line-height: 1.4; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; }");
oFile.WriteStringUTF8(L"code, pre { font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; }");
// Styles for headings
oFile.WriteStringUTF8(L"h1 { font-size: 20pt; color: #0f4761; margin-top: 18pt; margin-bottom: 4pt; }");
oFile.WriteStringUTF8(L"h2 { font-size: 16pt; color: #0f4761; margin-top: 8pt; margin-bottom: 4pt; }");
oFile.WriteStringUTF8(L"h3 { font-size: 14pt; color: #0f4761; margin-top: 8pt; margin-bottom: 4pt; }");
oFile.WriteStringUTF8(L"h4 { font-style: italic; color: #0f4761; margin-top: 4pt; margin-bottom: 2pt; }");
oFile.WriteStringUTF8(L"h5 { color: #0f4761; margin-top: 4pt; margin-bottom: 2pt; }");
oFile.WriteStringUTF8(L"h6 { font-style: italic; color: #595959; margin-top: 2pt; margin-bottom: 0; }");
oFile.WriteStringUTF8(L"</style>");
}
bool ConvertMdFileToHtml(const std::wstring& wsPathToMdFile, const std::wstring& wsPathToHtmlFile)
{
std::string sMdData;
if (!NSFile::CFileBinary::ReadAllTextUtf8A(wsPathToMdFile, sMdData))
return false;
NSFile::CFileBinary oFile;
if (!oFile.CreateFile(wsPathToHtmlFile))
return false;
oFile.WriteStringUTF8(L"<html><body>");
oFile.WriteStringUTF8(L"<head>");
//oFile.WriteStringUTF8(L"<meta charset=\"UTF-8\">");
oFile.WriteStringUTF8(L"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
WriteBaseHtmlStyles(oFile);
oFile.WriteStringUTF8(L"</head>");
bool bResult = true;
if (0 != md_html(sMdData.c_str(), sMdData.length(), ToHtmlFile, &oFile,
MD_DIALECT_GITHUB | MD_FLAG_NOINDENTEDCODEBLOCKS | MD_HTML_FLAG_SKIP_UTF8_BOM,
0))
bResult = false;
oFile.WriteStringUTF8(L"</body></html>");
oFile.CloseFile();
if (!bResult)
NSFile::CFileBinary::Remove(wsPathToHtmlFile);
return bResult;
}
}

View File

@ -0,0 +1,19 @@
#ifndef MD2HTML_H
#define MD2HTML_H
#include <string>
#ifndef MDCONVERTER_DECL_EXPORT
#define MDCONVERTER_DECL_EXPORT
#else
#include "../../../DesktopEditor/common/base_export.h"
#define MDCONVERTER_DECL_EXPORT Q_DECL_EXPORT
#endif
namespace Md
{
std::string MDCONVERTER_DECL_EXPORT ConvertMdStringToHtml(const std::string& sMdString);
bool MDCONVERTER_DECL_EXPORT ConvertMdFileToHtml(const std::wstring& wsPathToMdFile, const std::wstring& wsPathToHtmlFile);
}
#endif // MD2HTML_H

View File

@ -0,0 +1,11 @@
DEFINES += MD4C_USE_UTF8
HEADERS += $$PWD/md4c/src/md4c.h \
$$PWD/md4c/src/md4c-html.h \
$$PWD/md4c/src/entity.h \
$$PWD/md2html.h \
SOURCES += $$PWD/md4c/src/md4c.c \
$$PWD/md4c/src/md4c-html.c \
$$PWD/md4c/src/entity.c \
$$PWD/md2html.cpp

View File

@ -0,0 +1,16 @@
QT -= core
QT -= gui
TARGET = test
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CORE_ROOT_DIR = $$PWD/../../../../
SOURCES += main.cpp
include($$CORE_ROOT_DIR/Common/3dParty/md/md2html.pri)
DESTDIR = $$PWD/build/$$CORE_BUILDS_PLATFORM_PREFIX

View File

@ -0,0 +1 @@
* foo **bar [link](http://example.com) baz**

View File

@ -0,0 +1,10 @@
#include <iostream>
#include "../md2html.h"
int main(int argc, char *argv[])
{
std::cout << (ConvertMdFileToHtml(L"YOUR_PATH", L"YOUR_PATH") ? "Good" : "Bad") << std::endl;
return 0;
}

View File

@ -34,6 +34,8 @@
#include "../../../../DesktopEditor/common/StringExt.h"
#include <wininet.h>
#include <objbase.h>
#include <urlmon.h>
#pragma comment(lib, "Wininet")
#pragma comment(lib, "Ole32.lib")

View File

@ -103,9 +103,11 @@ public:
bool isBinaryDoctFormatFile(unsigned char* pBuffer, int dwBytes);
bool isBinaryXlstFormatFile(unsigned char* pBuffer, int dwBytes);
bool isBinaryPpttFormatFile(unsigned char* pBuffer, int dwBytes);
bool isBinaryVsdtFormatFile(unsigned char* pBuffer, int dwBytes);
bool isDjvuFormatFile(unsigned char* pBuffer, int dwBytes);
bool isMobiFormatFile(unsigned char* pBuffer, int dwBytes);
bool isFB2FormatFile(unsigned char* pBuffer, int dwBytes);
bool isXpsFile(const std::wstring& fileName);
bool isOFDFile(const std::wstring& fileName);
};

View File

@ -44,6 +44,7 @@
#include "3dParty/pole/pole.h"
#include <algorithm>
#include <limits>
#include "OfficeFileFormatDefines.h"
@ -222,6 +223,16 @@ bool COfficeFileFormatChecker::isBinaryPpttFormatFile(unsigned char *pBuffer, in
return false;
}
bool COfficeFileFormatChecker::isBinaryVsdtFormatFile(unsigned char* pBuffer, int dwBytes)
{
if (pBuffer == NULL)
return false;
if ((4 <= dwBytes) && ('V' == pBuffer[0] && 'S' == pBuffer[1] && 'D' == pBuffer[2] && 'Y' == pBuffer[3]))
return true;
return false;
}
bool COfficeFileFormatChecker::isPdfFormatFile(unsigned char *pBuffer, int dwBytes, std::wstring &documentID)
{
if (pBuffer == NULL)
@ -229,7 +240,7 @@ bool COfficeFileFormatChecker::isPdfFormatFile(unsigned char *pBuffer, int dwByt
documentID.clear();
if (dwBytes < 1)
if (dwBytes < 5 || (pBuffer[0] == 'P' && pBuffer[1] == 'K'))
return false;
pBuffer[dwBytes - 1] = '\0';
@ -786,6 +797,13 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring &_fileName)
bufferDetect = NULL;
return true;
}
else if (isOFDFile(fileName))
{
if (bufferDetect)
delete[] bufferDetect;
bufferDetect = NULL;
return true;
}
else if (isMacFormatFile(fileName))
{
if (bufferDetect)
@ -816,6 +834,10 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring &_fileName)
{
nFileType = AVS_OFFICESTUDIO_FILE_CANVAS_PRESENTATION;
}
else if (isBinaryVsdtFormatFile(bufferDetect, sizeRead)) // min size - 4
{
nFileType = AVS_OFFICESTUDIO_FILE_CANVAS_DRAW;
}
else if (isOOXFlatFormatFile(bufferDetect, sizeRead))
{
// nFileType;
@ -915,6 +937,8 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring &_fileName)
}
else if (0 == sExt.compare(L".mht") || 0 == sExt.compare(L".mhtml"))
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_MHT;
else if (0 == sExt.compare(L".md"))
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_MD;
else if (0 == sExt.compare(L".csv") || 0 == sExt.compare(L".xls") || 0 == sExt.compare(L".xlsx") || 0 == sExt.compare(L".xlsb"))
nFileType = AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV;
else if (0 == sExt.compare(L".html") || 0 == sExt.compare(L".htm"))
@ -923,7 +947,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring &_fileName)
nFileType = AVS_OFFICESTUDIO_FILE_CANVAS_PDF;
else if (0 == sExt.compare(L".doct")) // случай архива с html viewer
nFileType = AVS_OFFICESTUDIO_FILE_TEAMLAB_DOCY;
else if (0 == sExt.compare(L".txt") || 0 == sExt.compare(L".xml") || 0 == sExt.compare(L".rtf") || 0 == sExt.compare(L".doc") || 0 == sExt.compare(L".docx") || 0 == sExt.compare(L".md"))
else if (0 == sExt.compare(L".txt") || 0 == sExt.compare(L".xml") || 0 == sExt.compare(L".rtf") || 0 == sExt.compare(L".doc") || 0 == sExt.compare(L".docx"))
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_TXT;
else if (0 == sExt.compare(L".pages"))
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_PAGES;
@ -1150,6 +1174,10 @@ bool COfficeFileFormatChecker::isOnlyOfficeFormatFile(const std::wstring &fileNa
{
nFileType = AVS_OFFICESTUDIO_FILE_TEAMLAB_PPTY;
}
else if (isBinaryVsdtFormatFile(pBuffer, nBufferSize))
{
nFileType = AVS_OFFICESTUDIO_FILE_TEAMLAB_VSDY;
}
delete[] pBuffer;
pBuffer = NULL;
@ -1573,12 +1601,15 @@ bool COfficeFileFormatChecker::isOOXFlatFormatFile(unsigned char *pBuffer, int d
const char *xlsxPackage = "progid=\"Excel.Sheet\"";
const char *pptxPackage = "progid=\"PowerPoint.Show\"";
const char *packageFormatLine = "xmlns:pkg=\"http://schemas.microsoft.com/office/2006/xmlPackage\"";
const char* workbookFormatLine = "<Workbook";
const char* htmlFormatLine = "<html";
if (std::string::npos != xml_string.find(docxFormatLine))
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX_FLAT;
}
else if (std::string::npos != xml_string.find(xlsxFormatLine))
else if (std::string::npos != xml_string.find(xlsxFormatLine) && ( std::string::npos != xml_string.find(workbookFormatLine) ||
std::string::npos == xml_string.find(htmlFormatLine)))
{
nFileType = AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX_FLAT;
}
@ -1639,6 +1670,14 @@ std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
return L".fodt";
case AVS_OFFICESTUDIO_FILE_DOCUMENT_OTT:
return L".ott";
case AVS_OFFICESTUDIO_FILE_DOCUMENT_PAGES:
return L".pages";
case AVS_OFFICESTUDIO_FILE_DOCUMENT_HWP:
return L".hwp";
case AVS_OFFICESTUDIO_FILE_DOCUMENT_HWPX:
return L".hwpx";
case AVS_OFFICESTUDIO_FILE_DOCUMENT_MD:
return L".md";
case AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX:
return L".pptx";
@ -1660,6 +1699,10 @@ std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
return L".fodp";
case AVS_OFFICESTUDIO_FILE_PRESENTATION_OTP:
return L".otp";
case AVS_OFFICESTUDIO_FILE_PRESENTATION_ODG:
return L".odg";
case AVS_OFFICESTUDIO_FILE_PRESENTATION_KEY:
return L".key";
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX:
return L".xlsx";
@ -1681,6 +1724,8 @@ std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
return L".fods";
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_OTS:
return L".ots";
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_NUMBERS:
return L".numbers";
case AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDF:
case AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM_PDF:
@ -1691,6 +1736,8 @@ std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
return L".djvu";
case AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_XPS:
return L".xps";
case AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_OFD:
return L".ofd";
case AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_SVG:
return L".svg";
case AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_HTMLR:
@ -1732,12 +1779,15 @@ std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
case AVS_OFFICESTUDIO_FILE_CANVAS_WORD:
case AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET:
case AVS_OFFICESTUDIO_FILE_CANVAS_PRESENTATION:
case AVS_OFFICESTUDIO_FILE_CANVAS_DRAW:
return L".bin";
case AVS_OFFICESTUDIO_FILE_OTHER_OLD_DOCUMENT:
case AVS_OFFICESTUDIO_FILE_TEAMLAB_DOCY:
return L".doct";
case AVS_OFFICESTUDIO_FILE_TEAMLAB_XLSY:
return L".xlst";
case AVS_OFFICESTUDIO_FILE_TEAMLAB_VSDY:
return L".vsdt";
case AVS_OFFICESTUDIO_FILE_OTHER_OLD_PRESENTATION:
case AVS_OFFICESTUDIO_FILE_OTHER_OLD_DRAWING:
case AVS_OFFICESTUDIO_FILE_TEAMLAB_PPTY:
@ -1805,6 +1855,14 @@ int COfficeFileFormatChecker::GetFormatByExtension(const std::wstring &sExt)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT_FLAT;
if (L".ott" == ext)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_OTT;
if (L".pages" == ext)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_PAGES;
if (L".hwp" == ext)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_HWP;
if (L".hwpx" == ext)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_HWPX;
if (L".md" == ext)
return AVS_OFFICESTUDIO_FILE_DOCUMENT_MD;
if (L".pptx" == ext)
return AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX;
@ -1826,6 +1884,10 @@ int COfficeFileFormatChecker::GetFormatByExtension(const std::wstring &sExt)
return AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP_FLAT;
if (L".otp" == ext)
return AVS_OFFICESTUDIO_FILE_PRESENTATION_OTP;
if (L".odg" == ext)
return AVS_OFFICESTUDIO_FILE_PRESENTATION_ODG;
if (L".key" == ext)
return AVS_OFFICESTUDIO_FILE_PRESENTATION_KEY;
if (L".xlsx" == ext)
return AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX;
@ -1853,6 +1915,8 @@ int COfficeFileFormatChecker::GetFormatByExtension(const std::wstring &sExt)
return AVS_OFFICESTUDIO_FILE_SPREADSHEET_OTS;
if (L".ods" == ext)
return AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS;
if (L".numbers" == ext)
return AVS_OFFICESTUDIO_FILE_SPREADSHEET_NUMBERS;
if (L".ooxml" == ext)
return AVS_OFFICESTUDIO_FILE_OTHER_OOXML;
@ -1865,6 +1929,8 @@ int COfficeFileFormatChecker::GetFormatByExtension(const std::wstring &sExt)
return AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_DJVU;
if (L".xps" == ext || L".oxps" == ext)
return AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_XPS;
if (L"ofd" == ext)
return AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_OFD;
if (L".jpg" == ext || L".jpeg" == ext || L".jpe" == ext || L".jfif" == ext)
return AVS_OFFICESTUDIO_FILE_IMAGE_JPG;
@ -1899,6 +1965,8 @@ int COfficeFileFormatChecker::GetFormatByExtension(const std::wstring &sExt)
return AVS_OFFICESTUDIO_FILE_TEAMLAB_XLSY;
if (L".pptt" == ext)
return AVS_OFFICESTUDIO_FILE_TEAMLAB_PPTY;
if (L".vsdt" == ext)
return AVS_OFFICESTUDIO_FILE_TEAMLAB_VSDY;
if (L".vsdx" == ext)
return AVS_OFFICESTUDIO_FILE_DRAW_VSDX;
@ -2001,3 +2069,26 @@ bool COfficeFileFormatChecker::isXpsFile(const std::wstring &fileName)
}
return false;
}
bool COfficeFileFormatChecker::isOFDFile(const std::wstring& fileName)
{
COfficeUtils OfficeUtils(NULL);
ULONG nBufferSize = 0;
BYTE *pBuffer = NULL;
HRESULT hresult = OfficeUtils.LoadFileFromArchive(fileName, L"OFD.xml", &pBuffer, nBufferSize);
if (hresult == S_OK && pBuffer != NULL)
{
if (19 <= nBufferSize && NULL != strstr((char *)pBuffer, "ofd:OFD"))
nFileType = AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_OFD;
delete[] pBuffer;
pBuffer = NULL;
if (nFileType != AVS_OFFICESTUDIO_FILE_UNKNOWN)
return true;
}
return false;
}

View File

@ -58,7 +58,8 @@
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM_PDF AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0017
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_PAGES AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0018
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_HWP AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0019
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_HWPX AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0020
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_HWPX AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x001a
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_MD AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x001b
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_XML AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x0030
@ -103,6 +104,7 @@
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_HTMLRMenu AVS_OFFICESTUDIO_FILE_CROSSPLATFORM + 0x0007
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_HTMLRCanvas AVS_OFFICESTUDIO_FILE_CROSSPLATFORM + 0x0008
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDFA AVS_OFFICESTUDIO_FILE_CROSSPLATFORM + 0x0009
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_OFD AVS_OFFICESTUDIO_FILE_CROSSPLATFORM + 0x000a
#define AVS_OFFICESTUDIO_FILE_IMAGE 0x0400
#define AVS_OFFICESTUDIO_FILE_IMAGE_JPG AVS_OFFICESTUDIO_FILE_IMAGE + 0x0001
@ -138,12 +140,14 @@
#define AVS_OFFICESTUDIO_FILE_TEAMLAB_DOCY AVS_OFFICESTUDIO_FILE_TEAMLAB + 0x0001
#define AVS_OFFICESTUDIO_FILE_TEAMLAB_XLSY AVS_OFFICESTUDIO_FILE_TEAMLAB + 0x0002
#define AVS_OFFICESTUDIO_FILE_TEAMLAB_PPTY AVS_OFFICESTUDIO_FILE_TEAMLAB + 0x0003
#define AVS_OFFICESTUDIO_FILE_TEAMLAB_VSDY AVS_OFFICESTUDIO_FILE_TEAMLAB + 0x0004
#define AVS_OFFICESTUDIO_FILE_CANVAS 0x2000
#define AVS_OFFICESTUDIO_FILE_CANVAS_WORD AVS_OFFICESTUDIO_FILE_CANVAS + 0x0001
#define AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET AVS_OFFICESTUDIO_FILE_CANVAS + 0x0002
#define AVS_OFFICESTUDIO_FILE_CANVAS_PRESENTATION AVS_OFFICESTUDIO_FILE_CANVAS + 0x0003
#define AVS_OFFICESTUDIO_FILE_CANVAS_PDF AVS_OFFICESTUDIO_FILE_CANVAS + 0x0004
#define AVS_OFFICESTUDIO_FILE_CANVAS_DRAW AVS_OFFICESTUDIO_FILE_CANVAS + 0x0005
#define AVS_OFFICESTUDIO_FILE_DRAW 0x4000
#define AVS_OFFICESTUDIO_FILE_DRAW_VSDX AVS_OFFICESTUDIO_FILE_DRAW + 0x0001

View File

@ -47,7 +47,7 @@ win32 {
DEFINES += COPYRIGHT_YEAR=$${CURRENT_YEAR}
QMAKE_TARGET_COMPANY = $$PUBLISHER_NAME
QMAKE_TARGET_COPYRIGHT = Copyright (C) $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved
QMAKE_TARGET_COPYRIGHT = © $${PUBLISHER_NAME} $${CURRENT_YEAR}. All rights reserved.
# CONFIGURATION
CONFIG(debug, debug|release) {
@ -91,6 +91,10 @@ isEqual(QT_MAJOR_VERSION, 5) {
greaterThan(QT_MAJOR_VERSION, 5) {
DEFINES += QT_VERSION_6
core_windows {
QMAKE_CXXFLAGS += /permissive-
}
}
ios {
@ -108,6 +112,35 @@ win32:contains(QMAKE_TARGET.arch, x86_64): {
win32:!contains(QMAKE_TARGET.arch, x86_64): {
CONFIG += core_win_32
}
win32:contains(QMAKE_TARGET.arch, arm64): {
CONFIG -= core_win_32
CONFIG += core_win_arm64
}
linux-clang-libc++ {
CONFIG += core_linux
CONFIG += core_linux_64
CONFIG += core_linux_clang
message("linux-64-clang-libc++")
}
linux-clang-libc++-32 {
CONFIG += core_linux
CONFIG += core_linux_32
CONFIG += core_linux_clang
message("linux-32-clang-libc++")
}
linux-clang {
CONFIG += core_linux
CONFIG += core_linux_64
CONFIG += core_linux_clang
message("linux-64-clang")
}
linux-clang-32 {
CONFIG += core_linux
CONFIG += core_linux_32
CONFIG += core_linux_clang
message("linux-32-clang")
}
linux-g++ {
CONFIG += core_linux
@ -165,6 +198,8 @@ core_windows {
DEFINES += WIN32 _WIN32
DEFINES += NOMINMAX
#DEFINES += WIN32_LEAN_AND_MEAN
# use default _ITERATOR_DEBUG_LEVEL value
#core_debug:DEFINES += "_ITERATOR_DEBUG_LEVEL=0"
}
@ -174,6 +209,25 @@ core_win_64 {
core_linux {
DEFINES += LINUX _LINUX
QMAKE_CUSTOM_SYSROOT = $$(QMAKE_CUSTOM_SYSROOT)
QMAKE_CUSTOM_SYSROOT_BIN = $$(QMAKE_CUSTOM_SYSROOT)/usr/bin/
core_linux_64 {
!linux_arm64 { # x86_64
QMAKE_CUSTOM_SYSROOT_LIB = $$(QMAKE_CUSTOM_SYSROOT)/usr/lib/x86_64-linux-gnu
!isEmpty(QMAKE_CUSTOM_SYSROOT) {
message("using custom sysroot $$QMAKE_CUSTOM_SYSROOT")
QMAKE_CC = $$join(QMAKE_CUSTOM_SYSROOT_BIN, , , "gcc")
QMAKE_CXX = $$join(QMAKE_CUSTOM_SYSROOT_BIN, , , "g++")
QMAKE_LINK = $$join(QMAKE_CUSTOM_SYSROOT_BIN, , , "g++")
QMAKE_LINK_SHLIB = $$join(QMAKE_CUSTOM_SYSROOT_BIN, , , "g++")
QMAKE_CXXFLAGS += --sysroot $$QMAKE_CUSTOM_SYSROOT
QMAKE_LFLAGS += --sysroot $$QMAKE_CUSTOM_SYSROOT
}
}
}
}
core_linux_host_arm64 {
message("build on arm64")
@ -186,7 +240,11 @@ core_mac {
QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
# xcode15 add new linker
QMAKE_LFLAGS += -Wl,-ld_classic
greaterThan(QMAKE_XCODE_VERSION, 1499) {
QMAKE_LFLAGS += -Wl,-ld_classic
} else {
CONFIG += c++14
}
QMAKE_CFLAGS += "-Wno-implicit-function-declaration"
@ -196,11 +254,15 @@ core_mac {
}
}
core_linux_clang {
QMAKE_CFLAGS += -Wno-implicit-function-declaration
}
# PREFIXES
core_windows {
CONFIG -= debug_and_release debug_and_release_target
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CXXFLAGS -= -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE += /Zc:strictStrings-
QMAKE_CXXFLAGS += /Zc:strictStrings-
QMAKE_CXXFLAGS += /MP
MSVC_VERSION_DETECT = $$(VisualStudioVersion)
@ -256,6 +318,9 @@ core_win_32 {
core_win_64 {
CORE_BUILDS_PLATFORM_PREFIX = win_64
}
core_win_arm64 {
CORE_BUILDS_PLATFORM_PREFIX = win_arm64
}
core_linux_32 {
CORE_BUILDS_PLATFORM_PREFIX = linux_32
}
@ -282,8 +347,8 @@ linux_arm64 {
!isEmpty(ARM64_TOOLCHAIN_BIN){
!isEmpty(ARM64_TOOLCHAIN_BIN_PREFIX){
ARM64_TOOLCHAIN_BIN_FULL = $$ARM64_TOOLCHAIN_BIN/$$ARM64_TOOLCHAIN_BIN_PREFIX
message("using arm64 toolchain $$ARM64_TOOLCHAIN_BIN")
QMAKE_CC = $$join(ARM64_TOOLCHAIN_BIN_FULL, , , "gcc")
QMAKE_CXX = $$join(ARM64_TOOLCHAIN_BIN_FULL, , , "g++")
@ -416,6 +481,12 @@ message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX)
# COMPILER
CONFIG += c++11
#CONFIG += enable_cpp_17
enable_cpp_17 {
CONFIG += c++1z
DEFINES += _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
}
!core_windows {
QMAKE_CXXFLAGS += -Wno-register
QMAKE_CFLAGS += -Wno-register
@ -423,7 +494,11 @@ CONFIG += c++11
core_linux {
core_static_link_libstd {
QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
!core_linux_clang {
QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
} else {
# TODO: add libc++abi?
}
message(core_static_link_libstd)
}
plugin {
@ -533,42 +608,45 @@ core_windows {
DEFINES += CRYPTOPP_DISABLE_ASM
}
core_ios:CONFIG+=support_bundle_dylibs
core_ios|core_mac {
CONFIG += support_bundle_dylibs
}
!support_bundle_dylibs:CONFIG-=bundle_dylibs
core_ios {
bundle_dylibs {
plugin {
CONFIG -= plugin
CONFIG += lib_bundle
bundle_dylibs {
plugin {
CONFIG -= plugin
CONFIG += lib_bundle
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
#QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
#QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
#QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @executable_path/Frameworks
#QMAKE_LFLAGS += -Xlinker -rpath -Xlinker @loader_path/Frameworks
# correct version to < 256
VERSIONS = $$split(VERSION, ".")
VERSION_1 = $$member(VERSIONS, 0)
VERSION_2 = $$member(VERSIONS, 1)
VERSION_3 = $$member(VERSIONS, 2)
VERSION_4 = $$member(VERSIONS, 3)
# correct version to < 256
VERSIONS = $$split(VERSION, ".")
VERSION_1 = $$member(VERSIONS, 0)
VERSION_2 = $$member(VERSIONS, 1)
VERSION_3 = $$member(VERSIONS, 2)
VERSION_4 = $$member(VERSIONS, 3)
greaterThan(VERSION_1, 255): VERSION_1 = 255
greaterThan(VERSION_2, 255): VERSION_2 = 255
greaterThan(VERSION_3, 255): VERSION_3 = 255
greaterThan(VERSION_4, 255): VERSION_4 = 255
greaterThan(VERSION_1, 255): VERSION_1 = 255
greaterThan(VERSION_2, 255): VERSION_2 = 255
greaterThan(VERSION_3, 255): VERSION_3 = 255
greaterThan(VERSION_4, 255): VERSION_4 = 255
VERSION_CORRECT = $$VERSION_1
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)
VERSION_CORRECT = $$VERSION_1
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_2)
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_3)
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", ".")
VERSION_CORRECT = $$join(VERSION_CORRECT, "", "", $$VERSION_4)
VERSION = $$VERSION_CORRECT
}
VERSION = $$VERSION_CORRECT
MAJOR_VERSION = $$VERSION_1
# set framework version as A
QMAKE_FRAMEWORK_VERSION = A
}
}

View File

@ -1 +1,2 @@
emsdk
__pycache__

View File

@ -416,6 +416,16 @@ namespace agg
{
return self_type(rgba::from_wavelength(wl, gamma));
}
bool operator==(const self_type& other)
{
return a == other.a && r == other.r && g == other.g && b == other.b;
}
bool operator!=(const self_type& other)
{
return !operator==(other);
}
};

View File

@ -1465,7 +1465,29 @@ namespace agg
}
};
template<class ColorT, class Order> struct comp_op_rgba_draw_on_black
{
typedef ColorT color_type;
typedef Order order_type;
typedef typename color_type::value_type value_type;
typedef typename color_type::calc_type calc_type;
enum base_scale_e
{
base_shift = color_type::base_shift,
base_mask = color_type::base_mask
};
static AGG_INLINE void blend_pix(value_type* p,
unsigned sr, unsigned sg, unsigned sb,
unsigned sa, unsigned cover)
{
if (0x00 != p[Order::R] || 0x00 != p[Order::G] || 0x00 != p[Order::B])
return;
comp_op_rgba_src_over <ColorT,Order>::blend_pix(p, sr, sg, sb, sa, cover);
}
};
@ -1515,6 +1537,9 @@ namespace agg
comp_op_rgba_contrast <ColorT,Order>::blend_pix,
comp_op_rgba_invert <ColorT,Order>::blend_pix,
comp_op_rgba_invert_rgb <ColorT,Order>::blend_pix,
//Custom function
comp_op_rgba_draw_on_black<ColorT,Order>::blend_pix,
0
};
@ -1551,6 +1576,9 @@ namespace agg
comp_op_invert, //----comp_op_invert
comp_op_invert_rgb, //----comp_op_invert_rgb
//Custom modes
comp_op_draw_on_black, //----comp_op_draw_on_black
end_of_comp_op_e
};

View File

@ -1000,7 +1000,17 @@ namespace agg
{
if (i < RES && j < RES)
{
precalc[i][j] = c;
if (m_oGradientInfo.luminocity)
{
ColorT fillC;
fillC.r = m_oGradientInfo.shading.fill_color.r * c.r / 255 + 255 - c.r;
fillC.g = m_oGradientInfo.shading.fill_color.g * c.g / 255 + 255 - c.g;
fillC.b = m_oGradientInfo.shading.fill_color.b * c.b / 255 + 255 - c.b;
fillC.a = 255;
precalc[i][j] = fillC;
}
else
precalc[i][j] = c;
}
}
}

View File

@ -506,7 +506,7 @@ namespace NSDirectory
rmdir((char*)pUtf8);
delete [] pUtf8;
if (deleteRoot = false)CreateDirectory(strDirectory);
if (deleteRoot == false)CreateDirectory(strDirectory);
#elif MAC
BYTE* pUtf8 = NULL;
LONG lLen = 0;
@ -514,7 +514,7 @@ namespace NSDirectory
rmdir((char*)pUtf8);
delete [] pUtf8;
if (deleteRoot = false)CreateDirectory(strDirectory);
if (deleteRoot == false)CreateDirectory(strDirectory);
#endif
}
std::wstring GetFolderPath(const std::wstring& wsFolderPath)

View File

@ -1629,6 +1629,10 @@ namespace NSFile
{
wsTemp = L"";
}
#if defined(_WIN32) || defined (_WIN64)
if (wsTempDir)
free(wsTempDir);
#endif
wsTemp += L"x";
int nTime = (int)time(NULL);
for (int nIndex = 0; nIndex < 1000; ++nIndex)
@ -1864,7 +1868,7 @@ namespace NSFile
namespace NSFile
{
bool CBase64Converter::Encode(BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags)
bool CBase64Converter::Encode(const BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags)
{
if (!pDataSrc || nLenSrc < 1)
return false;

View File

@ -212,7 +212,7 @@ namespace NSFile
class KERNEL_DECL CBase64Converter
{
public:
static bool Encode(BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags = NSBase64::B64_BASE64_FLAG_NONE);
static bool Encode(const BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags = NSBase64::B64_BASE64_FLAG_NONE);
static bool Decode(const char* pDataSrc, int nLenSrc, BYTE*& pDataDst, int& nLenDst);
};

View File

@ -46,6 +46,7 @@ namespace NSProcessEnv
static const char* gc_proxy = "proxy";
static const char* gc_proxyUser = "proxyUser";
static const char* gc_proxyHeader = "proxyHeader";
static const char* gc_oformAsPdf = "oformAsPdf";
}
// serialize

View File

@ -319,7 +319,14 @@ namespace NSStringUtils
{
WriteEncodeXmlString(sString.c_str(), (int)sString.length());
}
void CStringBuilder::WriteEncodeXmlString(const std::string& sString)
{
WriteEncodeXmlString(std::wstring(sString.begin(), sString.end()));
}
void CStringBuilder::WriteUtf8EncodeXmlString(const std::string& sString)
{
WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sString.c_str(), sString.size()));
}
void CStringBuilder::WriteEncodeXmlString(const wchar_t* pString, int nCount)
{
if (sizeof(wchar_t) == 2)

View File

@ -110,6 +110,9 @@ namespace NSStringUtils
void WriteEncodeXmlString(const std::wstring& sString);
void WriteEncodeXmlString(const wchar_t* pString, int nCount = -1);
void WriteEncodeXmlString(const std::string& sString);
void WriteUtf8EncodeXmlString(const std::string& sString);
void WriteEncodeXmlStringHHHH(const std::wstring& sString);
void WriteEncodeXmlStringHHHH(const wchar_t* pString, int nCount = -1);

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2023
*
* This program is a free software product. You can redistribute it and/or
@ -59,7 +59,7 @@ namespace NSSystemUtils
static const wchar_t* gc_EnvLastModifiedBy = L"LAST_MODIFIED_BY";
static const wchar_t* gc_EnvModified = L"MODIFIED";
static const wchar_t* gc_EnvMemoryLimit = L"X2T_MEMORY_LIMIT";
static const wchar_t* gc_EnvMemoryLimitDefault = L"4GiB";
static const wchar_t* gc_EnvMemoryLimitDefault = L"3GiB";
KERNEL_DECL std::string GetEnvVariableA(const std::wstring& strName);
KERNEL_DECL std::wstring GetEnvVariable(const std::wstring& strName);

View File

@ -46,8 +46,10 @@
#define CXIMAGE_SUPPORT_PSD 1
#ifndef BUILDING_WASM_MODULE
#define CXIMAGE_SUPPORT_HEIF 1
#define CXIMAGE_SUPPORT_RAW 1
#else
#define CXIMAGE_SUPPORT_HEIF 0
#define CXIMAGE_SUPPORT_RAW 0
#endif

View File

@ -133,13 +133,17 @@ CXIMAGE_FORMAT_PSD = 20,
#if CXIMAGE_SUPPORT_PIC
CXIMAGE_FORMAR_PIC = 25,
#endif
#if CXIMAGE_SUPPORT_HEIF
CXIMAGE_FORMAT_HEIF = 26,
#endif
CMAX_IMAGE_FORMATS = CXIMAGE_SUPPORT_BMP + CXIMAGE_SUPPORT_GIF + CXIMAGE_SUPPORT_JPG +
CXIMAGE_SUPPORT_PNG + CXIMAGE_SUPPORT_MNG + CXIMAGE_SUPPORT_ICO +
CXIMAGE_SUPPORT_TIF + CXIMAGE_SUPPORT_TGA + CXIMAGE_SUPPORT_PCX +
CXIMAGE_SUPPORT_WBMP+ CXIMAGE_SUPPORT_WMF + CXIMAGE_SUPPORT_PIC +
CXIMAGE_SUPPORT_JBG + CXIMAGE_SUPPORT_JP2 + CXIMAGE_SUPPORT_JPC +
CXIMAGE_SUPPORT_PGX + CXIMAGE_SUPPORT_PNM + CXIMAGE_SUPPORT_RAS +
CXIMAGE_SUPPORT_SKA + CXIMAGE_SUPPORT_RAW + CXIMAGE_SUPPORT_PSD + 1
CXIMAGE_SUPPORT_SKA + CXIMAGE_SUPPORT_RAW + CXIMAGE_SUPPORT_PSD +
CXIMAGE_SUPPORT_HEIF + 1
};
#if CXIMAGE_SUPPORT_EXIF

View File

@ -23,14 +23,14 @@
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#pragma warning (disable : 4550)
#pragma warning (disable : 4550)
/*
* TIFF Library
*
* Read and return a packed RGBA image.
*/
*/
#include "tiffiop.h"
#include <stdio.h>
@ -828,11 +828,12 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
nrowsub = nrow;
if ((nrowsub%subsamplingver)!=0)
nrowsub+=subsamplingver-nrowsub%subsamplingver;
if (TIFFReadEncodedStrip(tif,
TIFFComputeStrip(tif,row+img->row_offset, 0),
buf,
((row + img->row_offset)%rowsperstrip + nrowsub) * scanline) < 0
&& img->stoponerr)
((row + img->row_offset)%rowsperstrip + nrowsub) * scanline) < 0
&& img->stoponerr)
{
ret = 0;
break;

View File

@ -57,7 +57,7 @@ namespace NSDoctRenderer
}
bool CDocBuilder::ExecuteCommand(const wchar_t* command, CDocBuilderValue* retValue)
{
return m_pInternal->ExecuteCommand(command, retValue);
return m_pInternal->ExecuteCommand(command, retValue, false, false);
}
CDocBuilderContext CDocBuilder::GetContext(bool enterContext)

View File

@ -23,6 +23,30 @@ public class NativeLibraryLoader {
}
}
private static String libPrefix;
private static String libExtension;
private static boolean loadIfExist(String libPath) {
File libFile = new File(libPath);
if (libFile.exists()) {
System.load(libPath);
return true;
}
return false;
}
private static void load(Path libDirPath, String libName) {
String libPath = libDirPath.resolve(libPrefix + libName + libExtension).toString();
if (OSChecker.isMac()) {
if (!loadIfExist(libPath)) {
// if dylib does not exist, load framework library
System.load(libDirPath.resolve(libName + ".framework/" + libName).toString());
}
} else {
System.load(libPath);
}
}
static {
try {
Path libDirPath = getLibPath();
@ -31,8 +55,8 @@ public class NativeLibraryLoader {
System.load(libDirPath.resolve("icudt58.dll").toString());
System.load(libDirPath.resolve("icuuc58.dll").toString());
} else if (OSChecker.isMac()) {
System.load(libDirPath.resolve("libicudata.58.dylib").toString());
System.load(libDirPath.resolve("libicuuc.58.dylib").toString());
loadIfExist(libDirPath.resolve("libicudata.58.dylib").toString());
loadIfExist(libDirPath.resolve("libicuuc.58.dylib").toString());
} else if (OSChecker.isLinux()) {
System.load(libDirPath.resolve("libicudata.so.58").toString());
System.load(libDirPath.resolve("libicuuc.so.58").toString());
@ -42,24 +66,25 @@ public class NativeLibraryLoader {
String[] libs = {"UnicodeConverter", "kernel", "kernel_network", "graphics", "PdfFile", "XpsFile", "DjVuFile", "DocxRenderer", "doctrenderer", "docbuilder.jni"};
String prefix = "";
libPrefix = "";
if (OSChecker.isMac() || OSChecker.isLinux()) {
prefix = "lib";
libPrefix = "lib";
}
String extension = "";
libExtension = "";
if (OSChecker.isWindows()) {
extension = ".dll";
libExtension = ".dll";
} else if (OSChecker.isMac()) {
extension = ".dylib";
libExtension = ".dylib";
} else {
extension = ".so";
libExtension = ".so";
}
for (String lib : libs) {
System.load(libDirPath.resolve(prefix + lib + extension).toString());
load(libDirPath, lib);
}
} catch (UnsatisfiedLinkError e) {
} catch (Exception e) {
System.out.println(e.getMessage());
throw new RuntimeException("Cannot load dynamic libraries. Check if JAR file is in the same directory as all docbuilder libraries.");
}
}

View File

@ -16,18 +16,18 @@ static std::wstring wstringFromJavaString(JNIEnv* env, jstring jstr)
return wstr;
}
jlong Java_docbuilder_CDocBuilder_c_1Create(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilder_c_1Create(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilder());
}
void Java_docbuilder_CDocBuilder_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
delete pSelf;
}
jint Java_docbuilder_CDocBuilder_c_1OpenFile(JNIEnv* env, jclass cls, jlong self, jstring path, jstring params)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilder_c_1OpenFile(JNIEnv* env, jclass cls, jlong self, jstring path, jstring params)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strPath = wstringFromJavaString(env, path);
@ -35,34 +35,34 @@ jint Java_docbuilder_CDocBuilder_c_1OpenFile(JNIEnv* env, jclass cls, jlong self
return (jint)pSelf->OpenFile(strPath.c_str(), strParams.c_str());
}
jboolean Java_docbuilder_CDocBuilder_c_1CreateFileByType(JNIEnv* env, jclass cls, jlong self, jint type)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1CreateFileByType(JNIEnv* env, jclass cls, jlong self, jint type)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
return (jboolean)pSelf->CreateFile((int)type);
}
jboolean Java_docbuilder_CDocBuilder_c_1CreateFileByExtension(JNIEnv* env, jclass cls, jlong self, jstring extension)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1CreateFileByExtension(JNIEnv* env, jclass cls, jlong self, jstring extension)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strExtension = wstringFromJavaString(env, extension);
return (jboolean)pSelf->CreateFile(strExtension.c_str());
}
void Java_docbuilder_CDocBuilder_c_1SetTmpFolder(JNIEnv* env, jclass cls, jlong self, jstring folder)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1SetTmpFolder(JNIEnv* env, jclass cls, jlong self, jstring folder)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strFolder = wstringFromJavaString(env, folder);
pSelf->SetTmpFolder(strFolder.c_str());
}
jint Java_docbuilder_CDocBuilder_c_1SaveFileByType(JNIEnv* env, jclass cls, jlong self, jint type, jstring path)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilder_c_1SaveFileByType(JNIEnv* env, jclass cls, jlong self, jint type, jstring path)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strPath = wstringFromJavaString(env, path);
return (jint)pSelf->SaveFile((int)type, strPath.c_str());
}
jint Java_docbuilder_CDocBuilder_c_1SaveFileByTypeWithParams(JNIEnv* env, jclass cls, jlong self, jint type, jstring path, jstring params)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilder_c_1SaveFileByTypeWithParams(JNIEnv* env, jclass cls, jlong self, jint type, jstring path, jstring params)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strPath = wstringFromJavaString(env, path);
@ -70,7 +70,7 @@ jint Java_docbuilder_CDocBuilder_c_1SaveFileByTypeWithParams(JNIEnv* env, jclass
return (jint)pSelf->SaveFile((int)type, strPath.c_str(), strParams.c_str());
}
jint Java_docbuilder_CDocBuilder_c_1SaveFileByExtension(JNIEnv* env, jclass cls, jlong self, jstring extension, jstring path)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilder_c_1SaveFileByExtension(JNIEnv* env, jclass cls, jlong self, jstring extension, jstring path)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strExtension = wstringFromJavaString(env, extension);
@ -78,7 +78,7 @@ jint Java_docbuilder_CDocBuilder_c_1SaveFileByExtension(JNIEnv* env, jclass cls,
return (jint)pSelf->SaveFile(strExtension.c_str(), strPath.c_str());
}
jint Java_docbuilder_CDocBuilder_c_1SaveFileByExtensionWithParams(JNIEnv* env, jclass cls, jlong self, jstring extension, jstring path, jstring params)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilder_c_1SaveFileByExtensionWithParams(JNIEnv* env, jclass cls, jlong self, jstring extension, jstring path, jstring params)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strExtension = wstringFromJavaString(env, extension);
@ -87,20 +87,20 @@ jint Java_docbuilder_CDocBuilder_c_1SaveFileByExtensionWithParams(JNIEnv* env, j
return (jint)pSelf->SaveFile(strExtension.c_str(), strPath.c_str(), strParams.c_str());
}
void Java_docbuilder_CDocBuilder_c_1CloseFile(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1CloseFile(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
pSelf->CloseFile();
}
jboolean Java_docbuilder_CDocBuilder_c_1ExecuteCommand(JNIEnv* env, jclass cls, jlong self, jstring command)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1ExecuteCommand(JNIEnv* env, jclass cls, jlong self, jstring command)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strCommand = wstringFromJavaString(env, command);
return (jboolean)pSelf->ExecuteCommand(strCommand.c_str());
}
jboolean Java_docbuilder_CDocBuilder_c_1ExecuteCommandWithRetValue(JNIEnv* env, jclass cls, jlong self, jstring command, jlong retValue)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1ExecuteCommandWithRetValue(JNIEnv* env, jclass cls, jlong self, jstring command, jlong retValue)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strCommand = wstringFromJavaString(env, command);
@ -108,14 +108,14 @@ jboolean Java_docbuilder_CDocBuilder_c_1ExecuteCommandWithRetValue(JNIEnv* env,
return (jboolean)pSelf->ExecuteCommand(strCommand.c_str(), pRetValue);
}
jboolean Java_docbuilder_CDocBuilder_c_1Run(JNIEnv* env, jclass cls, jlong self, jstring path)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1Run(JNIEnv* env, jclass cls, jlong self, jstring path)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strPath = wstringFromJavaString(env, path);
return (jboolean)pSelf->Run(strPath.c_str());
}
jboolean Java_docbuilder_CDocBuilder_c_1RunText(JNIEnv* env, jclass cls, jlong self, jstring commands)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1RunText(JNIEnv* env, jclass cls, jlong self, jstring commands)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
const char* strUtfCommands = env->GetStringUTFChars(commands, nullptr);
@ -124,7 +124,7 @@ jboolean Java_docbuilder_CDocBuilder_c_1RunText(JNIEnv* env, jclass cls, jlong s
return result;
}
void Java_docbuilder_CDocBuilder_c_1SetProperty(JNIEnv* env, jclass cls, jlong self, jstring param, jstring value)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1SetProperty(JNIEnv* env, jclass cls, jlong self, jstring param, jstring value)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
const char* strUtfParam = env->GetStringUTFChars(param, nullptr);
@ -133,7 +133,7 @@ void Java_docbuilder_CDocBuilder_c_1SetProperty(JNIEnv* env, jclass cls, jlong s
env->ReleaseStringUTFChars(param, strUtfParam);
}
void Java_docbuilder_CDocBuilder_c_1WriteData(JNIEnv* env, jclass cls, jlong self, jstring path, jstring data, jboolean append)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1WriteData(JNIEnv* env, jclass cls, jlong self, jstring path, jstring data, jboolean append)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
std::wstring strPath = wstringFromJavaString(env, path);
@ -141,13 +141,13 @@ void Java_docbuilder_CDocBuilder_c_1WriteData(JNIEnv* env, jclass cls, jlong sel
pSelf->WriteData(strPath.c_str(), strData.c_str(), (bool)append);
}
jboolean Java_docbuilder_CDocBuilder_c_1IsSaveWithDoctrendererMode(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilder_c_1IsSaveWithDoctrendererMode(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
return (jboolean)pSelf->IsSaveWithDoctrendererMode();
}
jstring Java_docbuilder_CDocBuilder_c_1GetVersion(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jstring JNICALL Java_docbuilder_CDocBuilder_c_1GetVersion(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
char* strUtfVersion = pSelf->GetVersion();
@ -156,30 +156,30 @@ jstring Java_docbuilder_CDocBuilder_c_1GetVersion(JNIEnv* env, jclass cls, jlong
return jstrVersion;
}
jlong Java_docbuilder_CDocBuilder_c_1GetContext(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilder_c_1GetContext(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
return reinterpret_cast<jlong>(new CDocBuilderContext(pSelf->GetContext()));
}
jlong Java_docbuilder_CDocBuilder_c_1GetContextWithEnterParam(JNIEnv* env, jclass cls, jlong self, jboolean enterContext)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilder_c_1GetContextWithEnterParam(JNIEnv* env, jclass cls, jlong self, jboolean enterContext)
{
CDocBuilder* pSelf = reinterpret_cast<CDocBuilder*>(self);
return reinterpret_cast<jlong>(new CDocBuilderContext(pSelf->GetContext((bool)enterContext)));
}
void Java_docbuilder_CDocBuilder_c_1Initialize(JNIEnv* env, jclass cls)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1Initialize(JNIEnv* env, jclass cls)
{
CDocBuilder::Initialize();
}
void Java_docbuilder_CDocBuilder_c_1InitializeWithDirectory(JNIEnv* env, jclass cls, jstring directory)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1InitializeWithDirectory(JNIEnv* env, jclass cls, jstring directory)
{
std::wstring strDirectory = wstringFromJavaString(env, directory);
CDocBuilder::Initialize(strDirectory.c_str());
}
void Java_docbuilder_CDocBuilder_c_1Dispose(JNIEnv* env, jclass cls)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilder_c_1Dispose(JNIEnv* env, jclass cls)
{
CDocBuilder::Dispose();
}

View File

@ -4,60 +4,60 @@
using namespace NSDoctRenderer;
jlong Java_docbuilder_CDocBuilderContext_c_1Create(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1Create(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilderContext());
}
jlong Java_docbuilder_CDocBuilderContext_c_1Copy(JNIEnv* env, jclass cls, jlong other)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1Copy(JNIEnv* env, jclass cls, jlong other)
{
CDocBuilderContext* pOther = reinterpret_cast<CDocBuilderContext*>(other);
return reinterpret_cast<jlong>(new CDocBuilderContext(*pOther));
}
void Java_docbuilder_CDocBuilderContext_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderContext_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
delete pSelf;
}
jlong Java_docbuilder_CDocBuilderContext_c_1CreateUndefined(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1CreateUndefined(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderValue(pSelf->CreateUndefined()));
}
jlong Java_docbuilder_CDocBuilderContext_c_1CreateNull(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1CreateNull(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderValue(pSelf->CreateNull()));
}
jlong Java_docbuilder_CDocBuilderContext_c_1CreateObject(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1CreateObject(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderValue(pSelf->CreateObject()));
}
jlong Java_docbuilder_CDocBuilderContext_c_1CreateArray(JNIEnv* env, jclass cls, jlong self, jint length)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1CreateArray(JNIEnv* env, jclass cls, jlong self, jint length)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderValue(pSelf->CreateArray((int)length)));
}
jlong Java_docbuilder_CDocBuilderContext_c_1GetGlobal(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1GetGlobal(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderValue(pSelf->GetGlobal()));
}
jlong Java_docbuilder_CDocBuilderContext_c_1CreateScope(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContext_c_1CreateScope(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return reinterpret_cast<jlong>(new CDocBuilderContextScope(pSelf->CreateScope()));
}
jboolean Java_docbuilder_CDocBuilderContext_c_1IsError(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderContext_c_1IsError(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContext* pSelf = reinterpret_cast<CDocBuilderContext*>(self);
return (jboolean)pSelf->IsError();

View File

@ -4,24 +4,24 @@
using namespace NSDoctRenderer;
jlong Java_docbuilder_CDocBuilderContextScope_c_1Create(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContextScope_c_1Create(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilderContextScope());
}
jlong Java_docbuilder_CDocBuilderContextScope_c_1Copy(JNIEnv* env, jclass cls, jlong other)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderContextScope_c_1Copy(JNIEnv* env, jclass cls, jlong other)
{
CDocBuilderContextScope* pOther = reinterpret_cast<CDocBuilderContextScope*>(other);
return reinterpret_cast<jlong>(new CDocBuilderContextScope(*pOther));
}
void Java_docbuilder_CDocBuilderContextScope_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderContextScope_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContextScope* pSelf = reinterpret_cast<CDocBuilderContextScope*>(self);
delete pSelf;
}
void Java_docbuilder_CDocBuilderContextScope_c_1Close(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderContextScope_c_1Close(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderContextScope* pSelf = reinterpret_cast<CDocBuilderContextScope*>(self);
pSelf->Close();

View File

@ -8,114 +8,114 @@
using namespace NSDoctRenderer;
jlong Java_docbuilder_CDocBuilderValue_c_1Create(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Create(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilderValue());
}
jlong Java_docbuilder_CDocBuilderValue_c_1Copy(JNIEnv* env, jclass cls, jlong other)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Copy(JNIEnv* env, jclass cls, jlong other)
{
CDocBuilderValue* pOther = reinterpret_cast<CDocBuilderValue*>(other);
return reinterpret_cast<jlong>(new CDocBuilderValue(*pOther));
}
void Java_docbuilder_CDocBuilderValue_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderValue_c_1Destroy(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
delete pSelf;
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsEmpty(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsEmpty(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsEmpty();
}
void Java_docbuilder_CDocBuilderValue_c_1Clear(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderValue_c_1Clear(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
pSelf->Clear();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsNull(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsNull(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsNull();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsUndefined(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsUndefined(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsUndefined();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsBool(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsBool(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsBool();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsInt(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsInt(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsInt();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsDouble(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsDouble(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsDouble();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsString(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsString(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsString();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsFunction(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsFunction(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsFunction();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsObject(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsObject(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsObject();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1IsArray(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1IsArray(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->IsArray();
}
jint Java_docbuilder_CDocBuilderValue_c_1GetLength(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilderValue_c_1GetLength(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jint)pSelf->GetLength();
}
jboolean Java_docbuilder_CDocBuilderValue_c_1ToBool(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jboolean JNICALL Java_docbuilder_CDocBuilderValue_c_1ToBool(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jboolean)pSelf->ToBool();
}
jint Java_docbuilder_CDocBuilderValue_c_1ToInt(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jint JNICALL Java_docbuilder_CDocBuilderValue_c_1ToInt(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jint)pSelf->ToInt();
}
jdouble Java_docbuilder_CDocBuilderValue_c_1ToDouble(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jdouble JNICALL Java_docbuilder_CDocBuilderValue_c_1ToDouble(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
return (jdouble)pSelf->ToDouble();
}
jstring Java_docbuilder_CDocBuilderValue_c_1ToString(JNIEnv* env, jclass cls, jlong self)
JNIEXPORT jstring JNICALL Java_docbuilder_CDocBuilderValue_c_1ToString(JNIEnv* env, jclass cls, jlong self)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CString strValue = pSelf->ToString();
@ -123,7 +123,7 @@ jstring Java_docbuilder_CDocBuilderValue_c_1ToString(JNIEnv* env, jclass cls, jl
return env->NewStringUTF(strUtfData.c_str());
}
jlong Java_docbuilder_CDocBuilderValue_c_1GetProperty(JNIEnv* env, jclass cls, jlong self, jstring name)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1GetProperty(JNIEnv* env, jclass cls, jlong self, jstring name)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
const char* strUtfName = env->GetStringUTFChars(name, nullptr);
@ -132,14 +132,14 @@ jlong Java_docbuilder_CDocBuilderValue_c_1GetProperty(JNIEnv* env, jclass cls, j
return reinterpret_cast<jlong>(pValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1GetByIndex(JNIEnv* env, jclass cls, jlong self, jint index)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1GetByIndex(JNIEnv* env, jclass cls, jlong self, jint index)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pValue = new CDocBuilderValue(pSelf->Get((int)index));
return reinterpret_cast<jlong>(pValue);
}
void Java_docbuilder_CDocBuilderValue_c_1SetProperty(JNIEnv* env, jclass cls, jlong self, jstring name, jlong value)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderValue_c_1SetProperty(JNIEnv* env, jclass cls, jlong self, jstring name, jlong value)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pValue = reinterpret_cast<CDocBuilderValue*>(value);
@ -149,29 +149,29 @@ void Java_docbuilder_CDocBuilderValue_c_1SetProperty(JNIEnv* env, jclass cls, jl
env->ReleaseStringUTFChars(name, strUtfName);
}
void Java_docbuilder_CDocBuilderValue_c_1SetByIndex(JNIEnv* env, jclass cls, jlong self, jint index, jlong value)
JNIEXPORT void JNICALL Java_docbuilder_CDocBuilderValue_c_1SetByIndex(JNIEnv* env, jclass cls, jlong self, jint index, jlong value)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pValue = reinterpret_cast<CDocBuilderValue*>(value);
pSelf->Set((int)index, *pValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateWithBool(JNIEnv* env, jclass cls, jboolean value)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateWithBool(JNIEnv* env, jclass cls, jboolean value)
{
return reinterpret_cast<jlong>(new CDocBuilderValue((bool)value));
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateWithInt(JNIEnv* env, jclass cls, jint value)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateWithInt(JNIEnv* env, jclass cls, jint value)
{
return reinterpret_cast<jlong>(new CDocBuilderValue((int)value));
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateWithDouble(JNIEnv* env, jclass cls, jdouble value)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateWithDouble(JNIEnv* env, jclass cls, jdouble value)
{
return reinterpret_cast<jlong>(new CDocBuilderValue((double)value));
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateWithString(JNIEnv* env, jclass cls, jstring str)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateWithString(JNIEnv* env, jclass cls, jstring str)
{
const char* strUtf = env->GetStringUTFChars(str, nullptr);
CDocBuilderValue* pValue = new CDocBuilderValue(strUtf);
@ -179,22 +179,22 @@ jlong Java_docbuilder_CDocBuilderValue_c_1CreateWithString(JNIEnv* env, jclass c
return reinterpret_cast<jlong>(pValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateUndefined(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateUndefined(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilderValue(CDocBuilderValue::CreateUndefined()));
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateNull(JNIEnv* env, jclass cls)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateNull(JNIEnv* env, jclass cls)
{
return reinterpret_cast<jlong>(new CDocBuilderValue(CDocBuilderValue::CreateNull()));
}
jlong Java_docbuilder_CDocBuilderValue_c_1CreateArray(JNIEnv* env, jclass cls, jint length)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1CreateArray(JNIEnv* env, jclass cls, jint length)
{
return reinterpret_cast<jlong>(new CDocBuilderValue(CDocBuilderValue::CreateArray((int)length)));
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call0(JNIEnv* env, jclass cls, jlong self, jstring name)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call0(JNIEnv* env, jclass cls, jlong self, jstring name)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
const char* strUtfName = env->GetStringUTFChars(name, nullptr);
@ -203,7 +203,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call0(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call1(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call1(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);
@ -213,7 +213,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call1(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call2(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call2(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);
@ -224,7 +224,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call2(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call3(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call3(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);
@ -236,7 +236,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call3(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call4(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call4(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);
@ -249,7 +249,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call4(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call5(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4, jlong p5)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call5(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4, jlong p5)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);
@ -263,7 +263,7 @@ jlong Java_docbuilder_CDocBuilderValue_c_1Call5(JNIEnv* env, jclass cls, jlong s
return reinterpret_cast<jlong>(pReturnValue);
}
jlong Java_docbuilder_CDocBuilderValue_c_1Call6(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6)
JNIEXPORT jlong JNICALL Java_docbuilder_CDocBuilderValue_c_1Call6(JNIEnv* env, jclass cls, jlong self, jstring name, jlong p1, jlong p2, jlong p3, jlong p4, jlong p5, jlong p6)
{
CDocBuilderValue* pSelf = reinterpret_cast<CDocBuilderValue*>(self);
CDocBuilderValue* pParam1 = reinterpret_cast<CDocBuilderValue*>(p1);

View File

@ -0,0 +1 @@
deploy/

View File

@ -24,6 +24,10 @@ def _loadLibrary(path):
library_name = 'libdocbuilder.c.so'
elif 'darwin' == os_name:
library_name = 'libdocbuilder.c.dylib'
# if there is no dylib file, get library from framework
if not os.path.exists(path + '/' + library_name):
path = path + '/docbuilder.c.framework'
library_name = 'docbuilder.c'
_lib = ctypes.CDLL(path + '/' + library_name)
@ -383,6 +387,20 @@ class CDocBuilderValue:
def __setitem__(self, key, value):
self.Set(key, value)
def __getattr__(self, name):
def method(*args):
return self.Call(name, *args)
return method
def __len__(self):
return self.GetLength()
def __iter__(self):
if not self.IsArray():
raise TypeError("Object is not iterable")
for i in range(self.GetLength()):
yield self.Get(i)
@staticmethod
def CreateUndefined():
return CDocBuilderValue(OBJECT_HANDLE(_lib.CDocBuilderValue_CreateUndefined()))
@ -424,6 +442,36 @@ class CDocBuilderValue:
else:
raise TypeError("Call() expects at most 6 arguments")
def append(self, value):
if not self.IsArray():
raise TypeError("Object is not an array")
length = self.GetLength()
self.Set(length, value)
return self
def extend(self, iterable):
if not self.IsArray():
raise TypeError("Object is not an array")
length = self.GetLength()
for i, value in enumerate(iterable, start=length):
self.Set(i, value)
return self
def insert(self, i, x):
if not self.IsArray():
raise TypeError("Object is not an array")
length = self.GetLength()
if i < 0:
if abs(i) > length:
raise IndexError("list index out of range")
i = max(0, length + i)
if i >= length:
raise IndexError("list index out of range")
for idx in range(length, i, -1):
self.Set(idx, self.Get(idx - 1))
self.Set(i, x)
class CDocBuilder:
_initialized = False
@ -435,7 +483,7 @@ class CDocBuilder:
# using self._lib instead of global _lib because it might be already garbage collected during this function call
self._lib.CDocBuilder_Destroy(self._internal)
def OpenFile(self, path, params):
def OpenFile(self, path, params=""):
return _lib.CDocBuilder_OpenFile(self._internal, ctypes.c_wchar_p(path), ctypes.c_wchar_p(params))
def CreateFile(self, type):

View File

@ -13,16 +13,16 @@ scope = context.CreateScope()
globalObj = context.GetGlobal()
api = globalObj['Api']
document = api.Call('GetDocument')
paragraph1 = api.Call('CreateParagraph')
paragraph1.Call('SetSpacingAfter', 1000, False)
paragraph1.Call('AddText', 'Hello from Python!')
document = api.GetDocument()
paragraph1 = api.CreateParagraph()
paragraph1.SetSpacingAfter(1000, False)
paragraph1.AddText('Hello from Python!')
paragraph2 = api.Call('CreateParagraph')
paragraph2.Call('AddText', 'Goodbye!')
paragraph2 = api.CreateParagraph()
paragraph2.AddText('Goodbye!')
content = [paragraph1, paragraph2]
document.Call('InsertContent', content)
document.InsertContent(content)
dstPath = os.getcwd() + '/result.docx'
builder.SaveFile(docbuilder.FileTypes.Document.DOCX, dstPath)

View File

@ -0,0 +1,29 @@
import os
import sys
sys.path.append('path_to_docbuilder')
import docbuilder
builder = docbuilder.CDocBuilder()
builder.CreateFile(docbuilder.FileTypes.Document.DOCX)
context = builder.GetContext()
scope = context.CreateScope()
globalObj = context.GetGlobal()
api = globalObj['Api']
document = api.Call('GetDocument')
paragraph1 = api.Call('CreateParagraph')
paragraph1.Call('SetSpacingAfter', 1000, False)
paragraph1.Call('AddText', 'Hello from Python!')
paragraph2 = api.Call('CreateParagraph')
paragraph2.Call('AddText', 'Goodbye!')
content = [paragraph1, paragraph2]
document.Call('InsertContent', content)
dstPath = os.getcwd() + '/result.docx'
builder.SaveFile(docbuilder.FileTypes.Document.DOCX, dstPath)
builder.CloseFile()

View File

@ -74,6 +74,7 @@ CV8RealTimeWorker::CV8RealTimeWorker(NSDoctRenderer::CDocBuilder* pBuilder, cons
global->set("native", oNativeCtrl);
CBuilderEmbed* pBuilderJSNative = static_cast<CBuilderEmbed*>(oBuilderJS->getNative());
pBuilderJSNative->SetExternalize(true);
pBuilderJSNative->m_pBuilder = pBuilder;
}
CV8RealTimeWorker::~CV8RealTimeWorker()
@ -82,7 +83,7 @@ CV8RealTimeWorker::~CV8RealTimeWorker()
m_context->Dispose();
}
bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRenderer::CDocBuilderValue* retValue, const bool& isEnterContext)
bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRenderer::CDocBuilderValue* retValue, const bool& isEnterContextSrc)
{
LOGGER_SPEED_START();
@ -92,6 +93,10 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
std::string commandA = U_TO_UTF8(command);
//commandA = "Api." + commandA;
bool isEnterContext = isEnterContextSrc;
if (!isEnterContext && !m_context->IsEntered())
isEnterContext = true;
if (isEnterContext)
m_context->Enter();
@ -1237,13 +1242,13 @@ namespace NSDoctRenderer
while (true)
{
while (_currentPos < _commandsLen && !(_commandsPtr[_currentPos] == '\"' && _commandsPtr[_currentPos - 1] != '\\'))
while (_currentPos < _commandsLen && !((_commandsPtr[_currentPos] == '\"' || _commandsPtr[_currentPos] == '\'') && _commandsPtr[_currentPos - 1] != '\\'))
++_currentPos;
++_currentPos;
size_t _start = _currentPos;
while (_currentPos < _commandsLen && !(_commandsPtr[_currentPos] == '\"' && _commandsPtr[_currentPos - 1] != '\\'))
while (_currentPos < _commandsLen && !((_commandsPtr[_currentPos] == '\"' || _commandsPtr[_currentPos] == '\'') && _commandsPtr[_currentPos - 1] != '\\'))
++_currentPos;
if (_currentPos > _start)
@ -1268,7 +1273,7 @@ namespace NSDoctRenderer
if (m_pInternal->m_nFileType != -1 && m_pInternal->m_bIsOpenedFromSimpleJS)
{
m_pInternal->m_bIsOpenedFromSimpleJS = false;
return true;
return 0;
}
m_pInternal->m_nFileType = -1;
@ -1509,7 +1514,8 @@ namespace NSDoctRenderer
if (nCountParameters > 2)
sParams = _builder_params[2].c_str();
this->SaveFile(nFormat, _builder_params[1].c_str(), sParams);
int nSaveError = this->SaveFile(nFormat, _builder_params[1].c_str(), sParams);
bIsNoError = (0 == nSaveError);
}
else if ("WriteData" == sFuncNum)
{

View File

@ -547,6 +547,7 @@ namespace NSDoctRenderer
CApplicationFontsWorker oWorker;
oWorker.m_bIsUseSystemFonts = m_oParams.m_bIsSystemFonts;
oWorker.m_arAdditionalFolders = m_oParams.m_arFontDirs;
oWorker.m_arAdditionalFolders.push_back(NSFile::GetProcessDirectory() + L"/fonts");
oWorker.m_bIsNeedThumbnails = false;
oWorker.m_sDirectory = sDirectory;
// это не рабочая папка, где только шрифты
@ -927,7 +928,7 @@ namespace NSDoctRenderer
COfficeFileFormatChecker oChecker;
if (!oChecker.isOfficeFile(sFileCopy))
return false;
return 1;
if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT)
m_nFileType = 0;
@ -1275,7 +1276,7 @@ namespace NSDoctRenderer
return SaveFile(nType, path, params);
}
bool ExecuteCommand(const std::wstring& command, CDocBuilderValue* retValue = NULL, const bool& forceExecute = false)
bool ExecuteCommand(const std::wstring& command, CDocBuilderValue* retValue = NULL, const bool& forceExecute = false, const bool& isEnterContext = true)
{
if (command.length() < 7 && !retValue) // minimum command (!!!)
return true;
@ -1291,12 +1292,12 @@ namespace NSDoctRenderer
if (CheckWorker())
{
bool bIsOpenedFromSimpleJSOld = m_bIsOpenedFromSimpleJS;
bool bResult = m_pWorker->ExecuteCommand(command, retValue);
bool bResult = m_pWorker->ExecuteCommand(command, retValue, isEnterContext);
if (!bResult && !bIsOpenedFromSimpleJSOld && m_bIsOpenedFromSimpleJS)
{
RELEASEOBJECT(m_pWorker);
CheckWorker();
return m_pWorker->ExecuteCommand(command, retValue);
return m_pWorker->ExecuteCommand(command, retValue, isEnterContext);
}
else
{

View File

@ -171,7 +171,6 @@ public:
return m_pFile ? true : false;
}
bool OpenFile(BYTE* data, LONG size, const std::wstring& sPassword)
{
CloseFile();
@ -284,6 +283,34 @@ public:
return NULL;
return m_pFile->ConvertToPixels(nPageIndex, nRasterW, nRasterH, true, m_pFontManager, nBackgroundColor, (nBackgroundColor == 0xFFFFFF) ? false : true);
}
BYTE* SplitPages(int* arrPageIndex, int nLength, BYTE* data, LONG size)
{
if (m_nType == 0)
return ((CPdfFile*)m_pFile)->SplitPages(arrPageIndex, nLength, data, size);
return NULL;
}
bool MergePages(BYTE* data, LONG size, int nMaxID, const std::string& sPrefixForm, bool bCopy = false)
{
if (m_nType == 0)
{
// Память из CDrawingFileEmbed освобождается сразу после вызова функции, поэтому копируем
if (bCopy)
{
BYTE* pCopy = (BYTE*)malloc(size);
memcpy(pCopy, data, size);
data = pCopy;
}
// Захватывает полученную память, будет освобождена либо в деструкторе MemStream, либо free в случае неудачи
return ((CPdfFile*)m_pFile)->MergePages(data, size, nMaxID, sPrefixForm);
}
return false;
}
bool UnmergePages()
{
if (m_nType == 0)
return ((CPdfFile*)m_pFile)->UnmergePages();
return false;
}
BYTE* GetGlyphs(int nPageIndex)
{
@ -403,22 +430,32 @@ public:
oRenderer.SetExternalImageStorage(m_pImageStorage);
oRenderer.SetTextAssociationType(NSDocxRenderer::TextAssociationType::tatParagraphToShape);
std::vector<std::wstring> arShapes;
if (0 == mode)
arShapes = oRenderer.ScanPage(m_pFile, nPageIndex);
else
arShapes = oRenderer.ScanPagePptx(m_pFile, nPageIndex);
int nLen = (int)arShapes.size();
NSWasm::CData oRes;
oRes.SkipLen();
oRes.AddInt(nLen);
switch (mode)
{
case 0:
case 1:
{
std::vector<std::wstring> arShapes = (0 == mode) ? oRenderer.ScanPage(m_pFile, nPageIndex) : oRenderer.ScanPagePptx(m_pFile, nPageIndex);
int nLen = (int)arShapes.size();
for (int i = 0; i < nLen; ++i)
oRes.WriteString(arShapes[i]);
oRes.SkipLen();
oRes.AddInt(nLen);
oRes.WriteLen();
for (int i = 0; i < nLen; ++i)
oRes.WriteString(arShapes[i]);
oRes.WriteLen();
break;
}
case 2:
{
oRes = oRenderer.ScanPageBin(m_pFile, nPageIndex);
break;
}
default:
return NULL;
}
BYTE* res = oRes.GetBuffer();
oRes.ClearWithoutAttack();

View File

@ -166,6 +166,48 @@ JSSmart<CJSValue> CDrawingFileEmbed::FreeWasmData(JSSmart<CJSValue> typedArray)
return NULL;
}
JSSmart<CJSValue> CDrawingFileEmbed::SplitPages(JSSmart<CJSValue> arrPageIndexes, JSSmart<CJSValue> data)
{
JSSmart<CJSArray> arrPages = arrPageIndexes->toArray();
CJSDataBuffer changes;
if (data->isTypedArray())
changes = data->toTypedArray()->getData();
int nCountPages = arrPages->getCount();
int* pPages = NULL;
if (0 < nCountPages)
pPages = new int[nCountPages];
for (int i = 0; i < nCountPages; i++)
pPages[i] = arrPages->get(i)->toInt32();
JSSmart<CJSValue> res = WasmMemoryToJS(m_pFile->SplitPages(pPages, nCountPages, changes.Data, (LONG)changes.Len));
if (pPages)
delete [] pPages;
return res;
}
JSSmart<CJSValue> CDrawingFileEmbed::MergePages(JSSmart<CJSValue> data, JSSmart<CJSValue> nMaxID, JSSmart<CJSValue> sPrefixForm)
{
bool result = false;
if (m_pFile)
{
JSSmart<CJSTypedArray> dataPtr = data->toTypedArray();
int maxID = nMaxID->toInt32();
std::string prefix = sPrefixForm->toStringA();
CJSDataBuffer buffer = dataPtr->getData();
result = m_pFile->MergePages(buffer.Data, (LONG)buffer.Len, maxID, prefix, true);
if (buffer.IsExternalize)
buffer.Free();
}
return CJSContext::createBool(result);
}
JSSmart<CJSValue> CDrawingFileEmbed::UnmergePages()
{
if (m_pFile)
return CJSContext::createBool(m_pFile->UnmergePages());
return CJSContext::createBool(false);
}
bool EmbedDrawingFile(JSSmart<NSJSBase::CJSContext>& context, IOfficeDrawingFile* pFile)
{
CJSContext::Embed<CDrawingFileEmbed>(false);

View File

@ -51,6 +51,10 @@ public:
JSSmart<CJSValue> FreeWasmData(JSSmart<CJSValue> typedArray);
JSSmart<CJSValue> SplitPages(JSSmart<CJSValue> arrPageIndexes, JSSmart<CJSValue> data);
JSSmart<CJSValue> MergePages(JSSmart<CJSValue> data, JSSmart<CJSValue> nMaxID, JSSmart<CJSValue> sPrefixForm);
JSSmart<CJSValue> UnmergePages();
DECLARE_EMBED_METHODS
};

View File

@ -196,7 +196,9 @@ JSSmart<CJSValue> CGraphicsEmbed::create(JSSmart<CJSValue> Native, JSSmart<CJSVa
}
JSSmart<CJSValue> CGraphicsEmbed::Destroy()
{
// For save image bits, if needed.
m_pInternal->Destroy();
RELEASEOBJECT(m_pInternal);
return NULL;
}
JSSmart<CJSValue> CGraphicsEmbed::EndDraw()

View File

@ -45,7 +45,7 @@ public:
public:
CBuilderDocumentEmbed() : m_pBuilder(NULL), m_bIsValid(false) {}
~CBuilderDocumentEmbed() { if(m_pBuilder) RELEASEOBJECT(m_pBuilder); }
~CBuilderDocumentEmbed() { if(m_pBuilder && !m_isExternalize) RELEASEOBJECT(m_pBuilder); }
virtual void* getObject() { return (void*)m_pBuilder; }
NSDoctRenderer::CDocBuilder_Private* GetPrivate(NSDoctRenderer::CDocBuilder* pBuilder) { return pBuilder->GetPrivate(); }

View File

@ -88,6 +88,7 @@ JSSmart<CJSValue> CBuilderEmbed::OpenTmpFile(JSSmart<CJSValue> path, JSSmart<CJS
JSSmart<CJSObject> oBuilderTmpDoc = CJSContext::createEmbedObject("CBuilderDocumentEmbed");
CBuilderDocumentEmbed* pBuilderTmpDocNative = static_cast<CBuilderDocumentEmbed*>(oBuilderTmpDoc->getNative());
pBuilderTmpDocNative->m_pBuilder = m_pBuilder;
pBuilderTmpDocNative->SetExternalize(true);
pBuilderTmpDocNative->_OpenFile(sPath, sParams);
return oBuilderTmpDoc->toValue();
}

View File

@ -47,7 +47,7 @@ public:
NSDoctRenderer::CDocBuilder* m_pBuilder;
CBuilderEmbed() : m_pBuilder(NULL) {}
~CBuilderEmbed() { if(m_pBuilder) RELEASEOBJECT(m_pBuilder); }
~CBuilderEmbed() { if(m_pBuilder && !m_isExternalize) RELEASEOBJECT(m_pBuilder); }
virtual void* getObject() { return (void*)m_pBuilder; }
NSDoctRenderer::CDocBuilder_Private* GetPrivate() { return m_pBuilder->GetPrivate(); }

View File

@ -27,6 +27,9 @@
-(JSValue*) ScanPage : (JSValue*)nPageIndex : (JSValue*)mode;
-(JSValue*) GetImageBase64 : (JSValue*)rId;
-(JSValue*) FreeWasmData : (JSValue*)typedArray;
-(JSValue*) SplitPages : (JSValue*)arrPageIndexes : (JSValue*)data;
-(JSValue*) MergePages : (JSValue*)data : (JSValue*)nMaxID : (JSValue*)sPrefixForm;
-(JSValue*) UnmergePages;
@end
@interface CJSCDrawingFileEmbed : NSObject<IJSCDrawingFileEmbed, JSEmbedObjectProtocol>
@ -61,6 +64,9 @@ FUNCTION_WRAPPER_JS_0(IsNeedCMap, IsNeedCMap)
FUNCTION_WRAPPER_JS_2(ScanPage, ScanPage)
FUNCTION_WRAPPER_JS_1(GetImageBase64, GetImageBase64)
FUNCTION_WRAPPER_JS_1(FreeWasmData, FreeWasmData)
FUNCTION_WRAPPER_JS_2(SplitPages, SplitPages)
FUNCTION_WRAPPER_JS_3(MergePages, MergePages)
FUNCTION_WRAPPER_JS_0(UnmergePages, UnmergePages)
@end
class CDrawingFileEmbedAdapter : public CJSEmbedObjectAdapterJSC

View File

@ -30,6 +30,9 @@ namespace NSDrawingFileEmbed
FUNCTION_WRAPPER_V8_2(_ScanPage, ScanPage)
FUNCTION_WRAPPER_V8_1(_GetImageBase64, GetImageBase64)
FUNCTION_WRAPPER_V8_1(_FreeWasmData, FreeWasmData)
FUNCTION_WRAPPER_V8_2(_SplitPages, SplitPages)
FUNCTION_WRAPPER_V8_3(_MergePages, MergePages)
FUNCTION_WRAPPER_V8_0(_UnmergePages, UnmergePages)
v8::Handle<v8::ObjectTemplate> CreateTemplate(v8::Isolate* isolate)
{
@ -59,6 +62,9 @@ namespace NSDrawingFileEmbed
NSV8Objects::Template_Set(result, "ScanPage", _ScanPage);
NSV8Objects::Template_Set(result, "GetImageBase64", _GetImageBase64);
NSV8Objects::Template_Set(result, "FreeWasmData", _FreeWasmData);
NSV8Objects::Template_Set(result, "SplitPages", _SplitPages);
NSV8Objects::Template_Set(result, "MergePages", _MergePages);
NSV8Objects::Template_Set(result, "UnmergePages", _UnmergePages);
return handle_scope.Escape(result);
}

View File

@ -42,6 +42,7 @@ namespace NSGraphics
m_pRenderer = NSGraphics::Create();
m_pRenderer->SetFontManager(pManager);
RELEASEINTERFACE(pManager);
int nRasterW = (int)width_px;
int nRasterH = (int)height_px;

View File

@ -115,17 +115,16 @@ namespace NSGraphics
class CGraphics
{
public:
CGraphicsAppImage* m_pAppImage;
CGraphicsAppImage* m_pAppImage = nullptr;
CBgraFrame m_oFrame;
private:
NSGraphics::IGraphicsRenderer* m_pRenderer;
NSGraphics::IGraphicsRenderer* m_pRenderer = nullptr;
CGrState m_oGrState;
public:
CGraphics()
{
m_pAppImage = NULL;
}
~CGraphics()
{

View File

@ -31,6 +31,7 @@ namespace NSJSBase {
{
embed_native_internal = nullptr;
m_pAdapter = nullptr;
m_isExternalize = false;
}
CJSEmbedObject::~CJSEmbedObject()
@ -44,6 +45,16 @@ namespace NSJSBase {
return nullptr;
}
void CJSEmbedObject::SetExternalize(const bool& isExternalize)
{
m_isExternalize = isExternalize;
}
bool CJSEmbedObject::GetExternalize()
{
return m_isExternalize;
}
CJSEmbedObjectAdapterBase* CJSEmbedObject::getAdapter()
{
return nullptr;

View File

@ -194,10 +194,18 @@ namespace NSJSBase
*/
virtual CJSEmbedObjectAdapterBase* getAdapter();
/**
* Use the externalize flag if you are monitoring the object's destruction yourself.
*/
virtual void SetExternalize(const bool& isExternalize = true);
virtual bool GetExternalize();
protected:
CJSEmbedObjectPrivateBase* embed_native_internal;
CJSEmbedObjectAdapterBase* m_pAdapter;
bool m_isExternalize;
friend class CJSEmbedObjectPrivateBase;
friend class CJSEmbedObjectPrivate;
};
@ -483,6 +491,12 @@ namespace NSJSBase
*/
void Exit();
/**
* Сheck if context is current.
* This method is not safe.
*/
bool IsEntered();
/**
* Embeds specified class in JS contexts.
* @tparam T Embedded class name.

View File

@ -10,6 +10,7 @@
@protocol JSEmbedObjectProtocol
-(void*) getNative;
-(void) freeNative;
@end
#if __has_feature(objc_arc)
@ -41,6 +42,10 @@
-(void*) getNative \
{ \
return m_internal; \
} \
-(void) freeNative \
{ \
RELEASEOBJECT(m_internal); \
}
namespace NSJSBase

View File

@ -34,6 +34,7 @@ namespace NSJSBase
// embed
id CreateEmbedNativeObject(NSString* name);
void FreeNativeObject(id embedded_object);
}
namespace NSJSBase

View File

@ -232,10 +232,14 @@ namespace NSJSBase
{
[m_internal->context evaluateScript:@"function jsc_toBase64(r){for(var o=[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"+\",\"/\"],a=r.length,f=4*(a/3>>0),n=f/76>>0,t=19,v=0,e=[],i=\"\",s=0;s<=n;s++){s==n&&(t=f%76/4>>0);for(var u=0;u<t;u++){for(var c=0,h=0;h<3;h++)c|=r[0+v++],c<<=8;i=\"\";for(var A=0;A<4;A++){i+=o[c>>>26&255],c<<=6,c&=4294967295}e.push(i)}}if(n=a%3!=0?a%3+1:0){for(c=0,h=0;h<3;h++)h<a%3&&(c|=r[0+v++]),c<<=8;i=\"\";for(A=0;A<n;A++){i+=o[c>>>26&255],c<<=6}t=0!=n?4-n:0;for(u=0;u<t;u++)i+=\"=\";e.push(i)}return e.join(\"\")}function jsc_fromBase64(r,o){for(var a,f=r.length,n=0,t=new Array(void 0===o?f:o),v=t,e=0,i=0;e<f;){for(var s=0,u=0,c=0;c<4&&!(f<=e);c++){var h=65<=(a=r.charCodeAt(e++))&&a<=90?a-65:97<=a&&a<=122?a-71:48<=a&&a<=57?a+4:43==a?62:47==a?63:-1;-1!=h?(s<<=6,s|=h,u+=6):c--}for(s<<=24-u,i=u>>>3,c=0;c<i;c++)v[n++]=(16711680&s)>>>16,s<<=8}return t}\n"];
}
// insert CreateEmbedObject() function to global object of this context
// insert embed functions to global object of this context
m_internal->context[@"CreateEmbedObject"] = ^(NSString* name) {
return CreateEmbedNativeObject(name);
};
m_internal->context[@"FreeEmbedObject"] = ^(id embedded_object) {
FreeNativeObject(embedded_object);
};
JSValue* global_js = [m_internal->context globalObject];
[global_js setValue:global_js forProperty:[[NSString alloc] initWithUTF8String:"window"]];
@ -246,6 +250,8 @@ namespace NSJSBase
{
CGlobalContext::GetInstance().UnregisterContextForId(*i);
}
// remove any exceptions pending to not prevent any JSValue deallocations
m_internal->context.exception = nil;
m_internal->context = nil;
}
@ -439,6 +445,11 @@ namespace NSJSBase
{
}
bool CJSContext::IsEntered()
{
return true;
}
class CJSLocalScopePrivate
{
public:
@ -498,6 +509,15 @@ namespace NSJSBase
return pEmbedObj;
}
void FreeNativeObject(id embedded_object)
{
// check if the object was actually embedded and do nothing if it wasn't
if ([embedded_object conformsToProtocol:@protocol(JSEmbedObjectProtocol)])
{
[embedded_object freeNative];
}
}
JSSmart<CJSValue> CJSEmbedObjectAdapterJSC::Native2Value(JSValue* value)
{
return js_value(value);

View File

@ -214,12 +214,41 @@ namespace NSJSBase
m_internal->m_contextPersistent.Reset(isolate, v8::Context::New(isolate));
// create temporary local handle to context
m_internal->m_context = v8::Local<v8::Context>::New(isolate, m_internal->m_contextPersistent);
// insert CreateEmbedObject() function to global object of this context
// insert embed functions to global object of this context
m_internal->InsertToGlobal("CreateEmbedObject", CreateEmbedNativeObject);
m_internal->InsertToGlobal("FreeEmbedObject", FreeNativeObject);
// clear temporary local handle
m_internal->m_context.Clear();
}
}
class WeakHandleVisitor : public v8::PersistentHandleVisitor
{
private:
WeakHandleVisitor() = default;
public:
void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t class_id) override
{
if (class_id == CJSEmbedObjectPrivate::kWeakHandleId)
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
v8::Local<v8::Object> handle = value->Get(isolate).As<v8::Object>();
v8::Local<v8::External> field = v8::Local<v8::External>::Cast(handle->GetInternalField(0));
CJSEmbedObject* native = static_cast<CJSEmbedObject*>(field->Value());
delete native;
}
}
public:
static WeakHandleVisitor* getInstance()
{
static WeakHandleVisitor visitor;
return &visitor;
}
};
void CJSContext::Dispose()
{
#ifdef V8_INSPECTOR
@ -228,7 +257,13 @@ namespace NSJSBase
#endif
m_internal->m_contextPersistent.Reset();
m_internal->m_isolate->Dispose();
// destroy native object in the weak handles before isolate disposal
v8::Isolate* isolate = m_internal->m_isolate;
{
v8::Isolate::Scope scope(isolate);
isolate->VisitHandlesWithClassIds(WeakHandleVisitor::getInstance());
}
isolate->Dispose();
m_internal->m_isolate = NULL;
}
@ -255,6 +290,8 @@ namespace NSJSBase
m_internal->m_context = v8::Local<v8::Context>::New(isolate, m_internal->m_contextPersistent);
if (!m_internal->m_context.IsEmpty())
m_internal->m_context->Enter();
m_internal->m_entered = true;
}
void CJSContext::Exit()
@ -271,6 +308,13 @@ namespace NSJSBase
else
m_internal->m_context = m_internal->m_isolate->GetCurrentContext();
m_internal->m_isolate->Exit();
m_internal->m_entered = false;
}
bool CJSContext::IsEntered()
{
return m_internal->m_entered;
}
CJSValue* CJSContext::createUndefined()
@ -646,4 +690,22 @@ namespace NSJSBase
NSJSBase::CJSEmbedObjectPrivate::CreateWeaker(obj);
args.GetReturnValue().Set(obj);
}
void FreeNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
if (args.Length() != 1)
{
args.GetReturnValue().Set(v8::Undefined(isolate));
return;
}
v8::Local<v8::Object> obj = args[0].As<v8::Object>();
v8::Local<v8::External> field = v8::Local<v8::External>::Cast(obj->GetInternalField(0));
CJSEmbedObject* native = static_cast<CJSEmbedObject*>(field->Value());
delete native;
// weak persistent handle will be cleared and removed in CJSEmbedObjectPrivate destructor
}
}

View File

@ -857,12 +857,14 @@ namespace NSJSBase
v8::Local<v8::Context> m_context;
v8::StartupData m_startup_data;
bool m_entered;
public:
CJSContextPrivate() : m_isolate(NULL)
{
m_startup_data.data = NULL;
m_startup_data.raw_size = 0;
m_entered = false;
}
void InsertToGlobal(const std::string& name, v8::FunctionCallback creator)
@ -881,6 +883,7 @@ namespace NSJSBase
// embed
void CreateEmbedNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args);
void FreeNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args);
class CJSEmbedObjectAdapterV8Template : public CJSEmbedObjectAdapterBase
{
@ -898,6 +901,8 @@ namespace NSJSBase
{
public:
v8::Persistent<v8::Object> handle;
// contstant id for all weak native handles
static const uint16_t kWeakHandleId = 1;
CJSEmbedObjectPrivate(v8::Local<v8::Object> obj)
{
@ -916,6 +921,8 @@ namespace NSJSBase
handle.Reset(CV8Worker::GetCurrent(), obj);
handle.SetWeak(pEmbedObject, EmbedObjectWeakCallback, v8::WeakCallbackType::kParameter);
// set class_id for being able to iterate over all these handles to destroy them on isolate disposal
handle.SetWrapperClassId(kWeakHandleId);
pEmbedObject->embed_native_internal = this;
}
@ -929,8 +936,6 @@ namespace NSJSBase
static void EmbedObjectWeakCallback(const v8::WeakCallbackInfo<CJSEmbedObject>& data)
{
v8::Isolate* isolate = data.GetIsolate();
v8::HandleScope scope(isolate);
CJSEmbedObject* wrap = data.GetParameter();
((CJSEmbedObjectPrivate*)wrap->embed_native_internal)->handle.Reset();
delete wrap;

View File

@ -1,4 +1,15 @@
#include "Embed.h"
#include <iostream>
CTestEmbed::CTestEmbed()
{
std::cout << "debug: CTestEmbed constructed" << std::endl;
}
CTestEmbed::~CTestEmbed()
{
std::cout << "debug: CTestEmbed destroyed" << std::endl;
}
#ifdef ENABLE_SUM_DEL
JSSmart<CJSValue> CTestEmbed::FunctionSum(JSSmart<CJSValue> param1, JSSmart<CJSValue> param2)

View File

@ -1,5 +1,5 @@
#ifndef _BUILD_NATIVE_HASH_EMBED_H_
#define _BUILD_NATIVE_HASH_EMBED_H_
#ifndef CTESTEMBED_H_
#define CTESTEMBED_H_
#include "js_internal/js_base.h"
@ -10,13 +10,8 @@ using namespace NSJSBase;
class CTestEmbed : public CJSEmbedObject
{
public:
CTestEmbed()
{
}
~CTestEmbed()
{
}
CTestEmbed();
~CTestEmbed();
virtual void* getObject() override { return NULL; }
@ -33,4 +28,4 @@ public:
DECLARE_EMBED_METHODS
};
#endif // _BUILD_NATIVE_HASH_EMBED_H_
#endif // CTESTEMBED_H_

View File

@ -1,278 +1,14 @@
/*
* (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 "test_functions.h"
#include <iostream>
#include "embed/Default.h"
#include "js_internal/js_base.h"
#include "Embed.h"
using namespace NSJSBase;
int main(int argc, char *argv[])
int main()
{
#if 0
// Primitives example
// TODO: test
JSSmart<CJSContext> oContext1 = new CJSContext(false);
oContext1->Initialize();
JSSmart<CJSContext> oContext2 = new CJSContext;
// oContext2->Initialize();
// Work with first context
oContext1->Enter();
{
CJSContextScope scope(oContext1);
CJSLocalScope local_scope;
JSSmart<CJSValue> oResLocal = oContext1->runScript("function f() { return 'Local scope test'; }; f();");
std::cout << oResLocal->toStringA() << std::endl;
}
JSSmart<CJSObject> oGlobal1 = oContext1->GetGlobal();
JSSmart<CJSValue> oVar2 = oContext1->createString("Hel");
oGlobal1->set("v1", oVar2.GetPointer());
oContext1->runScript("var res = v1 + 'lo'");
oContext1->Exit();
// Work with second context with CJSContextScope usage
{
CJSContextScope scope(oContext2);
JSSmart<CJSObject> oGlobal2 = oContext2->GetGlobal();
JSSmart<CJSValue> oVar4 = oContext2->createString("Wor");
oGlobal2->set("v1", oVar4.GetPointer());
oContext2->runScript("var res = v1 + 'ld!'");
}
// Print result from first context
oContext1->Enter();
JSSmart<CJSValue> oRes1 = oContext1->runScript("function f() { return res; }; f();");
std::string strRes1 = oRes1->toStringA();
std::cout << strRes1 << std::endl;
// Print second variable
oContext2->Enter();
JSSmart<CJSValue> oRes2 = oContext1->runScript("function f() { return res; }; f();");
std::string strRes2 = oRes2->toStringA();
std::cout << strRes2 << std::endl;
oContext2->Exit();
oContext1->Exit();
// oContext1->Dispose();
oContext2->Dispose();
#endif
#if 0
// External embed example
JSSmart<CJSContext> oContext1 = new CJSContext();
// Embedding
CJSContextScope scope(oContext1);
CJSContext::Embed<CTestEmbed>();
JSSmart<CJSValue> oResTestEmbed1 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionSum(10, 5); })();");
std::cout << "FunctionSum(10, 5) = " << oResTestEmbed1->toInt32() << std::endl;
JSSmart<CJSValue> oResTestEmbed2 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionSquare(4); })();");
std::cout << "FunctionSquare(4) = " << oResTestEmbed2->toInt32() << std::endl;
JSSmart<CJSValue> oResTestEmbed3 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionDel(30, 3); })();");
std::cout << "FunctionDel(30, 3) = " << oResTestEmbed3->toInt32() << std::endl;
JSSmart<CJSValue> oResTestEmbed4 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionGet(); })();");
std::cout << "FunctionGet() = " << oResTestEmbed4->toInt32() << std::endl;
#endif
#if 0
// CZipEmbed example
JSSmart<CJSContext> oContext1 = new CJSContext();
JSSmart<CJSContext> oContext2 = new CJSContext();
// Work with first context
oContext1->Enter();
CreateDefaults();
JSSmart<CJSValue> oRes1 = oContext1->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "');\n"
"oZip.close();");
oContext1->Exit();
// Work with second context
{
CJSContextScope scope(oContext2);
// CreateDefaults();
JSSmart<CJSValue> oRes2 = oContext2->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "/../embed');\n"
"oZip.close();");
}
// Print first result
oContext1->Enter();
JSSmart<CJSObject> oGlobal1 = oContext1->GetGlobal();
JSSmart<CJSArray> oFiles1 = oGlobal1->get("files")->toArray();
std::cout << "\nRESULT FROM CONTEXT 1:\n";
for (int i = 0; i < oFiles1->getCount(); i++)
{
std::cout << oFiles1->get(i)->toStringA() << std::endl;
}
// Print second result
oContext2->Enter();
JSSmart<CJSObject> oGlobal2 = oContext2->GetGlobal();
JSSmart<CJSArray> oFiles2 = oGlobal2->get("files")->toArray();
std::cout << "\nRESULT FROM CONTEXT 2:\n";
for (int i = 0; i < oFiles2->getCount(); i++)
{
std::cout << oFiles2->get(i)->toStringA() << std::endl;
}
oContext2->Exit();
oContext1->Exit();
#endif
#if 0
// CHashEmbed example
JSSmart<CJSContext> oContext1 = new CJSContext();
// Call hash() on first context
CJSContextScope scope(oContext1);
CreateDefaults();
JSSmart<CJSValue> oRes1 = oContext1->runScript(
"var oHash = CreateEmbedObject('CHashEmbed');\n"
"var str = 'test';\n"
"var hash = oHash.hash(str, str.length, 0);");
// Print first result
JSSmart<CJSObject> oGlobal1 = oContext1->GetGlobal();
JSSmart<CJSTypedArray> oHash = oGlobal1->get("hash")->toTypedArray();
std::cout << "\nRESULTED HASH:\n";
for (int i = 0; i < oHash->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(oHash->getData().Data[i]);
}
std::cout << std::endl;
// Call hash2() on first context
JSSmart<CJSValue> oRes2 = oContext1->runScript(
"var str2 = 'test';\n"
"var hash2 = oHash.hash2(str2, 'yrGivlyCImiWnryRee1OJw==', 100000, 7);");
// Print first result
JSSmart<CJSTypedArray> oHash2 = oGlobal1->get("hash2")->toTypedArray();
std::cout << "\nRESULTED HASH2:\n";
for (int i = 0; i < oHash2->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(oHash2->getData().Data[i]);
}
std::cout << std::endl;
#endif
#if 1
// Mixed embed example
JSSmart<CJSContext> oContext1 = new CJSContext();
// External CTestEmbed
CJSContextScope scope(oContext1);
CJSContext::Embed<CTestEmbed>(false);
JSSmart<CJSValue> oResTestEmbed1 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionSum(10, 5); })();");
if (oResTestEmbed1->isNumber())
std::cout << "FunctionSum(10, 5) = " << oResTestEmbed1->toInt32() << std::endl;
JSSmart<CJSObject> oTestEmbed = CJSContext::createEmbedObject("CTestEmbed");
// JSSmart<CJSValue> oResTestEmbed2 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionSquare(4); })();");
JSSmart<CJSValue> args2[1];
args2[0] = CJSContext::createInt(4);
JSSmart<CJSValue> oResTestEmbed2 = oTestEmbed->call_func("FunctionSquare", 1, args2);
if (oResTestEmbed2->isNumber())
std::cout << "FunctionSquare(4) = " << oResTestEmbed2->toInt32() << std::endl;
// JSSmart<CJSValue> oResTestEmbed3 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionDel(30, 3); })();");
JSSmart<CJSValue> args3[2];
args3[0] = CJSContext::createInt(30);
args3[1] = CJSContext::createInt(3);
JSSmart<CJSValue> oResTestEmbed3 = oTestEmbed->call_func("FunctionDel", 2, args3);
if (oResTestEmbed3->isNumber())
std::cout << "FunctionDel(30, 3) = " << oResTestEmbed3->toInt32() << std::endl;
JSSmart<CJSValue> oResTestEmbed4 = oContext1->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionGet(); })();");
if (oResTestEmbed4->isNumber())
std::cout << "FunctionGet() = " << oResTestEmbed4->toInt32() << std::endl;
// Internal CHashEmbed
CreateDefaults();
oContext1->runScript(
"var oHash = CreateEmbedObject('CHashEmbed');\n"
"var str = 'test';\n"
"var hash = oHash.hash(str, str.length, 0);");
// Print hash
JSSmart<CJSObject> oGlobal = oContext1->GetGlobal();
JSSmart<CJSTypedArray> oHash = oGlobal->get("hash")->toTypedArray();
std::cout << "\nRESULTED HASH:\n";
for (int i = 0; i < oHash->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(oHash->getData().Data[i]);
}
std::cout << std::endl;
// Internal CZipEmbed
oContext1->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "');\n"
"oZip.close();");
// Print files
JSSmart<CJSArray> oFiles1 = oGlobal->get("files")->toArray();
std::cout << "\nFILES IN CURRENT DIRECTORY:\n";
for (int i = 0; i < oFiles1->getCount(); i++)
{
std::cout << oFiles1->get(i)->toStringA() << std::endl;
}
#endif
// testMultipleContexts();
testEmbedExternal();
// testEmbedInternal();
// testHashEmbed();
// testEmbedMixed();
return 0;
}

View File

@ -0,0 +1,14 @@
#include "test_functions.h"
int main()
{
// all test functions should be called inside the `@autoreleasepool` block!
@autoreleasepool
{
testEmbedExternal();
// testHashEmbed();
// testEmbedMixed();
}
return 0;
}

View File

@ -29,10 +29,18 @@ core_linux {
LIBS += -ldl
}
SOURCES += main.cpp \
Embed.cpp
HEADERS += \
Embed.h
Embed.h \
test_functions.h
SOURCES += \
Embed.cpp \
test_functions.cpp
use_javascript_core {
OBJECTIVE_SOURCES += main.mm
} else {
SOURCES += main.cpp
}
ADD_FILES_FOR_EMBEDDED_CLASS_HEADER(Embed.h)

View File

@ -0,0 +1,286 @@
#include "test_functions.h"
#include <iostream>
#include "embed/Default.h"
#include "js_internal/js_base.h"
#include "Embed.h"
using namespace NSJSBase;
void testMultipleContexts()
{
// passing `false` when creating CJSContext means that we need to initialize it manually
JSSmart<CJSContext> context1 = new CJSContext(false);
context1->Initialize();
// while creating CJSContext without any arguments will create initialized CJSContext
JSSmart<CJSContext> context2 = new CJSContext;
// we don't need it:
// oContext2->Initialize();
// entering the first context
context1->Enter();
{
// entering the first context the second time in scope creation - it's allowed and the scopes stack correctly
CJSContextScope scope(context1);
// allocate new local variables inside a custom local scope instead of
// the one that is provided by CJSContextScope by default
CJSLocalScope local_scope;
JSSmart<CJSValue> res_local = context1->runScript("(function() { return 'Local scope test'; })();");
std::cout << res_local->toStringA() << std::endl;
// the first context is going to be exited at the end of the scope
}
// at this moment we are still inside the first context, since we have entered it twices
JSSmart<CJSObject> global1 = context1->GetGlobal();
JSSmart<CJSValue> var = context1->createString("Hel");
global1->set("v1", var);
// here `res` is set to be "Hello"
context1->runScript("var res = v1 + 'lo'");
// exit from the first context
context1->Exit();
// now we are going to work with the second context
{
// enter the second context via context scope
CJSContextScope scope(context2);
JSSmart<CJSObject> global2 = context2->GetGlobal();
JSSmart<CJSValue> var = context2->createString("Wor");
global2->set("v1", var);
// `res` is "World!"
context2->runScript("var res = v1 + 'ld!'");
// the second context is going to be exited at the end of the scope
}
// enter the first context
context1->Enter();
// print `res` variable from the first context
JSSmart<CJSValue> res1 = context1->runScript("(function() { return res; })();");
std::string str_res1 = res1->toStringA();
std::cout << str_res1 << ", ";
// make new variable `v2` in first context
// important to note, that accessing previous `global1` object is undefined behaviour and can lead to crashes!
// that is because when we exited from the first context, every local handle inside CJSValue and CJSObject was invalidated
global1 = context1->GetGlobal();
global1->set("v2", CJSContext::createInt(42));
// enter from the second context (notice, we haven't exited the first context before)
context2->Enter();
// print `res` variable from the second context
JSSmart<CJSValue> res2 = context1->runScript("(function() { return res; })();");
std::string str_res2 = res2->toStringA();
std::cout << str_res2 << std::endl;
// exit from the second context
context2->Exit();
// at this moment we are still in the first context
// we can validate that accessing `v2` variable, which exists only in the first context
global1 = context1->GetGlobal();
std::cout << global1->get("v2")->toInt32() << std::endl;
// exit from the first context
context1->Exit();
// manual disposing is not necessary, since it's going to be called in CJSContext's destructor anyway
// so we don't need to explicitly write:
// oContext1->Dispose();
// but still nothing wrong will happen if we do:
context2->Dispose();
}
void testEmbedExternal()
{
JSSmart<CJSContext> context = new CJSContext();
// Embedding
CJSContextScope scope(context);
CJSContext::Embed<CTestEmbed>();
JSSmart<CJSValue> res1 = context->runScript("(function() { let value = CreateEmbedObject('CTestEmbed'); let ret = value.FunctionSum(10, 5); FreeEmbedObject(value); return ret; })();");
std::cout << "FunctionSum(10, 5) = " << res1->toInt32() << std::endl;
JSSmart<CJSValue> res2 = context->runScript("(function() { let value = CreateEmbedObject('CTestEmbed'); let ret = value.FunctionSquare(4); FreeEmbedObject(value); return ret; })();");
std::cout << "FunctionSquare(4) = " << res2->toInt32() << std::endl;
JSSmart<CJSValue> res3 = context->runScript("(function() { let value = CreateEmbedObject('CTestEmbed'); let ret = value.FunctionDel(30, 3); FreeEmbedObject(value); return ret; })();");
std::cout << "FunctionDel(30, 3) = " << res3->toInt32() << std::endl;
JSSmart<CJSValue> res4 = context->runScript("(function() { let value = CreateEmbedObject('CTestEmbed'); let ret = value.FunctionGet(); FreeEmbedObject(value); return ret; })();");
std::cout << "FunctionGet() = " << res4->toInt32() << std::endl;
}
void testEmbedInternal()
{
// create both contexts
JSSmart<CJSContext> context1 = new CJSContext();
JSSmart<CJSContext> context2 = new CJSContext();
// work with the first context
context1->Enter();
// create embedding info for internally embedded objects (CZipEmbed is the one of them)
CreateDefaults();
context1->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "');\n"
"oZip.close();"
);
context1->Exit();
// work with the second context via context scope
{
CJSContextScope scope(context2);
// function CJSContext::Embed() is context-independent, so we don't actually need to call it in another context
// CreateDefaults();
context2->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "/../../../embed');\n"
"oZip.close();"
);
}
// print the files from the first context
context1->Enter();
JSSmart<CJSObject> global1 = context1->GetGlobal();
JSSmart<CJSArray> file_list1 = global1->get("files")->toArray();
std::cout << "\nRESULT FROM CONTEXT 1:\n";
for (int i = 0; i < file_list1->getCount(); i++)
{
std::cout << file_list1->get(i)->toStringA() << std::endl;
}
// print the files from the second result (note, we haven't exited the first context before)
context2->Enter();
JSSmart<CJSObject> global2 = context2->GetGlobal();
JSSmart<CJSArray> file_list2 = global2->get("files")->toArray();
std::cout << "\nRESULT FROM CONTEXT 2:\n";
for (int i = 0; i < file_list2->getCount(); i++)
{
std::cout << file_list2->get(i)->toStringA() << std::endl;
}
// exit the contexts in reverse order
context2->Exit();
context1->Exit();
}
void testHashEmbed()
{
JSSmart<CJSContext> context = new CJSContext();
// test hash()
CJSContextScope scope(context);
CreateDefaults();
context->runScript(
"var oHash = CreateEmbedObject('CHashEmbed');\n"
"var str = 'test';\n"
"var hash = oHash.hash(str, str.length, 0);"
);
JSSmart<CJSObject> global = context->GetGlobal();
JSSmart<CJSTypedArray> res_hash = global->get("hash")->toTypedArray();
std::cout << "\nRESULTED HASH:\n";
for (int i = 0; i < res_hash->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(res_hash->getData().Data[i]);
}
std::cout << std::endl;
// test hash2()
context->runScript(
"var str2 = 'test';\n"
"var hash2 = oHash.hash2(str2, 'yrGivlyCImiWnryRee1OJw==', 100000, 7);"
);
JSSmart<CJSTypedArray> res_hash2 = global->get("hash2")->toTypedArray();
std::cout << "\nRESULTED HASH2:\n";
for (int i = 0; i < res_hash2->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(res_hash2->getData().Data[i]);
}
std::cout << std::endl;
}
void testEmbedMixed()
{
JSSmart<CJSContext> context = new CJSContext();
CJSContextScope scope(context);
// --- test external embedding with CTestEmbed ---
// embed with `false` - means we are not able to create the object directly from JavaScript.
CJSContext::Embed<CTestEmbed>(false);
// example of incorrect usage:
JSSmart<CJSValue> res1 = context->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionSum(10, 5); })();");
if (res1->isNumber())
{
// this wouldn't print anything, since `res1` not a number - embedded object was not created in JS and exception was thrown.
std::cout << "FunctionSum(10, 5) = " << res1->toInt32() << std::endl;
}
// example of correct usage:
JSSmart<CJSObject> embedded_object = CJSContext::createEmbedObject("CTestEmbed");
JSSmart<CJSValue> args2[1];
args2[0] = CJSContext::createInt(4);
JSSmart<CJSValue> res2 = embedded_object->call_func("FunctionSquare", 1, args2);
if (res2->isNumber())
{
// should print: "FunctionSquare(4) = 16"
std::cout << "FunctionSquare(4) = " << res2->toInt32() << std::endl;
}
// another example of correct usage:
JSSmart<CJSValue> args3[2];
args3[0] = CJSContext::createInt(30);
args3[1] = CJSContext::createInt(3);
JSSmart<CJSValue> oResTestEmbed3 = embedded_object->call_func("FunctionDel", 2, args3);
if (oResTestEmbed3->isNumber())
{
// should print: "FunctionDel(30, 3) = 10"
std::cout << "FunctionDel(30, 3) = " << oResTestEmbed3->toInt32() << std::endl;
}
// another example of incorrect usage:
JSSmart<CJSValue> oResTestEmbed4 = context->runScript("(function() { var value = CreateEmbedObject('CTestEmbed'); return value.FunctionGet(); })();");
if (oResTestEmbed4->isNumber())
{
// again, this won't be executed and nothing will be printed
std::cout << "FunctionGet() = " << oResTestEmbed4->toInt32() << std::endl;
}
// --- test internal embedding with CHashEmbed ---
CreateDefaults();
context->runScript(
"var oHash = CreateEmbedObject('CHashEmbed');\n"
"var str = 'test';\n"
"var hash = oHash.hash(str, str.length, 0);"
);
// print hash
JSSmart<CJSObject> global = context->GetGlobal();
JSSmart<CJSTypedArray> hash = global->get("hash")->toTypedArray();
std::cout << "\nRESULTED HASH:\n";
for (int i = 0; i < hash->getCount(); i++)
{
std::cout << std::hex << static_cast<unsigned>(hash->getData().Data[i]);
}
std::cout << std::endl;
// --- test internal embedding with CZipEmbed ---
context->runScript(
"var oZip = CreateEmbedObject('CZipEmbed');\n"
"var files = oZip.open('" CURR_DIR "');\n"
"oZip.close();"
);
// print files
JSSmart<CJSArray> file_list = global->get("files")->toArray();
std::cout << "\nFILES IN CURRENT DIRECTORY:\n";
for (int i = 0; i < file_list->getCount(); i++)
{
std::cout << file_list->get(i)->toStringA() << std::endl;
}
}

View File

@ -0,0 +1,34 @@
#ifndef TEST_FUNCTIONS_H_
#define TEST_FUNCTIONS_H_
/**
* NOTE: V8 ONLY!
* The function tests the work of two CJSContexts in one thread.
* Current working context is managed with Enter() and Exit() functions, or with CJSContextScope.
*/
void testMultipleContexts();
/**
* The function tests external embedding functionality by embedding CTestEmbed class.
*/
void testEmbedExternal();
/**
* NOTE: V8 ONLY!
* The function tests internal embedding functionality by using CZipEmbed class.
* It also shows how embedding works for two CJSContext in the same thread (similar to testMultipleContexts()).
*/
void testEmbedInternal();
/**
* The function tests CHashEmbed class that is embedded internally.
*/
void testHashEmbed();
/**
* The function tests both internal and external embedding in a more complicated way.
*/
void testEmbedMixed();
#endif // TEST_FUNCTIONS_H_

View File

@ -1853,6 +1853,16 @@ std::vector<std::wstring> CApplicationFonts::GetSetupFontFiles(const bool& bIsUs
#if defined(_MAC) && !defined(_IOS)
std::vector<std::wstring> _array = NSDirectory::GetFiles(L"/Library/Fonts", true);
NSDirectory::GetFiles2(L"/System/Library/Fonts", _array, true);
std::set<std::wstring> installedList = GetInstalledFontsMac();
for (const auto& sysPath : installedList) {
if (0 == sysPath.find(L"/System/Library/Fonts/"))
continue;
if (0 == sysPath.find(L"/Library/Fonts/"))
continue;
_array.push_back(sysPath);
}
return _array;
#endif
@ -1958,6 +1968,10 @@ namespace NSFonts
if (FT_Open_Face(m_internal->m_library, &oOpenArgs, nFaceIndex, &pFace))
return;
bool bIsASC = false;
if (pFace->family_name && (0 == strcmp(pFace->family_name, "ASCW3")))
bIsASC = true;
for (int nCharMap = 0; nCharMap < pFace->num_charmaps; nCharMap++)
{
FT_Set_Charmap(pFace, pFace->charmaps[nCharMap]);
@ -1967,7 +1981,8 @@ namespace NSFonts
while (indexG)
{
pChecker->Check((int)character, indexG);
if (!bIsASC || (character < 35 || character > 255))
pChecker->Check((int)character, indexG);
character = FT_Get_Next_Char(pFace, character, &indexG);
}
}

View File

@ -38,6 +38,7 @@
#include <vector>
#include <list>
#include "FontManager.h"
#include <set>
namespace NSFonts
{
@ -354,6 +355,10 @@ public:
void InitFromReg();
#endif
#if defined(_MAC) && !defined(_IOS)
std::set<std::wstring> GetInstalledFontsMac();
#endif
NSFonts::IFontManager* GenerateFontManager();
std::wstring GetFontBySymbol(int symbol);

View File

@ -877,6 +877,11 @@ public:
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang SC", 36));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang TC", 37));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang HK", 38));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Heiti SC", 39));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Heiti TC", 40));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Songti SC", 41));
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Songti TC", 42));
#endif
NSFonts::CApplicationFontsSymbols oApplicationChecker;
@ -1604,6 +1609,14 @@ NSFonts::IApplicationFonts* CApplicationFontsWorker::Check()
if (m_sDirectory.empty())
return NULL;
for (std::vector<std::wstring>::iterator i = m_arAdditionalFolders.begin(); i != m_arAdditionalFolders.end(); i++)
{
if (0 == i->find(L"./"))
*i = NSFile::GetProcessDirectory() + L"/" + i->substr(2);
else if (0 == i->find(L"../"))
*i = NSFile::GetProcessDirectory() + L"/" + *i;
}
std::wstring strAllFontsJSPath = m_sDirectory + L"/AllFonts.js";
std::wstring strFontsSelectionBin = m_sDirectory + L"/font_selection.bin";

View File

@ -36,7 +36,7 @@
#include <vector>
#include "../graphics/pro/Fonts.h"
#define ONLYOFFICE_FONTS_VERSION 12
#define ONLYOFFICE_FONTS_VERSION 14
#define ONLYOFFICE_ALL_FONTS_VERSION 2
class CApplicationFontsWorkerBreaker

View File

@ -29,39 +29,36 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef PPTX_PRESENTATION_SLDSZ_INCLUDE_H_
#define PPTX_PRESENTATION_SLDSZ_INCLUDE_H_
#include "ApplicationFonts.h"
#include "../common/File.h"
#import <Foundation/Foundation.h>
#import <CoreText/CoreText.h>
#include "./../WrapperWritingElement.h"
#include "./../Limit/SlideSize.h"
namespace PPTX
std::set<std::wstring> CApplicationFonts::GetInstalledFontsMac()
{
namespace nsPresentation
std::set<std::wstring> paths;
CFArrayRef fontURLs = CTFontManagerCopyAvailableFontURLs();
if (!fontURLs)
return paths;
NSStringEncoding encode = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingUTF32LE);
CFIndex count = CFArrayGetCount(fontURLs);
for (CFIndex i = 0; i < count; ++i)
{
class SldSz : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(SldSz)
CFURLRef url = (CFURLRef)CFArrayGetValueAtIndex(fontURLs, i);
if (!url)
continue;
public:
virtual void fromXML(XmlUtils::CXmlNode& node);
virtual std::wstring toXML() const;
NSString* nsPath = [(__bridge NSURL *)url path];
if (!nsPath)
continue;
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const;
NSData* pSData = [nsPath dataUsingEncoding: encode];
paths.emplace(std::wstring((wchar_t*)[pSData bytes], [pSData length] / sizeof (wchar_t)));
}
public:
int cx;
int cy;
nullable_limit<Limit::SlideSize> type;
protected:
virtual void FillParentPointersForChilds();
void Normalize();
};
} // namespace nsPresentation
} // namespace PPTX
#endif // PPTX_PRESENTATION_SLDSZ_INCLUDE_H_
CFRelease(fontURLs);
return paths;
}

View File

@ -83,6 +83,7 @@
"./../../graphics/pro/js/wasm/src/lib",
"./../../../Common/3dParty/harfbuzz/harfbuzz/src",
"./../../../Common/3dParty/brotli/brotli/c/include",
"./../../../OfficeUtils/src",
"./../../../OfficeUtils/src/zlib-1.2.11",
@ -113,6 +114,8 @@
"BUILD_ZLIB_AS_SOURCES",
"IMAGE_CHECKER_DISABLE_XML",
"FT_CONFIG_OPTION_USE_BROTLI",
"BUILDING_WASM_MODULE"
],
"compile_files_array": [
@ -349,6 +352,26 @@
{
"folder": "./../../../Common/3dParty/hyphen/js/src",
"files": ["hyphen.cpp"]
},
{
"folder": "./../../../Common/3dParty/brotli/brotli/c/common",
"files": [
"constants.c",
"context.c",
"dictionary.c",
"platform.c",
"shared_dictionary.c",
"transform.c"
]
},
{
"folder": "./../../../Common/3dParty/brotli/brotli/c/dec",
"files": [
"bit_reader.c",
"decode.c",
"huffman.c",
"state.c"
]
}
]
}

View File

@ -917,15 +917,15 @@ function onLoadFontsModule(window, undefined)
this._mapToNames = AscCommon.spellcheckGetLanguages();
let _langKey = "" + lang;
let _langName = this._mapToNames[_langKey];
if (_langName === undefined)
let _langObj = this._mapToNames[_langKey];
if (!_langObj || !_langObj["hyphen"] || !_langObj["name"])
{
this._dictionaries[_langKey] = false;
callback();
return;
}
this._loadDictionaryAttemt(_langKey, _langName, callback);
this._loadDictionaryAttemt(_langKey, _langObj["name"], callback);
};
this._loadDictionaryAttemt = function(langKey, langName, callback, currentAttempt)

View File

@ -1020,22 +1020,39 @@ void CBooleanOperations::TracePaths()
{
size_t length = Segments1.size();
Result.StartFigure();
bool first_start = true;
for (size_t i = 0; i < length + Segments2.size(); i++)
{
Segment s = i >= length ? Segments2[i - length] : Segments1[i];
bool valid = s.IsValid(Op),
start = true;
start = true;
PointD start_point;
while (valid)
{
if (!start || (Op == Intersection && s.Inters && !GetNextSegment(s).Inters))
SetVisited(s);
if (start)
if (first_start)
{
Result.MoveTo(s.P.X, s.P.Y);
start_point = s.P;
}
else if (start)
{
double x, y;
Result.GetLastPoint(x, y);
if (isZero(start_point.X - x) && isZero(start_point.Y - y))
{
Result.MoveTo(s.P.X, s.P.Y);
start_point = s.P;
}
else
Result.LineTo(s.P.X, s.P.Y);
}
else if (s.IsCurve)
Result.CurveTo(s.HI.X + s.P.X, s.HI.Y + s.P.Y,
s.HO.X + s.P.X, s.HO.Y + s.P.Y,
s.P.X, s.P.Y);
s.HO.X + s.P.X, s.HO.Y + s.P.Y,
s.P.X, s.P.Y);
else
Result.LineTo(s.P.X, s.P.Y);
@ -1065,6 +1082,9 @@ void CBooleanOperations::TracePaths()
if (start)
start = false;
if (first_start)
first_start = false;
}
if (!start && AllOverlap()) break;
@ -1645,12 +1665,14 @@ int CBooleanOperations::CheckInters(const PointD& point, const Segment& segment,
std::vector<double> roots = curve.GetCurveLineIntersection(segment.P.X,segment.P.Y, point.X - segment.P.X, point.Y - segment.P.Y);
Curve line(segment, Segment(point));
int count = 0;
for (const auto& r : roots)
if (line.GetTimeOf(curve.GetPoint(r)) != -1)
count++;
return roots.size() % 2;
return count;
// int count = 0;
// for (const auto& r : roots)
// if (line.GetTimeOf(curve.GetPoint(r)) != -1)
// count++;
// return count;
}
return 0;
}

View File

@ -863,20 +863,22 @@ namespace Aggplus
double CGraphicsPath::GetArea(unsigned idx, bool isCurve) const noexcept
{
float area;
double area;
if (isCurve)
{
std::vector<PointD> points = GetPoints(idx, 4);
area = 3 * ((points[3].Y - points[0].Y) * (points[1].X + points[2].X)
- (points[3].X - points[0].X) * (points[1].Y * points[2].Y)
+ points[1].Y * (points[0].X - points[2].X)
- points[1].X * (points[0].Y - points[2].Y)
+ points[3].Y * (points[2].X + points[0].X / 3)
- points[3].X * (points[2].Y - points[0].Y / 3)) / 20;
area = (points[3].Y - points[0].Y) * (points[1].X + points[2].X)
- (points[3].X - points[0].X) * (points[1].Y + points[2].Y)
+ points[1].Y * (points[0].X - points[2].X)
- points[1].X * (points[0].Y - points[2].Y)
+ points[3].Y * (points[2].X + points[0].X / 3.0)
- points[3].X * (points[2].Y + points[0].Y / 3.0);
}
else
{
std::vector<PointD> points = GetPoints(idx, 2);
area = 4.0 * (points[1].Y * points[0].X - points[1].X * points[0].Y) / 3.0;
}
std::vector<PointD> points = GetPoints(idx, 2);
area = (points[1].Y * points[0].X - points[1].X * points[0].Y) / 20;
return area;
}

View File

@ -214,6 +214,7 @@ int CAnnotFieldInfo::GetFlag() const { return m_nFlag; }
int CAnnotFieldInfo::GetID() const { return m_nID; }
int CAnnotFieldInfo::GetAnnotFlag() const { return m_nAnnotFlag; }
int CAnnotFieldInfo::GetPage() const { return m_nPage; }
int CAnnotFieldInfo::GetCopyAP() const { return m_nCopyAP; }
void CAnnotFieldInfo::GetBE(BYTE& nS, double& dI) { nS = m_pBE.first; dI = m_pBE.second; }
BYTE* CAnnotFieldInfo::GetRender(LONG& nLen)
{
@ -223,6 +224,7 @@ BYTE* CAnnotFieldInfo::GetRender(LONG& nLen)
const std::wstring& CAnnotFieldInfo::GetNM() { return m_wsNM; }
const std::wstring& CAnnotFieldInfo::GetLM() { return m_wsLM; }
const std::wstring& CAnnotFieldInfo::GetOUserID() { return m_wsOUserID; }
const std::wstring& CAnnotFieldInfo::GetOMetadata() { return m_wsOMetadata; }
const std::wstring& CAnnotFieldInfo::GetContents() { return m_wsContents; }
const std::vector<double>& CAnnotFieldInfo::GetC() { return m_arrC; }
@ -359,6 +361,10 @@ bool CAnnotFieldInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMeta
}
if (nFlags & (1 << 7))
m_wsOUserID = pReader->ReadString();
if (nFlags & (1 << 8))
m_nCopyAP = pReader->ReadInt();
if (nFlags & (1 << 9))
m_wsOMetadata = pReader->ReadString();
if (IsMarkup())
{
@ -677,6 +683,7 @@ int CAnnotFieldInfo::CWidgetAnnotPr::GetR() const { return m_nR; }
int CAnnotFieldInfo::CWidgetAnnotPr::GetFlag() const { return m_nFlag; }
int CAnnotFieldInfo::CWidgetAnnotPr::GetFlags() const { return m_nFlags; }
int CAnnotFieldInfo::CWidgetAnnotPr::GetParentID() const { return m_nParentID; }
int CAnnotFieldInfo::CWidgetAnnotPr::GetMEOptions() const { return m_nMEOptions; }
int CAnnotFieldInfo::CWidgetAnnotPr::GetFontStyle() const { return m_nFontStyle; }
double CAnnotFieldInfo::CWidgetAnnotPr::GetFontSize() const { return m_dFS; }
double CAnnotFieldInfo::CWidgetAnnotPr::GetFontSizeAP() const { return m_dFSAP; }
@ -886,6 +893,8 @@ void CAnnotFieldInfo::CWidgetAnnotPr::Read(NSOnlineOfficeBinToPdf::CBufferReader
m_nParentID = pReader->ReadInt();
if (nFlags & (1 << 18))
m_wsT = pReader->ReadString();
if (nFlags & (1 << 21))
m_nMEOptions = pReader->ReadInt();
// Action
int nAction = pReader->ReadInt();
@ -982,7 +991,7 @@ void CAnnotFieldInfo::CWidgetAnnotPr::CTextWidgetPr::Read(NSOnlineOfficeBinToPdf
m_wsV = pReader->ReadString();
if (nFlags & (1 << 10))
m_nMaxLen = pReader->ReadInt();
if (nWidgetFlag & (1 << 25))
if (nFlags & (1 << 11))
m_wsRV = pReader->ReadString();
if (nFlags & (1 << 12))
m_wsAPV = pReader->ReadString();
@ -1061,15 +1070,21 @@ CWidgetsInfo::~CWidgetsInfo()
for (int i = 0; i < m_arrParents.size(); ++i)
RELEASEOBJECT(m_arrParents[i]);
}
const std::vector<int>& CWidgetsInfo::GetCO() { return m_arrCO; }
const std::vector< std::pair<int, int> >& CWidgetsInfo::GetCO() { return m_arrCO; }
const std::vector<std::wstring>& CWidgetsInfo::GetButtonImg() { return m_arrButtonImg; }
const std::vector<CWidgetsInfo::CParent*>& CWidgetsInfo::GetParents() { return m_arrParents; }
void CWidgetsInfo::ChangeCO(int i, int nNum, int nGen)
{
if (i < 0 || i > m_arrCO.size() - 1)
return;
m_arrCO[i] = std::make_pair(nNum, nGen);
}
bool CWidgetsInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector)
{
int n = pReader->ReadInt();
m_arrCO.reserve(n);
for (int i = 0; i < n; ++i)
m_arrCO.push_back(pReader->ReadInt());
m_arrCO.push_back(std::make_pair(pReader->ReadInt(), -1));
n = pReader->ReadInt();
m_arrParents.reserve(n);
@ -1101,6 +1116,40 @@ bool CWidgetsInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafil
for (int i = 0; i < n; ++i)
pParent->arrV.push_back(pReader->ReadString());
}
if (nFlags & (1 << 6))
{
int n = pReader->ReadInt();
pParent->arrOpt.reserve(n);
for (int i = 0; i < n; ++i)
{
std::wstring s1 = pReader->ReadString();
std::wstring s2 = pReader->ReadString();
pParent->arrOpt.push_back(std::make_pair(s1, s2));
}
}
if (nFlags & (1 << 7))
pParent->nFieldFlag = pReader->ReadInt();
if (nFlags & (1 << 8))
{
// Action
int nAction = pReader->ReadInt();
for (int i = 0; i < nAction; ++i)
{
std::wstring wsType = pReader->ReadString();
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget* pA = ReadAction(pReader);
if (pA)
{
pA->wsType = wsType;
pParent->arrAction.push_back(pA);
}
}
}
if (nFlags & (1 << 9))
pParent->nMaxLen = pReader->ReadInt();
if (nFlags & (1 << 10))
pParent->sTU = pReader->ReadString();
if (nFlags & (1 << 11))
pParent->nMEOptions = pReader->ReadInt();
m_arrParents.push_back(pParent);
}
@ -1109,7 +1158,10 @@ bool CWidgetsInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafil
for (int i = 0; i < n; ++i)
{
std::string sImagePath = pReader->ReadStringA();
m_arrButtonImg.push_back(pCorrector->GetImagePath(UTF8_TO_U(sImagePath)));
std::wstring sImage = UTF8_TO_U(sImagePath);
if (sImagePath.find("data:") != 0 && !sImagePath.empty())
sImage = pCorrector->GetImagePath(sImage);
m_arrButtonImg.push_back(sImage);
}
return true;

View File

@ -185,6 +185,7 @@ public:
int GetFlag() const;
int GetFlags() const;
int GetParentID() const;
int GetMEOptions() const;
int GetFontStyle() const;
double GetFontSize() const;
double GetFontSizeAP() const;
@ -214,6 +215,7 @@ public:
int m_nFlag;
int m_nFlags;
int m_nParentID;
int m_nMEOptions;
int m_nFontStyle;
double m_dFS;
double m_dFSAP;
@ -463,11 +465,13 @@ public:
int GetID() const;
int GetAnnotFlag() const;
int GetPage() const;
int GetCopyAP() const;
void GetBE(BYTE& nS, double& dI);
BYTE* GetRender(LONG& nLen);
const std::wstring& GetNM();
const std::wstring& GetLM();
const std::wstring& GetOUserID();
const std::wstring& GetOMetadata();
const std::wstring& GetContents();
const std::vector<double>& GetC();
@ -520,9 +524,11 @@ private:
int m_nID;
int m_nAnnotFlag;
int m_nPage;
int m_nCopyAP;
std::wstring m_wsNM;
std::wstring m_wsLM;
std::wstring m_wsOUserID;
std::wstring m_wsOMetadata;
std::wstring m_wsContents;
std::pair<BYTE, double> m_pBE;
std::vector<double> m_arrC;
@ -565,25 +571,33 @@ public:
{
int nID;
int nFlags;
int nMaxLen;
int nParentID;
int nMEOptions;
int nFieldFlag;
std::wstring sName;
std::wstring sV;
std::wstring sDV;
std::wstring sTU;
std::vector<int> arrI;
std::vector<std::wstring> arrV;
std::vector<CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget*> arrAction;
std::vector< std::pair<std::wstring, std::wstring> > arrOpt;
};
CWidgetsInfo();
virtual ~CWidgetsInfo();
const std::vector<int>& GetCO();
const std::vector< std::pair<int, int> >& GetCO();
const std::vector<std::wstring>& GetButtonImg();
const std::vector<CParent*>& GetParents();
void ChangeCO(int i, int nNum, int nGen);
bool Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector);
private:
std::vector<int> m_arrCO;
std::vector< std::pair<int, int> > m_arrCO;
std::vector<std::wstring> m_arrButtonImg;
std::vector<CParent*> m_arrParents;
};

View File

@ -18,6 +18,12 @@ SOURCES += \
$$FONT_ENGINE_PATH/FontPath.cpp \
$$FONT_ENGINE_PATH/GlyphString.cpp
core_mac {
OBJECTIVE_SOURCES += $$FONT_ENGINE_PATH/ApplicationFonts_mac.mm
LIBS += -framework Foundation
LIBS += -framework CoreText
}
# Application fonts worker
HEADERS += $$FONT_ENGINE_PATH/ApplicationFontsWorker.h
SOURCES += $$FONT_ENGINE_PATH/ApplicationFontsWorker.cpp
@ -38,6 +44,10 @@ enable_support_shaper {
}
# -------------------------------------------------
# ------------------- brotli ----------------------
include($$PWD/../../../Common/3dParty/brotli/brotli.pri)
# -------------------------------------------------
# ------------------- hyphen ----------------------
HEADERS += $$FONT_ENGINE_PATH/languages.h

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