mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-11 02:16:02 +08:00
Compare commits
950 Commits
core-windo
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| 6dda731502 | |||
| b470120075 | |||
| 0de5fb6bfc | |||
| 68122490bf | |||
| 4833c652d8 | |||
| af0e9be136 | |||
| d987233335 | |||
| 5f100d4ea0 | |||
| d4e34e244f | |||
| 4b8bc2c8e7 | |||
| b04f44ee2c | |||
| fb3b6aff47 | |||
| 531460e37d | |||
| 09407b08ba | |||
| 83bc1b18b6 | |||
| 56279f7465 | |||
| 566eeb06ae | |||
| 7dc6d70b8a | |||
| f5c359650f | |||
| d665d9449e | |||
| 3c93563027 | |||
| b525e1deb4 | |||
| d5b80e2fa3 | |||
| 2bc2039c01 | |||
| a0fdb1cbcc | |||
| 664007983d | |||
| a15aee3244 | |||
| 5e034e2877 | |||
| 8d77cdaf24 | |||
| e73b5c29b2 | |||
| 6a3b4d12a5 | |||
| 992e62b8c8 | |||
| 021e01af4e | |||
| 55a1a2ca59 | |||
| e644ef4062 | |||
| 05bf38a35d | |||
| 45d51a0002 | |||
| 247f0a7d89 | |||
| 7c621a4a81 | |||
| 62ba68aaa8 | |||
| 0a816a2d6d | |||
| c64a33f42d | |||
| 0599018f99 | |||
| bf8bea5d07 | |||
| d9bd1cdb32 | |||
| e1a8bd3b3d | |||
| a8f7a1f044 | |||
| 17e8cfcaa8 | |||
| 5d4bdccbac | |||
| 5c43b5743d | |||
| 0af0739792 | |||
| a2034c19c7 | |||
| 5ae24e7e32 | |||
| cc69c8c1b4 | |||
| d0b2acb6b3 | |||
| 7df5ff1aeb | |||
| 7ea2b40585 | |||
| 163fc24ad6 | |||
| a7058f0dbd | |||
| bac1fee526 | |||
| eeb7d2ce09 | |||
| 4bbca69cf0 | |||
| dd43fe62d9 | |||
| 5631c4d57d | |||
| 7fd99856c4 | |||
| 88cde2bbfb | |||
| 61cadf944f | |||
| b86c6785dd | |||
| 1322918d6b | |||
| 9c602642e1 | |||
| d55edaad17 | |||
| 7dc887ff51 | |||
| 140b511c7e | |||
| eade6a9377 | |||
| 020557281c | |||
| 01f30301ed | |||
| 758ae9a1da | |||
| 99bcce647c | |||
| dcf6fadcad | |||
| 7ed3410362 | |||
| 0b3c1b8d55 | |||
| 628cb55e9b | |||
| b6ad4dd76c | |||
| bbb46566d6 | |||
| a17fa6ea9a | |||
| bb7f417889 | |||
| e6adb77560 | |||
| fa94d74a1d | |||
| cd83fa27b9 | |||
| 1db705b00d | |||
| 45237ad7d4 | |||
| d44aa0d28a | |||
| 405396afca | |||
| 3ec6827f76 | |||
| dfc92584f7 | |||
| 743488b7a5 | |||
| fca8c8b09c | |||
| 2b36fe96a2 | |||
| ed90117493 | |||
| f0cd60b93c | |||
| ca9e385bbc | |||
| cfe9398ff0 | |||
| 16728b5195 | |||
| c53b93b24c | |||
| c3cd1afa85 | |||
| 84f1c05d5f | |||
| 49aa15a751 | |||
| 0c5410df72 | |||
| 9b3c92d5f5 | |||
| a4881cd241 | |||
| 4b6a14f617 | |||
| c4013d747c | |||
| 98e31947cc | |||
| 86378add6a | |||
| d00536d05d | |||
| 377d79cfc6 | |||
| cfe59582fc | |||
| 2256d3ae5d | |||
| a8b57060ce | |||
| 655dd97626 | |||
| 451b4920c7 | |||
| b214dc93d8 | |||
| a2d0c4ad7d | |||
| 43f29d2877 | |||
| 5f5f22a0f0 | |||
| 5256afe04c | |||
| b9080eb9c2 | |||
| 5649fb3e2e | |||
| 348b8e4045 | |||
| 2087e9f195 | |||
| ccd84e1850 | |||
| 08ca56873e | |||
| 72761a21e3 | |||
| 9e5a1f004e | |||
| 57fea23de4 | |||
| bc67fc8e55 | |||
| 4aae1b21e9 | |||
| ae69f892f1 | |||
| 93d8634ca3 | |||
| bdd4b68f43 | |||
| a9a674c895 | |||
| ed575b3b68 | |||
| 016d46d030 | |||
| 486685e4b4 | |||
| 26a6a77b8d | |||
| 90aa7973ed | |||
| b2363c02c0 | |||
| 32b59120aa | |||
| 7186b56b64 | |||
| 6247490047 | |||
| f30e14c421 | |||
| e340a2af22 | |||
| 6a5cddf0ce | |||
| 312728fe9a | |||
| 182da130da | |||
| eb3ba8c42e | |||
| dec099b19b | |||
| 21762360ac | |||
| 563fe88842 | |||
| 0e085fbb13 | |||
| ed409e745a | |||
| 4bc58482b3 | |||
| 89ee039a05 | |||
| 5d5b1202c7 | |||
| c7646fd813 | |||
| b1d406b448 | |||
| ea37eab86e | |||
| d045609523 | |||
| 9336448ca9 | |||
| 5830e7824a | |||
| 821feb51b5 | |||
| 547979cd9b | |||
| c4481eb125 | |||
| ad0f2c89e0 | |||
| e15c75b6aa | |||
| b2fb7f0fe7 | |||
| 410e5ebd75 | |||
| 9c57088ef1 | |||
| 24230e12a3 | |||
| 2acef0d4a2 | |||
| aca5ffa36f | |||
| 4fc3726f37 | |||
| 2682e1fbac | |||
| f5c3ae779b | |||
| 068c60afa0 | |||
| 5b8ca5b417 | |||
| acfd12ea30 | |||
| a04b83cada | |||
| a7bf12c052 | |||
| 5c01b23dee | |||
| db11b75a2e | |||
| 2ba4c18cdf | |||
| b264f20f29 | |||
| 5e04ea62f7 | |||
| 3d1db63c0e | |||
| f124d18256 | |||
| 9bffb65dcb | |||
| 2fbcc3832f | |||
| 97b4311e95 | |||
| 228b3a52e9 | |||
| 2f2236646d | |||
| 30603d0561 | |||
| 933af771b7 | |||
| c04a537d69 | |||
| e49d78db47 | |||
| 99ec420ee5 | |||
| f764b034a1 | |||
| 73fe023460 | |||
| 242af3c80e | |||
| 7756e4b8bd | |||
| 56a1d1f627 | |||
| 11bd4ff61d | |||
| 93a06d7f86 | |||
| 76d2d429b7 | |||
| c6de37dbad | |||
| d022e669f0 | |||
| 184e79bae1 | |||
| e6581671c8 | |||
| e0a1c688bf | |||
| 9e0b301179 | |||
| 8680fb2e0e | |||
| c7c605a970 | |||
| 23d648d92d | |||
| b098c98dbb | |||
| b88726beaf | |||
| b2d3e5e194 | |||
| a8315efae0 | |||
| 3781cf6774 | |||
| 7e36d47991 | |||
| 419a01bd09 | |||
| 804a01cab3 | |||
| 931d6aa17c | |||
| 2861539949 | |||
| 281dad68fb | |||
| 04ba432cde | |||
| 61c943a3b2 | |||
| 9fdc7641b3 | |||
| 1029ee9101 | |||
| 9ef5bec2a5 | |||
| 93132eb8a0 | |||
| 9828c25e51 | |||
| db1204288b | |||
| 26c3d37be5 | |||
| 077ea08368 | |||
| 98eab74e97 | |||
| 2a7e88ca76 | |||
| 44491bbbb4 | |||
| 369596b860 | |||
| 15af8f561a | |||
| 58f8d13d71 | |||
| d6413057e2 | |||
| 008382213b | |||
| dd5b4a719b | |||
| 3d198bc211 | |||
| 05ff75eeb2 | |||
| d44ef86319 | |||
| 2f42dc2c35 | |||
| 597414ea6b | |||
| 7f06ce7064 | |||
| adf39680b6 | |||
| ce77d478e3 | |||
| e1e14ae243 | |||
| 4f6e364225 | |||
| 26c02c5766 | |||
| 0d8c668f95 | |||
| 310cff0dfe | |||
| 7f6611ab21 | |||
| bb37e348f5 | |||
| 6b5e03df5e | |||
| d0e0109560 | |||
| dc33f7f197 | |||
| 85f4aa5679 | |||
| d2c5ea026f | |||
| 419ec7ed33 | |||
| 5f7d9eea02 | |||
| 709ee1942d | |||
| 5039cec847 | |||
| e59eff3a16 | |||
| 2206b3b366 | |||
| a2d37e8a22 | |||
| b13eba5f01 | |||
| a48058c7d5 | |||
| ab76aff379 | |||
| b8b8a14268 | |||
| e5ef749718 | |||
| 5d524369b8 | |||
| e78fc0befc | |||
| d9986d09cd | |||
| bd67f4bf1c | |||
| 475bfaf93d | |||
| 1a8af4d8ed | |||
| cdf8dc7a4c | |||
| d71552bddd | |||
| 548c5ab608 | |||
| 6a01384023 | |||
| d70f36e36d | |||
| f65984f079 | |||
| 5b48a7a330 | |||
| 1496aece57 | |||
| 60cf51ad0d | |||
| 8e7231b322 | |||
| 2b339b6842 | |||
| fb0dbfc231 | |||
| 756613e883 | |||
| ede03fafea | |||
| bdec91bfd5 | |||
| 260c2edd21 | |||
| 3eeec8fc67 | |||
| ba6c7e8151 | |||
| 41a213491e | |||
| b599a6bc43 | |||
| a0fd139027 | |||
| 48852bc618 | |||
| 20b781cb7e | |||
| 704b3b709f | |||
| e4674915c2 | |||
| 51fe936e5f | |||
| d8b177411f | |||
| 717b628055 | |||
| e4f94646b6 | |||
| dcec7447e4 | |||
| 5f12552f78 | |||
| d293769c1f | |||
| b45e772a50 | |||
| fdb7716abc | |||
| f72d6dfe0e | |||
| 23029a6a92 | |||
| eda8e4d13f | |||
| 64f578e59f | |||
| 16c57b50cc | |||
| 83c0ba9dab | |||
| a2443dadeb | |||
| 789bb1d4b3 | |||
| 4138ae5ce2 | |||
| 239b5dbf11 | |||
| c046776b9c | |||
| 055a02570b | |||
| e7bbbec0de | |||
| 1e2e5996f3 | |||
| 875717acd4 | |||
| 033feeaf9d | |||
| de336e5f96 | |||
| 82b3dbdae6 | |||
| d1227f7759 | |||
| 4d134387f9 | |||
| 3f8600dfb7 | |||
| 511f043d63 | |||
| 69a41343c2 | |||
| 578327bab6 | |||
| 52908908a5 | |||
| 24d9b99a44 | |||
| dce58b628f | |||
| f42cb4580c | |||
| 52777e36cb | |||
| 7b7e9f3e6e | |||
| d39fa156e7 | |||
| 48bf40919c | |||
| fd53a987be | |||
| b4d298542a | |||
| bae854027b | |||
| 9723c379dd | |||
| e8d8b2e56c | |||
| adb84b0f05 | |||
| a4ee30d031 | |||
| e05194b277 | |||
| 21f7f6ed5b | |||
| 80863ae25b | |||
| 07562a9582 | |||
| 6da196e426 | |||
| d220cc8c79 | |||
| f53c3d9f50 | |||
| fa98f22e3d | |||
| e01c09bcc9 | |||
| 069544bf6c | |||
| b0f0f656af | |||
| 99191e65b0 | |||
| fb41720817 | |||
| 406c290be4 | |||
| 5ae4d7f819 | |||
| e69c1677b2 | |||
| 4d836c180a | |||
| e08b6542d4 | |||
| e1340c63ec | |||
| 4b122c0b94 | |||
| 867438833b | |||
| 8b80aa94b7 | |||
| f960fc60bb | |||
| 64213746b0 | |||
| 09941c67ac | |||
| c2605bb582 | |||
| ab2703c825 | |||
| 08ce8cb3f5 | |||
| 5efe043ab3 | |||
| f2af1ccd36 | |||
| 113d5b4ca3 | |||
| d3461dd3cb | |||
| e95a0fb765 | |||
| c5ce1e27e4 | |||
| 7ecc7fa1df | |||
| c46cd9e6e5 | |||
| e299e59d11 | |||
| 1e0f4d6fdb | |||
| 4dae8f50fa | |||
| 9cc5ed1db0 | |||
| 6d1dd9c420 | |||
| a038e1562f | |||
| 549e3dc579 | |||
| 8440b18223 | |||
| 9c7a03fdc5 | |||
| 9272b27a69 | |||
| ef57330a79 | |||
| d35619eeae | |||
| b38c552cc5 | |||
| 1b91ee579c | |||
| 337c92e522 | |||
| 8fe1eb7525 | |||
| 1deb2a6905 | |||
| 470eddf2b1 | |||
| 69a787411c | |||
| 22f986295f | |||
| 86d2bde83b | |||
| 07041d60f6 | |||
| a5466ab740 | |||
| ffeb03e0d0 | |||
| dfd54ff53f | |||
| cf4d74a7e3 | |||
| 90c0633212 | |||
| 3ea4898939 | |||
| 1d00c343c6 | |||
| 2a408f0e2b | |||
| 6ec7d77e19 | |||
| 3813be21c7 | |||
| 047d0567e1 | |||
| 356ccba104 | |||
| 68c8c0cb29 | |||
| 3044d1122a | |||
| fb00ba7ecb | |||
| ab0c5703a5 | |||
| e22b63347f | |||
| 9dd115ec56 | |||
| 438ba3aded | |||
| 29b002ca80 | |||
| 34083d996b | |||
| 244d549cf8 | |||
| ef96571879 | |||
| 7a27150de6 | |||
| 2197fddb7b | |||
| d31344d7d3 | |||
| f7617b42cb | |||
| 8312cce2c3 | |||
| dc89e1d484 | |||
| 17f4903347 | |||
| ebdfb2f785 | |||
| ec2901bf48 | |||
| f9e87624c0 | |||
| 5f0e6349cc | |||
| 3bdf44b8c7 | |||
| d586698025 | |||
| eb6fb03ca5 | |||
| ad40f51dee | |||
| 5e60456fc1 | |||
| 1f9e3f4fd8 | |||
| 334620cd5a | |||
| 4a5fca5ccf | |||
| 828df16fe5 | |||
| 66dae03919 | |||
| 114a01f364 | |||
| 2ddaf33156 | |||
| 1af37af850 | |||
| b58026ea66 | |||
| 09a8a6794a | |||
| 941cbe4f9b | |||
| 668d0c2abf | |||
| 66db5b09e6 | |||
| e7dae4b381 | |||
| 7dbbacf336 | |||
| f43a0bbfe2 | |||
| 746c228261 | |||
| d8c7d41462 | |||
| 4a9abce180 | |||
| a78711a19c | |||
| b69051a5b4 | |||
| 04e4f1adae | |||
| 6e15370af2 | |||
| 57465b60bf | |||
| 24d58fe189 | |||
| 56bb39f716 | |||
| 60bcca0090 | |||
| 92ce863bdf | |||
| 48d4b72d4b | |||
| 85de7ec7a6 | |||
| 9e6d4950c2 | |||
| cb4befa078 | |||
| ac1292a17a | |||
| 007a984c36 | |||
| d3d3180402 | |||
| fa9c096f3c | |||
| e1ec9d942e | |||
| 4acaa75b06 | |||
| 431115ef48 | |||
| 2d66d9902e | |||
| 206dd12a47 | |||
| e8d3059fe8 | |||
| f624f731de | |||
| ed373b7e2d | |||
| a67eb5644d | |||
| 5040220d82 | |||
| 4f0b889f04 | |||
| c94768902b | |||
| f575947c03 | |||
| 16bdbafa75 | |||
| 089871d3ae | |||
| 765677d952 | |||
| 6afc38c899 | |||
| a43639587f | |||
| 46d022388d | |||
| 31363e8f83 | |||
| e1286e4b73 | |||
| 0366bcb341 | |||
| 452f717e0e | |||
| ab3add9577 | |||
| 54939bca61 | |||
| 7ccde9c777 | |||
| 6bdfa26c7e | |||
| a5bae64959 | |||
| 4d04a0d649 | |||
| fb7af5b902 | |||
| 77172fb39c | |||
| 78ecdc676c | |||
| bbccdf009b | |||
| 4b26066377 | |||
| 8742163d51 | |||
| 212753f831 | |||
| 903236d890 | |||
| 15bd732b22 | |||
| 3e86bf7644 | |||
| d6cd7c30f5 | |||
| 89b384abfe | |||
| f54baf3aa8 | |||
| b2184f7167 | |||
| 3a10eabfe9 | |||
| f9e80f3602 | |||
| 80b1e5e886 | |||
| d1a7800f36 | |||
| e223ffd0db | |||
| b140f4b521 | |||
| 2d570818be | |||
| 1462f08825 | |||
| 92fb4ac40b | |||
| 2bf55b7c8b | |||
| cf2159cd54 | |||
| decfeec7a1 | |||
| 50f47caea9 | |||
| 89cd81ecfd | |||
| 8df6286e80 | |||
| e947c91a7b | |||
| ef53ac4c63 | |||
| f50dd716ad | |||
| 54d0260ea2 | |||
| 2577365e08 | |||
| 792a722063 | |||
| 00df026108 | |||
| 56a4e80c83 | |||
| a7a78a09c1 | |||
| 6f93eeae69 | |||
| be45d169d7 | |||
| 0fc749f839 | |||
| 03267ba2ec | |||
| b0adc188a2 | |||
| 048fbc4b18 | |||
| c0a061f2cb | |||
| 0296a6ef33 | |||
| dcee112745 | |||
| 65709f9cc2 | |||
| bf5c41b9a0 | |||
| 66b45dba7c | |||
| 65e7372cf7 | |||
| 2ce5708599 | |||
| 1ea27ad7f8 | |||
| 48d94d24eb | |||
| f5c569ab2a | |||
| 2e61fcfdd9 | |||
| 3df883cbe8 | |||
| 0ed3f740b7 | |||
| af2e76aea6 | |||
| 6593230d48 | |||
| e02c72b564 | |||
| c2964f92af | |||
| 15fb3a4f4e | |||
| cff1836571 | |||
| cb57db3c8a | |||
| d22fb105b6 | |||
| 89aba918bc | |||
| 47c1e6f637 | |||
| f5284c967b | |||
| d465e29a0f | |||
| f43ef621cb | |||
| 2f9a8eb77f | |||
| a70087e1f2 | |||
| c3da9a66a1 | |||
| f907a90be7 | |||
| f65a27cf86 | |||
| ed59c2b998 | |||
| 925bca7149 | |||
| c9f2315186 | |||
| 5818f4997b | |||
| 691042c507 | |||
| d8f34224ca | |||
| dfe4541f43 | |||
| 3fa3a52c89 | |||
| 665783a6c5 | |||
| 0b15c31487 | |||
| 44fdbf6df4 | |||
| 582fce4ca1 | |||
| bde723c5cb | |||
| 97fb316248 | |||
| a607282285 | |||
| 62ea2bbc46 | |||
| 4071fa315b | |||
| 82eae7fc3e | |||
| 8efed345b0 | |||
| f5dcb1bed7 | |||
| 89ce79dafc | |||
| 6b4695fc3a | |||
| bed884007c | |||
| 1aa0b03901 | |||
| e2ada4ca61 | |||
| d87649f08e | |||
| 3982ac06d2 | |||
| 0a5d0af882 | |||
| 08e97b4a68 | |||
| c4447d7396 | |||
| c55af15ccd | |||
| 333d2fdbf0 | |||
| a2bbb1640c | |||
| 7388bf871f | |||
| 493238d656 | |||
| ea8dc009c9 | |||
| 9ade820313 | |||
| 358c1613ad | |||
| b3a83ad699 | |||
| 8d4e78ed40 | |||
| bde2c73f64 | |||
| 66fe9e6447 | |||
| f6d745cd25 | |||
| 002d30454c | |||
| ae2e9a5f26 | |||
| c985d1e0a2 | |||
| 5aaf90ebf2 | |||
| ebb9c89a0a | |||
| c4765e9f2e | |||
| 3ff5233ea4 | |||
| 4c7ab6e616 | |||
| a88ad0c279 | |||
| cf5458c761 | |||
| 9115edbd78 | |||
| 3f18f96171 | |||
| 8a75916944 | |||
| da45eb4f33 | |||
| 59d75ed148 | |||
| ccc4d751d0 | |||
| a020d3dbf9 | |||
| 7852b7fbe8 | |||
| a64fd8792d | |||
| 32448298a3 | |||
| b3384f1466 | |||
| 93274395a9 | |||
| 2726e14445 | |||
| 75e32a1562 | |||
| 8c2637b89c | |||
| ef389872df | |||
| 6fc611fdfc | |||
| 0cabb63336 | |||
| f501bf7930 | |||
| 7b617dc9e9 | |||
| 245f989ae3 | |||
| 429729b979 | |||
| d709652992 | |||
| 776d799fd2 | |||
| a975cb8261 | |||
| c932b5af26 | |||
| 423e8dda86 | |||
| afcf6b079e | |||
| 3ed2224f93 | |||
| 5307855120 | |||
| 3c9a91af45 | |||
| 9f06f94c93 | |||
| 4954ef2934 | |||
| 721e8800f1 | |||
| ef8e5cab6d | |||
| 028e58ad51 | |||
| 424e0e34cc | |||
| d8988cd101 | |||
| 440a884c0a | |||
| 449bab1a70 | |||
| c1e5e33691 | |||
| 8c7515443a | |||
| 1d16f4ab8f | |||
| 122a5cd056 | |||
| b0994759e7 | |||
| 118f1c5736 | |||
| b65703ceb1 | |||
| c08c960c96 | |||
| 02ece25af8 | |||
| 435a27f6d9 | |||
| 85ea22048a | |||
| 87ae0b38fa | |||
| b93d463469 | |||
| 0aa59b0d92 | |||
| 3dbcce8c36 | |||
| cc9459359f | |||
| 465e70759b | |||
| 9f6c833af5 | |||
| f4d16b0d61 | |||
| 398dc42bb2 | |||
| 69b4a09475 | |||
| ab360be66a | |||
| 98285c225d | |||
| bab6e40c2b | |||
| 539cb2f355 | |||
| 64d6c3c872 | |||
| 7c9be7e2eb | |||
| bad2992903 | |||
| d405cd4e83 | |||
| f632855006 | |||
| 48641d5bde | |||
| d88ae6d3f4 | |||
| e9ad1202ff | |||
| 1fc9280ab3 | |||
| 9e639ec68f | |||
| 28ebf5aaa6 | |||
| 8f5967356d | |||
| bc7d73667d | |||
| a434ae2cc4 | |||
| 7e52ebca48 | |||
| 4925b47002 | |||
| afdaacb226 | |||
| 9f98f07f23 | |||
| 9e1a0e365f | |||
| 39e2b69b8e | |||
| 58c00745a7 | |||
| 4015e8ba4d | |||
| 276af55699 | |||
| ebdfcbd7ee | |||
| 867c09c85d | |||
| cd12777c68 | |||
| 0708c1f45a | |||
| ee577e629a | |||
| f230dc2555 | |||
| 11c9d74e68 | |||
| d61a955c38 | |||
| acfb96e3c3 | |||
| d2e3cc47f2 | |||
| 4f2f164af9 | |||
| 8addd6cb04 | |||
| 92cda5bc80 | |||
| 1a377d8738 | |||
| ed3e107db5 | |||
| 64d8c659bc | |||
| 3debba45b8 | |||
| b8ad1797f0 | |||
| 48587f55b3 | |||
| a505ae391d | |||
| c389801937 | |||
| 24214cb561 | |||
| b19191b286 | |||
| 77f8ab6875 | |||
| 6fc6f9ead3 | |||
| 270c1fa2ac | |||
| f76a03fab8 | |||
| 09e6d3f760 | |||
| 90d8055bcb | |||
| 01ba3b4182 | |||
| ddb67584b8 | |||
| 38ce5586bb | |||
| f6d9ce83f0 | |||
| 03edd40850 | |||
| 9ff87b3c6b | |||
| 645cbef1ef | |||
| 02238f7eea | |||
| 907e00a3ac | |||
| 2470bfd335 | |||
| 3ae52bd221 | |||
| 227d4f18d6 | |||
| 36bdbad685 | |||
| 525b828540 | |||
| f64ee80a1a | |||
| f6402813c4 | |||
| 224ac7d6e2 | |||
| 2e2bd8989d | |||
| 8f434efb95 | |||
| 244dafb02b | |||
| 149a1bdbd5 | |||
| a79d9041bc | |||
| 3954c42602 | |||
| 29dc0aee32 | |||
| d805972d6d | |||
| 549d5a46a6 | |||
| 9e867be756 | |||
| 771bf2d55c | |||
| 3c58cd96fc | |||
| e50864fa98 | |||
| c8c0924c74 | |||
| af732e4e85 | |||
| 47ffdae8cc | |||
| fd5870083b | |||
| 5ba62cb25d | |||
| 79e0588544 | |||
| a3d08cfc35 | |||
| 5caccb284a | |||
| ce19969b52 | |||
| 0f91dc392e | |||
| e9805cef30 | |||
| e3e05eb2db | |||
| c09f17cffb | |||
| ce73dd5987 | |||
| 77df8aacb9 | |||
| ce45b2802f | |||
| 7886018d6f | |||
| 5b5cb4188e | |||
| f797af5f17 | |||
| 055977535e | |||
| 6ab24f10f0 | |||
| 12a03da231 | |||
| cb7088979a | |||
| 1fb1fc6c97 | |||
| e633c3c5d1 | |||
| 0f04de34b1 | |||
| 3f8c2c293a | |||
| 2c97e743da | |||
| 2c83860c04 | |||
| c64b624de2 | |||
| 5e3990937d | |||
| 21744c1607 | |||
| 0892e2549f | |||
| cff6f305d4 | |||
| 5060071227 | |||
| d64109eaa4 | |||
| ec064bbd50 | |||
| baf952a151 | |||
| 0dd36c5e6a | |||
| 474404a8f9 | |||
| f2f6483b6f | |||
| c30161dbd0 | |||
| ec4f4fe476 | |||
| 634509ae28 | |||
| 1244048c50 | |||
| a62b69fb31 | |||
| 5eb36efb63 | |||
| fb8c4231b0 | |||
| 9774d1de46 | |||
| f5b141eeee | |||
| 1e47dc1111 | |||
| d3f4a2127d | |||
| 4d5f328c30 | |||
| b18cd44cf6 | |||
| 6705045dd4 | |||
| 533bc2c250 | |||
| 85226c0821 | |||
| fecefb672d | |||
| f91e030836 | |||
| d0591483bc | |||
| 729f9f246f | |||
| 17a6ba735b | |||
| de22fb4737 | |||
| 8197fb8900 | |||
| 751774419e | |||
| 8278609f10 | |||
| 445eedc7a3 | |||
| ed7661b93c | |||
| a17a04298a | |||
| f7ba686f0c | |||
| c41385e1ae | |||
| f582a9b690 | |||
| b36c2dbaf9 | |||
| 10b9e9e5e8 | |||
| 1beb5440f9 | |||
| 9a9ba4cc62 | |||
| 5b4c6363bb | |||
| 2026d064ef | |||
| 42257ca447 | |||
| 6f2fdcd971 | |||
| 9b4b7a26fd | |||
| 4d688b3922 | |||
| be8d427e26 | |||
| 7e0749ddda | |||
| 9f2324d208 | |||
| 6e258b85d7 | |||
| 24e55018a0 | |||
| 2352ae5d88 | |||
| 2cba43e6f3 | |||
| abcf8d0246 | |||
| c18b955467 | |||
| 7896b75001 | |||
| 7d188b2213 | |||
| 79ead484cc | |||
| be65f18a0e | |||
| 60f61109a1 | |||
| 4201bcecc6 | |||
| 7b7bfbc5dd | |||
| a70255e500 | |||
| 7e9dede9b3 | |||
| 9b7ad03465 | |||
| 3162bb0bfe | |||
| ec95648c43 | |||
| 72ac11ac07 | |||
| f70ea2b74f | |||
| db834666ba | |||
| 6ed0e13178 | |||
| 446e519110 | |||
| fb1fc01963 | |||
| 4651ae1bbb | |||
| 18606e23c6 | |||
| ed6d070d1f | |||
| f00cecbcaf | |||
| c9aee26fd6 | |||
| 32d3c0e65c | |||
| 33aeef2c02 | |||
| 7c97941acc | |||
| 01a4cd2289 | |||
| 202b58fb10 | |||
| b221150797 | |||
| 2084587e9a | |||
| 8332c28ac2 | |||
| 435a11d75c | |||
| 9a5329f5d6 | |||
| 8eecbf5fa5 | |||
| 9e1773df65 | |||
| 39e4140524 | |||
| bd90de857e | |||
| 57f2ec7b96 | |||
| 634098a6fa | |||
| bdbf208f6c | |||
| a652f5d73f | |||
| 1602843aa6 | |||
| cdb7fb8ea6 | |||
| 6387e9fa69 | |||
| 4e8097c93d | |||
| 65254b57b2 | |||
| 95899e23a8 | |||
| 5c8757d346 | |||
| 234e19d68a | |||
| 62145b7204 | |||
| 8bcc6d1501 | |||
| 09ef46f333 | |||
| 1839350526 | |||
| d7587e91b1 | |||
| 7b0a342cf9 | |||
| 3d01b0782e | |||
| 95c472c15c |
5
.gitignore
vendored
5
.gitignore
vendored
@ -20,6 +20,7 @@ Common/3dParty/v8/win_32
|
||||
Common/3dParty/v8/linux_64
|
||||
Common/3dParty/v8/linux_32
|
||||
Common/3dParty/v8/mac_64
|
||||
Common/3dParty/openssl/openssl
|
||||
**/core_build
|
||||
**/Release
|
||||
**/Debug
|
||||
@ -43,3 +44,7 @@ OfficeUtils/win32/OfficeUtilsLib/OfficeUtilsLib/ReadMe.txt
|
||||
*.pdb
|
||||
*.tlb
|
||||
*.idb
|
||||
**/.hg
|
||||
*.zip
|
||||
*.tar.gz
|
||||
**/*.build/
|
||||
|
||||
15
.travis.yml
15
.travis.yml
@ -1 +1,14 @@
|
||||
language: cpp
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- p7zip-full
|
||||
script:
|
||||
- exit 0
|
||||
# Build fails anyway. See explanation in
|
||||
# https://github.com/ONLYOFFICE/core/pull/29#issuecomment-306773327
|
||||
- cd Common/3dParty && ./make.sh
|
||||
- cd ../../
|
||||
- make
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
namespace DocFormatUtils
|
||||
namespace DocFileFormat
|
||||
{
|
||||
typedef unsigned char Bool8;
|
||||
typedef unsigned short Bool16;
|
||||
@ -501,7 +501,7 @@ namespace DocFormatUtils
|
||||
|
||||
facet.widen((char*)bytes, (char*)bytes + size, &result[0]);
|
||||
|
||||
for (long i=0; i < result.length(); i++)
|
||||
for (size_t i=0; i < result.length(); i++)
|
||||
{
|
||||
STLCollection->push_back(result[i]);
|
||||
}
|
||||
@ -536,7 +536,7 @@ namespace DocFormatUtils
|
||||
delete [] pStrUtf16;
|
||||
return GetSTLCollectionFromLocale(STLCollection, bytes,size);
|
||||
}
|
||||
for (long i=0; i < nLength; i++)
|
||||
for (unsigned int i = 0; i < nLength; i++)
|
||||
{
|
||||
STLCollection->push_back(pStrUtf16[i]);
|
||||
}
|
||||
@ -566,7 +566,7 @@ namespace DocFormatUtils
|
||||
delete [] pStrUtf32;
|
||||
return GetSTLCollectionFromLocale(STLCollection, bytes, size);
|
||||
}
|
||||
for (long i=0; i < nLength; i++)
|
||||
for (unsigned int i = 0; i < nLength; i++)
|
||||
{
|
||||
STLCollection->push_back(pStrUtf32[i]);
|
||||
}
|
||||
@ -652,7 +652,7 @@ namespace DocFormatUtils
|
||||
NSUnicodeConverter::CUnicodeConverter oConverter;
|
||||
std::wstring unicode_string = oConverter.toUnicode((char*)bytes, size, sCodePage.c_str());
|
||||
|
||||
for (long i=0; i < unicode_string.size(); i++)
|
||||
for (size_t i = 0; i < unicode_string.size(); i++)
|
||||
{
|
||||
STLCollection->push_back(unicode_string[i]);
|
||||
}
|
||||
@ -963,4 +963,3 @@ namespace DocFormatUtils
|
||||
};
|
||||
}
|
||||
|
||||
using namespace DocFormatUtils;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -393,7 +393,7 @@ namespace XMLTools
|
||||
else
|
||||
{
|
||||
std::string s(m_str.begin(), m_str.end());
|
||||
file.WriteFile((unsigned char*)s.c_str(), s.length());
|
||||
file.WriteFile((unsigned char*)s.c_str(), (DWORD)s.length());
|
||||
}
|
||||
file.CloseFile();
|
||||
return true;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -41,7 +41,7 @@ namespace DocFileFormat
|
||||
public:
|
||||
AnnotationOwnerList(FileInformationBlock* fib, POLE::Stream* tableStream) : std::vector<std::wstring>()
|
||||
{
|
||||
VirtualStreamReader reader(tableStream, fib->m_FibWord97.fcGrpXstAtnOwners, fib->m_bOlderVersion);
|
||||
VirtualStreamReader reader(tableStream, fib->m_FibWord97.fcGrpXstAtnOwners, fib->m_nWordVersion);
|
||||
|
||||
if (fib->m_FibWord97.fcGrpXstAtnOwners > reader.GetSize()) return;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -40,7 +40,7 @@ namespace DocFileFormat
|
||||
|
||||
//read the user initials (LPXCharBuffer9)
|
||||
|
||||
if (reader->olderVersion)
|
||||
if (reader->nWordVersion > 0)
|
||||
{
|
||||
short cch = reader->ReadByte();
|
||||
|
||||
@ -76,4 +76,4 @@ namespace DocFileFormat
|
||||
|
||||
return static_cast<ByteStructure*>(newObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -41,9 +41,9 @@ namespace DocFileFormat
|
||||
static const int STRUCTURE_SIZE = 30;
|
||||
static const int STRUCTURE_SIZE_OLD = 20;
|
||||
|
||||
static const int GetSize(bool bOldVersion)
|
||||
static const int GetSize(int nWordVersion)
|
||||
{
|
||||
return bOldVersion ? STRUCTURE_SIZE_OLD : STRUCTURE_SIZE;
|
||||
return (nWordVersion > 0) ? STRUCTURE_SIZE_OLD : STRUCTURE_SIZE;
|
||||
}
|
||||
|
||||
inline std::wstring GetUserInitials() const
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -118,70 +118,78 @@ namespace DocFileFormat
|
||||
|
||||
public:
|
||||
/// Creates a new BorderCode with default values
|
||||
BorderCode(): cv(0), dptLineWidth(0), brcType(0), ico( Global::ColorIdentifier[0] ), dptSpace(0), fShadow(false), fFrame(false), fNil(false)
|
||||
BorderCode(): cv(0), dptLineWidth(0), brcType(0), ico( Global::ColorNameIdentifier[0] ), dptSpace(0), fShadow(false), fFrame(false), fNil(false)
|
||||
{
|
||||
}
|
||||
|
||||
/// Parses the unsigned char for a BRC
|
||||
BorderCode( unsigned char* bytes, int size ):
|
||||
cv(0), dptLineWidth(0), brcType(0), ico( Global::ColorIdentifier[0] ), dptSpace(0), fShadow(false), fFrame(false), fNil(false)
|
||||
cv(0), dptLineWidth(0), brcType(0), ico( Global::ColorNameIdentifier[0] ), dptSpace(0), fShadow(false), fFrame(false), fNil(false)
|
||||
{
|
||||
if ( FormatUtils::ArraySum( bytes, size ) == ( size * 255 ) )
|
||||
{
|
||||
this->fNil = true;
|
||||
fNil = true;
|
||||
}
|
||||
else if ( size == 8 )
|
||||
{
|
||||
//it's a border code of Word 2000/2003
|
||||
this->cv = FormatUtils::BytesToInt32( bytes, 0, size );
|
||||
this->ico = std::wstring( Global::ColorIdentifier[0] );
|
||||
cv = FormatUtils::BytesToInt32( bytes, 0, size );
|
||||
ico = std::wstring( Global::ColorIdentifier[0] );
|
||||
|
||||
this->dptLineWidth = bytes[4];
|
||||
this->brcType = bytes[5];
|
||||
dptLineWidth = bytes[4];
|
||||
brcType = bytes[5];
|
||||
|
||||
short val = FormatUtils::BytesToInt16( bytes, 6, size );
|
||||
this->dptSpace = val & 0x001F;
|
||||
dptSpace = val & 0x001F;
|
||||
|
||||
//not sure if this is correct, the values from the spec are definitly wrong:
|
||||
this->fShadow = FormatUtils::BitmaskToBool( val, 0x20 );
|
||||
this->fFrame = FormatUtils::BitmaskToBool( val, 0x40 );
|
||||
fShadow = FormatUtils::BitmaskToBool( val, 0x20 );
|
||||
fFrame = FormatUtils::BitmaskToBool( val, 0x40 );
|
||||
}
|
||||
else if ( size == 4 )
|
||||
{
|
||||
//it's a border code of Word 97
|
||||
unsigned short val = FormatUtils::BytesToUInt16( bytes, 0, size );
|
||||
this->dptLineWidth = (unsigned char)( val & 0x00FF );
|
||||
this->brcType = (unsigned char)( ( val & 0xFF00 ) >> 8 );
|
||||
|
||||
dptLineWidth = (unsigned char)( val & 0x00FF );
|
||||
brcType = (unsigned char)( ( val & 0xFF00 ) >> 8 );
|
||||
|
||||
val = FormatUtils::BytesToUInt16( bytes, 2, size );
|
||||
this->ico = FormatUtils::MapValueToWideString( ( val & 0x00FF ), &Global::ColorIdentifier[0][0], 17, 12 );
|
||||
this->dptSpace = ( val & 0x1F00 ) >> 8;
|
||||
|
||||
ico = FormatUtils::MapValueToWideString( ( val & 0x00FF ), &Global::ColorNameIdentifier[0][0], 17, 12 );
|
||||
dptSpace = ( val & 0x1F00 ) >> 8;
|
||||
}
|
||||
else
|
||||
else if (size == 2)
|
||||
{
|
||||
//throw new ByteParseException("Cannot parse the struct BRC, the length of the struct doesn't match");
|
||||
unsigned short val = FormatUtils::BytesToUInt16( bytes, 0, size );
|
||||
|
||||
dptLineWidth = GETBITS(val, 0, 2);
|
||||
brcType = GETBITS(val, 3, 4);
|
||||
fShadow = GETBIT(val, 5);
|
||||
ico = FormatUtils::MapValueToWideString(GETBITS(val, 6, 10), &Global::ColorNameIdentifier[0][0], 17, 12 );
|
||||
dptSpace = GETBITS(val, 11, 15);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BorderCode( const BorderCode& bc )
|
||||
{
|
||||
if ( this != &bc )
|
||||
{
|
||||
this->cv = bc.cv;
|
||||
this->dptLineWidth = bc.dptLineWidth;
|
||||
this->brcType = bc.brcType;
|
||||
this->ico = bc.ico;
|
||||
this->dptSpace = bc.dptSpace;
|
||||
this->fShadow = bc.fShadow;
|
||||
this->fFrame = bc.fFrame;
|
||||
this->fNil = bc.fNil;
|
||||
cv = bc.cv;
|
||||
dptLineWidth = bc.dptLineWidth;
|
||||
brcType = bc.brcType;
|
||||
ico = bc.ico;
|
||||
dptSpace = bc.dptSpace;
|
||||
fShadow = bc.fShadow;
|
||||
fFrame = bc.fFrame;
|
||||
fNil = bc.fNil;
|
||||
}
|
||||
}
|
||||
|
||||
bool operator == ( const BorderCode& bc )
|
||||
{
|
||||
if ( ( this->cv == bc.cv ) && ( this->dptLineWidth == bc.dptLineWidth ) && ( this->brcType == bc.brcType ) &&
|
||||
( this->ico == bc.ico ) && ( this->dptSpace == bc.dptSpace ) && ( this->fShadow == bc.fShadow ) &&
|
||||
( this->fFrame == bc.fFrame ) && ( this->fNil == bc.fNil ) )
|
||||
if ( ( cv == bc.cv ) && ( dptLineWidth == bc.dptLineWidth ) && ( brcType == bc.brcType ) &&
|
||||
( ico == bc.ico ) && ( dptSpace == bc.dptSpace ) && ( fShadow == bc.fShadow ) &&
|
||||
( fFrame == bc.fFrame ) && ( fNil == bc.fNil ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -129,355 +129,360 @@ namespace DocFileFormat
|
||||
parent->AppendChild( *webHidden );
|
||||
RELEASEOBJECT( webHidden );
|
||||
}
|
||||
std::list<SinglePropertyModifier>::iterator end = sprms->end();
|
||||
for (std::list<SinglePropertyModifier>::iterator iter = sprms->begin(); iter != end; ++iter)
|
||||
if ((sprms) && (!sprms->empty()))
|
||||
{
|
||||
int nProperty = 0; //for unknown test
|
||||
|
||||
switch ( (int)( iter->OpCode ) )
|
||||
std::list<SinglePropertyModifier>::iterator end = sprms->end();
|
||||
for (std::list<SinglePropertyModifier>::iterator iter = sprms->begin(); iter != end; ++iter)
|
||||
{
|
||||
case sprmOldCIstd :
|
||||
case sprmCIstd : // style id
|
||||
int nProperty = 0; //for unknown test
|
||||
|
||||
switch ( (int)( iter->OpCode ) )
|
||||
{
|
||||
if (_isRunStyleNeeded && !_webHidden)
|
||||
case sprmOldCIstd :
|
||||
case sprmCIstd : // style id
|
||||
{
|
||||
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
if (_currentIstd < _doc->Styles->Styles->size())
|
||||
if (_isRunStyleNeeded && !_webHidden)
|
||||
{
|
||||
appendValueElement( parent, L"rStyle", StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
|
||||
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
if (_currentIstd < _doc->Styles->Styles->size())
|
||||
{
|
||||
appendValueElement( parent, L"rStyle", StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
|
||||
}
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCFBiDi :
|
||||
appendFlagElement( parent, *iter, L"rtl", true );
|
||||
_isRTL = true;
|
||||
break;
|
||||
|
||||
case sprmOldCFBold :
|
||||
case sprmCFBold :
|
||||
appendFlagElement( parent, *iter, L"b", true );
|
||||
break;
|
||||
|
||||
case sprmCFBoldBi :
|
||||
appendFlagElement( parent, *iter, L"bCs", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFCaps :
|
||||
case sprmCFCaps :
|
||||
appendFlagElement( parent, *iter, L"caps", true );
|
||||
break;
|
||||
|
||||
case sprmCFComplexScripts :
|
||||
appendFlagElement( parent, *iter, L"cs", true );
|
||||
break;
|
||||
|
||||
case sprmCFDStrike :
|
||||
appendFlagElement( parent, *iter, L"dstrike", true );
|
||||
break;
|
||||
|
||||
case sprmCFEmboss :
|
||||
appendFlagElement( parent, *iter, L"emboss", true );
|
||||
break;
|
||||
|
||||
case sprmCFImprint :
|
||||
appendFlagElement( parent, *iter, L"imprint", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFItalic :
|
||||
case sprmCFItalic :
|
||||
appendFlagElement( parent, *iter, L"i", true );
|
||||
break;
|
||||
|
||||
case sprmCFItalicBi:
|
||||
appendFlagElement( parent, *iter, L"iCs", true );
|
||||
break;
|
||||
|
||||
case 0x0875:
|
||||
appendFlagElement( parent, *iter, L"noProof", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFOutline:
|
||||
case sprmCFOutline:
|
||||
appendFlagElement( parent, *iter, L"outline", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFShadow:
|
||||
case sprmCFShadow:
|
||||
appendFlagElement( parent, *iter, L"shadow", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFSmallCaps:
|
||||
case sprmCFSmallCaps:
|
||||
appendFlagElement( parent, *iter, L"smallCaps", true );
|
||||
break;
|
||||
|
||||
case sprmCFSpecVanish:
|
||||
appendFlagElement( parent, *iter, L"specVanish", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFStrike:
|
||||
case sprmCFStrike:
|
||||
appendFlagElement( parent, *iter, L"strike", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFVanish:
|
||||
case sprmCFVanish:
|
||||
appendFlagElement( parent, *iter, L"vanish", true );
|
||||
break;
|
||||
|
||||
case 0x0811:
|
||||
appendFlagElement( parent, *iter, L"webHidden", true );
|
||||
break;
|
||||
|
||||
case sprmOldCIss:
|
||||
case sprmCIss:
|
||||
if (iter->argumentsSize > 0 && iter->Arguments[0] < 3) //Metaevan.doc
|
||||
appendValueElement( parent, L"vertAlign", FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
|
||||
break;
|
||||
|
||||
case sprmCRgLid0_80:
|
||||
case sprmCRgLid0:
|
||||
{ //latin
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Default );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmOldCLid:
|
||||
case sprmCRgLid1_80:
|
||||
case sprmCRgLid1:
|
||||
{ //east asia
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, EastAsian );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmCLidBi:
|
||||
{
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Complex );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmCBrc80:
|
||||
case sprmCBrc:
|
||||
{ //borders
|
||||
XMLTools::XMLElement bdr( L"w:bdr" );
|
||||
BorderCode bc( iter->Arguments, iter->argumentsSize );
|
||||
appendBorderAttributes( &bc, &bdr );
|
||||
parent->AppendChild( bdr );
|
||||
}break;
|
||||
|
||||
case sprmCShd80:
|
||||
case sprmCShd:
|
||||
{ //shading
|
||||
ShadingDescriptor desc( iter->Arguments, iter->argumentsSize );
|
||||
|
||||
appendShading( parent, desc );
|
||||
}break;
|
||||
|
||||
case sprmOldCIco:
|
||||
case sprmCIco:
|
||||
case sprmCIcoBi:
|
||||
{//color
|
||||
colorVal->SetValue( FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ));
|
||||
}break;
|
||||
|
||||
case sprmCCv:
|
||||
{
|
||||
std::wstringstream sstream;
|
||||
|
||||
sstream << boost::wformat(L"%02x%02x%02x") % iter->Arguments[0] % /*G*/iter->Arguments[1] % /*B*/iter->Arguments[2];
|
||||
colorVal->SetValue(sstream.str());
|
||||
}break;
|
||||
|
||||
case sprmCOldHighlight:
|
||||
{
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorNameIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
case sprmCHighlight:
|
||||
{
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorNameIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCDxaSpace:
|
||||
case sprmCDxaSpace:
|
||||
{
|
||||
appendValueElement( parent, L"spacing", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCFtcBi :
|
||||
{//default from FontTable
|
||||
size_t nIndex = FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize);
|
||||
if( nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
if (ffn)
|
||||
m_sDefaultFont = ffn->xszFtn;
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCHpsBi :
|
||||
{
|
||||
appendValueElement( parent, L"szCs",
|
||||
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}
|
||||
break;
|
||||
// Font Size in points (2~3276) default 20-half-points
|
||||
case sprmOldCHps :
|
||||
{
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
|
||||
true );
|
||||
}break;
|
||||
case sprmCHps :
|
||||
{
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCMajority :
|
||||
{ //for complex props
|
||||
}break;
|
||||
|
||||
case sprmOldCHpsPos:
|
||||
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
|
||||
short nVertPos = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
|
||||
appendValueElement (parent, L"position", nVertPos, true);
|
||||
}break;
|
||||
case sprmCHpsPos:
|
||||
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
|
||||
short nVertPos = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
|
||||
appendValueElement (parent, L"position", nVertPos, true);
|
||||
}break;
|
||||
|
||||
case sprmOldCHpsKern:
|
||||
case sprmCHpsKern:
|
||||
{
|
||||
appendValueElement( parent, L"kern", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCFtc:
|
||||
case sprmCRgFtc0:
|
||||
{ // font family
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_sAsciiFont = ffn->xszFtn;
|
||||
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont, true));
|
||||
rFonts->AppendAttribute( *ascii );
|
||||
RELEASEOBJECT( ascii );
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCRgFtc1:
|
||||
{
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( L"w:eastAsia" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_sEastAsiaFont = ffn->xszFtn;
|
||||
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont));
|
||||
rFonts->AppendAttribute( *eastAsia );
|
||||
RELEASEOBJECT( eastAsia );
|
||||
}
|
||||
}
|
||||
}break;
|
||||
break;
|
||||
|
||||
case sprmCFBiDi :
|
||||
appendFlagElement( parent, *iter, L"rtl", true );
|
||||
_isRTL = true;
|
||||
break;
|
||||
|
||||
case sprmOldCFBold :
|
||||
case sprmCFBold :
|
||||
appendFlagElement( parent, *iter, L"b", true );
|
||||
break;
|
||||
|
||||
case sprmCFBoldBi :
|
||||
appendFlagElement( parent, *iter, L"bCs", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFCaps :
|
||||
case sprmCFCaps :
|
||||
appendFlagElement( parent, *iter, L"caps", true );
|
||||
break;
|
||||
|
||||
case sprmCFComplexScripts :
|
||||
appendFlagElement( parent, *iter, L"cs", true );
|
||||
break;
|
||||
|
||||
case sprmCFDStrike :
|
||||
appendFlagElement( parent, *iter, L"dstrike", true );
|
||||
break;
|
||||
|
||||
case sprmCFEmboss :
|
||||
appendFlagElement( parent, *iter, L"emboss", true );
|
||||
break;
|
||||
|
||||
case sprmCFImprint :
|
||||
appendFlagElement( parent, *iter, L"imprint", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFItalic :
|
||||
case sprmCFItalic :
|
||||
appendFlagElement( parent, *iter, L"i", true );
|
||||
break;
|
||||
|
||||
case sprmCFItalicBi:
|
||||
appendFlagElement( parent, *iter, L"iCs", true );
|
||||
break;
|
||||
|
||||
case 0x0875:
|
||||
appendFlagElement( parent, *iter, L"noProof", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFOutline:
|
||||
case sprmCFOutline:
|
||||
appendFlagElement( parent, *iter, L"outline", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFShadow:
|
||||
case sprmCFShadow:
|
||||
appendFlagElement( parent, *iter, L"shadow", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFSmallCaps:
|
||||
case sprmCFSmallCaps:
|
||||
appendFlagElement( parent, *iter, L"smallCaps", true );
|
||||
break;
|
||||
|
||||
case sprmCFSpecVanish:
|
||||
appendFlagElement( parent, *iter, L"specVanish", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFStrike:
|
||||
case sprmCFStrike:
|
||||
appendFlagElement( parent, *iter, L"strike", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFVanish:
|
||||
case sprmCFVanish:
|
||||
appendFlagElement( parent, *iter, L"vanish", true );
|
||||
break;
|
||||
|
||||
case 0x0811:
|
||||
appendFlagElement( parent, *iter, L"webHidden", true );
|
||||
break;
|
||||
|
||||
case sprmOldCIss:
|
||||
case sprmCIss:
|
||||
if (iter->argumentsSize > 0 && iter->Arguments[0] < 3) //Metaevan.doc
|
||||
appendValueElement( parent, L"vertAlign", FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
|
||||
break;
|
||||
|
||||
case sprmCRgLid0_80:
|
||||
case sprmCRgLid0:
|
||||
{ //latin
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Default );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmOldCLid:
|
||||
case sprmCRgLid1_80:
|
||||
case sprmCRgLid1:
|
||||
{ //east asia
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, EastAsian );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmCLidBi:
|
||||
{
|
||||
LanguageId langid( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) );
|
||||
|
||||
LanguageIdMapping* langIDMapping = new LanguageIdMapping( lang, Complex );
|
||||
|
||||
langid.Convert( langIDMapping );
|
||||
|
||||
RELEASEOBJECT( langIDMapping );
|
||||
}break;
|
||||
|
||||
case sprmCBrc80:
|
||||
case sprmCBrc:
|
||||
{ //borders
|
||||
XMLTools::XMLElement bdr( L"w:bdr" );
|
||||
BorderCode bc( iter->Arguments, iter->argumentsSize );
|
||||
appendBorderAttributes( &bc, &bdr );
|
||||
parent->AppendChild( bdr );
|
||||
}break;
|
||||
|
||||
case sprmCShd80:
|
||||
case sprmCShd:
|
||||
{ //shading
|
||||
ShadingDescriptor desc( iter->Arguments, iter->argumentsSize );
|
||||
|
||||
appendShading( parent, desc );
|
||||
}break;
|
||||
|
||||
case sprmOldCIco:
|
||||
case sprmCIco:
|
||||
case sprmCIcoBi:
|
||||
{//color
|
||||
colorVal->SetValue( FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ));
|
||||
}break;
|
||||
|
||||
case sprmCCv:
|
||||
{
|
||||
std::wstringstream sstream;
|
||||
|
||||
sstream << boost::wformat(L"%02x%02x%02x") % iter->Arguments[0] % /*G*/iter->Arguments[1] % /*B*/iter->Arguments[2];
|
||||
colorVal->SetValue(sstream.str());
|
||||
}break;
|
||||
|
||||
case sprmCOldHighlight:
|
||||
{
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
case sprmCHighlight:
|
||||
{
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCDxaSpace:
|
||||
case sprmCDxaSpace:
|
||||
{
|
||||
appendValueElement( parent, L"spacing", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCFtcBi :
|
||||
{//default from FontTable
|
||||
SHORT nIndex = FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize);
|
||||
if( nIndex < _doc->FontTable->Data.size() )
|
||||
case sprmCRgFtc2:
|
||||
{
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
if (ffn)
|
||||
m_sDefaultFont = ffn->xszFtn;
|
||||
}
|
||||
}break;
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
case sprmCHpsBi :
|
||||
{
|
||||
appendValueElement( parent, L"szCs",
|
||||
FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}
|
||||
break;
|
||||
// Font Size in points (2~3276) default 20-half-points
|
||||
case sprmOldCHps :
|
||||
{
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
|
||||
true );
|
||||
}break;
|
||||
case sprmCHps :
|
||||
{
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCMajority :
|
||||
{ //for complex props
|
||||
}break;
|
||||
|
||||
case sprmOldCHpsPos:
|
||||
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
|
||||
short nVertPos = FormatUtils::BytesToUChar(iter->Arguments, 0, iter->argumentsSize);
|
||||
appendValueElement (parent, L"position", nVertPos, true);
|
||||
}break;
|
||||
case sprmCHpsPos:
|
||||
{ // The vertical position, in half-points, of text relative to the normal position. (MUST be between -3168 and 3168)
|
||||
short nVertPos = FormatUtils::BytesToInt16(iter->Arguments, 0, iter->argumentsSize);
|
||||
appendValueElement (parent, L"position", nVertPos, true);
|
||||
}break;
|
||||
|
||||
case sprmOldCHpsKern:
|
||||
case sprmCHpsKern:
|
||||
{
|
||||
appendValueElement( parent, L"kern", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCFtc:
|
||||
case sprmCRgFtc0:
|
||||
{ // font family
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_sAsciiFont = ffn->xszFtn;
|
||||
ascii->SetValue( FormatUtils::XmlEncode(m_sAsciiFont, true));
|
||||
rFonts->AppendAttribute( *ascii );
|
||||
RELEASEOBJECT( ascii );
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCRgFtc1:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( L"w:eastAsia" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_sEastAsiaFont = ffn->xszFtn;
|
||||
eastAsia->SetValue( FormatUtils::XmlEncode(m_sEastAsiaFont));
|
||||
rFonts->AppendAttribute( *eastAsia );
|
||||
RELEASEOBJECT( eastAsia );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case sprmCRgFtc2:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( L"w:hAnsi" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_shAnsiFont = ffn->xszFtn;
|
||||
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont));
|
||||
rFonts->AppendAttribute( *ansi );
|
||||
RELEASEOBJECT( ansi );
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmOldCKul:
|
||||
case sprmCKul:
|
||||
{ //Underlining
|
||||
appendValueElement( parent, L"u", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
|
||||
}
|
||||
break;
|
||||
|
||||
case sprmCCharScale:
|
||||
{ //char width
|
||||
appendValueElement( parent, L"w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCSfxText:
|
||||
{ //animation
|
||||
appendValueElement( parent, L"effect", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
|
||||
}break;
|
||||
|
||||
case sprmCIdctHint:
|
||||
{
|
||||
switch(iter->Arguments[0])
|
||||
{
|
||||
case 0: break; // default
|
||||
case 1: break; // eastAsia
|
||||
case 2: break; // cs
|
||||
case 0xFF: break; //No ST_Hint equivalent
|
||||
}
|
||||
|
||||
}break;
|
||||
|
||||
case sprmCPbiIBullet:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize );
|
||||
if (nIndex >=0)
|
||||
{
|
||||
std::map<int, int>::iterator it = _doc->PictureBulletsCPsMap.find(nIndex);
|
||||
if (it != _doc->PictureBulletsCPsMap.end())
|
||||
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
//добавить
|
||||
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( L"w:hAnsi" );
|
||||
FontFamilyName* ffn = static_cast<FontFamilyName*>( _doc->FontTable->operator [] ( nIndex ) );
|
||||
m_shAnsiFont = ffn->xszFtn;
|
||||
ansi->SetValue( FormatUtils::XmlEncode(m_shAnsiFont));
|
||||
rFonts->AppendAttribute( *ansi );
|
||||
RELEASEOBJECT( ansi );
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmOldCKul:
|
||||
case sprmCKul:
|
||||
{ //Underlining
|
||||
appendValueElement( parent, L"u", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
|
||||
}
|
||||
}break;
|
||||
break;
|
||||
|
||||
case sprmCPbiGrf:
|
||||
{
|
||||
//used picture bullet
|
||||
int val = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
case sprmCCharScale:
|
||||
{ //char width
|
||||
appendValueElement( parent, L"w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCSfxText:
|
||||
{ //animation
|
||||
appendValueElement( parent, L"effect", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
|
||||
}break;
|
||||
|
||||
}break;
|
||||
case sprmCIdctHint:
|
||||
{
|
||||
switch(iter->Arguments[0])
|
||||
{
|
||||
case 0: break; // default
|
||||
case 1: break; // eastAsia
|
||||
case 2: break; // cs
|
||||
case 0xFF: break; //No ST_Hint equivalent
|
||||
}
|
||||
|
||||
case sprmCRsidProp:
|
||||
case sprmCRsidText:
|
||||
break;
|
||||
}break;
|
||||
|
||||
default:
|
||||
if (iter->argumentsSize == 2)
|
||||
{
|
||||
nProperty = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
}else
|
||||
if (iter->argumentsSize == 1)
|
||||
{
|
||||
nProperty = FormatUtils::BytesToUChar( iter->Arguments, 0, iter->argumentsSize );
|
||||
case sprmCPbiIBullet:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize );
|
||||
if (nIndex >=0)
|
||||
{
|
||||
std::map<int, int>::iterator it = _doc->PictureBulletsCPsMap.find(nIndex);
|
||||
if (it != _doc->PictureBulletsCPsMap.end())
|
||||
{
|
||||
//добавить
|
||||
}
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCPbiGrf:
|
||||
{
|
||||
//used picture bullet
|
||||
int val = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
}break;
|
||||
|
||||
case sprmCRsidProp:
|
||||
case sprmCRsidText:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (iter->argumentsSize == 2)
|
||||
{
|
||||
nProperty = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
}else
|
||||
if (iter->argumentsSize == 1)
|
||||
{
|
||||
nProperty = FormatUtils::BytesToUChar( iter->Arguments, 0, iter->argumentsSize );
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -35,19 +35,188 @@
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class CharacterPropertyExceptions: public PropertyExceptions
|
||||
{
|
||||
public:
|
||||
/// Creates a CHPX wich doesn't modify anything.
|
||||
/// The grpprl list is empty
|
||||
CharacterPropertyExceptions(): PropertyExceptions()
|
||||
{
|
||||
}
|
||||
class CharacterPropertyExceptions: public PropertyExceptions
|
||||
{
|
||||
public:
|
||||
/// Creates a CHPX wich doesn't modify anything.
|
||||
/// The grpprl list is empty
|
||||
CharacterPropertyExceptions(): PropertyExceptions()
|
||||
{
|
||||
}
|
||||
|
||||
/// Parses the bytes to retrieve a CHPX
|
||||
CharacterPropertyExceptions( unsigned char* bytes, int size, bool oldVersion) :
|
||||
PropertyExceptions( bytes, size, oldVersion )
|
||||
{
|
||||
}
|
||||
};
|
||||
/// Parses the bytes to retrieve a CHPX
|
||||
CharacterPropertyExceptions( unsigned char* bytes, int size, int nWordVersion) :
|
||||
PropertyExceptions( bytes, size, nWordVersion )
|
||||
{
|
||||
if (nWordVersion > 1)
|
||||
{
|
||||
RELEASEOBJECT( grpprl );
|
||||
grpprl = new std::list<SinglePropertyModifier>();
|
||||
|
||||
MemoryStream oStream(bytes, size);
|
||||
int pos = 0;
|
||||
|
||||
if (nWordVersion == 3)
|
||||
{
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short fChar = oStream.ReadUInt16(); pos += 2;
|
||||
|
||||
unsigned char val;
|
||||
val = GETBIT(fChar, 0); grpprl->push_back(SinglePropertyModifier(sprmOldCFBold, 1, &val));
|
||||
val = GETBIT(fChar, 1); grpprl->push_back(SinglePropertyModifier(sprmOldCFItalic, 1, &val));
|
||||
val = GETBIT(fChar, 2); grpprl->push_back(SinglePropertyModifier(sprmOldCFStrike, 1, &val));
|
||||
val = GETBIT(fChar, 3); grpprl->push_back(SinglePropertyModifier(sprmOldCFOutline, 1, &val));
|
||||
val = GETBIT(fChar, 4); grpprl->push_back(SinglePropertyModifier(sprmOldCFFldVanish, 1, &val));
|
||||
val = GETBIT(fChar, 5); grpprl->push_back(SinglePropertyModifier(sprmOldCFSmallCaps, 1, &val));
|
||||
val = GETBIT(fChar, 6); grpprl->push_back(SinglePropertyModifier(sprmOldCFCaps, 1, &val));
|
||||
val = GETBIT(fChar, 7); grpprl->push_back(SinglePropertyModifier(sprmOldCFVanish, 1, &val));
|
||||
val = GETBIT(fChar, 8); grpprl->push_back(SinglePropertyModifier(sprmOldCFRMark, 1, &val));
|
||||
val = GETBIT(fChar, 9); grpprl->push_back(SinglePropertyModifier(sprmOldCFSpec, 1, &val));
|
||||
|
||||
bool fsIco = GETBIT(fChar, 10);
|
||||
bool fsFtc = GETBIT(fChar, 11);
|
||||
bool fsHps = GETBIT(fChar, 12);
|
||||
bool fsKul = GETBIT(fChar, 13);
|
||||
bool fsPos = GETBIT(fChar, 14);
|
||||
bool fsSpace = GETBIT(fChar, 15);
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
int fff = oStream.ReadUInt16(); pos += 2;//?????
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short ftc = oStream.ReadUInt16(); pos += 2; // Font Code
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCFtc, 2, (unsigned char*)&ftc));
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char hps = oStream.ReadByte(); pos += 1; // Font size in half points
|
||||
|
||||
if (hps > 0)
|
||||
{
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCHps, 1, &hps));
|
||||
}
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char hpsPos = oStream.ReadByte(); pos += 1; // Sub/Superscript ( signed number, 0 = normal )
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCHpsPos, 1, &hpsPos));
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short fText = oStream.ReadUInt16(); pos += 2;
|
||||
|
||||
unsigned short qpsSpace = GETBITS(fText, 0, 5);
|
||||
unsigned char wSpare2 = GETBITS(fText, 6, 7);
|
||||
unsigned char ico = GETBITS(fText, 8, 11);
|
||||
unsigned char kul = GETBITS(fText, 12, 14);
|
||||
bool fSysVanish = GETBIT(fChar, 15);
|
||||
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCKul, 1, &kul));
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCIco, 1, &ico));
|
||||
|
||||
//sizeof(CHP) == 12 == 0xC
|
||||
if (pos + 4 > size) return;
|
||||
unsigned int fcPic = oStream.ReadUInt16(); pos += 4; //pos = 8
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCPicLocation, 4, (BYTE*)&fcPic));
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char fnPic = oStream.ReadByte(); pos += 1;
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short hpsLargeChp = oStream.ReadUInt16(); pos += 2;// ??? type
|
||||
}
|
||||
else if (nWordVersion == 2)
|
||||
{
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short fChar = oStream.ReadUInt16(); pos += 2;
|
||||
|
||||
unsigned char val;
|
||||
val = GETBIT(fChar, 0); grpprl->push_back(SinglePropertyModifier(sprmOldCFBold, 1, &val));
|
||||
val = GETBIT(fChar, 1); grpprl->push_back(SinglePropertyModifier(sprmOldCFItalic, 1, &val));
|
||||
val = GETBIT(fChar, 2); grpprl->push_back(SinglePropertyModifier(sprmOldCIbstRMark, 1, &val));
|
||||
val = GETBIT(fChar, 3); grpprl->push_back(SinglePropertyModifier(sprmOldCFOutline, 1, &val));
|
||||
val = GETBIT(fChar, 4); grpprl->push_back(SinglePropertyModifier(sprmOldCFFldVanish, 1, &val));
|
||||
val = GETBIT(fChar, 5); grpprl->push_back(SinglePropertyModifier(sprmOldCFSmallCaps, 1, &val));
|
||||
val = GETBIT(fChar, 6); grpprl->push_back(SinglePropertyModifier(sprmOldCFCaps, 1, &val));
|
||||
val = GETBIT(fChar, 7); grpprl->push_back(SinglePropertyModifier(sprmOldCFVanish, 1, &val));
|
||||
val = GETBIT(fChar, 8); grpprl->push_back(SinglePropertyModifier(sprmOldCFRMark, 1, &val));
|
||||
val = GETBIT(fChar, 9); grpprl->push_back(SinglePropertyModifier(sprmOldCFSpec, 1, &val));
|
||||
val = GETBIT(fChar, 10); grpprl->push_back(SinglePropertyModifier(sprmOldCFStrike, 1, &val));
|
||||
val = GETBIT(fChar, 11); grpprl->push_back(SinglePropertyModifier(sprmOldCFObj, 1, &val));
|
||||
val = GETBIT(fChar, 12); grpprl->push_back(SinglePropertyModifier(sprmCFBoldBi, 1, &val));
|
||||
val = GETBIT(fChar, 13); grpprl->push_back(SinglePropertyModifier(sprmCFItalicBi, 1, &val));
|
||||
val = GETBIT(fChar, 14); grpprl->push_back(SinglePropertyModifier(sprmCFBiDi, 1, &val));
|
||||
val = GETBIT(fChar, 15); grpprl->push_back(SinglePropertyModifier(sprmCFDiacColor, 1, &val));
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short fChar2 = oStream.ReadUInt16(); pos += 2;
|
||||
bool fsIco = GETBIT(fChar2, 0);
|
||||
bool fsFtc = GETBIT(fChar2, 1);
|
||||
bool fsHps = GETBIT(fChar2, 2);
|
||||
bool fsKul = GETBIT(fChar2, 3);
|
||||
bool fsPos = GETBIT(fChar2, 4);
|
||||
bool fsSpace = GETBIT(fChar2, 5);
|
||||
bool fsLid = GETBIT(fChar2, 6);
|
||||
bool fsIcoBi = GETBIT(fChar2, 7);
|
||||
bool fsFtcBi = GETBIT(fChar2, 8);
|
||||
bool fsHpsBi = GETBIT(fChar2, 9);
|
||||
bool fsLidBi = GETBIT(fChar2, 10);
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short ftc = oStream.ReadUInt16(); pos += 2; // Font Code
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCFtc, 2, (unsigned char*)&ftc));
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char hps = oStream.ReadByte(); pos += 1; // Font size in half points
|
||||
|
||||
if (hps > 0)
|
||||
{
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCHps, 1, &hps));
|
||||
}
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char hpsPos = oStream.ReadByte(); pos += 1; // Sub/Superscript ( signed number, 0 = normal )
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCHpsPos, 1, &hpsPos));
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short fText = oStream.ReadUInt16(); pos += 2;
|
||||
|
||||
unsigned short qpsSpace = GETBITS(fText, 0, 5);
|
||||
unsigned char wSpare2 = GETBITS(fText, 6, 7);
|
||||
unsigned char ico = GETBITS(fText, 8, 11);
|
||||
unsigned char kul = GETBITS(fText, 12, 14);
|
||||
bool fSysVanish = GETBIT(fChar, 15);
|
||||
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCKul, 1, &kul));
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCIco, 1, &ico));
|
||||
|
||||
//if (pos + 1 > size) return;
|
||||
//unsigned char icoBi = oStream.ReadUInt16(); pos += 1;//wSpare3
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short lid = oStream.ReadUInt16(); pos += 2;
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCLid, 2, (BYTE*)&lid));
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short ftcBi = oStream.ReadUInt16(); pos += 2;
|
||||
grpprl->push_back(SinglePropertyModifier(sprmCFtcBi, 4, (BYTE*)&ftcBi));
|
||||
|
||||
//if (pos + 2 > size) return;
|
||||
//unsigned short hpsBi = oStream.ReadUInt16(); pos += 2;
|
||||
//grpprl->push_back(SinglePropertyModifier(sprmCHpsBi, 4, (BYTE*)&hpsBi));
|
||||
|
||||
//if (pos + 2 > size) return;
|
||||
//unsigned short lidBi = oStream.ReadUInt16(); pos += 2;
|
||||
//grpprl->push_back(SinglePropertyModifier(sprmCLidBi, 2, (BYTE*)&lidBi));
|
||||
|
||||
if (pos + 4 > size) return;
|
||||
unsigned int fcPic = oStream.ReadUInt16(); pos += 4; //pos = 8
|
||||
grpprl->push_back(SinglePropertyModifier(sprmOldCPicLocation, 4, (BYTE*)&fcPic));
|
||||
|
||||
if (pos + 1 > size) return;
|
||||
unsigned char fnPic = oStream.ReadByte(); pos += 1;
|
||||
|
||||
if (pos + 2 > size) return;
|
||||
unsigned short hpsLargeChp = oStream.ReadUInt16(); pos += 2;// ??? type
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -68,12 +68,12 @@ namespace DocFileFormat
|
||||
int cp = m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr;
|
||||
|
||||
size_t count = m_document->AnnotationsReferencePlex->Elements.size();
|
||||
for (unsigned int i = 0; i < count; ++i)
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:author",
|
||||
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
|
||||
@ -95,7 +95,7 @@ namespace DocFileFormat
|
||||
if (fc < 0) break;
|
||||
|
||||
ParagraphPropertyExceptions* papx = findValidPapx(fc);
|
||||
TableInfo tai(papx);
|
||||
TableInfo tai(papx, m_document->nWordVersion);
|
||||
|
||||
if ( tai.fInTable )
|
||||
{
|
||||
@ -107,7 +107,7 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph(cp);
|
||||
cp = writeParagraph(cp, 0x7fffffff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -69,8 +69,13 @@ namespace OpenXmlContentTypes
|
||||
static const wchar_t* Tiff = L"image/tiff";
|
||||
static const wchar_t* Wmf = L"image/x-wmf";
|
||||
static const wchar_t* Bmp = L"image/bmp";
|
||||
static const wchar_t* Pcz = L"image/x-pcz";
|
||||
}
|
||||
namespace DocPrContentTypes
|
||||
{
|
||||
static const wchar_t* App = L"application/vnd.openxmlformats-officedocument.extended-properties+xml";
|
||||
static const wchar_t* Core = L"application/vnd.openxmlformats-package.core-properties+xml";
|
||||
}
|
||||
|
||||
namespace WordprocessingMLContentTypes
|
||||
{
|
||||
// WordprocessingML content types
|
||||
@ -136,7 +141,7 @@ namespace OpenXmlNamespaces
|
||||
|
||||
namespace OpenXmlRelationshipTypes
|
||||
{
|
||||
static const wchar_t* CoreProperties = L"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
|
||||
static const wchar_t* CoreProperties = L"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
|
||||
static const wchar_t* ExtendedProperties = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";
|
||||
|
||||
static const wchar_t* Theme = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
|
||||
@ -157,6 +162,7 @@ namespace OpenXmlRelationshipTypes
|
||||
static const wchar_t* OleObject = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
|
||||
static const wchar_t* GlossaryDocument = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
|
||||
static const wchar_t* Package = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
|
||||
static const wchar_t* VbaProject = L"http://schemas.microsoft.com/office/2006/relationships/vbaProject";
|
||||
}
|
||||
|
||||
namespace MicrosoftWordRelationshipTypes
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -47,30 +47,17 @@ namespace DocFileFormat
|
||||
|
||||
virtual ~ConversionContext()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Adds a new RSID to the set
|
||||
inline void AddRsid(const std::wstring& rsid)
|
||||
{
|
||||
if (AllRsids.find(rsid) == AllRsids.end())
|
||||
AllRsids.insert(rsid);
|
||||
}
|
||||
|
||||
inline WordDocument* GetDocument()
|
||||
{
|
||||
return _doc;
|
||||
}
|
||||
|
||||
inline WordprocessingDocument* GetXmlDocument()
|
||||
{
|
||||
return _docx;
|
||||
}
|
||||
|
||||
public:
|
||||
WordprocessingDocument* _docx;
|
||||
WordDocument* _doc;
|
||||
/// A set thta contains all revision ids.
|
||||
|
||||
std::set<std::wstring> AllRsids;
|
||||
};
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -63,9 +63,17 @@ namespace DocFileFormat
|
||||
{
|
||||
long Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
|
||||
{
|
||||
if (!doc || !docx) return S_FALSE;
|
||||
|
||||
ConversionContext context( doc, docx );
|
||||
|
||||
//Write styles.xml
|
||||
//Write fontTable.xml
|
||||
if (doc->FontTable)
|
||||
{
|
||||
FontTableMapping fontTableMapping( &context );
|
||||
doc->FontTable->Convert( &fontTableMapping );
|
||||
}
|
||||
//Write styles.xml
|
||||
if (doc->Styles)
|
||||
{
|
||||
StyleSheetMapping styleSheetMapping( &context );
|
||||
@ -88,9 +96,7 @@ namespace DocFileFormat
|
||||
return S_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Write numbering.xml
|
||||
//Write numbering.xml
|
||||
if (doc->listTable)
|
||||
{
|
||||
NumberingMapping numberingMapping( &context );
|
||||
@ -109,14 +115,6 @@ namespace DocFileFormat
|
||||
return S_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//Write fontTable.xml
|
||||
if (doc->FontTable)
|
||||
{
|
||||
FontTableMapping fontTableMapping( &context );
|
||||
doc->FontTable->Convert( &fontTableMapping );
|
||||
}
|
||||
|
||||
if ( progress != NULL )
|
||||
{
|
||||
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 875000 );
|
||||
@ -130,7 +128,7 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
//write the footnotes
|
||||
//write the footnotes
|
||||
FootnotesMapping footnotesMapping( &context );
|
||||
doc->Convert( &footnotesMapping );
|
||||
|
||||
@ -147,7 +145,7 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
//write the endnotes
|
||||
//write the endnotes
|
||||
EndnotesMapping endnotesMapping( &context );
|
||||
doc->Convert( &endnotesMapping );
|
||||
|
||||
@ -164,7 +162,7 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
//write the comments
|
||||
//write the comments
|
||||
CommentsMapping commentsMapping( &context );
|
||||
doc->Convert( &commentsMapping );
|
||||
|
||||
@ -181,13 +179,13 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
//write settings.xml at last because of the rsid list
|
||||
//write settings.xml at last because of the rsid list
|
||||
if (doc->DocProperties)
|
||||
{
|
||||
SettingsMapping settingsMapping( &context );
|
||||
doc->DocProperties->Convert( &settingsMapping );
|
||||
}
|
||||
|
||||
|
||||
if ( progress != NULL )
|
||||
{
|
||||
progress->OnProgress( progress->caller, DOC_ONPROGRESSEVENT_ID, 975000 );
|
||||
@ -204,7 +202,7 @@ namespace DocFileFormat
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
long Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress)
|
||||
long Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
|
||||
{
|
||||
long result = S_FALSE;
|
||||
|
||||
@ -219,7 +217,7 @@ namespace DocFileFormat
|
||||
|
||||
if (result == S_OK)
|
||||
{
|
||||
docx.SaveDocument();
|
||||
docx.SaveDocument(bMacros);
|
||||
|
||||
if (progress)progress->OnProgress(progress->caller, DOC_ONPROGRESSEVENT_ID, 1000000);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -48,7 +48,7 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring m_sTempFolder;
|
||||
|
||||
long LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress);
|
||||
long LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
|
||||
|
||||
private:
|
||||
long Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -59,29 +59,30 @@ namespace DocFileFormat
|
||||
short wdy;
|
||||
|
||||
public:
|
||||
/// Creates a new DateAndTime with default values
|
||||
DateAndTime()
|
||||
{
|
||||
setDefaultValues();
|
||||
}
|
||||
|
||||
/// Parses the unsigned char sto retrieve a DateAndTime
|
||||
DateAndTime( unsigned char* bytes, int size )
|
||||
{
|
||||
if ( size == 4 )
|
||||
{
|
||||
this->mint = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 0, 6 );
|
||||
this->hr = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 6, 5 );
|
||||
this->dom = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 11, 5 );
|
||||
this->mon = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 16, 4 );
|
||||
this->yr = (short)( 1900 + FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 20, 9 ) );
|
||||
this->wdy = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 29, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw new ByteParseException("Cannot parse the struct DTTM, the length of the struct doesn't match");
|
||||
}
|
||||
}
|
||||
DateAndTime()
|
||||
{
|
||||
setDefaultValues();
|
||||
}
|
||||
DateAndTime( unsigned int val )
|
||||
{
|
||||
DateAndTime((unsigned char*)&val, 4);
|
||||
}
|
||||
DateAndTime( unsigned char* bytes, int size )
|
||||
{
|
||||
if ( size == 4 )
|
||||
{
|
||||
this->mint = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 0, 6 );
|
||||
this->hr = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 6, 5 );
|
||||
this->dom = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 11, 5 );
|
||||
this->mon = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 16, 4 );
|
||||
this->yr = (short)( 1900 + FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 20, 9 ) );
|
||||
this->wdy = (short)FormatUtils::GetIntFromBits( FormatUtils::BytesToInt32( bytes, 0, size ), 29, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw new ByteParseException("Cannot parse the struct DTTM, the length of the struct doesn't match");
|
||||
}
|
||||
}
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
SYSTEMTIME ToSYSTEMTIME()
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -48,6 +48,8 @@
|
||||
#include "OleObjectMapping.h"
|
||||
#include "ConversionContext.h"
|
||||
#include "IMapping.h"
|
||||
#include "FormFieldData.h"
|
||||
#include "FormFieldDataMapping.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -85,7 +87,7 @@ namespace DocFileFormat
|
||||
bool isSectionEnd ( int cp );
|
||||
// Writes a Paragraph that starts at the given cp and
|
||||
// ends at the next paragraph end mark or section end mark
|
||||
int writeParagraph( int cp );
|
||||
int writeParagraph( int cp, int cpEnd );
|
||||
// Writes a Paragraph that starts at the given cpStart and
|
||||
// ends at the given cpEnd
|
||||
int writeParagraph( int initialCp, int cpEnd, bool sectionEnd, bool lastBad = false );
|
||||
@ -99,28 +101,33 @@ namespace DocFileFormat
|
||||
void writeTextStart ( const std::wstring& textType, bool preserve_space);
|
||||
void writeTextEnd ( const std::wstring& textType );
|
||||
|
||||
// Searches for bookmarks in the list of characters.
|
||||
std::vector<int> searchBookmarks( std::vector<wchar_t>* chars, int initialCp );
|
||||
std::vector<int> searchAnnot(std::vector<wchar_t>* chars, int initialCp);
|
||||
|
||||
ParagraphPropertyExceptions* findValidPapx( int fc );
|
||||
// Splits a list of characters into several lists
|
||||
std::list<std::vector<wchar_t> >* splitCharList( std::vector<wchar_t>* chars, std::vector<int>* splitIndices );
|
||||
// Writes the table starts at the given cp value
|
||||
int writeTable ( int initialCp, unsigned int nestingLevel );
|
||||
// Builds a list that contains the width of the several columns of the table.
|
||||
std::vector<short>* buildTableGrid( int initialCp, unsigned int nestingLevel );
|
||||
bool buildTableGrid( int initialCp, unsigned int nestingLevel, std::vector<short>& grid, std::vector<short>& grid_write );
|
||||
// Finds the FC of the next row end mark.
|
||||
int findRowEndFc ( int initialCp, int& rowEndCp, unsigned int nestingLevel );
|
||||
// Finds the FC of the next row end mark.
|
||||
int findRowEndFc ( int initialCp, unsigned int nestingLevel );
|
||||
// Writes the table row that starts at the given cp value and ends at the next row end mark
|
||||
int writeTableRow ( int initialCp, std::vector<short>* grid, unsigned int nestingLevel );
|
||||
int writeTableRow ( int initialCp, std::vector<short>* grid, std::vector<short>* grid_write, unsigned int nestingLevel );
|
||||
// Writes the table cell that starts at the given cp value and ends at the next cell end mark
|
||||
int writeTableCell ( int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, int& gridIndex, int cellIndex, unsigned int nestingLevel );
|
||||
int writeTableCell ( int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, std::vector<short>* grid_write, int& gridIndex, int cellIndex, unsigned int nestingLevel );
|
||||
int findCellEndCp ( int initialCp, unsigned int nestingLevel );
|
||||
|
||||
bool writeBookmarks ( int cp );
|
||||
bool writeBookmarkStart ( short id );
|
||||
bool writeBookmarkEnd ( short id );
|
||||
|
||||
bool writeAnnotations ( int cp );
|
||||
bool writeAnnotationStart( short id );
|
||||
bool writeAnnotationEnd ( short id );
|
||||
// Checks if the CHPX is special
|
||||
bool isSpecial( CharacterPropertyExceptions* chpx );
|
||||
// Finds the SEPX that is valid for the given CP.
|
||||
@ -147,11 +154,19 @@ namespace DocFileFormat
|
||||
int _commentNr;
|
||||
bool _isTextBoxContent;
|
||||
int _isSectionPageBreak; //0 - not set, 1 -page break, 2 - continues
|
||||
bool _writeInstrText;
|
||||
bool _writeWebHidden;
|
||||
unsigned int _fldCharCounter;
|
||||
std::wstring _writeAfterRun;
|
||||
std::wstring _lastOLEObject;
|
||||
int _cacheListNum;
|
||||
|
||||
struct fieldLevels
|
||||
{
|
||||
bool bBegin = false;
|
||||
bool bSeparate = false;
|
||||
//bool bInstrText = false;
|
||||
bool bEnd = false;
|
||||
};
|
||||
std::vector<fieldLevels> _fieldLevels;
|
||||
bool _bContentWrite;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -48,22 +48,89 @@ namespace DocFileFormat
|
||||
{
|
||||
Initialize();
|
||||
|
||||
VirtualStreamReader tStream( tableStream, fib->m_FibWord97.fcDop, fib->m_bOlderVersion);
|
||||
VirtualStreamReader tStream( tableStream, fib->m_FibWord97.fcDop, fib->m_nWordVersion);
|
||||
|
||||
//setDefaultCompatibilityOptions( fib->m_FibBase.nFib );
|
||||
|
||||
unsigned int size = fib->m_FibWord97.lcbDop;
|
||||
unsigned char* bytes = tStream.ReadBytes( size, true );
|
||||
unsigned int size = fib->m_FibWord97.lcbDop;
|
||||
unsigned char* bytes = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
if ( size > 0 )
|
||||
if (fib->m_nWordVersion == 2)
|
||||
{
|
||||
unsigned char* Temp = tStream.ReadBytes(size, true);
|
||||
tStream.Seek(fib->m_FibWord97.fcDop, 0);
|
||||
delete []Temp;
|
||||
|
||||
unsigned char flags1 = tStream.ReadByte();
|
||||
|
||||
fFacingPages = GETBIT(flags1, 0);
|
||||
fWindowControl = GETBIT(flags1, 1);
|
||||
Fpc = GETBITS(flags1, 5, 6);
|
||||
bool fWide = GETBIT(flags1, 7);
|
||||
|
||||
grpfIhdt = tStream.ReadByte();
|
||||
|
||||
unsigned short flags2 = tStream.ReadUInt16();
|
||||
rncFtn = GETBIT(flags2, 0);
|
||||
nFtn = GETBITS(flags2, 1, 15);
|
||||
|
||||
unsigned char irmBar = tStream.ReadByte();
|
||||
|
||||
unsigned char flags3 = tStream.ReadByte();
|
||||
unsigned char irmProps = GETBITS(flags3, 0, 6);
|
||||
fRevMarking = GETBIT(flags3, 7);
|
||||
|
||||
unsigned short flags4 = tStream.ReadUInt16();
|
||||
fBackup = GETBIT(flags4, 0);
|
||||
fExactWords = GETBIT(flags4, 1);
|
||||
fPagHidden = GETBIT(flags4, 2);
|
||||
fPagResults = GETBIT(flags4, 3);
|
||||
fLockAtn = GETBIT(flags4, 4);
|
||||
fMirrorMargins = GETBIT(flags4, 5);
|
||||
bool fKeepFileFormat = GETBIT(flags4, 6);
|
||||
fDflttrueType = GETBIT(flags4, 7);
|
||||
|
||||
fPagSuppressTopSpacing = GETBIT(flags4, 8);
|
||||
fMaybeRTLTables = GETBIT(flags4, 9);
|
||||
|
||||
bool fSpares = tStream.ReadUInt16();
|
||||
dxaTab = tStream.ReadUInt16();
|
||||
|
||||
wSpare = tStream.ReadUInt16();//ftcDefaultBi
|
||||
dxaHotZ = tStream.ReadUInt16();
|
||||
|
||||
wSpare2 = tStream.ReadUInt16();
|
||||
wSpare3 = tStream.ReadUInt16();
|
||||
|
||||
dttmCreated = DateAndTime( tStream.ReadUInt32() );
|
||||
dttmRevised = DateAndTime( tStream.ReadUInt32() );
|
||||
dttmLastPrint = DateAndTime( tStream.ReadUInt32() );
|
||||
|
||||
nRevision = tStream.ReadUInt16();
|
||||
tmEdited = tStream.ReadUInt32();
|
||||
|
||||
cWords = tStream.ReadUInt32();
|
||||
cCh = tStream.ReadUInt32();
|
||||
cPg = tStream.ReadUInt16();
|
||||
|
||||
unsigned short rgwSpareDocSum[2];
|
||||
rgwSpareDocSum[0] = tStream.ReadUInt16();
|
||||
rgwSpareDocSum[1] = tStream.ReadUInt16();
|
||||
|
||||
}
|
||||
else if ( size > 0 )
|
||||
{
|
||||
fFacingPages = FormatUtils::GetBitFromBytes( bytes, 2, 0 );
|
||||
bytes = tStream.ReadBytes( size, true );
|
||||
|
||||
fFacingPages = FormatUtils::GetBitFromBytes( bytes, 2, 0 );
|
||||
fWindowControl = FormatUtils::GetBitFromBytes( bytes, 2, 1 );
|
||||
fPMHMainDoc = FormatUtils::GetBitFromBytes( bytes, 2, 2 );
|
||||
grfSuppression = (short)FormatUtils::GetUIntFromBytesBits( bytes, 2, 3, 2 );
|
||||
Fpc = (short)(short)FormatUtils::GetUIntFromBytesBits( bytes, 2, 5, 2 );
|
||||
Fpc = (short)FormatUtils::GetUIntFromBytesBits( bytes, 2, 5, 2 );
|
||||
|
||||
grpfIhdt = FormatUtils::BytesToUChar( bytes, 1, size );
|
||||
|
||||
rncFtn = (short)FormatUtils::GetUIntFromBytesBits( ( bytes + 2 ), 2, 0, 2 );
|
||||
nFtn = (short)FormatUtils::GetUIntFromBytesBits( ( bytes + 2 ), 2, 2, 14 );
|
||||
@ -545,6 +612,7 @@ namespace DocFileFormat
|
||||
fSwapBordersFacingPgs = false;
|
||||
dxaTab = 0;
|
||||
wSpare = 0;
|
||||
wSpare3 = 0;
|
||||
dxaHotZ = 0;
|
||||
cConsecHypLim = 0;
|
||||
wSpare2 = 0;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -177,7 +177,8 @@ namespace DocFileFormat
|
||||
unsigned short cConsecHypLim;
|
||||
// Reserved
|
||||
unsigned short wSpare2;
|
||||
// Date and time document was created
|
||||
unsigned short wSpare3;
|
||||
// Date and time document was created
|
||||
DateAndTime dttmCreated;
|
||||
// Date and time document was last revised
|
||||
DateAndTime dttmRevised;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -33,7 +33,6 @@
|
||||
#include "DrawingPrimitives.h"
|
||||
#include "VirtualStreamReader.h"
|
||||
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
DrawingPrimitive * DrawingPrimitive::Create(VirtualStreamReader* reader, int length, short dpk)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -35,137 +35,148 @@
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
EncryptionHeader::EncryptionHeader( FileInformationBlock* fib, POLE::Stream* tableStream )
|
||||
EncryptionHeader::EncryptionHeader( FileInformationBlock* fib, POLE::Stream* tableStream ) : bStandard(false), bXOR(false), bAES(false)
|
||||
{
|
||||
VirtualStreamReader tStream( tableStream, 0, fib->m_bOlderVersion);
|
||||
VirtualStreamReader tStream( tableStream, 0, fib->m_nWordVersion);
|
||||
|
||||
if (fib->m_FibBase.fObfuscation)
|
||||
if (fib->m_FibBase.fObfuscation || fib->m_nWordVersion > 0)
|
||||
{
|
||||
//xor
|
||||
return;
|
||||
}
|
||||
unsigned short vMajor = tStream.ReadUInt16();
|
||||
unsigned short vMinor = tStream.ReadUInt16();
|
||||
|
||||
if(0x0001 == vMajor) // RC4 encryption header structure
|
||||
{// fib->m_FibBase.lKey == 52
|
||||
bStandard = true;
|
||||
|
||||
crypt_data_rc4.Salt.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b4 = tStream.ReadUInt32();
|
||||
bXOR = true;
|
||||
|
||||
crypt_data_rc4.EncryptedVerifier.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b4 = tStream.ReadUInt32();
|
||||
|
||||
crypt_data_rc4.EncryptedVerifierHash.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b4 = tStream.ReadUInt32();
|
||||
crypt_data_xor.key = fib->m_FibBase.lKey >> 16;
|
||||
crypt_data_xor.hash = fib->m_FibBase.lKey - (crypt_data_xor.key << 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
bStandard = false;
|
||||
crypt_data_aes.bAgile = false;
|
||||
unsigned short vMajor = tStream.ReadUInt16();
|
||||
unsigned short vMinor = tStream.ReadUInt16();
|
||||
|
||||
unsigned short flags = tStream.ReadUInt32();
|
||||
unsigned char *pDataRead = NULL;
|
||||
if(0x0001 == vMajor) // RC4 encryption header structure
|
||||
{// fib->m_FibBase.lKey == 52
|
||||
bStandard = true;
|
||||
|
||||
bool fCryptoAPI = GETBIT(flags, 1);
|
||||
bool fDocProps = GETBIT(flags, 2);
|
||||
bool fExternal = GETBIT(flags, 3);
|
||||
bool fAES = GETBIT(flags, 4);
|
||||
|
||||
//EncryptionHeader
|
||||
int HeaderSize = tStream.ReadUInt32();
|
||||
int Flags = tStream.ReadUInt32();
|
||||
int SizeExtra = tStream.ReadUInt32();
|
||||
int AlgID = tStream.ReadUInt32();
|
||||
int AlgIDHash = tStream.ReadUInt32();
|
||||
int KeySize = tStream.ReadUInt32();
|
||||
int ProviderType= tStream.ReadUInt32();
|
||||
int Reserved1 = tStream.ReadUInt32();
|
||||
int Reserved2 = tStream.ReadUInt32();
|
||||
|
||||
int pos = tStream.GetPosition();
|
||||
int size = tStream.GetSize();
|
||||
|
||||
std::vector<char> dataCSPName;
|
||||
while(pos < size - 1)
|
||||
crypt_data_rc4.Salt.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.Salt.b4 = tStream.ReadUInt32();
|
||||
|
||||
crypt_data_rc4.EncryptedVerifier.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifier.b4 = tStream.ReadUInt32();
|
||||
|
||||
crypt_data_rc4.EncryptedVerifierHash.b1 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b2 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b3 = tStream.ReadUInt32();
|
||||
crypt_data_rc4.EncryptedVerifierHash.b4 = tStream.ReadUInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
dataCSPName.push_back(tStream.ReadByte());
|
||||
dataCSPName.push_back(tStream.ReadByte());
|
||||
if (dataCSPName[dataCSPName.size() - 1] == 0 && dataCSPName[dataCSPName.size() - 2] == 0)
|
||||
bAES = true;
|
||||
crypt_data_aes.bAgile = false;
|
||||
|
||||
unsigned short flags = tStream.ReadUInt32();
|
||||
unsigned char *pDataRead = NULL;
|
||||
|
||||
bool fCryptoAPI = GETBIT(flags, 1);
|
||||
crypt_data_aes.fDocProps = GETBIT(flags, 2);
|
||||
bool fExternal = GETBIT(flags, 3);
|
||||
bool fAES = GETBIT(flags, 4);
|
||||
|
||||
//EncryptionHeader
|
||||
int HeaderSize = tStream.ReadUInt32();
|
||||
int Flags = tStream.ReadUInt32();
|
||||
int SizeExtra = tStream.ReadUInt32();
|
||||
int AlgID = tStream.ReadUInt32();
|
||||
int AlgIDHash = tStream.ReadUInt32();
|
||||
int KeySize = tStream.ReadUInt32();
|
||||
int ProviderType= tStream.ReadUInt32();
|
||||
int Reserved1 = tStream.ReadUInt32();
|
||||
int Reserved2 = tStream.ReadUInt32();
|
||||
|
||||
int pos = tStream.GetPosition();
|
||||
int size = tStream.GetSize();
|
||||
|
||||
std::vector<char> dataCSPName;
|
||||
while(pos < size - 1)
|
||||
{
|
||||
dataCSPName.push_back(tStream.ReadByte());
|
||||
dataCSPName.push_back(tStream.ReadByte());
|
||||
if (dataCSPName[dataCSPName.size() - 1] == 0 && dataCSPName[dataCSPName.size() - 2] == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
pos+=2;//unicode null-terminate string
|
||||
}
|
||||
//EncryptionVerifier
|
||||
crypt_data_aes.saltSize = tStream.ReadUInt32();
|
||||
pDataRead = tStream.ReadBytes(crypt_data_aes.saltSize, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.saltValue = std::string((char*)pDataRead, crypt_data_aes.saltSize);
|
||||
delete pDataRead;
|
||||
}
|
||||
|
||||
pDataRead = tStream.ReadBytes(0x10, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.encryptedVerifierInput = std::string((char*)pDataRead, 0x10);
|
||||
delete pDataRead;
|
||||
}
|
||||
|
||||
crypt_data_aes.hashSize = tStream.ReadUInt32();
|
||||
|
||||
int szEncryptedVerifierHash = (ProviderType == 0x0001) ? 0x14 : 0x20;
|
||||
pDataRead = tStream.ReadBytes(szEncryptedVerifierHash, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.encryptedVerifierValue = std::string((char*)pDataRead, szEncryptedVerifierHash);
|
||||
delete pDataRead;
|
||||
}
|
||||
|
||||
pos = tStream.GetPosition();
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
switch(AlgIDHash)
|
||||
{
|
||||
case 0x8003: crypt_data_aes.hashAlgorithm = CRYPT_METHOD::MD5; break;
|
||||
case 0x0000:
|
||||
case 0x8004: crypt_data_aes.hashAlgorithm = CRYPT_METHOD::SHA1; break;
|
||||
}
|
||||
crypt_data_aes.spinCount = 0;
|
||||
|
||||
switch(AlgID)
|
||||
{
|
||||
case 0x0000:
|
||||
if (fAES) crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
if (fCryptoAPI) crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
crypt_data_aes.keySize = KeySize / 8;
|
||||
case 0x6801:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
crypt_data_aes.keySize = KeySize / 8;
|
||||
|
||||
if (crypt_data_aes.keySize == 0) crypt_data_aes.keySize = 5; // 40 bit
|
||||
break;
|
||||
case 0x660E:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 128 /8;
|
||||
break;
|
||||
case 0x660F:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 192 /8;
|
||||
break;
|
||||
case 0x6610:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 256 /8;
|
||||
break;
|
||||
}
|
||||
pos+=2;//unicode null-terminate string
|
||||
}
|
||||
//EncryptionVerifier
|
||||
crypt_data_aes.saltSize = tStream.ReadUInt32();
|
||||
pDataRead = tStream.ReadBytes(crypt_data_aes.saltSize, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.saltValue = std::string((char*)pDataRead, crypt_data_aes.saltSize);
|
||||
delete pDataRead;
|
||||
}
|
||||
|
||||
pDataRead = tStream.ReadBytes(0x10, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.encryptedVerifierInput = std::string((char*)pDataRead, 0x10);
|
||||
delete pDataRead;
|
||||
}
|
||||
|
||||
crypt_data_aes.hashSize = tStream.ReadUInt32();
|
||||
|
||||
int szEncryptedVerifierHash = (ProviderType == 0x0001) ? 0x14 : 0x20;
|
||||
pDataRead = tStream.ReadBytes(szEncryptedVerifierHash, true);
|
||||
if (pDataRead)
|
||||
{
|
||||
crypt_data_aes.encryptedVerifierValue = std::string((char*)pDataRead, szEncryptedVerifierHash);
|
||||
delete pDataRead;
|
||||
//switch(ProviderType)
|
||||
//{
|
||||
// case 0x0001: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4; break;
|
||||
// case 0x0018: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB; break;
|
||||
//}
|
||||
}
|
||||
|
||||
pos = tStream.GetPosition();
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
crypt_data_aes.hashAlgorithm = CRYPT_METHOD::SHA1; //by AlgIDHash -> 0x0000 || 0x8004
|
||||
crypt_data_aes.spinCount = 50000;
|
||||
|
||||
switch(AlgID)
|
||||
{
|
||||
case 0x6801:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
crypt_data_aes.keySize = KeySize / 8;
|
||||
break;
|
||||
case 0x660E:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 128 /8;
|
||||
break;
|
||||
case 0x660F:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 192 /8;
|
||||
break;
|
||||
case 0x6610:
|
||||
crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
crypt_data_aes.keySize = 256 /8;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(ProviderType)
|
||||
{
|
||||
case 0x0001: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4; break;
|
||||
case 0x0018: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB; break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//RELEASEARRAYOBJECTS( bytes );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -52,6 +52,10 @@ namespace DocFileFormat
|
||||
private:
|
||||
CRYPT::_rc4CryptData crypt_data_rc4;
|
||||
CRYPT::_ecmaCryptData crypt_data_aes;
|
||||
CRYPT::_xorCryptData crypt_data_xor;
|
||||
|
||||
bool bStandard;
|
||||
bool bXOR;
|
||||
bool bAES;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -79,7 +79,7 @@ namespace DocFileFormat
|
||||
if (fc < 0) break;
|
||||
|
||||
ParagraphPropertyExceptions* papx = findValidPapx( fc );
|
||||
TableInfo tai( papx );
|
||||
TableInfo tai( papx, m_document->nWordVersion );
|
||||
|
||||
if ( tai.fInTable )
|
||||
{
|
||||
@ -91,7 +91,7 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
cp = writeParagraph( cp, 0x7fffffff );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -69,14 +69,22 @@ namespace DocFileFormat
|
||||
newObject->prq = (unsigned char) FormatUtils::BitmaskToInt ( ffid, 0x03 );
|
||||
newObject->fTrueType = FormatUtils::BitmaskToBool ( ffid, 0x04 );
|
||||
newObject->ff = (unsigned char) FormatUtils::BitmaskToInt ( ffid, 0x70 );
|
||||
newObject->wWeight = reader->ReadInt16();
|
||||
newObject->chs = reader->ReadByte();
|
||||
|
||||
//int sz_fonts = 150; //.. нужно генерить уникальное todooo
|
||||
int szAlt = 0;
|
||||
if (reader->nWordVersion == 2)
|
||||
{
|
||||
newObject->wWeight = reader->ReadByte();
|
||||
}
|
||||
else
|
||||
{
|
||||
newObject->wWeight = reader->ReadInt16();
|
||||
newObject->chs = reader->ReadByte();
|
||||
|
||||
int szAlt = reader->ReadByte();
|
||||
szAlt = reader->ReadByte();
|
||||
}
|
||||
|
||||
if (!reader->olderVersion)
|
||||
if (reader->nWordVersion == 0)
|
||||
{
|
||||
//read the 10 bytes panose
|
||||
newObject->panoseSize = 10;
|
||||
@ -97,7 +105,7 @@ namespace DocFileFormat
|
||||
|
||||
unsigned char *bytes = reader->ReadBytes( (int)( strEnd - strStart ), true );
|
||||
|
||||
if (reader->olderVersion)
|
||||
if (reader->nWordVersion > 0)
|
||||
{
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>( &(newObject->xszFtn), bytes, (int)( strEnd - strStart ), ENCODING_WINDOWS_1250 );
|
||||
}
|
||||
@ -131,7 +139,7 @@ namespace DocFileFormat
|
||||
|
||||
bytes = reader->ReadBytes( (int)( strEnd - strStart ), true );
|
||||
|
||||
if (reader->olderVersion)
|
||||
if (reader->nWordVersion > 0)
|
||||
{
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>( &(newObject->xszAlt), bytes, (int)( strEnd - strStart ), ENCODING_WINDOWS_1250);
|
||||
}
|
||||
@ -151,7 +159,7 @@ namespace DocFileFormat
|
||||
{
|
||||
long strStart = reader->GetPosition();
|
||||
|
||||
if (reader->olderVersion)
|
||||
if (reader->nWordVersion > 0)
|
||||
{//ansi string only
|
||||
while ( reader->ReadByte() != 0 )
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -48,7 +48,8 @@ namespace DocFileFormat
|
||||
|
||||
class FontFamilyName: public ByteStructure
|
||||
{
|
||||
friend class CharacterPropertiesMapping;
|
||||
friend class WordDocument;
|
||||
friend class CharacterPropertiesMapping;
|
||||
friend class DocumentMapping;
|
||||
friend class FontTableMapping;
|
||||
friend class StyleSheetMapping;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -34,32 +34,30 @@
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
FontTableMapping::FontTableMapping( ConversionContext* ctx ): AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() )
|
||||
FontTableMapping::FontTableMapping( ConversionContext* ctx ) : AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() )
|
||||
{
|
||||
_ctx = ctx;
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
FontTableMapping::~FontTableMapping()
|
||||
{
|
||||
RELEASEOBJECT (m_pXmlWriter);
|
||||
}
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
void FontTableMapping::Apply( IVisitable* visited )
|
||||
{
|
||||
StringTable<FontFamilyName>* table = static_cast<StringTable<FontFamilyName>*>( visited );
|
||||
|
||||
this->_ctx->_docx->RegisterFontTable();
|
||||
_ctx->_docx->RegisterFontTable();
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:fonts", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
int sz_fonts = table->Data.size();
|
||||
int sz_fonts = table->Data.size();
|
||||
int users_fonts = 0;
|
||||
|
||||
for ( std::vector<ByteStructure*>::iterator iter = table->Data.begin(); iter != table->Data.end(); iter++ )
|
||||
@ -140,6 +138,6 @@ namespace DocFileFormat
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:fonts");
|
||||
|
||||
this->_ctx->_docx->FontTableXML = std::wstring( m_pXmlWriter->GetXmlString() );
|
||||
_ctx->_docx->FontTableXML = m_pXmlWriter->GetXmlString() ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -71,7 +71,7 @@ namespace DocFileFormat
|
||||
if (fc < 0) break;
|
||||
|
||||
ParagraphPropertyExceptions* papx = findValidPapx( fc );
|
||||
TableInfo tai( papx );
|
||||
TableInfo tai( papx, m_document->nWordVersion );
|
||||
|
||||
if ( tai.fInTable )
|
||||
{
|
||||
@ -89,7 +89,7 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
cp = writeParagraph( cp, 0x7fffffff );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -75,11 +75,13 @@ namespace DocFileFormat
|
||||
|
||||
while ( ( cp - m_document->FIB->m_RgLw97.ccpText ) < (*m_document->IndividualFootnotesPlex)[id + 1] )
|
||||
{
|
||||
int cpStart = cp;
|
||||
|
||||
int fc = m_document->FindFileCharPos(cp);
|
||||
if (fc < 0) break;
|
||||
|
||||
ParagraphPropertyExceptions* papx = findValidPapx( fc );
|
||||
TableInfo tai( papx );
|
||||
TableInfo tai( papx, m_document->nWordVersion );
|
||||
|
||||
if ( tai.fInTable )
|
||||
{
|
||||
@ -91,8 +93,10 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
cp = writeParagraph( cp, 0x7fffffff );
|
||||
}
|
||||
while (cp <= cpStart) //conv_fQioC665ib4ngHkDGY4__docx.doc
|
||||
cp++;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:footnote");
|
||||
|
||||
170
ASCOfficeDocFile/DocDocxConverter/FormFieldData.cpp
Normal file
170
ASCOfficeDocFile/DocDocxConverter/FormFieldData.cpp
Normal file
@ -0,0 +1,170 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "FormFieldData.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/unicode_util.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
std::wstring readXstz(VirtualStreamReader *reader)
|
||||
{
|
||||
if (!reader) return L"";
|
||||
|
||||
unsigned short flags, cch, chTerm;
|
||||
|
||||
cch = reader->ReadUInt16();
|
||||
|
||||
std::wstring ret;
|
||||
|
||||
if (cch > 0)
|
||||
{
|
||||
std::shared_ptr<unsigned char>data = std::shared_ptr<unsigned char>(reader->ReadBytes(cch * 2, true));
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
ret = std::wstring((wchar_t*)data.get(), cch );
|
||||
#else
|
||||
ret = convertUtf16ToWString((UTF16*)data.get(), cch );
|
||||
#endif
|
||||
}
|
||||
chTerm = reader->ReadUInt16();
|
||||
|
||||
return ret;
|
||||
};
|
||||
void FormFieldData::_HFD::read(VirtualStreamReader *reader)
|
||||
{
|
||||
if (!reader) return;
|
||||
}
|
||||
void FormFieldData::_FFData::read(VirtualStreamReader *reader)
|
||||
{
|
||||
if (!reader) return;
|
||||
|
||||
bExist = true;
|
||||
|
||||
unsigned short flags;
|
||||
|
||||
version = reader->ReadUInt32();
|
||||
flags = reader->ReadUInt16();
|
||||
|
||||
iType = GETBITS(flags, 0, 1);
|
||||
iRes = GETBITS(flags, 2, 6);
|
||||
fOwnHelp = GETBIT(flags, 7);
|
||||
fOwnStat = GETBIT(flags, 8);
|
||||
fProt = GETBIT(flags, 9);
|
||||
iSize = GETBIT(flags, 10);
|
||||
iTypeTxt = GETBITS(flags, 11, 13);
|
||||
fRecalc = GETBIT(flags, 14);
|
||||
fHasListBox = GETBIT(flags, 15);
|
||||
|
||||
cch_field = reader->ReadUInt16();
|
||||
hps = reader->ReadUInt16();
|
||||
|
||||
xstzName = readXstz(reader);
|
||||
xstzTextDef = readXstz(reader);
|
||||
|
||||
wDef = reader->ReadUInt16();
|
||||
|
||||
xstzTextFormat = readXstz(reader);
|
||||
xstzHelpText = readXstz(reader);
|
||||
xstzStatText = readXstz(reader);
|
||||
xstzEntryMcr = readXstz(reader);
|
||||
xstzExitMcr = readXstz(reader);
|
||||
}
|
||||
FormFieldData::FormFieldData( int type, const CharacterPropertyExceptions* chpx, POLE::Stream* stream, int nWordVersion )
|
||||
{
|
||||
binary_data_size = 0;
|
||||
|
||||
if (!chpx) return;
|
||||
|
||||
int fc = -1;
|
||||
bool bNilPICFAndBinData = false;
|
||||
|
||||
for ( std::list<SinglePropertyModifier>::iterator iter = chpx->grpprl->begin(); iter != chpx->grpprl->end(); iter++ )
|
||||
{
|
||||
switch ( iter->OpCode)
|
||||
{
|
||||
case sprmCFSpec:
|
||||
{
|
||||
}
|
||||
break;
|
||||
case sprmCFFldVanish:
|
||||
{
|
||||
}
|
||||
break;
|
||||
case sprmCPicLocation:
|
||||
{
|
||||
fc = FormatUtils::BytesToInt32( iter->Arguments, 0, iter->argumentsSize );
|
||||
}
|
||||
break;
|
||||
case sprmCRsidText:
|
||||
{
|
||||
rsid = FormatUtils::IntToFormattedWideString(FormatUtils::BytesToInt32(iter->Arguments, 0, iter->argumentsSize), L"%08x");
|
||||
}
|
||||
break;
|
||||
case sprmCFData:
|
||||
{
|
||||
bNilPICFAndBinData = true; // or bPICFAndOfficeArtData - shape, pic, ole
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fc >= 0 && bNilPICFAndBinData)
|
||||
{
|
||||
VirtualStreamReader reader(stream, fc, nWordVersion);
|
||||
|
||||
int sz_stream = reader.GetSize();
|
||||
|
||||
int lcb = reader.ReadUInt32();
|
||||
int cbHeader = reader.ReadUInt16();
|
||||
|
||||
if (cbHeader != 0x44) return;
|
||||
|
||||
//ignored
|
||||
reader.ReadBytes(62, false);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case 1:
|
||||
HFD.read(&reader);
|
||||
case 2:
|
||||
FFData.read(&reader);
|
||||
break;
|
||||
default:
|
||||
binary_data_size = lcb - cbHeader;
|
||||
binary_data = std::shared_ptr<unsigned char>(reader.ReadBytes(binary_data_size, true));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
126
ASCOfficeDocFile/DocDocxConverter/FormFieldData.h
Normal file
126
ASCOfficeDocFile/DocDocxConverter/FormFieldData.h
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "IVisitable.h"
|
||||
#include "CharacterPropertyExceptions.h"
|
||||
#include "StructuredStorageReader.h"
|
||||
#include "VirtualStreamReader.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class FormFieldData : public IVisitable
|
||||
{
|
||||
public:
|
||||
|
||||
struct _HFD
|
||||
{
|
||||
bool bExist = false;
|
||||
|
||||
bool fNew = false;
|
||||
bool fNoHist = false;
|
||||
bool fImageMap = false;
|
||||
bool fLocation = false;
|
||||
bool fTooltip = false;
|
||||
|
||||
std::wstring clsid;
|
||||
|
||||
_UINT32 streamVersion = 0;
|
||||
bool hlstmfHasMoniker = false;
|
||||
bool hlstmfIsAbsolute = false;
|
||||
bool hlstmfSiteGaveDisplayName = false;
|
||||
bool hlstmfHasLocationStr = false;
|
||||
bool hlstmfHasDisplayName = false;
|
||||
bool hlstmfHasGUID = false;
|
||||
bool hlstmfHasCreationTime = false;
|
||||
bool hlstmfHasFrameName = false;
|
||||
bool hlstmfMonikerSavedAsStr = false;
|
||||
bool hlstmfAbsFromGetdataRel = false;
|
||||
|
||||
std::wstring displayName;
|
||||
std::wstring targetFrameName;
|
||||
std::wstring moniker;
|
||||
|
||||
std::wstring oleMoniker_clsid;
|
||||
std::wstring oleMoniker_data;
|
||||
std::wstring location;
|
||||
|
||||
std::wstring guid;
|
||||
_UINT64 fileTime = 0;
|
||||
|
||||
void read(VirtualStreamReader* reader);
|
||||
};
|
||||
struct _FFData
|
||||
{
|
||||
bool bExist = false;
|
||||
_UINT32 version = 0;
|
||||
|
||||
unsigned char iType = 0;
|
||||
unsigned char iRes = 0;
|
||||
bool fOwnHelp = false;
|
||||
bool fOwnStat = false;
|
||||
bool fProt = false;
|
||||
bool iSize = false;
|
||||
unsigned char iTypeTxt = 0;
|
||||
bool fRecalc = false;
|
||||
bool fHasListBox = false;
|
||||
|
||||
unsigned short cch_field = 0;
|
||||
unsigned short hps = 0;
|
||||
std::wstring xstzName;
|
||||
std::wstring xstzTextDef;
|
||||
unsigned short wDef = 0;
|
||||
std::wstring xstzTextFormat;
|
||||
std::wstring xstzHelpText;
|
||||
std::wstring xstzStatText;
|
||||
std::wstring xstzEntryMcr;
|
||||
std::wstring xstzExitMcr;
|
||||
|
||||
//STTB hsttbDropList;
|
||||
void read(VirtualStreamReader* reader);
|
||||
};
|
||||
FormFieldData( int type, const CharacterPropertyExceptions* chpx, POLE::Stream* stream, int nWordVersion );
|
||||
virtual ~FormFieldData() {}
|
||||
private:
|
||||
friend class FormFieldDataMapping;
|
||||
|
||||
std::wstring name;
|
||||
std::wstring rsid;
|
||||
|
||||
_FFData FFData;
|
||||
_HFD HFD;
|
||||
|
||||
std::shared_ptr<unsigned char> binary_data;
|
||||
int binary_data_size;
|
||||
|
||||
};
|
||||
}
|
||||
87
ASCOfficeDocFile/DocDocxConverter/FormFieldDataMapping.h
Normal file
87
ASCOfficeDocFile/DocDocxConverter/FormFieldDataMapping.h
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ConversionContext.h"
|
||||
#include "FormFieldData.h"
|
||||
|
||||
#include "AbstractOpenXmlMapping.h"
|
||||
#include "IMapping.h"
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class FormFieldDataMapping: public AbstractOpenXmlMapping, public IMapping
|
||||
{
|
||||
public:
|
||||
FormFieldDataMapping(XMLTools::CStringXmlWriter* writer, ConversionContext* context, IMapping* caller)
|
||||
: AbstractOpenXmlMapping(writer), m_context(NULL),_caller(NULL)
|
||||
{
|
||||
m_context = context;
|
||||
_caller = caller;
|
||||
}
|
||||
|
||||
virtual void Apply(IVisitable* visited)
|
||||
{
|
||||
FormFieldData* ffData = static_cast<FormFieldData*>(visited);
|
||||
|
||||
if ( ffData == NULL ) return;
|
||||
|
||||
if (ffData->FFData.bExist)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:ffData");
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:name", true);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val", ffData->FFData.xstzName);
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:name", true, true );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:calcOnExit", true);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val", ffData->FFData.fRecalc);
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:calcOnExit", true, true );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:textInput");
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:maxLength", true);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val", ffData->FFData.cch_field);
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:maxLength", true, true );
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:textInput" );
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:ffData" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
ConversionContext* m_context;
|
||||
IMapping* _caller;
|
||||
};
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -52,7 +52,7 @@ namespace DocFileFormat
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
FormattedDiskPageCHPX::FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, bool oldVersion ):
|
||||
FormattedDiskPageCHPX::FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, int nWordVersion ):
|
||||
FormattedDiskPage(), rgb(NULL), grpchpxSize(NULL), grpchpx(NULL)
|
||||
{
|
||||
Type = Character;
|
||||
@ -80,7 +80,6 @@ namespace DocFileFormat
|
||||
j += 4;
|
||||
}
|
||||
|
||||
//create arrays
|
||||
grpchpxSize = crun;
|
||||
rgb = new unsigned char[crun];
|
||||
grpchpx = new CharacterPropertyExceptions*[grpchpxSize];
|
||||
@ -104,11 +103,10 @@ namespace DocFileFormat
|
||||
|
||||
//read the bytes of chpx
|
||||
chpx = new unsigned char[cb];
|
||||
//Array.Copy(bytes, (wordOffset * 2) + 1, chpx, 0, chpx.Length);
|
||||
memcpy( chpx, ( bytes + (wordOffset * 2) + 1 ), cb );
|
||||
|
||||
//parse CHPX and fill grpchpx
|
||||
grpchpx[i] = new CharacterPropertyExceptions( chpx, cb, oldVersion);
|
||||
grpchpx[i] = new CharacterPropertyExceptions( chpx, cb, nWordVersion);
|
||||
|
||||
RELEASEARRAYOBJECTS( chpx );
|
||||
}
|
||||
@ -139,7 +137,7 @@ namespace DocFileFormat
|
||||
}
|
||||
//there are n offsets and n-1 fkp's in the bin table
|
||||
|
||||
if (fib->m_bOlderVersion)
|
||||
if (fib->m_nWordVersion > 0)
|
||||
{
|
||||
int n = ( ( (int)fib->m_FibWord97.lcbPlcfBteChpx - 8 ) / 6 ) + 1;
|
||||
|
||||
@ -162,7 +160,7 @@ namespace DocFileFormat
|
||||
int offset = fkpnr * 512;
|
||||
|
||||
//parse the FKP and add it to the list
|
||||
CHPXlist->push_back( new FormattedDiskPageCHPX( wordStream, offset, fib->m_bOlderVersion ) );
|
||||
CHPXlist->push_back( new FormattedDiskPageCHPX( wordStream, offset, fib->m_nWordVersion ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -178,7 +176,7 @@ namespace DocFileFormat
|
||||
int offset = fkpnr * 512;
|
||||
|
||||
//parse the FKP and add it to the list
|
||||
CHPXlist->push_back( new FormattedDiskPageCHPX( wordStream, offset, fib->m_bOlderVersion ) );
|
||||
CHPXlist->push_back( new FormattedDiskPageCHPX( wordStream, offset, fib->m_nWordVersion ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -50,7 +50,7 @@ namespace DocFileFormat
|
||||
|
||||
public:
|
||||
virtual ~FormattedDiskPageCHPX();
|
||||
FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, bool oldVersion );
|
||||
FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, int nWordVersion );
|
||||
/// Parses the 0Table (or 1Table) for FKP _entries containing CHPX
|
||||
static std::list<FormattedDiskPageCHPX*>* GetAllCHPXFKPs( FileInformationBlock* fib, POLE::Stream* wordStream, POLE::Stream* tableStream );
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -52,59 +52,53 @@ namespace DocFileFormat
|
||||
|
||||
/*========================================================================================================*/
|
||||
|
||||
FormattedDiskPagePAPX::FormattedDiskPagePAPX( POLE::Stream* wordStream, int offset, POLE::Stream* dataStream, bool oldVersion, bool fComplex):
|
||||
FormattedDiskPagePAPX::FormattedDiskPagePAPX( POLE::Stream* wordStream, int offset, POLE::Stream* dataStream, int nWordVersion, bool fComplex):
|
||||
FormattedDiskPage(), rgbx(NULL), grppapxSize(0), grppapx(NULL)
|
||||
{
|
||||
Type = Paragraph;
|
||||
WordStream = wordStream;
|
||||
{
|
||||
Type = Paragraph;
|
||||
WordStream = wordStream;
|
||||
|
||||
//read the 512 bytes (FKP)
|
||||
unsigned char* bytes = NULL;
|
||||
bytes = new unsigned char[512];
|
||||
|
||||
WordStream->seek( offset);
|
||||
WordStream->read( bytes, 512);
|
||||
//read the 512 bytes (FKP)
|
||||
unsigned char* bytes = NULL;
|
||||
bytes = new unsigned char[512];
|
||||
|
||||
//get the count
|
||||
crun = bytes[511];
|
||||
WordStream->seek( offset);
|
||||
WordStream->read( bytes, 512);
|
||||
|
||||
//create and fill the array with the adresses
|
||||
rgfcSize = crun + 1;
|
||||
rgfc = new int[rgfcSize];
|
||||
//get the count
|
||||
crun = bytes[511];
|
||||
|
||||
int j = 0;
|
||||
//create and fill the array with the adresses
|
||||
rgfcSize = crun + 1;
|
||||
rgfc = new int[rgfcSize];
|
||||
|
||||
int j = 0;
|
||||
|
||||
for ( unsigned int i = 0; i < rgfcSize; i++ )
|
||||
{
|
||||
rgfc[i] = FormatUtils::BytesToInt32( bytes, j, 512 );
|
||||
j += 4;
|
||||
}
|
||||
for ( unsigned int i = 0; i < rgfcSize; i++ )
|
||||
{
|
||||
rgfc[i] = FormatUtils::BytesToInt32( bytes, j, 512 );
|
||||
j += 4;
|
||||
}
|
||||
rgbx = new BX[crun];
|
||||
grppapxSize = crun;
|
||||
grppapx = new ParagraphPropertyExceptions*[grppapxSize];
|
||||
|
||||
//create arrays
|
||||
rgbx = new BX[crun];
|
||||
grppapxSize = crun;
|
||||
grppapx = new ParagraphPropertyExceptions*[grppapxSize];
|
||||
for ( unsigned int i = 0; i < grppapxSize; i++ )
|
||||
{
|
||||
grppapx[i] = NULL;
|
||||
}
|
||||
|
||||
for ( unsigned int i = 0; i < grppapxSize; i++ )
|
||||
{
|
||||
grppapx[i] = NULL;
|
||||
}
|
||||
j = 4 * ( crun + 1 );
|
||||
|
||||
j = 4 * ( crun + 1 );
|
||||
|
||||
//read the 12 for PHE
|
||||
unsigned char* phe = NULL;
|
||||
phe = new unsigned char[12];
|
||||
|
||||
unsigned char* papx = NULL;
|
||||
unsigned char phe[12];
|
||||
|
||||
for ( int i = 0; i < crun; i++ )
|
||||
for ( unsigned char i = 0; i < crun; i++ )
|
||||
{
|
||||
BX bx;
|
||||
bx.wordOffset = bytes[j];
|
||||
j++;
|
||||
|
||||
if (fComplex || !oldVersion)
|
||||
if (fComplex || nWordVersion == 0)
|
||||
{
|
||||
memcpy( phe, ( bytes + j), 12 );
|
||||
|
||||
@ -113,6 +107,13 @@ namespace DocFileFormat
|
||||
|
||||
j += 12;
|
||||
}
|
||||
else if (nWordVersion == 2)
|
||||
{
|
||||
memcpy( phe, ( bytes + bx.wordOffset * 2 + j + 1), 6);
|
||||
|
||||
//fill the rgbx array
|
||||
bx.phe = ParagraphHeight( phe, 6, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy( phe, ( bytes + j), 6);
|
||||
@ -126,29 +127,26 @@ namespace DocFileFormat
|
||||
|
||||
if ( bx.wordOffset != 0 )
|
||||
{
|
||||
//read first unsigned char of PAPX
|
||||
//PAPX is stored in a FKP; so the first unsigned char is a count of words
|
||||
unsigned char padbyte = 0;
|
||||
unsigned char cw = bytes[bx.wordOffset * 2];
|
||||
|
||||
unsigned char cw = bytes[bx.wordOffset * 2] * 2;
|
||||
//if that unsigned char is zero, it's a pad unsigned char, and the word count is the following unsigned char
|
||||
if ( cw == 0 )
|
||||
{
|
||||
padbyte = 1;
|
||||
cw = bytes[bx.wordOffset * 2 + 1];
|
||||
cw = bytes[bx.wordOffset * 2 + 1] * 2;
|
||||
}
|
||||
|
||||
if ( cw != 0 )
|
||||
{
|
||||
//read the bytes for papx
|
||||
papx = new unsigned char[cw * 2];
|
||||
memcpy( papx, ( bytes + (bx.wordOffset * 2) + padbyte + 1 ), ( cw * 2 ) );
|
||||
unsigned char* papx = new unsigned char[cw];
|
||||
memcpy( papx, ( bytes + (bx.wordOffset * 2) + padbyte + 1 ), cw );
|
||||
|
||||
//parse PAPX and fill grppapx
|
||||
grppapx[i] = new ParagraphPropertyExceptions( papx, ( cw * 2 ), dataStream, oldVersion );
|
||||
grppapx[i] = new ParagraphPropertyExceptions( papx, cw, dataStream, nWordVersion );
|
||||
|
||||
RELEASEARRAYOBJECTS( papx );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -157,7 +155,6 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS( phe );
|
||||
RELEASEARRAYOBJECTS( bytes );
|
||||
}
|
||||
|
||||
@ -179,7 +176,7 @@ namespace DocFileFormat
|
||||
|
||||
//there are n offsets and n-1 fkp's in the bin table
|
||||
|
||||
if (fib->m_bOlderVersion && fib->m_FibBase.fComplex == false)
|
||||
if (fib->m_nWordVersion > 0 && fib->m_FibBase.fComplex == false)
|
||||
{
|
||||
int n = ( ( (int)fib->m_FibWord97.lcbPlcfBtePapx - 8 ) / 6 ) + 1;
|
||||
|
||||
@ -202,7 +199,7 @@ namespace DocFileFormat
|
||||
int offset = fkpnr * 512;
|
||||
|
||||
//parse the FKP and add it to the list
|
||||
PAPXlist->push_back( new FormattedDiskPagePAPX( wordStream, offset, dataStream, fib->m_bOlderVersion, fib->m_FibBase.fComplex) );
|
||||
PAPXlist->push_back( new FormattedDiskPagePAPX( wordStream, offset, dataStream, fib->m_nWordVersion, fib->m_FibBase.fComplex) );
|
||||
}
|
||||
|
||||
//if (PAPXlist->back()->rgfc[PAPXlist->back()->rgfcSize-1] < last)
|
||||
@ -226,7 +223,7 @@ namespace DocFileFormat
|
||||
int offset = fkpnr * 512;
|
||||
|
||||
//parse the FKP and add it to the list
|
||||
PAPXlist->push_back( new FormattedDiskPagePAPX( wordStream, offset, dataStream, fib->m_bOlderVersion, fib->m_FibBase.fComplex) );
|
||||
PAPXlist->push_back( new FormattedDiskPagePAPX( wordStream, offset, dataStream, fib->m_nWordVersion, fib->m_FibBase.fComplex) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -63,7 +63,7 @@ namespace DocFileFormat
|
||||
|
||||
public:
|
||||
virtual ~FormattedDiskPagePAPX();
|
||||
FormattedDiskPagePAPX( POLE::Stream* wordStream, int offset, POLE::Stream* dataStream, bool oldVersion, bool fComplex);
|
||||
FormattedDiskPagePAPX( POLE::Stream* wordStream, int offset, POLE::Stream* dataStream, int nWordVersion, bool fComplex);
|
||||
/// Parses the 0Table (or 1Table) for FKP _entries containing PAPX
|
||||
static std::list<FormattedDiskPagePAPX*>* GetAllPAPXFKPs( FileInformationBlock* fib, POLE::Stream* wordStream, POLE::Stream* tableStream, POLE::Stream* dataStream);
|
||||
/// Returns a list of all PAPX FCs between they given boundaries.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -38,10 +38,30 @@ namespace Global
|
||||
static const wchar_t ColorIdentifier[17][12] =
|
||||
{
|
||||
L"auto",
|
||||
L"000000",//L"black",
|
||||
L"0000FF",//L"blue",
|
||||
L"00FFFF",//L"cyan",
|
||||
L"00FF00",// L"green",
|
||||
L"FF00FF",//L"magenta",
|
||||
L"FF0000",//L"red",
|
||||
L"FFFF00",//L"yellow",
|
||||
L"FFFFFF",//L"white",
|
||||
L"darkBlue",
|
||||
L"darkCyan",
|
||||
L"darkGreen",
|
||||
L"darkMagenta",
|
||||
L"darkRed",
|
||||
L"darkYellow",
|
||||
L"darkGray",
|
||||
L"lightGray"
|
||||
};
|
||||
static const wchar_t ColorNameIdentifier[17][12] =
|
||||
{
|
||||
L"auto",
|
||||
L"black",
|
||||
L"blue",
|
||||
L"cyan",
|
||||
L"green",
|
||||
L"green",
|
||||
L"magenta",
|
||||
L"red",
|
||||
L"yellow",
|
||||
@ -55,7 +75,6 @@ namespace Global
|
||||
L"darkGray",
|
||||
L"lightGray"
|
||||
};
|
||||
|
||||
static const wchar_t UnderlineCode[56][16] =
|
||||
{
|
||||
L"none",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -38,110 +38,83 @@ namespace DocFileFormat
|
||||
{
|
||||
HeaderAndFooterTable::HeaderAndFooterTable (FileInformationBlock* fib, POLE::Stream* pTableStream)
|
||||
{
|
||||
VirtualStreamReader tableReader (pTableStream, fib->m_FibWord97.fcPlcfHdd, fib->m_bOlderVersion);
|
||||
m_nCurrentIndex = 0;
|
||||
|
||||
VirtualStreamReader tableReader (pTableStream, fib->m_FibWord97.fcPlcfHdd, fib->m_nWordVersion);
|
||||
|
||||
if (fib->m_FibWord97.fcPlcfHdd > tableReader.GetSize()) return;
|
||||
|
||||
unsigned int tableSize = fib->m_FibWord97.lcbPlcfHdd / 4;//in bytes
|
||||
|
||||
if ( ( tableSize > 0 ) && ( fib->m_RgLw97.ccpHdr > 0 ) )
|
||||
if ( tableSize < 1 || fib->m_RgLw97.ccpHdr <1 )
|
||||
return;
|
||||
|
||||
int* table = new int[tableSize];
|
||||
|
||||
for (unsigned int i = 0; i < tableSize; ++i)
|
||||
{
|
||||
int* table = new int[tableSize];
|
||||
|
||||
for (unsigned int i = 0; i < tableSize; ++i)
|
||||
{
|
||||
table[i] = tableReader.ReadInt32();
|
||||
}
|
||||
|
||||
int initialPos = fib->m_RgLw97.ccpText + fib->m_RgLw97.ccpFtn;
|
||||
|
||||
|
||||
//the first 6 _entries are about footnote and endnote formatting
|
||||
//so skip these _entries
|
||||
int pos = (fib->m_FibBase.fComplex || !fib->m_bOlderVersion) ? 6 : 0;
|
||||
|
||||
int count = ( tableSize - pos - 2) / 6;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
//Even Header
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arEvenHeaders.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arEvenHeaders.push_back( new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ) );
|
||||
}
|
||||
|
||||
pos++;
|
||||
|
||||
//Odd Header
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arOddHeaders.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arOddHeaders.push_back( new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ) );
|
||||
}
|
||||
|
||||
pos++;
|
||||
|
||||
//Even Footer
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arEvenFooters.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arEvenFooters.push_back( new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ) );
|
||||
}
|
||||
|
||||
pos++;
|
||||
|
||||
//Odd Footer
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arOddFooters.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arOddFooters.push_back( new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ) );
|
||||
}
|
||||
|
||||
pos++;
|
||||
|
||||
//First Page Header
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arFirstHeaders.push_back (NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arFirstHeaders.push_back (new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ));
|
||||
}
|
||||
|
||||
pos++;
|
||||
|
||||
if (pos >= tableSize)
|
||||
break;
|
||||
|
||||
//First Page Footers
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arFirstFooters.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arFirstFooters.push_back( new CharacterRange( ( initialPos + table[pos] ), ( table[pos + 1] - table[pos] ) ) );
|
||||
}
|
||||
|
||||
pos++;
|
||||
}
|
||||
|
||||
RELEASEARRAYOBJECTS(table);
|
||||
table[i] = tableReader.ReadInt32();
|
||||
}
|
||||
|
||||
int initialPos = fib->m_RgLw97.ccpText + fib->m_RgLw97.ccpFtn;
|
||||
|
||||
int count = 0;
|
||||
int pos = (fib->m_FibBase.fComplex || fib->m_nWordVersion == 0) ? 6 : 0;
|
||||
//the first 6 _entries are about footnote and endnote formatting -Word97 so skip these
|
||||
|
||||
std::vector<std::vector<CharacterRange*>*> arHeadersFooters;
|
||||
|
||||
if (fib->m_nWordVersion == 2)
|
||||
{
|
||||
count = ( tableSize - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
count = ( tableSize - pos - 1) / 6;
|
||||
|
||||
arHeadersFooters.push_back(&m_arEvenHeaders);
|
||||
arHeadersFooters.push_back(&m_arOddHeaders);
|
||||
arHeadersFooters.push_back(&m_arEvenFooters);
|
||||
arHeadersFooters.push_back(&m_arOddFooters);
|
||||
arHeadersFooters.push_back(&m_arFirstHeaders);
|
||||
arHeadersFooters.push_back(&m_arFirstFooters);
|
||||
}
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
//Even Header
|
||||
if (fib->m_nWordVersion == 2)
|
||||
{
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
m_arCommonHeadersFooters.push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arCommonHeadersFooters.push_back( new CharacterRange( initialPos + table[pos], table[pos + 1] - table[pos]) );
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t j = 0; j < 6; j++)
|
||||
{
|
||||
if ( table[pos] == table[pos + 1] )
|
||||
{
|
||||
arHeadersFooters[j]->push_back( NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
arHeadersFooters[j]->push_back( new CharacterRange( initialPos + table[pos], table[pos + 1] - table[pos]) );
|
||||
}
|
||||
pos++;
|
||||
|
||||
if (pos >= tableSize) break;
|
||||
}
|
||||
}
|
||||
if (pos >= tableSize) break;
|
||||
}
|
||||
RELEASEARRAYOBJECTS(table);
|
||||
}
|
||||
|
||||
HeaderAndFooterTable::~HeaderAndFooterTable()
|
||||
@ -152,5 +125,7 @@ namespace DocFileFormat
|
||||
for_each (m_arFirstHeaders.begin(), m_arFirstHeaders.end(), DeleteDynamicObject());
|
||||
for_each (m_arOddFooters.begin(), m_arOddFooters.end(), DeleteDynamicObject());
|
||||
for_each (m_arOddHeaders.begin(), m_arOddHeaders.end(), DeleteDynamicObject());
|
||||
|
||||
for_each (m_arCommonHeadersFooters.begin(), m_arCommonHeadersFooters.end(), DeleteDynamicObject());
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -34,10 +34,12 @@
|
||||
#include "CharacterRange.h"
|
||||
#include "FileInformationBlock.h"
|
||||
|
||||
#define GET_CHARS_RANGE(NAME) inline CharacterRange* Get##NAME(int nIndex) {\
|
||||
#define GET_CHARS_RANGE(NAME) inline CharacterRange* Get##NAME(int nIndex)\
|
||||
{\
|
||||
if (m_ar##NAME.empty()) return NULL; \
|
||||
if (nIndex < (int)m_ar##NAME.size()) return m_ar##NAME[nIndex];\
|
||||
return NULL; } \
|
||||
return NULL; \
|
||||
}\
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
@ -54,8 +56,17 @@ namespace DocFileFormat
|
||||
GET_CHARS_RANGE (EvenFooters);
|
||||
GET_CHARS_RANGE (OddFooters);
|
||||
|
||||
inline CharacterRange* GetNextHeaderFooter()
|
||||
{
|
||||
if (m_nCurrentIndex < m_arCommonHeadersFooters.size())
|
||||
return m_arCommonHeadersFooters[m_nCurrentIndex++];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
private:
|
||||
|
||||
size_t m_nCurrentIndex;
|
||||
std::vector<CharacterRange*> m_arCommonHeadersFooters;
|
||||
|
||||
std::vector<CharacterRange*> m_arFirstHeaders;
|
||||
std::vector<CharacterRange*> m_arEvenHeaders;
|
||||
std::vector<CharacterRange*> m_arOddHeaders;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -71,7 +71,7 @@ namespace DocFileFormat
|
||||
if (fc < 0) break;
|
||||
|
||||
ParagraphPropertyExceptions* papx = findValidPapx( fc );
|
||||
TableInfo tai( papx );
|
||||
TableInfo tai( papx, m_document->nWordVersion );
|
||||
|
||||
if ( tai.fInTable )
|
||||
{
|
||||
@ -84,7 +84,7 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
cp = writeParagraph( cp, 0x7fffffff );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -33,6 +33,9 @@
|
||||
|
||||
#include "IMapping.h"
|
||||
|
||||
#define GETBITS(from, numL, numH) ((from & (((1 << (numH - numL + 1)) - 1) << numL)) >> numL)
|
||||
#define GETBIT(from, num) ((from & (1 << num)) != 0)
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
class IVisitable
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -152,37 +152,53 @@ namespace DocFileFormat
|
||||
}
|
||||
OutlineListDescriptor::OutlineListDescriptor( unsigned char * data, int length )
|
||||
{
|
||||
int pos = 0;
|
||||
if (length < 212)
|
||||
{
|
||||
//int sz = FormatUtils::BytesToUChar(data, 0, length);
|
||||
int pos = 0;
|
||||
|
||||
for (int i = 0 ; i < 9; i++)
|
||||
{
|
||||
lvl[i].Parse(data + pos, length - pos);
|
||||
pos += 16;
|
||||
for (int i = 0 ; i < 9; i++)
|
||||
{
|
||||
lvl[i].Parse(data + pos, 1);
|
||||
pos += 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
fRestartHdr = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst2 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst3 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst4 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
|
||||
short strLen = length - pos;
|
||||
|
||||
while (strLen > 0)
|
||||
{
|
||||
if (data[strLen + 20 - 1] != 0)
|
||||
break;
|
||||
strLen--;
|
||||
for (int i = 0 ; i < 9; i++)
|
||||
{
|
||||
lvl[i].Parse(data + pos, length - pos);
|
||||
pos += 16;
|
||||
}
|
||||
|
||||
fRestartHdr = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst2 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst3 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
fSpareOlst4 = FormatUtils::BytesToUChar(data, pos, length); pos += 2;
|
||||
|
||||
short strLen = length - pos;
|
||||
|
||||
while (strLen > 0)
|
||||
{
|
||||
if (data[strLen + 20 - 1] != 0)
|
||||
break;
|
||||
strLen--;
|
||||
}
|
||||
if (strLen > 0)
|
||||
{
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>( &(xst), data + 20, ( strLen ), ENCODING_WINDOWS_1250);
|
||||
}
|
||||
}
|
||||
if (strLen > 0)
|
||||
{
|
||||
FormatUtils::GetSTLCollectionFromBytes<std::wstring>( &(xst), data + 20, ( strLen ), ENCODING_WINDOWS_1250);
|
||||
}
|
||||
}
|
||||
|
||||
ByteStructure* OutlineListDescriptor::ConstructObject(VirtualStreamReader* reader, int length)
|
||||
{
|
||||
unsigned char *data = reader->ReadBytes(212, true);
|
||||
OutlineListDescriptor *newObject = new OutlineListDescriptor(data, 212);
|
||||
int sz = GetSize(reader->nWordVersion);
|
||||
|
||||
unsigned char *data = reader->ReadBytes(sz, true);
|
||||
OutlineListDescriptor *newObject = new OutlineListDescriptor(data, sz);
|
||||
|
||||
delete []data;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -143,8 +143,13 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring xst; //64 chars ansi
|
||||
|
||||
public:
|
||||
static const int STRUCTURE_SIZE = 212;
|
||||
static const int STRUCTURE_SIZE_OLD = 10;
|
||||
public:
|
||||
static const int GetSize(int nWordVersion)
|
||||
{
|
||||
return (nWordVersion == 2) ? STRUCTURE_SIZE_OLD : STRUCTURE_SIZE;
|
||||
}
|
||||
virtual ByteStructure* ConstructObject( VirtualStreamReader* reader, int length );
|
||||
|
||||
virtual ~OutlineListDescriptor();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -49,7 +49,7 @@ namespace DocFileFormat
|
||||
{
|
||||
if ( fib->m_FibWord97.lcbPlfLfo > 0 )
|
||||
{
|
||||
VirtualStreamReader reader( tableStream, fib->m_FibWord97.fcPlfLfo, fib->m_bOlderVersion);
|
||||
VirtualStreamReader reader( tableStream, fib->m_FibWord97.fcPlfLfo, fib->m_nWordVersion);
|
||||
|
||||
if (fib->m_FibWord97.fcPlfLfo > reader.GetSize()) return;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -77,7 +77,7 @@ namespace DocFileFormat
|
||||
//this papx has no istd, so use PX to parse it
|
||||
unsigned char *bytes = reader->ReadBytes( cbGrpprlPapx, true );
|
||||
|
||||
PropertyExceptions* px = new PropertyExceptions( bytes, cbGrpprlPapx, reader->olderVersion);
|
||||
PropertyExceptions* px = new PropertyExceptions( bytes, cbGrpprlPapx, reader->nWordVersion);
|
||||
grpprlPapx = new ParagraphPropertyExceptions( *(px->grpprl) );
|
||||
|
||||
RELEASEOBJECT( px );
|
||||
@ -85,7 +85,7 @@ namespace DocFileFormat
|
||||
|
||||
//read the group of chpx sprms
|
||||
bytes = reader->ReadBytes( cbGrpprlChpx, true );
|
||||
grpprlChpx = new CharacterPropertyExceptions( bytes, cbGrpprlChpx, reader->olderVersion );
|
||||
grpprlChpx = new CharacterPropertyExceptions( bytes, cbGrpprlChpx, reader->nWordVersion );
|
||||
RELEASEARRAYOBJECTS( bytes );
|
||||
|
||||
//read the number text
|
||||
@ -116,6 +116,10 @@ namespace DocFileFormat
|
||||
|
||||
void NumberingLevelDescriptor::Parse(unsigned char * data, int length )
|
||||
{
|
||||
if (length < 16)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bEnabled = true;
|
||||
|
||||
nfc = FormatUtils::BytesToUChar(data, 0, length);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -45,7 +45,7 @@ namespace DocFileFormat
|
||||
{
|
||||
if ( fib->m_FibWord97.lcbPlfLst > 0 )
|
||||
{
|
||||
VirtualStreamReader reader( tableStream, fib->m_FibWord97.fcPlfLst, fib->m_bOlderVersion);
|
||||
VirtualStreamReader reader( tableStream, fib->m_FibWord97.fcPlfLst, fib->m_nWordVersion);
|
||||
|
||||
if (fib->m_FibWord97.fcPlfLst > reader.GetSize()) return;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -50,8 +50,7 @@ namespace DocFileFormat
|
||||
void MainDocumentMapping::Apply(IVisitable* visited)
|
||||
{
|
||||
m_document = static_cast<WordDocument*>(visited);
|
||||
m_context->_docx->RegisterDocument();
|
||||
|
||||
|
||||
// Header
|
||||
m_pXmlWriter->WriteNodeBegin(L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
|
||||
m_pXmlWriter->WriteNodeBegin(L"w:document", TRUE );
|
||||
@ -111,7 +110,7 @@ namespace DocFileFormat
|
||||
int countText = m_document->FIB->m_RgLw97.ccpText;
|
||||
int countTextRel = m_document->FIB->m_RgLw97.ccpText - 1;
|
||||
|
||||
while (cp < countText)
|
||||
while (cp < countText && cp >= 0)
|
||||
{
|
||||
fc = m_document->FindFileCharPos(cp);
|
||||
|
||||
@ -121,19 +120,22 @@ namespace DocFileFormat
|
||||
|
||||
if (papx)
|
||||
{
|
||||
TableInfo tai(papx);
|
||||
TableInfo tai(papx, m_document->nWordVersion);
|
||||
if (tai.fInTable)
|
||||
{
|
||||
int cpStart = cp;
|
||||
//this PAPX is for a table
|
||||
//cp = writeTable( cp, tai.iTap );
|
||||
Table table( this, cp, ( ( tai.iTap > 0 ) ? ( 1 ) : ( 0 ) ) );
|
||||
table.Convert(this);
|
||||
cp = table.GetCPEnd();
|
||||
while (cp <= cpStart) //conv_eznHsm8em2unSv6_2QE__docx.doc
|
||||
cp++;
|
||||
}
|
||||
else
|
||||
{
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph(cp);
|
||||
cp = writeParagraph(cp, countTextRel);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -72,7 +72,7 @@ public:
|
||||
|
||||
if (m_Data)
|
||||
{
|
||||
rdUShort = FormatUtils::BytesToUInt16 (m_Data, m_Position, m_Size);
|
||||
rdUShort = DocFileFormat::FormatUtils::BytesToUInt16 (m_Data, m_Position, m_Size);
|
||||
m_Position += sizeof(rdUShort);
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ public:
|
||||
|
||||
if (m_Data)
|
||||
{
|
||||
rdShort = FormatUtils::BytesToInt16 (m_Data, m_Position, m_Size);
|
||||
rdShort = DocFileFormat::FormatUtils::BytesToInt16 (m_Data, m_Position, m_Size);
|
||||
m_Position += sizeof(rdShort);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ public:
|
||||
|
||||
if (m_Data)
|
||||
{
|
||||
rdInt = FormatUtils::BytesToInt32 (m_Data, m_Position, m_Size);
|
||||
rdInt = DocFileFormat::FormatUtils::BytesToInt32 (m_Data, m_Position, m_Size);
|
||||
m_Position += sizeof(rdInt);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public:
|
||||
|
||||
if (m_Data )
|
||||
{
|
||||
rdUInt = FormatUtils::BytesToUInt32 (m_Data, m_Position, m_Size);
|
||||
rdUInt = DocFileFormat::FormatUtils::BytesToUInt32 (m_Data, m_Position, m_Size);
|
||||
m_Position += sizeof(rdUInt);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ public:
|
||||
|
||||
if (m_Data)
|
||||
{
|
||||
rdByte = m_Data[m_Position];
|
||||
rdByte = (m_Position < m_Size) ? m_Data[m_Position] : 0;
|
||||
m_Position += sizeof(rdByte);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -38,8 +38,8 @@ namespace DocFileFormat
|
||||
{
|
||||
if (m_context)
|
||||
{
|
||||
m_document = m_context->GetDocument();
|
||||
m_xmldocument = m_context->GetXmlDocument();
|
||||
m_document = m_context->_doc;
|
||||
m_xmldocument = m_context->_docx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,9 +338,9 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
|
||||
std::wstring NumberingMapping::GetNumberFormatWideString(int nfc, bool bOlderVersion)
|
||||
std::wstring NumberingMapping::GetNumberFormatWideString(int nfc, int nWordVersion)
|
||||
{
|
||||
if (bOlderVersion && nfc > 5)
|
||||
if (nWordVersion > 0 && nfc > 5)
|
||||
{
|
||||
if (nfc == 0xff) return std::wstring( L"bullet");
|
||||
else return std::wstring( L"none");
|
||||
@ -582,7 +582,7 @@ namespace DocFileFormat
|
||||
// The style id is used for a reverse reference.
|
||||
// It can happen that the reference points to the wrong style.
|
||||
|
||||
if (styleIndex != ListData::ISTD_NIL)
|
||||
if (styleIndex != ListData::ISTD_NIL && styleIndex < m_document->Styles->Styles->size())
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
|
||||
@ -633,7 +633,7 @@ namespace DocFileFormat
|
||||
|
||||
if ((chpxs != NULL) && (!chpxs->empty()))
|
||||
{
|
||||
PictureDescriptor pict(chpxs->front(), m_document->DataStream, fcEnd - fc, m_document->FIB->m_bOlderVersion);
|
||||
PictureDescriptor pict(chpxs->front(), m_document->DataStream, fcEnd - fc, m_document->nWordVersion);
|
||||
|
||||
if ((pict.mfp.mm > 98) && (pict.shapeContainer != NULL))
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -65,7 +65,7 @@ namespace DocFileFormat
|
||||
|
||||
static int FindIndexbyId(const std::list<ListData*>& listData, int id);
|
||||
/// Converts the number format code of the binary format.
|
||||
static std::wstring GetNumberFormatWideString(int nfc, bool bOlderVersion = false);
|
||||
static std::wstring GetNumberFormatWideString(int nfc, int nWordVersion = 0);
|
||||
|
||||
virtual ~NumberingMapping();
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -60,7 +60,7 @@ namespace DocFileFormat
|
||||
|
||||
OfficeArtContent (const FileInformationBlock* pFIB, POLE::Stream* pStream): m_pDrawingGroupData(NULL), m_pBackgroud(NULL)
|
||||
{
|
||||
VirtualStreamReader oStearmReader(pStream, 0 , pFIB->m_bOlderVersion);
|
||||
VirtualStreamReader oStearmReader(pStream, 0 , pFIB->m_nWordVersion);
|
||||
|
||||
if (pFIB->m_FibWord97.fcDggInfo > oStearmReader.GetSize()) return;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -110,6 +110,11 @@ namespace DocFileFormat
|
||||
unused2 = Reader->ReadByte();
|
||||
unused3 = Reader->ReadByte();
|
||||
|
||||
if (btMacOS != btWin32)
|
||||
{
|
||||
btWin32 = btMacOS = (Global::BlipType)this->Instance;
|
||||
}
|
||||
|
||||
if (BodySize > 0x24)
|
||||
{
|
||||
Blip = RecordFactory::ReadRecord(Reader, 0);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
@ -60,7 +60,7 @@ namespace DocFileFormat
|
||||
_size.cx = Right - Left;
|
||||
_size.cy = Bottom - Top;
|
||||
|
||||
rcgBounds = DocFormatUtils::Rectangle (_point, _size);
|
||||
rcgBounds = DocFileFormat::Rectangle (_point, _size);
|
||||
}
|
||||
|
||||
virtual ~ChildAnchor()
|
||||
@ -75,7 +75,7 @@ namespace DocFileFormat
|
||||
public:
|
||||
|
||||
/// Rectangle that describes the bounds of the anchor
|
||||
DocFormatUtils::Rectangle rcgBounds;
|
||||
DocFileFormat::Rectangle rcgBounds;
|
||||
int Left;
|
||||
int Top;
|
||||
int Right;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* 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)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user