mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-11 02:16:02 +08:00
Compare commits
1036 Commits
core/devel
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 369596b860 | |||
| 15af8f561a | |||
| 58f8d13d71 | |||
| d6413057e2 | |||
| 008382213b | |||
| dd5b4a719b | |||
| 3d198bc211 | |||
| 05ff75eeb2 | |||
| 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 | |||
| dfd54ff53f | |||
| 6ec7d77e19 | |||
| 3813be21c7 | |||
| 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 | |||
| fecfcfa7d2 | |||
| 29b5fa513a | |||
| f9a19badbf | |||
| d2630ea73c | |||
| a4a58c4782 | |||
| 29a3d80071 | |||
| 598bb419c0 | |||
| 087da9d2ce | |||
| c505aced48 | |||
| 959d5e5fcd | |||
| 8ee0cf4b2c | |||
| 426342074e | |||
| d2c092fe62 | |||
| a336917338 | |||
| 8925ddeee5 | |||
| 84824631b2 | |||
| dc3ecb1fc0 | |||
| 266cef8c49 | |||
| a5e821cd21 | |||
| cb5d92334e | |||
| f6dbc6b9f0 | |||
| c2c6430495 | |||
| 9ecf5b7834 | |||
| 1d003863dd | |||
| 774561bd00 | |||
| d356a305b9 | |||
| 95c472c15c | |||
| 2dbec241f7 | |||
| f3c66cab50 | |||
| 11e6fc3e06 | |||
| cdf8c0a11b | |||
| ae29cebe35 | |||
| e933a1fb42 | |||
| 5a3f98c502 | |||
| 8677540a82 | |||
| f4ceac5b2b | |||
| 61be4ea100 | |||
| 51c6ce2ba2 | |||
| e13bc44198 | |||
| 56cefcb1be | |||
| 6f860c17e3 | |||
| fb9edc4f81 | |||
| 4eb0a73f3c | |||
| 7929d798c8 | |||
| 4c3d8ca059 | |||
| ad74a8ea6b | |||
| f50dda7c31 | |||
| f78a805fa3 | |||
| bc177269a9 | |||
| 84cab29276 | |||
| d7c7584b4d | |||
| 1346072ab2 | |||
| 3b6b463b1b | |||
| a75daf9d90 | |||
| dc81f97bac | |||
| d194249ffb | |||
| 4ec04c31c5 | |||
| 8774035be9 | |||
| 8cec4ce82e | |||
| 17e46a2c99 | |||
| c5ffcd4b44 | |||
| 51c77c3a85 | |||
| 4326a7d258 | |||
| 38813fd105 | |||
| 19960fa3b5 | |||
| 32121d6d3b | |||
| 2dcef22681 | |||
| ee5a56183e | |||
| b90e3a3cd1 | |||
| f074d1252b | |||
| 30f07d3aa4 | |||
| d27b7b2f56 | |||
| 1dbf3e83ad | |||
| a5f70c9740 | |||
| ab72c8973d | |||
| a204c576ad | |||
| 4a7d40d3fb | |||
| 4f5fb86f87 | |||
| f7f2629e9d | |||
| 048c2fd034 | |||
| 3299c47858 | |||
| 8977e2c792 | |||
| 089e7d3230 | |||
| bd5863a02d | |||
| e0296d5a9a | |||
| e26cf3bf39 | |||
| 8525a1e9f0 | |||
| 2e8c83a668 | |||
| e857496565 | |||
| 143f65ae5a | |||
| f89d75ae92 | |||
| 403507206d | |||
| 7f6431700c | |||
| 7977bcf069 | |||
| 32ad6b46e2 | |||
| bf6bfce051 | |||
| 805c24ff1a | |||
| 2c4bb7c808 | |||
| 15a711396f | |||
| 3d8403346b | |||
| 5700503efe | |||
| d01b1e7d41 | |||
| 584cc6ab80 | |||
| 4b727edde8 | |||
| 9d10c4ddce | |||
| d5026d014d | |||
| ac0b7e4e22 | |||
| 623fe25415 | |||
| c4c9d50aae | |||
| 5d8dda02ec | |||
| bc3461147d | |||
| 80d4e6057b | |||
| 2dc5c2916a | |||
| 5f9631a3c5 | |||
| ef7df69036 | |||
| b3961994d2 | |||
| 927a847607 | |||
| 674cc6c1a2 | |||
| 5d77cf9473 | |||
| 512dad1d24 | |||
| 3d684934f1 | |||
| dd6ac185fb | |||
| 9825b6e32e | |||
| 653008ebfc | |||
| 236e93aa9c | |||
| 164c7faf94 | |||
| 4c07ddbcc7 | |||
| 7be543c3a6 | |||
| ccb47b0bda | |||
| 8aefacd411 | |||
| 6cd5fbcaca | |||
| 7c964b3f9c | |||
| 8c43c781bd | |||
| 7496de06f0 | |||
| fdd443a2d7 | |||
| 037c4046eb | |||
| 4e5ac14ca9 | |||
| dedf74b366 | |||
| 6f2eef1137 | |||
| 9a8d3edbef | |||
| 305ebda78d | |||
| 114050c23e | |||
| 7eee0755bf | |||
| c329f29e9a | |||
| 0f3a02ca7c | |||
| 62d4860873 | |||
| 21666ee309 | |||
| 47ff766e4e | |||
| 50cbc671b3 | |||
| f2d3390bd4 | |||
| fb5af12d7a | |||
| 63655a97e9 | |||
| fdf032d9f8 | |||
| 3b85b58558 | |||
| 00f1f40a1e | |||
| 46c05a4c27 | |||
| f3a510bd58 | |||
| 45231b822c | |||
| e0591675d2 | |||
| 67a849f110 | |||
| 15800296f7 | |||
| 52fe741f9a | |||
| b3ee693890 | |||
| 8c2e1738ea | |||
| bf33aed853 | |||
| 5869c7a02e | |||
| bbd429a994 | |||
| f4d636539e | |||
| 92e02257d7 | |||
| d2046d7ccb | |||
| 7bc35a157a | |||
| 903245e8a7 | |||
| 25ee9c3c1c | |||
| 9ead40d279 | |||
| e097379c21 | |||
| f86579d601 | |||
| de7511f243 | |||
| 9a68a75f70 | |||
| e04388aa32 | |||
| cee61e7a92 | |||
| 48185ed4e9 | |||
| 7bea086784 | |||
| 774f9c42cb | |||
| 10964d32e6 | |||
| da2493ed3b | |||
| 0a183f3505 | |||
| ac6cc1ec24 | |||
| a1846da0da | |||
| 0bd10c28ac | |||
| 2367cee329 | |||
| 288d89301a | |||
| 4d519e8f26 | |||
| 1bd2c0b852 | |||
| 82b0f4bce8 | |||
| 5635239274 | |||
| 1f979fc4cc | |||
| 80c4a65147 | |||
| 4fda6101eb | |||
| 99822fb597 | |||
| f1d9c12f07 | |||
| 30ef5a9de4 | |||
| 765ca861fb | |||
| 99570b3b86 | |||
| d9c6759108 | |||
| b82a8c6b9b | |||
| d76b1897aa | |||
| 857b79ee23 | |||
| ecba12b29f | |||
| efc48ab44c | |||
| 5f0620ed90 | |||
| 150ff1fae2 | |||
| dd1b9ca9be | |||
| c6ed59a742 | |||
| 1d3315711e | |||
| 46ddcff040 | |||
| a044b262e4 | |||
| 51b0e715a1 | |||
| 1cdeefb576 | |||
| db9aeb40bb | |||
| 8a41f0c716 | |||
| 4be5a491da | |||
| 4b4d4ebc54 | |||
| b132ea266a | |||
| e20e061330 | |||
| fc97b32d18 | |||
| a63aa93092 | |||
| 91cb5e895b | |||
| 16d233da47 | |||
| 69e8a6501e | |||
| dac6ae2e48 | |||
| 9f145333f8 | |||
| c8c5b82924 | |||
| 2e99efeeb6 | |||
| c4492f2cd2 | |||
| 41da15d8cf | |||
| ea3db6936c | |||
| 0928e7d787 | |||
| 2d3040aba2 | |||
| ce590a4a61 | |||
| e899647453 | |||
| fe1553f8da | |||
| 04d197375c | |||
| d2f1022b5a | |||
| 0265162cb9 | |||
| 9be4d6ca0e | |||
| 9e9da20450 | |||
| 082fd814af | |||
| 39cd23d7c0 | |||
| 78b051c999 | |||
| 2836fee493 | |||
| 6e409d2f7e | |||
| 3e698b8579 | |||
| 95e32f00d0 | |||
| 61c632ce55 | |||
| a0b93fd1b2 | |||
| 0b096a4c46 | |||
| a97518359a | |||
| 96cea25bca | |||
| 1a57f62773 | |||
| 9d1f83b1ce | |||
| 6653e8ef82 | |||
| fd121841a9 | |||
| 00255297c8 | |||
| 74a0fd2928 | |||
| ce7487a14d | |||
| 95d9d8bc8e | |||
| dce0b43c11 | |||
| d7a981a84e | |||
| bb52ddba2b | |||
| a82814d565 |
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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,10 +501,11 @@ 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]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class T> static bool GetSTLCollectionFromUtf8( T *STLCollection, unsigned char *bytes, int size)
|
||||
@ -535,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]);
|
||||
}
|
||||
@ -565,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]);
|
||||
}
|
||||
@ -651,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]);
|
||||
}
|
||||
@ -770,6 +771,7 @@ namespace DocFormatUtils
|
||||
{
|
||||
return (std::to_wstring(value));
|
||||
}
|
||||
|
||||
static inline std::wstring DoubleToWideString(double value)
|
||||
{
|
||||
std::wstringstream src;
|
||||
@ -961,4 +963,3 @@ namespace DocFormatUtils
|
||||
};
|
||||
}
|
||||
|
||||
using namespace DocFormatUtils;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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;
|
||||
@ -406,34 +406,12 @@ namespace XMLTools
|
||||
|
||||
void WriteInteger(int Value, int Base = 10)
|
||||
{
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
wchar_t buff[33] ={};
|
||||
_itow(Value, buff, Base);
|
||||
m_str += std::wstring(buff);
|
||||
#else
|
||||
m_str += std::to_wstring(Value);
|
||||
#endif
|
||||
}
|
||||
|
||||
void WriteDouble(double Value)
|
||||
{
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
int *dec = NULL, *sign = NULL;
|
||||
char *str = _fcvt( Value , 4, dec, sign);
|
||||
|
||||
if (str)
|
||||
{
|
||||
std::string sA(str);
|
||||
delete []str;
|
||||
m_str += std::wstring(sA.begin(), sA.end());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_str += L"0";
|
||||
}
|
||||
#else
|
||||
m_str += std::to_wstring(Value);
|
||||
#endif
|
||||
}
|
||||
void WriteBoolean(bool Value)
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -76,4 +76,4 @@ namespace DocFileFormat
|
||||
|
||||
return static_cast<ByteStructure*>(newObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,7 +38,7 @@ namespace DocFileFormat
|
||||
: PropertiesMapping( writer ), _isRunStyleNeeded(isRunStyleNeeded), _isOwnRPr(true), _isRTL(false)
|
||||
{
|
||||
_doc = doc;
|
||||
_rPr = new XMLTools::XMLElement( _T( "w:rPr" ) );
|
||||
_rPr = new XMLTools::XMLElement( L"w:rPr");
|
||||
_revisionData = rev;
|
||||
_currentPapx = currentPapx;
|
||||
_styleChpx = styleChpx;
|
||||
@ -77,7 +77,7 @@ namespace DocFileFormat
|
||||
// apend revision changes
|
||||
if (_revisionData->Type == Changed)
|
||||
{
|
||||
XMLTools::XMLElement rPrChange( _T( "w:rPrChange" ) );
|
||||
XMLTools::XMLElement rPrChange( L"w:rPrChange");
|
||||
|
||||
//todooo date - _revisionData->Dttm.Convert( new DateMapping( rPrChange ) );
|
||||
|
||||
@ -85,7 +85,7 @@ namespace DocFileFormat
|
||||
|
||||
if (author_str)
|
||||
{
|
||||
XMLTools::XMLAttribute author( _T( "w:author" ), FormatUtils::XmlEncode(*author_str));
|
||||
XMLTools::XMLAttribute author( L"w:author", FormatUtils::XmlEncode(*author_str));
|
||||
rPrChange.AppendAttribute( author );
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ namespace DocFileFormat
|
||||
{
|
||||
//Todo сделать определение симольного шрифта через fontManager
|
||||
//Заглушка под Google Docs, они пишут bullet в Arial
|
||||
if (-1 != m_sAsciiFont.find (_T("Arial")) && -1 != m_sEastAsiaFont.find (_T("Arial")) && -1 != m_shAnsiFont.find (_T("Arial")))
|
||||
if (-1 != m_sAsciiFont.find (L"Arial") && -1 != m_sEastAsiaFont.find (L"Arial") && -1 != m_shAnsiFont.find (L"Arial"))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -118,14 +118,14 @@ namespace DocFileFormat
|
||||
|
||||
void CharacterPropertiesMapping::convertSprms( std::list<SinglePropertyModifier>* sprms, XMLTools::XMLElement* parent )
|
||||
{
|
||||
XMLTools::XMLElement * rFonts = new XMLTools::XMLElement ( _T( "w:rFonts" ) );
|
||||
XMLTools::XMLElement * color = new XMLTools::XMLElement ( _T( "w:color" ) );
|
||||
XMLTools::XMLAttribute * colorVal = new XMLTools::XMLAttribute ( _T( "w:val" ) );
|
||||
XMLTools::XMLElement * lang = new XMLTools::XMLElement ( _T( "w:lang" ) );
|
||||
XMLTools::XMLElement * rFonts = new XMLTools::XMLElement ( L"w:rFonts" );
|
||||
XMLTools::XMLElement * color = new XMLTools::XMLElement ( L"w:color" );
|
||||
XMLTools::XMLAttribute * colorVal = new XMLTools::XMLAttribute ( L"w:val" );
|
||||
XMLTools::XMLElement * lang = new XMLTools::XMLElement ( L"w:lang" );
|
||||
|
||||
if (_webHidden)
|
||||
{
|
||||
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( _T( "w:webHidden" ) );
|
||||
XMLTools::XMLElement * webHidden = new XMLTools::XMLElement ( L"w:webHidden" );
|
||||
parent->AppendChild( *webHidden );
|
||||
RELEASEOBJECT( webHidden );
|
||||
}
|
||||
@ -144,95 +144,96 @@ namespace DocFileFormat
|
||||
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
if (_currentIstd < _doc->Styles->Styles->size())
|
||||
{
|
||||
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
|
||||
appendValueElement( parent, L"rStyle", StyleSheetMapping::MakeStyleId( _doc->Styles->Styles->at( _currentIstd ) ), true );
|
||||
}
|
||||
}
|
||||
}break;
|
||||
|
||||
case sprmCFBiDi :
|
||||
appendFlagElement( parent, *iter, _T( "rtl" ), true );
|
||||
appendFlagElement( parent, *iter, L"rtl", true );
|
||||
_isRTL = true;
|
||||
break;
|
||||
|
||||
case sprmOldCFBold :
|
||||
case sprmCFBold :
|
||||
appendFlagElement( parent, *iter, _T( "b" ), true );
|
||||
appendFlagElement( parent, *iter, L"b", true );
|
||||
break;
|
||||
|
||||
case sprmCFBoldBi :
|
||||
appendFlagElement( parent, *iter, _T( "bCs" ), true );
|
||||
appendFlagElement( parent, *iter, L"bCs", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFCaps :
|
||||
case sprmCFCaps :
|
||||
appendFlagElement( parent, *iter, _T( "caps" ), true );
|
||||
appendFlagElement( parent, *iter, L"caps", true );
|
||||
break;
|
||||
|
||||
case sprmCFComplexScripts :
|
||||
appendFlagElement( parent, *iter, _T( "cs" ), true );
|
||||
appendFlagElement( parent, *iter, L"cs", true );
|
||||
break;
|
||||
|
||||
case sprmCFDStrike :
|
||||
appendFlagElement( parent, *iter, _T( "dstrike" ), true );
|
||||
appendFlagElement( parent, *iter, L"dstrike", true );
|
||||
break;
|
||||
|
||||
case sprmCFEmboss :
|
||||
appendFlagElement( parent, *iter, _T( "emboss" ), true );
|
||||
appendFlagElement( parent, *iter, L"emboss", true );
|
||||
break;
|
||||
|
||||
case sprmCFImprint :
|
||||
appendFlagElement( parent, *iter, _T( "imprint" ), true );
|
||||
appendFlagElement( parent, *iter, L"imprint", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFItalic :
|
||||
case sprmCFItalic :
|
||||
appendFlagElement( parent, *iter, _T( "i" ), true );
|
||||
appendFlagElement( parent, *iter, L"i", true );
|
||||
break;
|
||||
|
||||
case sprmCFItalicBi:
|
||||
appendFlagElement( parent, *iter, _T( "iCs" ), true );
|
||||
appendFlagElement( parent, *iter, L"iCs", true );
|
||||
break;
|
||||
|
||||
case 0x0875:
|
||||
appendFlagElement( parent, *iter, _T( "noProof" ), true );
|
||||
appendFlagElement( parent, *iter, L"noProof", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFOutline:
|
||||
case sprmCFOutline:
|
||||
appendFlagElement( parent, *iter, _T( "outline" ), true );
|
||||
appendFlagElement( parent, *iter, L"outline", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFShadow:
|
||||
case sprmCFShadow:
|
||||
appendFlagElement( parent, *iter, _T( "shadow" ), true );
|
||||
appendFlagElement( parent, *iter, L"shadow", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFSmallCaps:
|
||||
case sprmCFSmallCaps:
|
||||
appendFlagElement( parent, *iter, _T( "smallCaps" ), true );
|
||||
appendFlagElement( parent, *iter, L"smallCaps", true );
|
||||
break;
|
||||
|
||||
case sprmCFSpecVanish:
|
||||
appendFlagElement( parent, *iter, _T( "specVanish" ), true );
|
||||
appendFlagElement( parent, *iter, L"specVanish", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFStrike:
|
||||
case sprmCFStrike:
|
||||
appendFlagElement( parent, *iter, _T( "strike" ), true );
|
||||
appendFlagElement( parent, *iter, L"strike", true );
|
||||
break;
|
||||
|
||||
case sprmOldCFVanish:
|
||||
case sprmCFVanish:
|
||||
appendFlagElement( parent, *iter, _T( "vanish" ), true );
|
||||
appendFlagElement( parent, *iter, L"vanish", true );
|
||||
break;
|
||||
|
||||
case 0x0811:
|
||||
appendFlagElement( parent, *iter, _T( "webHidden" ), true );
|
||||
appendFlagElement( parent, *iter, L"webHidden", true );
|
||||
break;
|
||||
|
||||
case sprmOldCIss:
|
||||
case sprmCIss:
|
||||
appendValueElement( parent, _T( "vertAlign" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &SuperscriptIndex[0][0], 3, 12 ), true );
|
||||
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:
|
||||
@ -274,7 +275,7 @@ namespace DocFileFormat
|
||||
case sprmCBrc80:
|
||||
case sprmCBrc:
|
||||
{ //borders
|
||||
XMLTools::XMLElement bdr( _T( "w:bdr" ) );
|
||||
XMLTools::XMLElement bdr( L"w:bdr" );
|
||||
BorderCode bc( iter->Arguments, iter->argumentsSize );
|
||||
appendBorderAttributes( &bc, &bdr );
|
||||
parent->AppendChild( bdr );
|
||||
@ -305,22 +306,22 @@ namespace DocFileFormat
|
||||
|
||||
case sprmCOldHighlight:
|
||||
{
|
||||
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[1], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
case sprmCHighlight:
|
||||
{
|
||||
appendValueElement( parent, _T( "highlight" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
appendValueElement( parent, L"highlight", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::ColorIdentifier[0][0], 17, 12 ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCDxaSpace:
|
||||
case sprmCDxaSpace:
|
||||
{
|
||||
appendValueElement( parent, _T( "spacing" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
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);
|
||||
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 ) );
|
||||
@ -331,20 +332,20 @@ namespace DocFileFormat
|
||||
|
||||
case sprmCHpsBi :
|
||||
{
|
||||
appendValueElement( parent, _T( "szCs" ),
|
||||
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, _T( "sz" ),
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize) ),
|
||||
true );
|
||||
}break;
|
||||
case sprmCHps :
|
||||
{
|
||||
appendValueElement (parent, _T( "sz" ),
|
||||
appendValueElement (parent, L"sz",
|
||||
FormatUtils::IntToWideString (FormatUtils::BytesToUInt16 (iter->Arguments, 0, iter->argumentsSize) ), true );
|
||||
}break;
|
||||
|
||||
@ -355,28 +356,28 @@ namespace DocFileFormat
|
||||
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, _T("position"), nVertPos, true);
|
||||
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, _T("position"), nVertPos, true);
|
||||
appendValueElement (parent, L"position", nVertPos, true);
|
||||
}break;
|
||||
|
||||
case sprmOldCHpsKern:
|
||||
case sprmCHpsKern:
|
||||
{
|
||||
appendValueElement( parent, _T( "kern" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
appendValueElement( parent, L"kern", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmOldCFtc:
|
||||
case sprmCRgFtc0:
|
||||
{ // font family
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
|
||||
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));
|
||||
@ -387,10 +388,11 @@ namespace DocFileFormat
|
||||
|
||||
case sprmCRgFtc1:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex >= 0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute( _T( "w:eastAsia" ) );
|
||||
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));
|
||||
@ -402,10 +404,11 @@ namespace DocFileFormat
|
||||
|
||||
case sprmCRgFtc2:
|
||||
{
|
||||
int nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
size_t nIndex = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
|
||||
|
||||
if( nIndex>=0 && nIndex < _doc->FontTable->Data.size() )
|
||||
{
|
||||
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute( _T( "w:hAnsi" ) );
|
||||
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));
|
||||
@ -417,18 +420,18 @@ namespace DocFileFormat
|
||||
case sprmOldCKul:
|
||||
case sprmCKul:
|
||||
{ //Underlining
|
||||
appendValueElement( parent, _T( "u" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
|
||||
appendValueElement( parent, L"u", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::UnderlineCode[0][0], 56, 16 ), true );
|
||||
}
|
||||
break;
|
||||
|
||||
case sprmCCharScale:
|
||||
{ //char width
|
||||
appendValueElement( parent, _T( "w" ), FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
appendValueElement( parent, L"w", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
}break;
|
||||
|
||||
case sprmCSfxText:
|
||||
{ //animation
|
||||
appendValueElement( parent, _T( "effect" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
|
||||
appendValueElement( parent, L"effect", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::TextAnimation[0][0], 7, 16 ), true );
|
||||
}break;
|
||||
|
||||
case sprmCIdctHint:
|
||||
@ -482,7 +485,7 @@ namespace DocFileFormat
|
||||
|
||||
if (!m_sDefaultFont.empty() && m_sAsciiFont.empty() && m_sEastAsiaFont.empty() && m_shAnsiFont.empty())
|
||||
{//????
|
||||
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( _T( "w:ascii" ) );
|
||||
XMLTools::XMLAttribute* ascii = new XMLTools::XMLAttribute( L"w:ascii" );
|
||||
ascii->SetValue( FormatUtils::XmlEncode(m_sDefaultFont));
|
||||
//rFonts->AppendAttribute( *ascii );
|
||||
RELEASEOBJECT( ascii );
|
||||
@ -501,7 +504,7 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//append color
|
||||
if ( colorVal->GetValue() != _T( "" ) )
|
||||
if ( colorVal->GetValue() != L"")
|
||||
{
|
||||
color->AppendAttribute( *colorVal );
|
||||
parent->AppendChild( *color );
|
||||
@ -523,8 +526,8 @@ namespace DocFileFormat
|
||||
|
||||
if( flag != 128 )
|
||||
{
|
||||
XMLTools::XMLElement* ele = new XMLTools::XMLElement( _T( "w" ), elementName );
|
||||
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( _T( "w:val" ) );
|
||||
XMLTools::XMLElement* ele = new XMLTools::XMLElement( L"w", elementName );
|
||||
XMLTools::XMLAttribute* val = new XMLTools::XMLAttribute( L"w:val" );
|
||||
|
||||
if ( unique )
|
||||
{
|
||||
@ -533,7 +536,7 @@ namespace DocFileFormat
|
||||
|
||||
if ( flag == 0 )
|
||||
{
|
||||
val->SetValue( _T( "false" ) );
|
||||
val->SetValue( L"false" );
|
||||
ele->AppendAttribute( *val );
|
||||
node->AppendChild( *ele );
|
||||
}
|
||||
@ -576,7 +579,7 @@ namespace DocFileFormat
|
||||
//invert it
|
||||
if ( stylesVal )
|
||||
{
|
||||
val->SetValue( _T( "false" ) );
|
||||
val->SetValue( L"false" );
|
||||
ele->AppendAttribute( *val );
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -54,29 +54,29 @@ namespace DocFileFormat
|
||||
|
||||
int index = 0;
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:comments" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:comments", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
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( _T( "w:comment" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( index ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:author" ),
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
|
||||
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( _T( "w:initials" ), atrdPre10->GetUserInitials());
|
||||
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
|
||||
|
||||
//!!!TODO!!!
|
||||
/*//ATRDpost10 is optional and not saved in all files
|
||||
@ -87,7 +87,7 @@ namespace DocFileFormat
|
||||
atrdPost10.Date.Convert(new DateMapping(_writer));
|
||||
}*/
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
while ( ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpHdr ) < (*m_document->IndividualCommentsPlex)[index + 1] )
|
||||
{
|
||||
@ -111,12 +111,12 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T( "w:comment" ));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:comment" );
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:comments" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:comments" );
|
||||
m_context->_docx->CommentsXML = std::wstring(m_pXmlWriter->GetXmlString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,129 +40,135 @@
|
||||
namespace OpenXmlContentTypes
|
||||
{
|
||||
// default content types
|
||||
static const TCHAR* Xml = _T("application/xml");
|
||||
static const wchar_t* Xml = L"application/xml";
|
||||
|
||||
// package content types
|
||||
static const TCHAR* Relationships = _T("application/vnd.openxmlformats-package.relationships+xml");
|
||||
static const wchar_t* Relationships = L"application/vnd.openxmlformats-package.relationships+xml";
|
||||
|
||||
static const TCHAR* CoreProperties = _T("application/vnd.openxmlformats-package.core-properties+xml");
|
||||
static const wchar_t* CoreProperties = L"application/vnd.openxmlformats-package.core-properties+xml";
|
||||
|
||||
// general office document content types
|
||||
static const TCHAR* ExtendedProperties = _T("application/vnd.openxmlformats-officedocument.extended-properties+xml");
|
||||
static const TCHAR* Theme = _T("application/vnd.openxmlformats-officedocument.theme+xml");
|
||||
static const wchar_t* ExtendedProperties = L"application/vnd.openxmlformats-officedocument.extended-properties+xml";
|
||||
static const wchar_t* Theme = L"application/vnd.openxmlformats-officedocument.theme+xml";
|
||||
|
||||
static const TCHAR* CustomXmlProperties = _T("application/vnd.openxmlformats-officedocument.customXmlProperties+xml");
|
||||
static const wchar_t* CustomXmlProperties = L"application/vnd.openxmlformats-officedocument.customXmlProperties+xml";
|
||||
|
||||
static const TCHAR* OleObject = _T("application/vnd.openxmlformats-officedocument.oleObject");
|
||||
static const TCHAR* Vml = _T("application/vnd.openxmlformats-officedocument.vmlDrawing");
|
||||
static const TCHAR* Drawing = _T("application/vnd.openxmlformats-officedocument.drawing+xml");
|
||||
static const wchar_t* OleObject = L"application/vnd.openxmlformats-officedocument.oleObject";
|
||||
static const wchar_t* Vml = L"application/vnd.openxmlformats-officedocument.vmlDrawing";
|
||||
static const wchar_t* Drawing = L"application/vnd.openxmlformats-officedocument.drawing+xml";
|
||||
|
||||
static const TCHAR* MSWordDocx = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
static const wchar_t* MSWordDocx = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
||||
|
||||
static const TCHAR* MSExcel = _T("application/vnd.ms-excel");
|
||||
static const TCHAR* MSWord = _T("application/msword");
|
||||
static const TCHAR* MSPowerpoint = _T("application/vnd.ms-powerpoint");
|
||||
static const wchar_t* MSExcel = L"application/vnd.ms-excel";
|
||||
static const wchar_t* MSWord = L"application/msword";
|
||||
static const wchar_t* MSPowerpoint = L"application/vnd.ms-powerpoint";
|
||||
|
||||
static const TCHAR* Emf = _T("image/x-emf");
|
||||
static const TCHAR* Jpeg = _T("image/jpeg");
|
||||
static const TCHAR* Png = _T("image/png");
|
||||
static const TCHAR* Tiff = _T("image/tiff");
|
||||
static const TCHAR* Wmf = _T("image/x-wmf");
|
||||
static const TCHAR* Bmp = _T("image/bmp");
|
||||
static const wchar_t* Emf = L"image/x-emf";
|
||||
static const wchar_t* Jpeg = L"image/jpeg";
|
||||
static const wchar_t* Png = L"image/png";
|
||||
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
|
||||
static const TCHAR* MainDocument = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
|
||||
static const TCHAR* MainDocumentMacro = _T("application/vnd.ms-word.document.macroEnabled.main+xml");
|
||||
static const TCHAR* MainDocumentTemplate = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml");
|
||||
static const TCHAR* MainDocumentMacroTemplate = _T("application/vnd.ms-word.template.macroEnabledTemplate.main+xml");
|
||||
static const wchar_t* MainDocument = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
|
||||
static const wchar_t* MainDocumentMacro = L"application/vnd.ms-word.document.macroEnabled.main+xml";
|
||||
static const wchar_t* MainDocumentTemplate = L"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml";
|
||||
static const wchar_t* MainDocumentMacroTemplate = L"application/vnd.ms-word.template.macroEnabledTemplate.main+xml";
|
||||
|
||||
static const TCHAR* Styles = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml");
|
||||
static const TCHAR* Numbering = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml");
|
||||
static const TCHAR* FontTable = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml");
|
||||
static const TCHAR* WebSettings = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml");
|
||||
static const TCHAR* Settings = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml");
|
||||
static const wchar_t* Styles = L"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
|
||||
static const wchar_t* Numbering = L"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml";
|
||||
static const wchar_t* FontTable = L"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml";
|
||||
static const wchar_t* WebSettings = L"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml";
|
||||
static const wchar_t* Settings = L"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml";
|
||||
|
||||
static const TCHAR* Comments = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");
|
||||
static const wchar_t* Comments = L"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml";
|
||||
|
||||
static const TCHAR* Footnotes = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml");
|
||||
static const TCHAR* Endnotes = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml");
|
||||
static const wchar_t* Footnotes = L"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml";
|
||||
static const wchar_t* Endnotes = L"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml";
|
||||
|
||||
static const TCHAR* Header = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml");
|
||||
static const TCHAR* Footer = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml");
|
||||
static const wchar_t* Header = L"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml";
|
||||
static const wchar_t* Footer = L"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
|
||||
|
||||
static const TCHAR* Glossary = _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml");
|
||||
static const wchar_t* Glossary = L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml";
|
||||
}
|
||||
|
||||
namespace MicrosoftWordContentTypes
|
||||
{
|
||||
static const TCHAR* KeyMapCustomization = _T("application/vnd.ms-word.keyMapCustomizations+xml");
|
||||
static const TCHAR* VbaProject = _T("application/vnd.ms-office.vbaProject");
|
||||
static const TCHAR* VbaData = _T("application/vnd.ms-word.vbaData+xml");
|
||||
static const TCHAR* Toolbars = _T("application/vnd.ms-word.attachedToolbars");
|
||||
static const wchar_t* KeyMapCustomization = L"application/vnd.ms-word.keyMapCustomizations+xml";
|
||||
static const wchar_t* VbaProject = L"application/vnd.ms-office.vbaProject";
|
||||
static const wchar_t* VbaData = L"application/vnd.ms-word.vbaData+xml";
|
||||
static const wchar_t* Toolbars = L"application/vnd.ms-word.attachedToolbars";
|
||||
}
|
||||
|
||||
namespace OpenXmlNamespaces
|
||||
{
|
||||
// package namespaces
|
||||
static const TCHAR* ContentTypes = _T("http://schemas.openxmlformats.org/package/2006/content-types");
|
||||
static const TCHAR* RelationshipsPackage = _T("http://schemas.openxmlformats.org/package/2006/relationships");
|
||||
static const TCHAR* Relationships = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
|
||||
static const wchar_t* ContentTypes = L"http://schemas.openxmlformats.org/package/2006/content-types";
|
||||
static const wchar_t* RelationshipsPackage = L"http://schemas.openxmlformats.org/package/2006/relationships";
|
||||
static const wchar_t* Relationships = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
||||
|
||||
// Drawing ML namespaces
|
||||
static const TCHAR* DrawingML = _T("http://schemas.openxmlformats.org/drawingml/2006/main");
|
||||
static const TCHAR* DrawingMLPicture = _T("http://schemas.openxmlformats.org/drawingml/2006/picture");
|
||||
static const wchar_t* DrawingML = L"http://schemas.openxmlformats.org/drawingml/2006/main";
|
||||
static const wchar_t* DrawingMLPicture = L"http://schemas.openxmlformats.org/drawingml/2006/picture";
|
||||
|
||||
// WordprocessingML namespaces
|
||||
static const TCHAR* WordprocessingML = _T("http://schemas.openxmlformats.org/wordprocessingml/2006/main");
|
||||
static const TCHAR* WordprocessingDrawingML = _T("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
|
||||
static const TCHAR* VectorML = _T("urn:schemas-microsoft-com:vml");
|
||||
static const TCHAR* MicrosoftWordML = _T("http://schemas.microsoft.com/office/word/2006/wordml");
|
||||
static const wchar_t* WordprocessingML = L"http://schemas.openxmlformats.org/wordprocessingml/2006/main";
|
||||
static const wchar_t* WordprocessingDrawingML = L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
|
||||
static const wchar_t* VectorML = L"urn:schemas-microsoft-com:vml";
|
||||
static const wchar_t* MicrosoftWordML = L"http://schemas.microsoft.com/office/word/2006/wordml";
|
||||
|
||||
// PresentationML namespaces
|
||||
static const TCHAR* PresentationML = _T("http://schemas.openxmlformats.org/presentationml/2006/main");
|
||||
static const wchar_t* PresentationML = L"http://schemas.openxmlformats.org/presentationml/2006/main";
|
||||
|
||||
// SpreadsheetML Namespaces
|
||||
static const TCHAR* SharedStringML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
static const TCHAR* WorkBookML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
static const TCHAR* StylesML = _T("http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
static const wchar_t* SharedStringML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
|
||||
static const wchar_t* WorkBookML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
|
||||
static const wchar_t* StylesML = L"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
|
||||
|
||||
//Office
|
||||
static const TCHAR* Office = _T("urn:schemas-microsoft-com:office:office");
|
||||
static const TCHAR* OfficeWord = _T("urn:schemas-microsoft-com:office:word");
|
||||
static const wchar_t* Office = L"urn:schemas-microsoft-com:office:office";
|
||||
static const wchar_t* OfficeWord = L"urn:schemas-microsoft-com:office:word";
|
||||
}
|
||||
|
||||
namespace OpenXmlRelationshipTypes
|
||||
{
|
||||
static const TCHAR* CoreProperties = _T("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
|
||||
static const TCHAR* ExtendedProperties = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-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 TCHAR* Theme = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme");
|
||||
static const TCHAR* OfficeDocument = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
|
||||
static const TCHAR* Styles = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
|
||||
static const TCHAR* FontTable = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
|
||||
static const TCHAR* Numbering = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering");
|
||||
static const TCHAR* WebSettings = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
|
||||
static const TCHAR* Settings = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
|
||||
static const TCHAR* CustomXml = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml");
|
||||
static const TCHAR* CustomXmlProperties = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps");
|
||||
static const TCHAR* Comments = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments");
|
||||
static const TCHAR* Footnotes = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes");
|
||||
static const TCHAR* Endnotes = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes");
|
||||
static const TCHAR* Header = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
|
||||
static const TCHAR* Footer = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
|
||||
static const TCHAR* Image = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image");
|
||||
static const TCHAR* OleObject = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
|
||||
static const TCHAR* GlossaryDocument = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument");
|
||||
static const TCHAR* Package = _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
|
||||
static const wchar_t* Theme = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
|
||||
static const wchar_t* OfficeDocument = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
||||
static const wchar_t* Styles = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
|
||||
static const wchar_t* FontTable = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
|
||||
static const wchar_t* Numbering = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
|
||||
static const wchar_t* WebSettings = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";
|
||||
static const wchar_t* Settings = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";
|
||||
static const wchar_t* CustomXml = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
|
||||
static const wchar_t* CustomXmlProperties = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
|
||||
static const wchar_t* Comments = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
||||
static const wchar_t* Footnotes = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes";
|
||||
static const wchar_t* Endnotes = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes";
|
||||
static const wchar_t* Header = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
|
||||
static const wchar_t* Footer = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
|
||||
static const wchar_t* Image = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
||||
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
|
||||
{
|
||||
static const TCHAR* KeyMapCustomizations = _T("http://schemas.microsoft.com/office/2006/relationships/keyMapCustomizations");
|
||||
static const TCHAR* VbaProject = _T("http://schemas.microsoft.com/office/2006/relationships/vbaProject");
|
||||
static const TCHAR* VbaData = _T("http://schemas.microsoft.com/office/2006/relationships/wordVbaData");
|
||||
static const TCHAR* Toolbars = _T("http://schemas.microsoft.com/office/2006/relationships/attachedToolbars");
|
||||
static const wchar_t* KeyMapCustomizations = L"http://schemas.microsoft.com/office/2006/relationships/keyMapCustomizations";
|
||||
static const wchar_t* VbaProject = L"http://schemas.microsoft.com/office/2006/relationships/vbaProject";
|
||||
static const wchar_t* VbaData = L"http://schemas.microsoft.com/office/2006/relationships/wordVbaData";
|
||||
static const wchar_t* Toolbars = L"http://schemas.microsoft.com/office/2006/relationships/attachedToolbars";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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
|
||||
{
|
||||
@ -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.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -133,14 +133,25 @@ namespace DocFileFormat
|
||||
pos = tStream.GetPosition();
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
crypt_data_aes.hashAlgorithm = CRYPT_METHOD::SHA1; //by AlgIDHash -> 0x0000 || 0x8004
|
||||
crypt_data_aes.spinCount = 50000;
|
||||
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;
|
||||
@ -156,16 +167,11 @@ namespace DocFileFormat
|
||||
break;
|
||||
}
|
||||
|
||||
switch(ProviderType)
|
||||
{
|
||||
case 0x0001: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::RC4; break;
|
||||
case 0x0018: crypt_data_aes.cipherAlgorithm = CRYPT_METHOD::AES_ECB; 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,8 @@ namespace DocFileFormat
|
||||
|
||||
EncryptionHeader( FileInformationBlock* fib, POLE::Stream* tableStream );
|
||||
private:
|
||||
CRYPT::CryptRC4Data crypt_data_rc4;
|
||||
CRYPT::ECMADecryptor::_cryptData crypt_data_aes;
|
||||
bool bStandard;
|
||||
CRYPT::_rc4CryptData crypt_data_rc4;
|
||||
CRYPT::_ecmaCryptData crypt_data_aes;
|
||||
bool bStandard;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -54,24 +54,24 @@ namespace DocFileFormat
|
||||
|
||||
int id = 0;
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:endnotes" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:endnotes", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
int cp = ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr + m_document->FIB->m_RgLw97.ccpAtn );
|
||||
|
||||
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr + m_document->FIB->m_RgLw97.ccpAtn + m_document->FIB->m_RgLw97.ccpEdn - 2 ) )
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:endnote" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:endnote", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( id ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
while ( ( cp - m_document->FIB->m_RgLw97.ccpText - m_document->FIB->m_RgLw97.ccpFtn - m_document->FIB->m_RgLw97.ccpHdr - m_document->FIB->m_RgLw97.ccpAtn ) < (*m_document->IndividualEndnotesPlex)[id + 1] )
|
||||
{
|
||||
@ -95,14 +95,14 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:endnote" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:endnote");
|
||||
id++;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:endnotes" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:endnotes");
|
||||
|
||||
m_context->_docx->EndnotesXML = std::wstring( m_pXmlWriter->GetXmlString() );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -507,9 +507,9 @@ namespace DocFileFormat
|
||||
class FileInformationBlock
|
||||
{
|
||||
public:
|
||||
bool m_bOlderVersion;
|
||||
int m_CodePage;
|
||||
FibBase m_FibBase;
|
||||
bool m_bOlderVersion;
|
||||
int m_CodePage;
|
||||
FibBase m_FibBase;
|
||||
|
||||
RgW97 m_RgW97;
|
||||
RgLw97 m_RgLw97;
|
||||
@ -1189,9 +1189,9 @@ namespace DocFileFormat
|
||||
m_FibBase.fDot = FormatUtils::BitmaskToBool((int)flag16, 0x0001);
|
||||
m_FibBase.fGlsy = FormatUtils::BitmaskToBool((int)flag16, 0x0002);
|
||||
m_FibBase.fComplex = FormatUtils::BitmaskToBool((int)flag16, 0x0002);
|
||||
m_FibBase.fHasPic = FormatUtils::BitmaskToBool((int)flag16, 0x0008);
|
||||
m_FibBase.cQuickSaves = (WORD)(((int)flag16 & 0x00F0) >> 4);
|
||||
m_FibBase.fEncrypted = FormatUtils::BitmaskToBool((int)flag16, 0x0100);
|
||||
m_FibBase.fHasPic = FormatUtils::BitmaskToBool((int)flag16, 0x0008);
|
||||
m_FibBase.cQuickSaves = (WORD)(((int)flag16 & 0x00F0) >> 4);
|
||||
m_FibBase.fEncrypted = FormatUtils::BitmaskToBool((int)flag16, 0x0100);
|
||||
m_FibBase.fWhichTblStm = FormatUtils::BitmaskToBool((int)flag16, 0x0200);
|
||||
m_FibBase.fReadOnlyRecommended = FormatUtils::BitmaskToBool((int)flag16, 0x0400);
|
||||
m_FibBase.fWriteReservation = FormatUtils::BitmaskToBool((int)flag16, 0x0800);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,112 +34,110 @@
|
||||
|
||||
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( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:fonts" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
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++ )
|
||||
{
|
||||
FontFamilyName* font = dynamic_cast<FontFamilyName*>( *iter );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:font" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:font", TRUE );
|
||||
|
||||
std::wstring name_ = FormatUtils::XmlEncode(font->xszFtn, true);
|
||||
if (name_.empty())
|
||||
name_ = L"UserFont_" + std::to_wstring(++users_fonts);
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:name" ), name_);
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:name", name_);
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
//alternative name
|
||||
if ( ( font->xszAlt != std::wstring( _T( "" ) ) ) && ( font->xszAlt.length() > 0 ) )
|
||||
if ( ( font->xszAlt != std::wstring( L"" ) ) && ( font->xszAlt.length() > 0 ) )
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:altName" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(font->xszAlt, true));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:altName" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:altName", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(font->xszAlt, true));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:altName" );
|
||||
}
|
||||
|
||||
//charset
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:charset" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( font->chs, _T( "%02x" ) ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:charset" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:charset", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( font->chs, L"%02x" ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:charset" );
|
||||
|
||||
//font family
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:family"), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:family" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:family", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( font->ff, &FontFamily[0][0], 6, 11 ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:family" );
|
||||
|
||||
//panose
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:panose1"), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:panose1", TRUE );
|
||||
|
||||
std::wstring wstr( _T( "" ) );
|
||||
std::wstring wstr( L"" );
|
||||
|
||||
for ( unsigned int i = 0; i < font->panoseSize; i++ )
|
||||
{
|
||||
wstr += FormatUtils::IntToFormattedWideString( font->panose[i], _T( "%02x" ) );
|
||||
wstr += FormatUtils::IntToFormattedWideString( font->panose[i], L"%02x" );
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), wstr);
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:panose1" ) );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", wstr);
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:panose1" );
|
||||
|
||||
//pitch
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:pitch"), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:pitch" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:pitch", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( font->prq, &FontPitch[0][0], 3, 9 ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:pitch" );
|
||||
|
||||
//truetype
|
||||
if ( !font->fTrueType )
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:notTrueType"), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "true" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:notTrueType" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:notTrueType", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", L"true" );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:notTrueType" );
|
||||
}
|
||||
|
||||
//font signature
|
||||
m_pXmlWriter->WriteNodeBegin( _T("w:sig"), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:usb0" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:usb1" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:usb2" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:usb3" ), FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:csb0" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:csb1" ), FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:sig" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:sig", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:usb0", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield0, L"%08x" ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:usb1", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield1, L"%08x" ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:usb2", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield2, L"%08x" ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:usb3", FormatUtils::IntToFormattedWideString( font->fs.UnicodeSubsetBitfield3, L"%08x" ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:csb0", FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield0, L"%08x" ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:csb1", FormatUtils::IntToFormattedWideString( font->fs.CodePageBitfield1, L"%08x" ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:sig" );
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:font" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:font" );
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T("w:fonts") );
|
||||
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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -42,19 +42,19 @@ namespace DocFileFormat
|
||||
{
|
||||
static const wchar_t FontFamily[6][11] =
|
||||
{
|
||||
_T( "auto" ),
|
||||
_T( "roman" ),
|
||||
_T( "swiss" ),
|
||||
_T( "modern" ),
|
||||
_T( "script" ),
|
||||
_T( "decorative" )
|
||||
L"auto",
|
||||
L"roman",
|
||||
L"swiss",
|
||||
L"modern",
|
||||
L"script",
|
||||
L"decorative"
|
||||
};
|
||||
|
||||
static const wchar_t FontPitch[3][9] =
|
||||
{
|
||||
_T( "default" ),
|
||||
_T( "fixed" ),
|
||||
_T( "variable" )
|
||||
L"default",
|
||||
L"fixed",
|
||||
L"variable"
|
||||
};
|
||||
|
||||
class FontTableMapping: public AbstractOpenXmlMapping, public IMapping
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,16 +45,16 @@ namespace DocFileFormat
|
||||
m_document = static_cast<WordDocument*>( visited );
|
||||
|
||||
//start the document
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:ftr" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:ftr", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
//convert the footer text
|
||||
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
|
||||
@ -93,8 +93,8 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:ftr" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:ftr" );
|
||||
|
||||
m_context->_docx->FooterXMLList.push_back( std::wstring( m_pXmlWriter->GetXmlString() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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)
|
||||
@ -54,27 +54,29 @@ namespace DocFileFormat
|
||||
|
||||
int id = 0;
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:footnotes" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:footnotes", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
int cp = m_document->FIB->m_RgLw97.ccpText;
|
||||
|
||||
while ( cp <= ( m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn - 2 ) )
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:footnote" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:id" ), FormatUtils::IntToWideString( id ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:footnote", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( id ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
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;
|
||||
|
||||
@ -93,16 +95,18 @@ namespace DocFileFormat
|
||||
//this PAPX is for a normal paragraph
|
||||
cp = writeParagraph( cp );
|
||||
}
|
||||
while (cp <= cpStart) //conv_fQioC665ib4ngHkDGY4__docx.doc
|
||||
cp++;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:footnote" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:footnote");
|
||||
id++;
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:footnotes" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:footnotes");
|
||||
|
||||
m_context->_docx->FootnotesXML = std::wstring(m_pXmlWriter->GetXmlString());
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
170
ASCOfficeDocFile/DocDocxConverter/FormFieldData.cpp
Normal file
170
ASCOfficeDocFile/DocDocxConverter/FormFieldData.cpp
Normal file
@ -0,0 +1,170 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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, bool bOlderVersion_ )
|
||||
{
|
||||
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, bOlderVersion_);
|
||||
|
||||
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-2017
|
||||
*
|
||||
* 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, bool bOlderVersion );
|
||||
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-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,16 +45,16 @@ namespace DocFileFormat
|
||||
m_document = static_cast<WordDocument*>( visited );
|
||||
|
||||
//start the document
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:hdr" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:hdr", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
//convert the header text
|
||||
_lastValidPapx = (*(m_document->AllPapxFkps->begin()))->grppapx[0];
|
||||
@ -88,8 +88,8 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:hdr" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:hdr");
|
||||
|
||||
m_context->_docx->HeaderXMLList.push_back( std::wstring( m_pXmlWriter->GetXmlString() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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 );
|
||||
@ -124,11 +123,14 @@ namespace DocFileFormat
|
||||
TableInfo tai(papx);
|
||||
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
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,17 +63,17 @@ namespace DocFileFormat
|
||||
m_xmldocument->RegisterNumbering();
|
||||
|
||||
//start the document
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:numbering" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:numbering", TRUE );
|
||||
|
||||
//write namespaces
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:v" ), OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:o" ), OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:w10" ), OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( _T( "xmlns:r" ), OpenXmlNamespaces::Relationships );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:o", OpenXmlNamespaces::Office );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||
m_pXmlWriter->WriteAttribute( L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
PictureBulletsMapping();
|
||||
|
||||
@ -82,37 +82,37 @@ namespace DocFileFormat
|
||||
for (std::list<ListData*>::iterator iter = rglst->listData.begin(); iter != rglst->listData.end(); ++iter, ++i)
|
||||
{
|
||||
//start abstractNum
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
//nsid
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
//multiLevelType
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:multiLevelType" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:multiLevelType", TRUE );
|
||||
|
||||
if ( (*iter)->fHybrid )
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "hybridMultilevel" ) );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", L"hybridMultilevel" );
|
||||
}
|
||||
else if ( (*iter)->fSimpleList )
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "singleLevel" ) );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", L"singleLevel" );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "multilevel" ) );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", L"multilevel" );
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
//template
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:tmpl" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->tplc, _T( "%08x" ) ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:tmpl", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->tplc, L"%08x"));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
// writes the levels
|
||||
size_t length = (*iter)->rglvl->size();
|
||||
@ -124,33 +124,33 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//end abstractNum
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:abstractNum" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:abstractNum" );
|
||||
}
|
||||
//write old style numbering (сложносоставных не сущестует)
|
||||
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
|
||||
{
|
||||
//start abstractNum
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNum" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:abstractNumId" ), FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:abstractNum", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:abstractNumId", FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
////nsid
|
||||
//m_pXmlWriter->WriteNodeBegin( _T( "w:nsid" ), TRUE );
|
||||
//m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( (*iter)->lsid, _T( "%08x" ) ));
|
||||
//m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
//m_pXmlWriter->WriteNodeBegin( L"w:nsid", TRUE );
|
||||
//m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( (*iter)->lsid, L"%08x" ) ));
|
||||
//m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
//multiLevelType
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:multiLevelType" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:multiLevelType", TRUE );
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), _T( "singleLevel" ) );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", L"singleLevel" );
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
LevelMapping(*iter, 0);
|
||||
|
||||
//end abstractNum
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "w:abstractNum" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"w:abstractNum" );
|
||||
}
|
||||
|
||||
//write the overrides
|
||||
@ -159,36 +159,36 @@ namespace DocFileFormat
|
||||
ListFormatOverride* lfo = m_document->listFormatOverrideTable->at(i);
|
||||
|
||||
//start num
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i + 1));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:num", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(i + 1));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
int index = FindIndexbyId( rglst->listData, lfo->lsid );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( index ) );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:abstractNumId", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( index ) );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
for (std::vector<ListFormatOverrideLevel*>::const_iterator iter = lfo->rgLfoLvl.begin(); iter != lfo->rgLfoLvl.end(); ++iter)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlOverride" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:lvlOverride", TRUE );
|
||||
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString( (*iter)->ilvl ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString( (*iter)->ilvl ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
if ( ( (*iter)->fStartAt ) && ( !(*iter)->fFormatting ) )
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:startOverride" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( (*iter)->iStartAt ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:startOverride", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( (*iter)->iStartAt ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
}
|
||||
|
||||
LevelMapping((*iter)->lvl, 0, ListData::ISTD_NIL);
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:lvlOverride"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:lvlOverride");
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T( "w:num"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:num");
|
||||
}
|
||||
|
||||
if (m_document->listFormatOverrideTable->empty() && !rglst->listNumbering.empty())
|
||||
@ -196,20 +196,20 @@ namespace DocFileFormat
|
||||
i = 0;
|
||||
for (std::list<NumberingDescriptor>::iterator iter = rglst->listNumbering.begin(); iter != rglst->listNumbering.end(); ++iter, ++i)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:num" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:numId" ), FormatUtils::IntToWideString(i+1));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:num", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:numId", FormatUtils::IntToWideString(i+1));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:abstractNumId" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:abstractNumId", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString( i ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T( "w:num"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:num");
|
||||
}
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:numbering"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:numbering");
|
||||
|
||||
m_xmldocument->NumberingXML = std::wstring(m_pXmlWriter->GetXmlString());
|
||||
}
|
||||
@ -277,7 +277,7 @@ namespace DocFileFormat
|
||||
{
|
||||
newResult = find_if((result + 1), lvl->xst.end(), &NumberingMapping::IsPlaceholder);
|
||||
|
||||
ret += _T( "%" );
|
||||
ret += L"%";
|
||||
ret += FormatUtils::IntToWideString(*result + 1);
|
||||
ret += std::wstring((result + 1), newResult);
|
||||
result = newResult;
|
||||
@ -307,13 +307,11 @@ namespace DocFileFormat
|
||||
if (!FormatUtils::IsControlSymbol(xchBullet))
|
||||
{
|
||||
ret.push_back(lvl.xst[0]);
|
||||
ret.push_back(L'\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.push_back(L'\xF0B7');
|
||||
ret.push_back(L'\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -321,7 +319,7 @@ namespace DocFileFormat
|
||||
std::wstring strBefore = lvl.xst.substr(0, Before);
|
||||
std::wstring strAfter = lvl.xst.substr(Before, After);
|
||||
|
||||
ret = strBefore + _T( "%1" ) + strAfter ;
|
||||
ret = strBefore + L"%1" + strAfter ;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -344,134 +342,134 @@ namespace DocFileFormat
|
||||
{
|
||||
if (bOlderVersion && nfc > 5)
|
||||
{
|
||||
if (nfc == 0xff) return std::wstring( _T( "bullet" ) );
|
||||
else return std::wstring( _T( "none" ) );
|
||||
if (nfc == 0xff) return std::wstring( L"bullet");
|
||||
else return std::wstring( L"none");
|
||||
}
|
||||
|
||||
switch ( nfc )
|
||||
{
|
||||
case 0:
|
||||
return std::wstring( _T( "decimal" ) );
|
||||
return std::wstring( L"decimal" );
|
||||
case 1:
|
||||
return std::wstring( _T( "upperRoman" ) );
|
||||
return std::wstring( L"upperRoman" );
|
||||
case 2:
|
||||
return std::wstring( _T( "lowerRoman" ) );
|
||||
return std::wstring( L"lowerRoman" );
|
||||
case 3:
|
||||
return std::wstring( _T( "upperLetter" ) );
|
||||
return std::wstring( L"upperLetter");
|
||||
case 4:
|
||||
return std::wstring( _T( "lowerLetter" ) );
|
||||
return std::wstring( L"lowerLetter");
|
||||
case 5:
|
||||
return std::wstring( _T( "ordinal" ) );
|
||||
return std::wstring( L"ordinal" );
|
||||
case 6:
|
||||
return std::wstring( _T( "cardinalText" ) );
|
||||
return std::wstring( L"cardinalText" );
|
||||
case 7:
|
||||
return std::wstring( _T( "ordinalText" ) );
|
||||
return std::wstring( L"ordinalText" );
|
||||
case 8:
|
||||
return std::wstring( _T( "hex" ) );
|
||||
return std::wstring( L"hex" );
|
||||
case 9:
|
||||
return std::wstring( _T( "chicago" ) );
|
||||
return std::wstring( L"chicago" );
|
||||
case 10:
|
||||
return std::wstring( _T( "ideographDigital" ) );
|
||||
return std::wstring( L"ideographDigital" );
|
||||
case 11:
|
||||
return std::wstring( _T( "japaneseCounting" ) );
|
||||
return std::wstring( L"japaneseCounting" );
|
||||
case 12:
|
||||
return std::wstring( _T( "aiueo" ) );
|
||||
return std::wstring( L"aiueo" );
|
||||
case 13:
|
||||
return std::wstring( _T( "iroha" ) );
|
||||
return std::wstring( L"iroha" );
|
||||
case 14:
|
||||
return std::wstring( _T( "decimalFullWidth" ) );
|
||||
return std::wstring( L"decimalFullWidth" );
|
||||
case 15:
|
||||
return std::wstring( _T( "decimalHalfWidth" ) );
|
||||
return std::wstring( L"decimalHalfWidth" );
|
||||
case 16:
|
||||
return std::wstring( _T( "japaneseLegal" ) );
|
||||
return std::wstring( L"japaneseLegal" );
|
||||
case 17:
|
||||
return std::wstring( _T( "japaneseDigitalTenThousand" ) );
|
||||
return std::wstring( L"japaneseDigitalTenThousand" );
|
||||
case 18:
|
||||
return std::wstring( _T( "decimalEnclosedCircle" ) );
|
||||
return std::wstring( L"decimalEnclosedCircle" );
|
||||
case 19:
|
||||
return std::wstring( _T( "decimalFullWidth2" ) );
|
||||
return std::wstring( L"decimalFullWidth2" );
|
||||
case 20:
|
||||
return std::wstring( _T( "aiueoFullWidth" ) );
|
||||
return std::wstring( L"aiueoFullWidth" );
|
||||
case 21:
|
||||
return std::wstring( _T( "irohaFullWidth" ) );
|
||||
return std::wstring( L"irohaFullWidth" );
|
||||
case 22:
|
||||
return std::wstring( _T( "decimalZero" ) );
|
||||
return std::wstring( L"decimalZero" );
|
||||
case 23:
|
||||
return std::wstring( _T( "bullet" ) );
|
||||
return std::wstring( L"bullet" );
|
||||
case 24:
|
||||
return std::wstring( _T( "ganada" ) );
|
||||
return std::wstring( L"ganada" );
|
||||
case 25:
|
||||
return std::wstring( _T( "chosung" ) );
|
||||
return std::wstring( L"chosung" );
|
||||
case 26:
|
||||
return std::wstring( _T( "decimalEnclosedFullstop" ) );
|
||||
return std::wstring( L"decimalEnclosedFullstop" );
|
||||
case 27:
|
||||
return std::wstring( _T( "decimalEnclosedParen" ) );
|
||||
return std::wstring( L"decimalEnclosedParen" );
|
||||
case 28:
|
||||
return std::wstring( _T( "decimalEnclosedCircleChinese" ) );
|
||||
return std::wstring( L"decimalEnclosedCircleChinese" );
|
||||
case 29:
|
||||
return std::wstring( _T( "ideographEnclosedCircle" ) );
|
||||
return std::wstring( L"ideographEnclosedCircle" );
|
||||
case 30:
|
||||
return std::wstring( _T( "ideographTraditional" ) );
|
||||
return std::wstring( L"ideographTraditional" );
|
||||
case 31:
|
||||
return std::wstring( _T( "ideographZodiac" ) );
|
||||
return std::wstring( L"ideographZodiac" );
|
||||
case 32:
|
||||
return std::wstring( _T( "ideographZodiacTraditional" ) );
|
||||
return std::wstring( L"ideographZodiacTraditional" );
|
||||
case 33:
|
||||
return std::wstring( _T( "taiwaneseCounting" ) );
|
||||
return std::wstring( L"taiwaneseCounting" );
|
||||
case 34:
|
||||
return std::wstring( _T( "ideographLegalTraditional" ) );
|
||||
return std::wstring( L"ideographLegalTraditional" );
|
||||
case 35:
|
||||
return std::wstring( _T( "taiwaneseCountingThousand" ) );
|
||||
return std::wstring( L"taiwaneseCountingThousand" );
|
||||
case 36:
|
||||
return std::wstring( _T( "taiwaneseDigital" ) );
|
||||
return std::wstring( L"taiwaneseDigital" );
|
||||
case 37:
|
||||
return std::wstring( _T( "chineseCounting" ) );
|
||||
return std::wstring( L"chineseCounting" );
|
||||
case 38:
|
||||
return std::wstring( _T( "chineseLegalSimplified" ) );
|
||||
return std::wstring( L"chineseLegalSimplified" );
|
||||
case 39:
|
||||
return std::wstring( _T( "chineseCountingThousand" ) );
|
||||
return std::wstring( L"chineseCountingThousand" );
|
||||
case 40:
|
||||
return std::wstring( _T( "koreanDigital" ) );
|
||||
return std::wstring( L"koreanDigital" );
|
||||
case 41:
|
||||
return std::wstring( _T( "koreanCounting" ) );
|
||||
return std::wstring( L"koreanCounting" );
|
||||
case 42:
|
||||
return std::wstring( _T( "koreanLegal" ) );
|
||||
return std::wstring( L"koreanLegal" );
|
||||
case 43:
|
||||
return std::wstring( _T( "koreanDigital2" ) );
|
||||
return std::wstring( L"koreanDigital2" );
|
||||
case 44:
|
||||
return std::wstring( _T( "vietnameseCounting" ) );
|
||||
return std::wstring( L"vietnameseCounting" );
|
||||
case 45:
|
||||
return std::wstring( _T( "russianLower" ) );
|
||||
return std::wstring( L"russianLower" );
|
||||
case 46:
|
||||
return std::wstring( _T( "russianUpper" ) );
|
||||
return std::wstring( L"russianUpper" );
|
||||
case 47:
|
||||
return std::wstring( _T( "none" ) );
|
||||
return std::wstring( L"none" );
|
||||
case 48:
|
||||
return std::wstring( _T( "numberInDash" ) );
|
||||
return std::wstring( L"numberInDash" );
|
||||
case 49:
|
||||
return std::wstring( _T( "hebrew1" ) );
|
||||
return std::wstring( L"hebrew1" );
|
||||
case 50:
|
||||
return std::wstring( _T( "hebrew2" ) );
|
||||
return std::wstring( L"hebrew2" );
|
||||
case 51:
|
||||
return std::wstring( _T( "arabicAlpha" ) );
|
||||
return std::wstring( L"arabicAlpha" );
|
||||
case 52:
|
||||
return std::wstring( _T( "arabicAbjad" ) );
|
||||
return std::wstring( L"arabicAbjad" );
|
||||
case 53:
|
||||
return std::wstring( _T( "hindiVowels" ) );
|
||||
return std::wstring( L"hindiVowels" );
|
||||
case 54:
|
||||
return std::wstring( _T( "hindiConsonants" ) );
|
||||
return std::wstring( L"hindiConsonants" );
|
||||
case 55:
|
||||
return std::wstring( _T( "hindiNumbers" ) );
|
||||
return std::wstring( L"hindiNumbers" );
|
||||
case 56:
|
||||
return std::wstring( _T( "hindiCounting" ) );
|
||||
return std::wstring( L"hindiCounting" );
|
||||
case 57:
|
||||
return std::wstring( _T( "thaiLetters" ) );
|
||||
return std::wstring( L"thaiLetters" );
|
||||
case 58:
|
||||
return std::wstring( _T( "thaiNumbers" ) );
|
||||
return std::wstring( L"thaiNumbers" );
|
||||
case 59:
|
||||
return std::wstring( _T( "thaiCounting" ) );
|
||||
return std::wstring( L"thaiCounting" );
|
||||
default:
|
||||
return std::wstring( _T( "decimal" ) );
|
||||
return std::wstring( L"decimal" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,22 +486,22 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:lvl", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString(level));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl.iStartAt));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:start", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl.iStartAt));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl.nfc, true));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:numFmt", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl.nfc, true));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
//// suffix
|
||||
// m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
|
||||
// m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
|
||||
// m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
// m_pXmlWriter->WriteNodeBegin( L"w:suff", TRUE );
|
||||
// m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.ixchFollow, &FollowingCharMap[0][0], 3, 8));
|
||||
// m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
// Number level text
|
||||
std::wstring lvlText = GetLvlText(lvl, isSymbol, lvl.cbTextBefore, lvl.cbTextAfter);
|
||||
@ -517,33 +515,33 @@ namespace DocFileFormat
|
||||
//}
|
||||
if (!lvlText.empty())
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
|
||||
m_pXmlWriter->WriteAttribute(_T("w:val"), lvlText);
|
||||
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
|
||||
m_pXmlWriter->WriteNodeBegin(L"w:lvlText",TRUE);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val",lvlText);
|
||||
m_pXmlWriter->WriteNodeEnd(L"", TRUE);
|
||||
}
|
||||
|
||||
// jc
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:lvlJc", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl.jc, &LevelJustificationMap[0][0], 3, 7));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
// pPr
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:pPr" ), FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:pPr"));
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:pPr", FALSE );
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:pPr");
|
||||
|
||||
// rPr
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:rPr" ), FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:rPr", FALSE );
|
||||
|
||||
if (!fontFamily.empty())
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:rFonts" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:rFonts", TRUE );
|
||||
// w:hint="default"
|
||||
m_pXmlWriter->WriteAttribute(_T("w:hAnsi"), fontFamily);
|
||||
m_pXmlWriter->WriteAttribute(_T("w:ascii"), fontFamily);
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute(L"w:hAnsi",fontFamily);
|
||||
m_pXmlWriter->WriteAttribute(L"w:ascii",fontFamily);
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
}
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:rPr"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:rPr");
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:lvl"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:lvl");
|
||||
}
|
||||
|
||||
void NumberingMapping::LevelMapping(const ListLevel* lvl, unsigned int level, short styleIndex)
|
||||
@ -558,58 +556,58 @@ namespace DocFileFormat
|
||||
|
||||
// Проверяем шрифт
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:lvl" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:ilvl" ), FormatUtils::IntToWideString(level));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:lvl", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:ilvl", FormatUtils::IntToWideString(level));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
|
||||
// starts at
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:start" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString(lvl->iStartAt));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:start", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::IntToWideString(lvl->iStartAt));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
// number format
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:numFmt" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), GetNumberFormatWideString(lvl->nfc));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:numFmt", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", GetNumberFormatWideString(lvl->nfc));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
// suffix
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:suff" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:suff", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl->ixchFollow, &FollowingCharMap[0][0], 3, 8));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
|
||||
// style
|
||||
// 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( _T( "w:pStyle" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
}
|
||||
|
||||
// Number level text
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin(_T("w:lvlText"), TRUE);
|
||||
m_pXmlWriter->WriteAttribute(_T("w:val"), GetLvlText(lvl, cpMapping.CheckIsSymbolFont()));
|
||||
m_pXmlWriter->WriteNodeEnd(_T( ""), TRUE);
|
||||
m_pXmlWriter->WriteNodeBegin(L"w:lvlText",TRUE);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val",GetLvlText(lvl, cpMapping.CheckIsSymbolFont()));
|
||||
m_pXmlWriter->WriteNodeEnd(L"",TRUE);
|
||||
|
||||
WriteLevelPictureBullet(lvl->grpprlChpx);
|
||||
|
||||
// legacy
|
||||
if (lvl->fWord6)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:legacy" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:legacy" ), _T( "1" ) );
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:legacy", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:legacy", L"1" );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
}
|
||||
// jc
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:lvlJc" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:lvlJc", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::MapValueToWideString(lvl->jc, &LevelJustificationMap[0][0], 3, 7));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE );
|
||||
// pPr
|
||||
bool isBidi = false;
|
||||
ParagraphPropertiesMapping oppMapping(m_pXmlWriter, m_context, m_document, NULL, isBidi);
|
||||
@ -619,7 +617,7 @@ namespace DocFileFormat
|
||||
|
||||
m_pXmlWriter->WriteString(oWriterTemp.GetXmlString());
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:lvl"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:lvl");
|
||||
}
|
||||
|
||||
void NumberingMapping::PictureBulletsMapping()
|
||||
@ -639,10 +637,10 @@ namespace DocFileFormat
|
||||
|
||||
if ((pict.mfp.mm > 98) && (pict.shapeContainer != NULL))
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:numPicBullet" ), TRUE );
|
||||
m_pXmlWriter->WriteAttribute( _T( "w:numPicBulletId" ), FormatUtils::IntToWideString( iter->first ));
|
||||
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( _T( "w:pict" ) );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:numPicBullet", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:numPicBulletId", FormatUtils::IntToWideString( iter->first ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:pict" );
|
||||
|
||||
//inline picture + bullete props
|
||||
if (pict.blipStoreEntry != NULL)
|
||||
@ -659,8 +657,8 @@ namespace DocFileFormat
|
||||
pict.shapeContainer->Convert(&oShape);
|
||||
}
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:pict"));
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:numPicBullet"));
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:pict");
|
||||
m_pXmlWriter->WriteNodeEnd(L"w:numPicBullet");
|
||||
}
|
||||
}
|
||||
|
||||
@ -693,10 +691,10 @@ namespace DocFileFormat
|
||||
|
||||
if (isPictureBullet)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin(_T("w:lvlPicBulletId"), TRUE);
|
||||
m_pXmlWriter->WriteAttribute(_T("w:val"), FormatUtils::IntToWideString(index));
|
||||
m_pXmlWriter->WriteNodeEnd(_T(""), TRUE);
|
||||
m_pXmlWriter->WriteNodeBegin(L"w:lvlPicBulletId",TRUE);
|
||||
m_pXmlWriter->WriteAttribute(L"w:val",FormatUtils::IntToWideString(index));
|
||||
m_pXmlWriter->WriteNodeEnd(L"",TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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,9 +52,9 @@ namespace DocFileFormat
|
||||
|
||||
static const wchar_t LevelJustificationMap[3][7] =
|
||||
{
|
||||
_T("left"),
|
||||
_T("center"),
|
||||
_T("right")
|
||||
L"left",
|
||||
L"center",
|
||||
L"right"
|
||||
};
|
||||
|
||||
class NumberingMapping: public AbstractOpenXmlMapping, public IMapping
|
||||
@ -89,4 +89,4 @@ namespace DocFileFormat
|
||||
WordDocument* m_document;
|
||||
WordprocessingDocument* m_xmldocument;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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-2016
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* 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