Compare commits

..

390 Commits

Author SHA1 Message Date
b1a044ba14 Refactoring zip module 2022-05-30 11:45:41 +03:00
eae2ef8d85 Fix build with qt < 5.15 2022-05-28 22:08:20 +03:00
3599c01b97 Change buffer to unexternalized 2022-05-28 00:00:51 +03:00
c76649d296 Refactoring 2022-05-26 21:18:31 +03:00
738568bf6d [x2t] Call apply_changes for docx 2022-05-26 19:54:04 +03:00
b730fb350d Merge pull request #940 from ONLYOFFICE/feature/newEmbed
Feature/new embed
2022-05-26 18:18:02 +03:00
e147129642 Fix buh with HEAP8 instead HEAPU8 2022-05-26 16:12:49 +03:00
3f097fa83c Change spases to tabs 2022-05-26 15:29:03 +03:00
9a971f16dd Merge pull request #938 from ONLYOFFICE/fix/v7.2.0-fix-bugs
fix bug #57319
2022-05-26 14:54:49 +03:00
272cbbb8b6 fix bug #57319 2022-05-26 14:53:57 +03:00
1d14056ebc Update fonts engine 2022-05-26 14:00:21 +03:00
39e06f668e Fix build module 2022-05-26 10:43:20 +03:00
150a76650e Fix typo 2022-05-25 22:48:02 +03:00
4016df7fc7 End support ZipEmbed 2022-05-25 22:41:58 +03:00
8422e3cd3b Refactoring 2022-05-25 21:26:14 +03:00
827fc16fbe Fix mac version 2022-05-25 21:08:28 +03:00
9b2208b97d Add files 2022-05-25 20:55:58 +03:00
8a34dcf222 Start developing 2022-05-25 20:51:49 +03:00
6aae00a6ee . 2022-05-25 10:39:11 +03:00
42acdac865 Refactoring 2022-05-24 19:52:50 +03:00
459313292e Refactoring zlib module 2022-05-24 18:40:59 +03:00
08612c0cd5 oleSize 2022-05-24 14:38:01 +03:00
7c72b34986 fix bug #57259 2022-05-24 14:37:06 +03:00
d396c8dc7e Merge pull request #931 from ONLYOFFICE/fix/CssTableStyle
Fix css table style
2022-05-23 16:53:42 +03:00
13ee681c22 fix empty w:tblW 2022-05-23 14:40:27 +03:00
3e1c28687a Merge pull request #929 from ONLYOFFICE/feature/ppt_7
Feature/ppt 7
2022-05-23 11:09:24 +03:00
2625d6cd26 Merge remote-tracking branch 'origin/fix/v7.1.0-fix-bugs-ppt3' into feature/ppt_7 2022-05-23 11:07:24 +03:00
dae64684b1 . 2022-05-21 12:46:39 +03:00
6db7f67972 improving the quality of converting table styles 2022-05-20 17:45:06 +03:00
561298b43c fix bug #54031 2022-05-20 17:41:52 +03:00
7c08b05fcd html fix empty <w:tc> 2022-05-19 19:02:51 +03:00
dc9e6ffdd5 html fix empty <w:tc> 2022-05-19 14:57:34 +03:00
b8e5f7d01b html fix hyperlink 2022-05-19 13:16:41 +03:00
32841d6596 Merge pull request #927 from ONLYOFFICE/hotfix/v7.1.1
Hotfix/v7.1.1
2022-05-19 11:50:20 +03:00
4d2830732f fix part of 54031 2022-05-18 23:44:31 +03:00
c8d5ae5f52 html different <w:p> 2022-05-18 18:52:48 +03:00
6eb4e89fe2 Merge pull request #925 from ONLYOFFICE/hotfix/v7.1.1
Hotfix/v7.1.1
2022-05-18 16:31:24 +03:00
0398c6a018 Added the display property 2022-05-18 12:12:37 +03:00
93d1688e13 . 2022-05-18 10:58:21 +03:00
72cde59fdb Fixed a problem with incorrect display of table borders 2022-05-17 18:50:51 +03:00
03bfb325cd vb->bin 2022-05-17 16:22:56 +03:00
06f7208e20 Merge pull request #924 from ONLYOFFICE/android_password
[android] Add save password
2022-05-17 16:07:22 +03:00
1dcaa7e5cb [android] Add save password 2022-05-17 15:58:24 +03:00
fd3abeca46 fix indent for tab level with bullet 2022-05-17 15:29:14 +03:00
f60dd5b3c7 . 2022-05-17 14:04:00 +03:00
f443771b12 fix UTF-16 fb2 2022-05-17 10:39:22 +03:00
dad67014be fix build 2022-05-17 10:24:02 +03:00
4c3f3ea607 fix big csv 2022-05-16 19:40:55 +03:00
05c7e09041 add m_mAttrs to NSCSS::CNode 2022-05-16 17:22:44 +03:00
5e127f15e2 html table attributes 2022-05-16 17:04:22 +03:00
94bfcfc9a6 Merge branch release/v7.1.0 into develop 2022-05-16 12:52:12 +00:00
d565300d25 fix UTF-16 html 2022-05-16 12:31:34 +03:00
bb1534f674 vb 2022-05-16 11:43:09 +03:00
4f4a3cc8fa [x2t] Add numformat formatCode16 for bug 48273 2022-05-10 11:02:35 +03:00
64e9652941 fix bug #57029 2022-05-06 17:04:46 +03:00
ec8fa5d6cc [Test] Update tests 2022-04-29 17:26:51 +03:00
09c617010a Merge pull request #915 from ONLYOFFICE/fix/emf
Fixing a build error
2022-04-29 12:36:15 +03:00
186bfb4b89 Fixing a build error 2022-04-29 12:33:01 +03:00
ad53cd99c3 Merge pull request #911 from ONLYOFFICE/fix/emf_wmf
Fix/emf_wmf
2022-04-27 12:10:15 +03:00
4c5ff20a07 Merge branch 'develop' into fix/emf_wmf 2022-04-26 18:31:04 +03:00
38460e9163 Fixed a problem with incorrect positioning of single characters 2022-04-26 18:25:26 +03:00
882f47f6bc Fix bug 56057 2022-04-26 17:20:53 +03:00
6a543bb12d Merge remote-tracking branch 'remotes/origin/release/v7.1.0' into develop 2022-04-12 18:51:22 +03:00
a80642bfaf Corrected the definition of parity 2022-04-06 14:22:04 +03:00
14801e3620 Working with reading and drawing regions 2022-04-06 14:22:04 +03:00
01cff05f71 Merge pull request #891 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-04-05 15:13:20 +03:00
4e7f35c108 Merge pull request #889 from ONLYOFFICE/release/v7.1.0
Move ft_library to cache class from manager
2022-04-04 20:17:46 +03:00
55428c64fb Merge pull request #888 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-04-04 13:44:00 +03:00
a8e1f9117f Fix typo 2022-03-31 11:41:27 +03:00
fc52fb3c17 Merge pull request #886 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-03-31 11:39:05 +03:00
27ccd7d2d3 Added scaling of some values and refactoring 2022-03-30 10:00:57 +03:00
88435e51bb Merge pull request #883 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-03-27 18:29:51 +03:00
5e7b33ba61 Add CMaps 2022-03-26 22:59:26 +03:00
ded794244d [Test] Update tests 2022-03-25 18:26:05 +03:00
bb9897acbf Merge pull request #878 from ONLYOFFICE/feature/odf_2
Update MathConverter.cpp
2022-03-21 17:44:08 +03:00
e06edbc6fe Update MathConverter.cpp
Annotation
2022-03-21 17:31:07 +04:00
c2c69d2a8e Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-03-18 11:11:43 +03:00
3de0f27479 . 2022-03-16 18:10:00 +03:00
6a3fad4a3a . 2022-03-11 17:02:15 +03:00
43c935b79e Merge branch 'feature/odf_2' into develop 2022-03-11 17:02:05 +03:00
feb203abc2 Merge branch 'feature/xlsb_2' into develop 2022-03-11 15:59:41 +03:00
9ae39513d3 Merge branch 'release/v7.1.0' into develop 2022-03-11 15:53:27 +03:00
a5baf69f57 Added support for rendering Wmf in Emf+ records 2022-03-11 10:48:36 +03:00
62445265e6 Refactoring 2022-03-10 18:35:40 +03:00
191669ea1a [xlsb][read] add default value for pivots 2022-03-10 12:56:14 +03:00
af28e9d319 annotation fix 2022-03-10 13:03:55 +04:00
8c6b665fc5 fix zlib
If delete unread file in open file, then don't need to free the file pointer
2022-03-09 17:14:03 +03:00
4d1c217905 Added support for EMR_FILLRGN recording 2022-03-05 15:55:47 +03:00
edf7e2b4f0 [xlsb][read] skip USERSHVIEWS (customSheetView) 2022-03-04 12:52:32 +03:00
22d1811e94 [xlsb][read] add check on default value in sheetData 2022-03-03 22:33:26 +03:00
8262f8802c [xlsb][read] add write each readed worksheet in file (xlsb -> xlsx) 2022-03-03 18:12:54 +03:00
715425185b [xlsb][read] fix for fmlas 2022-03-02 20:16:57 +03:00
1ec288eb9a [xlsb] add external sheet name in formulas 2022-03-01 23:46:33 +03:00
bb4cf4eebc Minor defects have been fixed 2022-03-01 22:04:47 +03:00
4f3bd8b91b [xlsb] add memory optimization for convert xml sheetData from Unicode to
UTF8
2022-02-28 20:33:43 +03:00
fa56a45026 [xlsb] memory optimizations for large sheetData 2022-02-28 19:40:52 +03:00
9af13304d5 Partially changed calculations of the angle and position of lineCap 2022-02-25 20:37:32 +03:00
6f4bcbb548 LineCaps implementation started 2022-02-25 18:13:34 +03:00
5b08350475 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-25 10:57:42 +03:00
f847267c3c [xlsb] fix formula exception 2022-02-24 21:50:08 +03:00
8c7a59ed39 fix free memory in zlib 2022-02-24 17:59:35 +03:00
b5e3467cc3 fix realloc 2022-02-24 16:36:51 +03:00
4d10b801bb xlsb - optimization for PivotCacheRecords 2022-02-22 21:11:25 +03:00
e78dbed50d LineCaps implementation started and refactoring 2022-02-22 20:27:52 +03:00
1b7111bb03 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-22 13:26:33 +03:00
c2dd57e895 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-22 13:26:27 +03:00
8534679f04 [xlsb] . 2022-02-22 13:22:35 +03:00
db8a0b3a6f [xlsb] some fixes for optimization 2022-02-22 10:54:01 +03:00
320befbc53 . 2022-02-21 16:29:41 +03:00
e9d42264c0 Merge branch 'feature/odf_2' of https://github.com/ONLYOFFICE/core into feature/odf_2 2022-02-21 15:51:30 +03:00
5abab316fb some fixes 2022-02-21 15:51:01 +03:00
5b17cf6da3 . 2022-02-21 11:41:11 +03:00
177a57e4ef . 2022-02-21 11:19:46 +03:00
b4cd2f065d . 2022-02-20 20:58:33 +03:00
59d420543f . 2022-02-20 20:49:25 +03:00
195709f629 ofstream->NSFile 2022-02-20 14:49:04 +03:00
084ae03ddb fix linux build 2022-02-20 14:30:32 +03:00
4725acd2e7 Merge branch 'develop' into feature/odf_2 2022-02-18 18:34:22 +03:00
609afe6de3 . 2022-02-18 18:33:17 +03:00
17ea6e66c8 fix build graphics 2022-02-18 14:27:01 +03:00
bb700daba1 [xlsb] fix bugs with formulas 2022-02-18 01:40:46 +03:00
444e82d520 Merge remote-tracking branch 'remotes/origin/feature/emf_wmf' into develop 2022-02-17 14:43:55 +03:00
5b9c2383cf . 2022-02-17 12:20:34 +03:00
b625b724c7 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-16 16:43:45 +03:00
54bb1e79d3 Merge pull request #851 from ONLYOFFICE/feature/xlsb_2
[xlsb] add optimization for reading sheetData
2022-02-16 16:43:07 +03:00
721e4ec5d8 Merge pull request #847 from ONLYOFFICE/feature/downloader
Feature/downloader
2022-02-16 12:43:30 +03:00
c371fea966 [xlsb] add optimization for reading sheetData 2022-02-15 21:42:42 +03:00
bd63cc0d6b Fixed bugs 2022-02-15 21:07:31 +03:00
dac870635f . 2022-02-14 10:31:58 +03:00
1c2a45aa98 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-13 17:43:10 +03:00
444cdb6b9a . 2022-02-13 11:22:28 +03:00
747341f8eb Merge branch 'release/v7.1.0' into develop 2022-02-11 10:39:40 +03:00
da48349248 Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-11 10:38:43 +03:00
c83b1d9f67 [xlsb] fix bugs with slicer in Pivot Table 2022-02-10 23:05:04 +03:00
a7e4ced942 [xlsb] fix bug with id table and corresponding slicers 2022-02-10 19:01:22 +03:00
422b462bb8 Refactoring and fixed bugs 2022-02-10 17:42:11 +03:00
550039df32 [xlsb] some fixes 2022-02-10 14:57:09 +03:00
b6d868a176 [xlsb] fix bugs in pivot table (2) 2022-02-09 20:25:48 +03:00
1b31dc3b72 Fixed bugs 2022-02-09 19:08:40 +03:00
89d70ff2cb [xlsb] fix bugs in pivot table 2022-02-09 17:49:40 +03:00
986a7783ab Merge branch 'develop' into feature/odf_2 2022-02-08 20:30:01 +03:00
47be7419d2 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-08 20:29:40 +03:00
c7b7bd928c [xlsb] fix bugs 2022-02-08 20:14:46 +03:00
7cce201567 Merge branch 'develop' into feature/emf_wmf 2022-02-08 14:41:36 +03:00
5fe1188c5b The error has been removed 2022-02-08 14:40:21 +03:00
a95d7117c7 Fixed bags and implementation of text rendering in Emf+ records has begun 2022-02-08 13:58:48 +03:00
b569af10a5 . 2022-02-08 13:12:49 +03:00
cff91a5235 Merge branch 'develop' into feature/odf_2 2022-02-08 09:40:13 +03:00
0aee8e6d53 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-02-08 09:36:43 +03:00
73e5c70e39 [xlsb] add PCRRecord 2022-02-07 23:59:16 +03:00
1d7b17f149 [xlsb] fix bugs and add pivotCacheID in workbook 2022-02-07 12:50:15 +03:00
70d591d505 Added support for recording EMR_CREATEMONOBRUSH, fixed bugs with brushes and pens 2022-02-04 19:05:14 +03:00
27a7c792b0 Fixed some bugs related to brushes, pens and lack of font 2022-02-03 20:23:22 +03:00
6ed6802123 . 2022-02-03 14:47:24 +03:00
f88b208a57 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 2022-02-02 13:28:00 +03:00
30025abbed for xlsb pivots 2022-02-02 12:59:37 +03:00
b2087497ae [xlsb] fix bug with cell type 2022-02-01 18:01:58 +03:00
ece6f2a907 Merge branch 'develop' into feature/downloader 2022-02-01 17:50:54 +03:00
732c29b2cb . 2022-02-01 14:57:10 +03:00
32f0be300a Merge remote-tracking branch 'origin/feature/xlsb_2' into develop 2022-02-01 13:39:35 +03:00
24fe803997 Merge branch 'release/v7.1.0' into develop 2022-02-01 13:38:57 +03:00
41eeaf8cd7 some fixes 2 2022-02-01 10:20:14 +03:00
daa7328a86 [xlsb] fix bugs 2022-01-31 22:48:57 +03:00
372366adc0 some fixes 2022-01-31 18:08:34 +03:00
e82902f387 [xlsb] fix exception and add to logic.cpp 2022-01-31 13:00:29 +03:00
32f755dc10 Merge branch 'release/v7.1.0' of https://github.com/ONLYOFFICE/core into feature/xlsb_2 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. [xlsb] merge with release/v7.1.0 2022-01-30 23:57:11 +03:00
855fb66aef [xlsb] add PIVOTCACHEDEF (fill inside objects) 2022-01-30 23:11:32 +03:00
0064635fe7 Merge branch 'feature/odf_2' of https://github.com/ONLYOFFICE/core into feature/odf_2 2022-01-30 19:54:58 +03:00
fb6142cb9d Other annotations with some bugs 2022-01-30 19:54:33 +03:00
5e62690318 The problem with missing lines due to the lack of pen thickness has been solved, minor bugs have been fixed 2022-01-28 20:26:27 +03:00
2750b471ba [test] For bug 55091 2022-01-28 19:42:39 +03:00
08471d634f [Test] Update tests 2022-01-28 16:48:31 +03:00
d2e0712a92 [xlsb] add PivotTable (fill inside objects) 2022-01-27 21:03:10 +03:00
43cb660f80 Added bitmap rendering of images embedded in EmfPlus recording 2022-01-27 20:29:15 +03:00
53186e12d2 [Test] Update tests 2022-01-25 20:24:18 +03:00
896832f05c [xlsb] add PIVOTCACHEDEF (record and unions only) 2022-01-25 17:19:27 +03:00
03776dac88 [Network] debug 2022-01-25 00:18:32 +03:00
2a3f16a4d8 [Network] debug download "abort" flag on linux 2022-01-24 23:59:38 +03:00
26fbe3babf [Network] changed checking for 'aborted' thread's flag 2022-01-24 23:59:37 +03:00
e28e8b56b1 [Network] refactoring 2022-01-24 23:59:37 +03:00
536b080451 [Network] replaced isExit flag 2022-01-24 23:59:37 +03:00
4c7e16a33c The principle of working with Emf files embedded in EmfPlus recording has been completely redesigned and refactoring 2022-01-22 22:04:25 +03:00
d997dae36c [Network] and [Kernel] add Cancel for downloader (windows) 2022-01-22 20:04:48 +03:00
920adde65f [Network] and [Kernal] add cancel from thread (linux) 2022-01-22 14:55:28 +03:00
7066a55813 [Test] Update tests 2022-01-21 17:49:22 +03:00
694ea6abe4 [xlsb] add remaining records and unions for PIVOTTABLE 2022-01-19 16:32:37 +03:00
53f53200df Merge pull request #828 from ONLYOFFICE/feature/add-onProgress-downloader
Feature/add on progress downloader
2022-01-18 17:46:27 +03:00
916a84b041 [Network] add fix callBack onProgress for windows 2022-01-18 16:40:01 +03:00
1f0f8ae1b4 [Network] add fix callBack onProgress for curl linux (comment for mobile) 2022-01-18 16:16:23 +03:00
db67132ce2 Merge pull request #829 from ONLYOFFICE/release/v7.1.0
Fix typo
2022-01-18 15:35:05 +03:00
fb2b4b2797 [Network] add save call onProcess on windows 2022-01-18 15:08:00 +03:00
539f1cab81 Merge pull request #827 from ONLYOFFICE/release/v7.1.0
Remove using graphics.pri in release mode
2022-01-18 15:05:56 +03:00
2194dd5899 [Network] add callBack onProcess for curl (both variant) 2022-01-18 15:00:27 +03:00
2799b63869 Merge pull request #826 from ONLYOFFICE/release/v7.1.0
Add missed files
2022-01-18 12:06:15 +03:00
8fa09793eb Merge pull request #825 from ONLYOFFICE/release/v7.1.0
Fix build
2022-01-18 10:55:17 +03:00
0a577290ba Merge pull request #824 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-17 20:56:33 +03:00
23dd433b20 [Test] Update tests 2022-01-17 20:00:20 +03:00
194faf5eff Merge pull request #823 from ONLYOFFICE/feature/add-onProgress-downloader
[Test] add TestDownloader
2022-01-17 19:30:09 +03:00
8f9d36085b [Test] add TestDownloader 2022-01-17 19:26:47 +03:00
2342956bb1 Merge pull request #822 from ONLYOFFICE/feature/add-onProgress-downloader
[Network][FileDownloader] add callBack onProgress for windows
2022-01-17 19:05:03 +03:00
892c415382 [Network][FileDownloader] add callBack onProgress for windows 2022-01-17 19:02:56 +03:00
63ccb0fbee Fractions with Annotations 2022-01-17 18:41:38 +03:00
9ca2b70ee3 Merge branch release/v7.0.0 into develop 2022-01-17 14:19:06 +00:00
79e57e8965 Merge pull request #818 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-17 16:20:26 +03:00
99ee15f65f [xlsb] add records and unions for PIVOTTABLE (without FRTSXVIEW) 2022-01-17 13:16:06 +03:00
6af132ab18 Merge branch 'feature/odf_2' into develop 2022-01-14 16:51:04 +03:00
01a4770af4 [test] Fix test scripts 2022-01-11 19:07:32 +03:00
874129f41c Merge branch 'feature/number-format-locale' into develop 2022-01-11 17:45:57 +03:00
64c361f806 [xlsb] add PivotCacheRecords (records, unions, fill inside objects) 2022-01-11 13:33:41 +03:00
f2c9aec380 Merge remote-tracking branch 'origin/release/v7.1.0' into develop 2022-01-11 11:22:20 +03:00
8ebcbe8636 Merge pull request #811 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-10 18:22:12 +03:00
44c5e23bc1 Merge pull request #810 from ONLYOFFICE/release/v7.1.0
Release/v7.1.0
2022-01-10 14:30:56 +03:00
9484e549b4 Merge pull request #654 from ONLYOFFICE/feature/network/callback
[Common][Network] change typedef style func to c++11 std::function
2022-01-10 13:07:14 +03:00
461006b3b8 Added calculation of exact X-axis coordinates for rendering embedded Emf+ Emf records 2021-12-29 21:08:12 +03:00
1175fd4150 [xlsb] add External links (records, unions, fill inside objects) 2021-12-27 14:55:18 +03:00
281ee487cb The work with the FinalTransform update has been finalized 2021-12-10 20:36:33 +03:00
2f88cf34ea Adding Emf+ Record - Interpretator communication support 2021-12-09 21:30:57 +03:00
5bbe04dd69 Changed the position calculation for the emf image, which is embedded in the emf+ record 2021-12-06 21:45:07 +03:00
b71f62fcad Added calculations of the X-axis position of the emf image embedded in emf+ 2021-12-03 18:57:12 +03:00
6133c11f38 Combining EmfPlus objects 2021-12-02 21:13:42 +03:00
25de0c763f Fixed a typo in the test example 2021-12-02 21:10:44 +03:00
31e0f5e177 Fixed the position of the rotated and reflected text at the same time 2021-11-29 21:40:01 +03:00
ccd47865bd Intermediate commit 2021-11-25 22:41:27 +03:00
725b60245f Fixed a bug in the test example 2021-11-25 22:21:30 +03:00
9153cc678d Refactoring 2021-11-23 21:57:19 +03:00
d9ca2f9e46 Fixed a bug in the test example 2021-11-23 21:53:30 +03:00
0784a62e89 Refactoring 2021-11-19 21:08:48 +03:00
3bafd3f9f2 Working with EMF+ records 2021-11-17 21:22:31 +03:00
a3f9832b4e Working with EMF+ records 2021-11-16 20:33:42 +03:00
5645f15c58 Working with EMF+ records 2021-11-12 20:34:04 +03:00
95fc2c2e94 Working with EMF+ records 2021-11-11 20:29:47 +03:00
b0062b6135 Working with EMF+ records 2021-11-10 21:26:06 +03:00
5d3c3ce818 Working with EMF+ records 2021-11-08 20:11:24 +03:00
1535e5763d Working with EMF+ records 2021-11-01 19:01:56 +03:00
9ed5581b39 Working with EMF+ records 2021-10-28 20:43:34 +03:00
1e922e4724 Working with EMF+ records 2021-10-27 20:05:04 +03:00
94167f1954 Working with EMF+ records 2021-10-26 21:15:21 +03:00
e2c0d814bb Working with EMF+ records 2021-10-22 20:28:41 +03:00
0d20ab0378 Refactoring 2021-10-22 16:18:05 +03:00
c85774a897 Working with EMF+ records 2021-10-21 19:02:44 +03:00
df5140532d Added reading of EMF records+ 2021-10-19 19:36:27 +03:00
7588b592df The addition of the implementation of EMF+ records has begun 2021-10-18 21:24:16 +03:00
bf434987f9 Fixed a bug in the test example in which the EMR_SETPIXELV record was incorrectly written 2021-10-15 22:10:39 +03:00
d5f8c4b474 Added statistics update when deleting or adding records 2021-10-15 22:09:49 +03:00
9d2d7e646a Refactoring 2021-10-13 21:51:30 +03:00
6d4cb1ff4c Added search for records in the Xml tree 2021-10-12 21:37:26 +03:00
e0fcaae71e In the test example, the method of tracking the right mouse click has been changed 2021-10-11 21:27:26 +03:00
4ff908701c [Bug 40483]Fixed 2021-10-09 00:14:04 +03:00
f29c812aa7 [Bug 40483] Fixed a problem with the text position 2021-10-07 22:32:01 +03:00
b30b91ca6d [Bug 40483] Fixed a problem with objects going outside the image boundaries 2021-10-07 22:31:16 +03:00
4c3ec3259c [Bug 40483] Fixed missing formulas 2021-10-05 21:49:03 +03:00
4bb7f3cf83 [Bug 52289]Fixed 2021-10-01 18:55:49 +03:00
3f730897a0 [Bug 52289]Fixed missing images 2021-09-30 22:19:09 +03:00
6fd26cf0f7 [Bug 52289]Added the display of the text background and removed the stub 2021-09-29 22:02:50 +03:00
e5e090f385 Added scrolling in the record editing widget 2021-09-22 23:55:00 +03:00
78e4a4e92b Refactoring 2021-09-16 22:27:25 +03:00
0455514ea9 Added the ability to create a text record 2021-09-14 22:20:43 +03:00
950515f219 Added the ability to create a text record 2021-09-10 17:27:56 +03:00
a16921b2e9 Added the ability to create a text record 2021-09-09 20:55:09 +03:00
7a33ead400 Refactoring and increased the number of possible record creation 2021-09-08 22:18:40 +03:00
1c6c5f982a Increased the number of possible record creation 2021-09-07 23:10:15 +03:00
f62f1dff83 Increased the number of possible record creation 2021-09-07 02:48:33 +03:00
9a4769eb47 Refactoring 2021-09-03 21:10:47 +03:00
a2cf7ed13c Added the ability to save in Emf format 2021-09-03 20:48:52 +03:00
1d97c0e61d Changed the display of the buffer record 2021-09-03 20:35:05 +03:00
e67089c5b4 The logic of converting created records into a tree object has been redesigned 2021-09-02 21:17:01 +03:00
a5c1351cde The addition of the ability to create records has begun 2021-08-30 21:38:38 +03:00
58e99cd2d4 Fixed a malfunction when saving Xml and a small refactoring 2021-08-27 21:40:59 +03:00
905973fded Implemented real-time updating of image changes 2021-08-27 20:28:06 +03:00
717ebd02af Refactoring and adding the ability to edit records 2021-08-26 20:19:34 +03:00
e57b35c77e Added a window for editing records 2021-08-25 22:16:17 +03:00
84d0cef869 In the test example, the ability to save XML has been added 2021-08-20 16:51:17 +03:00
d152aabd82 The implementation of XML to EMF conversion is finally completed 2021-08-20 14:34:38 +03:00
0c6c406cf5 Added saving polygons in polygons 2021-08-19 22:01:22 +03:00
7f8a98f290 Added an entry in the Xml of unknown records 2021-08-18 21:50:38 +03:00
e4cf0cb61f Refactoring 2021-08-17 20:57:50 +03:00
c86e6258af Refactoring 2021-08-16 21:10:03 +03:00
96a8f54933 Correction of defects 2021-07-30 18:57:16 +03:00
8de9a7dd31 Refactoring 2021-07-29 13:56:49 +03:00
1e7c83a0e7 Fixed saving empty records in Xml 2021-07-28 18:02:18 +03:00
7ddc578d1f Changed saving float and string types to an EMF file 2021-07-22 21:48:25 +03:00
319e390b87 The cycle of reading data from an Xml file has been changed 2021-07-21 21:18:20 +03:00
18063bbbbf Refactoring and added recording of the remaining records in Emf 2021-07-19 21:50:31 +03:00
a7c1d6bf59 Added recording of some records in Emf 2021-07-16 21:56:58 +03:00
673df114cc Refactoring 2021-07-14 23:33:54 +03:00
406005815b Refactoring and adding a save to Emf has started 2021-07-13 21:55:08 +03:00
4c483e506e Refactoring and adding data reading from an Xml file 2021-07-12 21:32:48 +03:00
c309339666 Major refactoring 2021-07-09 22:29:16 +03:00
2dadace9e0 [Common][Network] change typedef style func to c++11 std::function 2021-07-09 14:01:14 +03:00
39347207da Refactoring 2021-06-29 21:14:25 +03:00
b97006cda9 Fixed incorrect entry of some records in XML 2021-06-28 21:57:29 +03:00
3a43362536 Refactoring 2021-06-25 22:06:58 +03:00
ec13c73f03 Started adding a read from an Xml file 2021-06-23 21:09:52 +03:00
8489f6e02b Added the function of zooming images using the mouse wheel 2021-06-20 16:44:39 +03:00
434a69f15a Refactoring 2021-06-20 16:13:06 +03:00
922810b157 Combining data output into Xml and a file 2021-06-17 22:42:39 +03:00
b24d16534d Refactoring 2021-06-16 21:47:23 +03:00
b9308428ed Added a draft version of combining structures 2021-06-15 22:15:08 +03:00
57774bb53e Added deleting elements from the tree 2021-06-07 21:45:45 +03:00
4de761f624 Added support for reading all records from an Xml file 2021-06-03 22:23:26 +03:00
c4e31235d5 Added file statistics 2021-06-01 23:55:24 +03:00
5bd661720d Fixed closing the Xml file 2021-05-28 22:19:49 +03:00
4039b87453 Improved appearance 2021-05-28 21:58:34 +03:00
f98ebcac7d Improved appearance 2021-05-26 22:50:50 +03:00
0b40961549 Removing unnecessary content 2021-05-24 20:06:03 +03:00
06a5922b9d Changed the display of the XML file on QTreeView 2021-05-21 23:54:03 +03:00
24b6e73b41 Adjusting the size of the resulting image 2021-05-19 19:43:48 +03:00
4259d2d256 Added rendering of metafiles 2021-05-18 21:37:14 +03:00
6a3b6ff05f Added reading bytes from an Xml file 2021-05-07 21:01:14 +03:00
48f23caff6 Refactoring 2021-05-07 18:41:05 +03:00
9bf8bf7c0f Refactoring 2021-05-07 18:23:55 +03:00
58dc38315a Added support for reading new records from Xml 2021-05-06 21:06:30 +03:00
fa86ad2322 Added a prototype for reading data from an Xml file 2021-05-05 21:25:42 +03:00
c2cb1fd828 Added saving arbitrary bytes from an EMF file to XML, Refactoring 2021-04-28 23:38:55 +03:00
aad4c38574 Refactoring saving EMF to XML 2021-04-22 19:00:46 +03:00
575339bdb8 Revert "Added saving of the Unsigned int type"
This reverts commit a7ee06aeca.
2021-04-19 18:31:00 +03:00
a7ee06aeca Added saving of the Unsigned int type 2021-04-19 17:09:12 +03:00
78e44be4d1 Refactoring 2021-04-19 07:05:56 +03:00
82fb489cdd Added image display and its xml representation in Qt 2021-04-18 15:37:44 +03:00
d3bcc73216 Refactoring 2021-04-14 21:20:21 +03:00
99ce92b794 Added saving EMF to XML 2021-04-10 14:25:46 +03:00
bea00062b4 Refactoring 2021-03-31 18:01:22 +03:00
e142db5400 Adjusted the size of some polygons 2021-03-30 21:09:58 +03:00
6a3ca43a1d Fixed incorrect position of arcs in some cases 2021-03-22 21:17:13 +03:00
08f303d73d Fixed incorrect background in some cases 2021-03-22 21:14:25 +03:00
468b2bf877 Changed the default background color from black to white 2021-03-19 22:11:44 +03:00
5b88f73bf5 Fixed a problem with different text rotation direction 2021-03-19 20:39:36 +03:00
b8f7f267ff Fixed the position of the rotated text 2021-03-18 22:56:27 +03:00
3262b0e551 Changing the formula for calculating new text coordinates when rotating 2021-03-11 20:42:58 +03:00
8c3490eaf6 Fix the coordinates of the position of the rotated text 2021-03-10 21:10:00 +03:00
8f6a51a4f8 [test] Update test file 2020-12-25 13:48:52 +03:00
4748ad961b Fixed a bug with incorrect position of ellipses 2020-11-24 20:01:04 +03:00
a9131b0841 The rotated text appears in the desired area 2020-11-19 21:10:06 +03:00
467360bc3e [test] Add test file 2020-11-17 22:42:11 +03:00
90ffc2be3b Numbers appeared in different places 2020-11-13 15:45:34 +03:00
11bbb0880d [se] dates is updated proof resolved 2020-11-11 15:06:20 +03:00
e69514a338 [se] macros-locale-data.xlsm chanes date 2020-11-10 17:06:28 +03:00
66eac90262 [se]the dates's been changed 2020-10-28 16:49:08 +03:00
2ddefee334 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale 2020-10-27 13:09:39 +03:00
456f25d9e1 [se]fix 2020-10-27 13:09:17 +03:00
e447a428d0 [se] fix 2020-10-27 13:08:50 +03:00
c52c2306c3 [se] 2020-10-27 09:02:29 +03:00
68c07a11d4 updated 2020-10-27 08:58:59 +03:00
b4b8c74fd7 updated 2020-10-27 08:58:29 +03:00
908524ff2e [se] builders 2020-10-27 08:57:43 +03:00
bfd8f52e5e [se]ParseLocalFormatSymbol 2020-10-23 17:32:18 +03:00
40ef42f18d [se] view 2020-10-23 13:43:20 +03:00
057514398c [se] renamed 2020-10-23 13:40:51 +03:00
2f1975eca7 [se] renamed 2020-10-23 13:37:40 +03:00
199325b458 [se] chanhed Readme.md 2020-10-23 13:34:18 +03:00
7bb737e4ab [se]fix 2020-10-23 13:18:53 +03:00
4a381a013c [se]fix 2020-10-23 12:34:23 +03:00
795601e243 [se]fix 2020-10-23 12:29:21 +03:00
e0f902ef50 [se] moved 2020-10-23 12:28:57 +03:00
a8c605da58 [se] changed output 2020-10-23 12:18:58 +03:00
1330c28758 [se]rename 2020-10-23 12:17:32 +03:00
06cbaa82f2 [se] 2020-10-23 12:14:36 +03:00
bdd3cd0795 [se]alghoritm 2020-10-23 12:13:43 +03:00
bb6fc86e0a [se]renamed 2020-10-23 12:01:00 +03:00
900d28e002 [se] update 2020-10-22 15:34:43 +03:00
d41904eab0 [se]fix 2020-10-22 15:13:49 +03:00
22063acc38 [se] fxi 2020-10-22 14:52:45 +03:00
b61ecc11ae [se]algoiscommented 2020-10-22 14:41:22 +03:00
ded9f2cc6a [se] changeofdata 2020-10-22 14:38:00 +03:00
a7c136cdeb [se]changenamess2 2020-10-22 13:52:55 +03:00
d1e75447a0 [se] changenames s1 2020-10-22 13:25:53 +03:00
5263677365 [se]fix 2020-10-22 13:20:07 +03:00
de6d5de360 [se] alghoritm 2020-10-22 13:04:26 +03:00
66478ba28e [se] the comented algorithm 2020-10-22 09:56:11 +03:00
c6ed595019 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale
# Conflicts:
#	Test/Applications/ParseExcelNumberFormatLocales/test/proof/test.js
2020-10-22 09:51:01 +03:00
7dd98a564c [se] fix 2020-10-22 09:27:01 +03:00
19d2417ffe Readme.md's been filled. 2020-10-22 09:26:25 +03:00
da2d9f6ed3 _ 2020-10-21 13:05:03 +03:00
6b0256ae4c _ 2020-10-21 13:00:07 +03:00
5ca14e42a6 _ 2020-10-21 12:59:51 +03:00
d150c439d4 _ 2020-10-21 12:01:36 +03:00
9952900ca8 _ 2020-10-21 11:57:39 +03:00
bc2f1a2c82 _ 2020-10-21 08:51:56 +03:00
ec1c5b278c fix 2020-10-20 17:15:40 +03:00
207cb4e6dd _ 2020-10-20 15:31:37 +03:00
f01770ba3c _ 2020-10-20 15:27:23 +03:00
dc2236c664 _ 2020-10-20 14:59:56 +03:00
112e2a866a fix 2020-10-20 14:55:39 +03:00
8add25ef19 _ 2020-10-20 14:51:27 +03:00
4863b89e62 Merge branch 'feature/number-format-locale' of https://github.com/ONLYOFFICE/core into feature/number-format-locale
# Conflicts:
#	Test/Applications/ParseExcelNumberFormatLocales/test/macros-locale (1).xlsm
#	Test/Applications/ParseExcelNumberFormatLocales/test/run2.vbs
#	Test/Applications/ParseExcelNumberFormatLocales/test/test2.ps1
2020-10-20 14:48:32 +03:00
f63dcd82f4 added dates 2020-10-19 15:45:06 +03:00
25b35c542a -replace "," to "." and " " to "!". the 2 bugs's been found. The first is webstorm cant replace "\u00A0" to "\u0020", the second is bad data, str2[297][1] = "\", strofdec[297] = "," 2020-10-19 15:41:00 +03:00
fc3060d2d0 [test] Move to relative path 2020-10-12 13:24:03 +03:00
8f4cbc5a5c [test] testing of the functional for changing symbols 2020-10-12 11:44:37 +03:00
34cd2d3e77 [test] Add new test project 2020-10-08 12:57:44 +03:00
5471 changed files with 710002 additions and 6865 deletions

2
.gitignore vendored
View File

@ -38,3 +38,5 @@ Thumbs.db
*.db
*.opendb
DesktopEditor/fontengine/js/common/freetype-2.10.4

View File

@ -172,13 +172,13 @@ void pptx_text_context::Impl::start_paragraph(const std::wstring & styleName)
{
if (paragraphs_cout_++ > 0)
{
//if (in_list_ == false || in_comment == true)
//{
//// конец предыдущего абзаца и начало следующего
////text_ << L"&#10;";
// text_ << L"\n";
//}
//else/* (paragraph_style_name_ != styleName)*/
if (in_list_ == false || in_comment == true)
{
// конец предыдущего абзаца и начало следующего
//text_ << L"&#10;";
text_ << L"\n";
}
else/* (paragraph_style_name_ != styleName)*/
{
dump_paragraph();
}

View File

@ -221,9 +221,16 @@ void math_mmultiscripts::oox_convert(oox::math_context & Context)
{//1* elements
std::wostream & strm = Context.output_stream();
strm << L"<m:sPre>";
strm << L"<m:sPre>";
strm << L"<m:sub>";
for (size_t i = 0; i < pre_content_.size() / 2; i++)
{
office_math_element* math_element = dynamic_cast<office_math_element*>(pre_content_[i].get());
math_element->oox_convert(Context);
}
strm << L"</m:sub>";
strm << L"<m:sup>";
for (size_t i = 0; i < pre_content_.size(); i++)
for (size_t i = pre_content_.size() / 2; i < pre_content_.size(); i++)
{
office_math_element* math_element = dynamic_cast<office_math_element*>(pre_content_[i].get());
math_element->oox_convert(Context);

View File

@ -116,6 +116,7 @@ void math_mi::oox_convert(oox::math_context & Context)
CP_XML_NODE(L"m:t")
{
//CP_XML_ATTR(L"xml:space", L"preserve");
std::wstring new_text_ = text_.get() + L" ";
CP_XML_STREAM() << xml::utils::replace_text_to_xml( *text_ );
}
}

View File

@ -458,7 +458,7 @@ void text_format_properties_content::drawing_serialize(std::wostream & strm, std
if ((fo_letter_spacing_) && (fo_letter_spacing_->get_type() != letter_spacing::Normal))
{
CP_XML_ATTR(L"spc",(int)(20.0 * fo_letter_spacing_->get_length().get_value_unit(length::pt)));
CP_XML_ATTR(L"spc",(int)(100. * fo_letter_spacing_->get_length().get_value_unit(length::pt)));
}
if (style_text_position_)

View File

@ -135,17 +135,26 @@ void math_annotation::serialize(std::wostream & _Wostream)
{
CP_XML_NODE_SIMPLE_NONS()
{
CP_XML_ATTR_OPT(L"encoding", encoding_);
if (text_)
{
CP_XML_CONTENT(text_.get());
common_attlist_.serialize(CP_GET_XML_NODE());
}
for (size_t i = 0; i < content_.size(); i++)
{
if (!content_[i]) continue;
content_[i]->serialize(CP_XML_STREAM());
}
CP_XML_ATTR_OPT(L"math:text", text_);
CP_XML_ATTR_OPT(L"math:encoding", encoding_);
}
}
}
void math_annotation::add_text(const std::wstring& Text)
{
text_ = Text;
}
//----------------------------------------------------------------------------------------------------
const wchar_t * math_annotation_xml::ns = L"math";
const wchar_t * math_annotation_xml::name = L"annotation-xml";

View File

@ -38,8 +38,8 @@
#include <xml/simple_xml_writer.h>
#include "office_elements_create.h"
#include "mathvariant.h"
#include "../datatypes/common_attlists.h"
namespace cpdoccore {
@ -119,6 +119,8 @@ public:
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeMathAnnotation;
_CP_OPT(std::wstring) encoding_;
CPDOCCORE_DEFINE_VISITABLE();
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_
private:
@ -127,9 +129,12 @@ private:
virtual void serialize(std::wostream & _Wostream);
virtual void add_text(const std::wstring& Text);
odf_types::common_math_style_attlist common_attlist_;
office_element_ptr_array content_;
_CP_OPT(std::wstring) text_;
_CP_OPT(std::wstring) encoding_;
};
CP_REGISTER_OFFICE_ELEMENT2(math_annotation);

View File

@ -110,7 +110,7 @@ namespace odf_writer
static formulasconvert::oox2odf_converter formulas_converter_math;
odf_math_context::odf_math_context(odf_conversion_context *odf_context)
: impl_(new odf_math_context::Impl(odf_context)), lvl_of_me(0), counter(0)
: impl_(new odf_math_context::Impl(odf_context)), lvl_of_me(0), counter(0), annotation_flag(true), matrix_row_counter(0)
{
mo = { L'+', L'-', L'±', L'', L'', L'×', L'', L'÷', L'/', L'', L'', L'', L'', L'', L'', L'', L'¬', L'', L'', // un/bi operators
L'=', L'', L'<', L'', L'>', L'', L'', L'', L'', L'~', L'', L'', L'', L'', L'', L'|', L'', L'', L'', // relations
@ -123,10 +123,27 @@ namespace odf_writer
L'˙', L'¨', L'', L'̂', L'̌', L'́'//, L'̆', L'', L'', L'', L'', L'',
};
diakSymbols = { {L"̇", L"˙"}, {L"̈", L"¨"}, {L"", L""}, {L"̂", L"&#708;"}, {L"̌", L"ˇ"}, {L"́", L"´"}, {L"̀", L"&#715;"}, {L"̆", L"˘"}, {L"̃", L"~"}, {L"̅", L"¯"},
diak_symbols = { {L"̇", L"˙"}, {L"̈", L"¨"}, {L"", L""}, {L"̂", L"&#708;"}, {L"̌", L"ˇ"}, {L"́", L"´"}, {L"̀", L"&#715;"}, {L"̆", L"˘"}, {L"̃", L"~"}, {L"̅", L"¯"},
{L"̿", L""}, {L"", L""}, {L"", L""}, {L"", L""}, {L"", L""}, {L"", L""}, {L"", L""}, {L"̲", L"&#45;"}
//{L'', L''}, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }
};
annotation_diak_symbols = { {L"˙",L"dot"}, {L"¨",L"ddot"}, {L"",L"dddot"}, {L"&#708;", L"hat"}, {L"ˇ",L"check"}, {L"´",L"acute"}, {L"&#715;",L"grave"}, {L"˘",L"breve"},
{L"~",L"tilde"},{L"¯",L"overline"},{L"",L"vec"}, {L"",L"harpoon"}, {L"&#45;",L"unnderline"}/*, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""},{L"",L""},
{L"",L""}*/
};
annotation_operators = { {L"",L"int"}, {L"", L"iint "}, {L"", L"iiint "}, {L"", L"lint "}, {L"", L"llint "},
{L"", L"lllint "}, {L"", L"sum "}, {L"", L"prod "}, {L"", L"coprod "}
};
annotation_brackets_begin = { {L"(", L"("}, {L"[", L"["}, {L"{", L"lbrace"}, {L"", L"langle"}, {L"", L"langle"}, {L"", L"lfloor"}, {L"", L"lceil"}, {L"|", L"lline"}, {L"", L"ldline"},
{L"]", L"]"}, {L"", L"ldbracket"}
};
annotation_brackets_end = { {L")", L")"}, {L"]", L"]"}, {L"}", L"rbrace"}, {L"", L"rangle"}, {L"", L"rangle"},{L"", L"rfloor"}, {L"", L"rceil"}, {L"|", L"rline"}, {L"", L"rdline"},
{L"[", L"["}, {L"", L"rdbracket"}
};
//debug_stream.open(debug_fileName);
}

View File

@ -87,12 +87,19 @@ namespace cpdoccore {
void end_element();
std::vector<std::vector<std::wstring>> brackets;
std::wstring annotation;
int lvl_of_me;
int matrix_row_counter;
std::vector<int> end_counter;
int counter;
std::set<wchar_t> mo;
std::map<std::wstring, std::wstring> diakSymbols;
std::map<std::wstring, std::wstring> diak_symbols;
bool annotation_flag;
std::map<std::wstring, std::wstring> annotation_operators;
std::map<std::wstring, std::wstring> annotation_brackets_begin;
std::map<std::wstring, std::wstring> annotation_brackets_end;
std::map<std::wstring, std::wstring> annotation_diak_symbols;
//std::pair<std::set<std::string>, bool> annotation_from_to_operators;
void end_math();
std::wofstream debug_stream;

View File

@ -1937,7 +1937,7 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
odf_context()->drawing_context()->set_paragraph_properties(paragraph_properties);
}
if (oox_paragraph->RunElems.empty() && list_present) list_present = false; // ms не обозначает присутствие списка, libra - показывает значек
//if (oox_paragraph->RunElems.empty() && list_present) list_present = false; // ms не обозначает присутствие списка, libra - показывает значек
while ((int)odf_context()->text_context()->list_state_.levels.size() > list_level)
{

View File

@ -660,6 +660,8 @@ public:
std::vector<std::vector<std::wstring>>& brackets();
int& lvl_of_me();
std::vector<int>& end_counter();
std::wstring& annotation();
bool& annotation_flag();
void mrow();
void endOfMrow();
void resizeBrackets();
@ -674,7 +676,7 @@ public:
void convert(OOX::Logic::CBorderBox *oox_border_box);
void convert(OOX::Logic::CBorderBoxPr *oox_border_box_pr);
void convert(OOX::Logic::CBox *oox_box);
void convert(OOX::Logic::CBoxPr *oox_box_pr);
bool convert(OOX::Logic::CBoxPr *oox_box_pr);
void convert(OOX::Logic::CBrk *oox_brk);
void convert(OOX::Logic::CDelimiter *oox_del);
std::pair<std::wstring, std::wstring> convert(OOX::Logic::CDelimiterPr *oox_del_pr);
@ -707,7 +709,7 @@ public:
void convert(OOX::Logic::CMRun *oox_run);
void convert(OOX::Logic::CMText *oox_text);
void convert(OOX::Logic::CNary *oox_nary);
std::pair<bool, bool> convert(OOX::Logic::CNaryPr *oox_nary_pr);
std::vector<bool> convert(OOX::Logic::CNaryPr *oox_nary_pr);
void convert(OOX::Logic::CGrow *oox_grow);
void convert(OOX::Logic::COMathPara *oox_math_para);
void convert(OOX::Logic::COMathParaPr *oox_math_para_pr);
@ -735,7 +737,7 @@ public:
void convert(OOX::Logic::CSub *oox_sub, OOX::Logic::CElement *oox_elm);
void convert(OOX::Logic::CFName *oox_fname);
void convert(OOX::Logic::CLim *oox_lim);
void convert(OOX::Logic::CChr *oox_chr);
bool convert(OOX::Logic::CChr *oox_chr);
void convert(OOX::Logic::CSup *oox_csup);
void convert(OOX::Logic::CSub *oox_csub);
bool convert(OOX::Logic::CSubHide *oox_subHide);
@ -743,7 +745,7 @@ public:
std::wstring convert(OOX::Logic::CType *oox_type);
void convert(OOX::Logic::CDiff *oox_diff);
void convert(OOX::Logic::CArgSz *oox_arg_sz);
void convert(OOX::Logic::COpEmu *oox_op_emu);
bool convert(OOX::Logic::COpEmu *oox_op_emu);
bool convert(OOX::Logic::CPos *oox_pos);
void convert(OOX::Logic::CVertJc *oox_vert_jc);
void convert(OOX::Logic::CNoBreak *oox_no_break);

View File

@ -29,6 +29,59 @@ namespace Oox2Odf
return odf_context()->math_context()->end_counter;
}
std::wstring& OoxConverter::annotation()
{
return odf_context()->math_context()->annotation;
}
void annotaionReplaceAll(std::wstring& annotation, std::wstring substr1, std::wstring substr2)
{
size_t pos = annotation.find(substr1);
while (pos != std::wstring::npos)
{
annotation.replace(pos, substr1.size(), substr2);
pos = annotation.find(substr1, pos + substr2.size());
}
}
void annotationPostProd(std::wstring& annotation)
{
annotaionReplaceAll(annotation, L"=", L"\"=\"");
annotaionReplaceAll(annotation, L"{) }", L")");
annotaionReplaceAll(annotation, L"{( }", L"(");
annotaionReplaceAll(annotation, L"*", L"\"*\"");
annotaionReplaceAll(annotation, L"|", L"\"|\"");
// ∥
size_t pos = annotation.find(L"");
std::vector<size_t> positions;
//positions.push_back(pos);
while (pos != std::wstring::npos)
{
positions.push_back(pos);
pos = annotation.find(L"", pos + 1);
}
std::wstring str1 = L"ldline";
std::wstring str2 = L"rdline";
for (int i = positions.size() - 1; i >= 0; i--)
{
if (i % 2 == 0)
annotation.replace(positions[i], 1, str1);
else
annotation.replace(positions[i], 1, str2);
}
//if (annotation[0] == L'=')
// annotation = L"\"\"" + annotation;
//if ((annotation[annotation.size() - 1] == L'=') || (annotation[annotation.size() - 1] == L' ') && annotation[annotation.size() - 2] == L'=')
// annotation = annotation + L"\"\"";
}
bool& OoxConverter::annotation_flag()
{
return odf_context()->math_context()->annotation_flag;
}
void OoxConverter::mrow() // обертка для тега <mrow>
{
CREATE_MATH_TAG(L"mrow");
@ -58,7 +111,28 @@ namespace Oox2Odf
for (size_t i = 0; i < oox_math->m_arrItems.size(); ++i)
{
convert(oox_math->m_arrItems[i]);
}
}
if (annotation_flag())
{
CREATE_MATH_TAG(L"annotation");
typedef odf_writer::math_annotation* T;
T tmp = dynamic_cast<T>(elm.get());
if (tmp)
{
tmp->encoding_ = L"StarMath 5.0";
}
annotationPostProd(annotation());
elm->add_text(annotation());
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
}
else
annotation_flag() = true;
annotation().clear();
if (bStart) odf_context()->end_math();
}
@ -132,14 +206,22 @@ namespace Oox2Odf
OPEN_MATH_TAG(elm);
convert(oox_acc->m_oElement.GetPointer());
//convert(oox_acc->m_oAccPr.GetPointer());
std::wstring diakSymbol = (oox_acc->m_oAccPr->m_oChr.IsInit()) ? oox_acc->m_oAccPr->m_oChr.get().m_val->GetValue() : L"̂";
std::map<std::wstring, std::wstring>& map = odf_context()->math_context()->diakSymbols;
std::map<std::wstring, std::wstring>& map = odf_context()->math_context()->diak_symbols;
std::wstring symbol;
symbol = (map[diakSymbol]);
std::map<std::wstring, std::wstring>& annotation_map = odf_context()->math_context()->annotation_diak_symbols;
if (annotation_map.find(symbol) != annotation_map.end())
annotation() += annotation_map[symbol] + L" ";
else
annotation_flag() = false;
annotation() += L"{";
convert(oox_acc->m_oElement.GetPointer());
annotation() += L"}";
{
CREATE_MATH_TAG(L"mo");
/*typedef odf_writer::math_mo* T;
@ -154,6 +236,7 @@ namespace Oox2Odf
}
CLOSE_MATH_TAG;
}
void OoxConverter::convert(OOX::Logic::CAccPr *oox_acc_pr)
@ -189,13 +272,18 @@ namespace Oox2Odf
CREATE_MATH_TAG(tag.c_str());
OPEN_MATH_TAG(elm);
{
if(flag) annotation() += L"bar {";
else annotation() += L"underline { ";
convert(oox_bar->m_oElement.GetPointer());
CREATE_MATH_TAG(L"mo");
if (flag) elm->add_text(L"¯");
else elm->add_text(L"&#713;");
if (flag) elm->add_text(L"¯");
else elm->add_text(L"&#713;");
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += L"} ";
}
CLOSE_MATH_TAG;
@ -240,16 +328,19 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CBox *oox_box)
{
if (!oox_box) return;
convert(oox_box->m_oBoxPr.GetPointer());
convert(oox_box->m_oElement.GetPointer());
if (convert(oox_box->m_oBoxPr.GetPointer()))
{
annotation() += L"\"";
convert(oox_box->m_oElement.GetPointer());
annotation() += L"\"";
}
else
convert(oox_box->m_oElement.GetPointer());
}
void OoxConverter::convert(OOX::Logic::CBoxPr *oox_box_pr)
bool OoxConverter::convert(OOX::Logic::CBoxPr *oox_box_pr)
{
if (!oox_box_pr) return;
if (!oox_box_pr) return false;
convert(oox_box_pr->m_oAln.GetPointer());
@ -257,7 +348,7 @@ namespace Oox2Odf
convert(oox_box_pr->m_oCtrlPr.GetPointer());
convert(oox_box_pr->m_oDiff.GetPointer());
convert(oox_box_pr->m_oNoBreak.GetPointer());
convert(oox_box_pr->m_oOpEmu.GetPointer());
return convert(oox_box_pr->m_oOpEmu.GetPointer());
}
void OoxConverter::convert(OOX::Logic::CNoBreak *oox_no_break)
@ -265,9 +356,14 @@ namespace Oox2Odf
if (!oox_no_break) return;
}
void OoxConverter::convert(OOX::Logic::COpEmu *oox_op_emu)
bool OoxConverter::convert(OOX::Logic::COpEmu *oox_op_emu)
{
if (!oox_op_emu) return;
if (!oox_op_emu) return false;
if (oox_op_emu->m_val->ToBool())// == L"true") ||(oox_op_emu->m_val == L"1"))
return true;
else
return false;
}
void OoxConverter::convert(OOX::Logic::CDiff *oox_diff)
@ -283,7 +379,6 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CDelimiter *oox_del)
{
if (!oox_del) return;
std::pair<std::wstring, std::wstring> begEndChrs;
for (size_t i = 0; i < oox_del->m_arrItems.size(); ++i)
{
@ -303,9 +398,12 @@ namespace Oox2Odf
tmp->form_ = L"prefix";
tmp->stretchy_ = true;
}
OPEN_MATH_TAG(elm);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
if (begEndChrs.first == L"")
annotation() += L"left none "; //left none
else
annotation() += L"left " + odf_context()->math_context()->annotation_brackets_begin[begEndChrs.first] + L" ";
}
for (size_t i = 0; i < oox_del->m_arrItems.size(); ++i)
@ -326,11 +424,19 @@ namespace Oox2Odf
tmp->form_ = L"postfix";
tmp->stretchy_ = true;
}
OPEN_MATH_TAG(elm)
CLOSE_MATH_TAG
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
if (begEndChrs.second == L"")
annotation() += L"right none "; //right none
else
annotation() += L"right " + odf_context()->math_context()->annotation_brackets_end[begEndChrs.second] + L" ";
}
endOfMrow();
/*if (begEndChrs.first == begEndChrs.second ||
begEndChrs.first == L"]" && begEndChrs.second == L"[" ||
begEndChrs.first == L"⟦" && begEndChrs.second == L"⟧")
annotation_flag() = false;*/
}
std::pair<std::wstring, std::wstring> OoxConverter::convert(OOX::Logic::CDelimiterPr *oox_del_pr)
@ -354,6 +460,9 @@ namespace Oox2Odf
if (!oox_beg_chr) return L"(";
std::wstring s_val = oox_beg_chr->m_val->GetValue();
//brackets()[lvl_of_me()].push_back(s_val);
return s_val;
}
@ -362,6 +471,8 @@ namespace Oox2Odf
if (!oox_end_chr) return L")";
std::wstring s_val = oox_end_chr->m_val->GetValue();
//brackets()[lvl_of_me()].push_back(s_val);
return s_val;
}
@ -375,7 +486,8 @@ namespace Oox2Odf
CREATE_MATH_TAG(L"mtable");
OPEN_MATH_TAG(elm);
{
for (size_t i = 1; i < oox_eq_arr->m_arrItems.size() - 1; ++i)
annotation() += L" binom ";
for (size_t i = 1; i < oox_eq_arr->m_arrItems.size(); ++i)
{
CREATE_MATH_TAG(L"mtr");
@ -384,12 +496,16 @@ namespace Oox2Odf
CREATE_MATH_TAG(L"mtd");
OPEN_MATH_TAG(elm);
mrow();
annotation() += L"{";
convert(oox_eq_arr->m_arrItems[i]);
annotation() += L"} ";
endOfMrow();
CLOSE_MATH_TAG;
}
CLOSE_MATH_TAG;
}
}
/*for (size_t i = 1; i < oox_eq_arr->m_arrItems.size() - 1; ++i)
annotation() += L"} ";*/
}
CLOSE_MATH_TAG;
}
@ -441,9 +557,15 @@ namespace Oox2Odf
if (val == L"lin")
{
annotation() += L"{";
mrow();
convert(oox_fraction->m_oNum.GetPointer());
endOfMrow();
annotation() += L"} / {";
CREATE_MATH_TAG(L"mo");
OPEN_MATH_TAG(elm);
elm->add_text(L"/");
@ -451,6 +573,30 @@ namespace Oox2Odf
mrow();
convert(oox_fraction->m_oDen.GetPointer());
endOfMrow();
annotation() += L"}";
}
else if (val == L"skw")
{
CREATE_MATH_TAG(L"mfrac");
typedef odf_writer::math_mfrac* T;
T tmp = dynamic_cast<T>(elm.get());
if (tmp)
{
tmp->bevelled = true;
}
OPEN_MATH_TAG(elm);
annotation() += L"{";
mrow();
convert(oox_fraction->m_oNum.GetPointer());
endOfMrow();
annotation() += L"} wideslash {";
mrow();
convert(oox_fraction->m_oDen.GetPointer());
endOfMrow();
annotation() += L"}";
CLOSE_MATH_TAG;
}
else if (val == L"noBar")
{
@ -462,10 +608,12 @@ namespace Oox2Odf
{
CREATE_MATH_TAG(L"mtd");
OPEN_MATH_TAG(elm);
annotation() += L"binom{";
mrow();
convert(oox_fraction->m_oNum.GetPointer());
endOfMrow();
CLOSE_MATH_TAG;
annotation() += L"} {";
}
CLOSE_MATH_TAG;
}
@ -479,6 +627,7 @@ namespace Oox2Odf
convert(oox_fraction->m_oDen.GetPointer());
endOfMrow();
CLOSE_MATH_TAG;
annotation() += L"}";
}
CLOSE_MATH_TAG;
}
@ -486,29 +635,17 @@ namespace Oox2Odf
}
else
{
CREATE_MATH_TAG(L"mfrac");
typedef odf_writer::math_mfrac* T;
T tmp = dynamic_cast<T>(elm.get());
if (tmp)
{
if (val == L"skw")
{
tmp->bevelled = true;
}
}
CREATE_MATH_TAG(L"mfrac");
annotation() += L"{";
OPEN_MATH_TAG(elm);
mrow();
convert(oox_fraction->m_oNum.GetPointer());
endOfMrow();
annotation() += L"} over {";
mrow();
convert(oox_fraction->m_oDen.GetPointer());
endOfMrow();
annotation() += L"}";
CLOSE_MATH_TAG;
}
}
@ -639,20 +776,26 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CLimLow *oox_lim_low)
{
if (!oox_lim_low) return;
mrow();
CREATE_MATH_TAG(L"munder");
OPEN_MATH_TAG(elm);
annotation() += L"oper ";
mrow();
convert(oox_lim_low->m_oElement.GetPointer());
endOfMrow();
convert(oox_lim_low->m_oLimLowPr.GetPointer());
convert(oox_lim_low->m_oLim.GetPointer());
CLOSE_MATH_TAG
/*if (annotation().find(L"lim") == -1)
annotation_flag() = false;*/
convert(oox_lim_low->m_oLimLowPr.GetPointer());
annotation() += L"from {";
convert(oox_lim_low->m_oLim.GetPointer());
annotation() += L"} ";
CLOSE_MATH_TAG;
endOfMrow();
}
@ -660,13 +803,13 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CLim *oox_lim)
{
if (!oox_lim) return;
mrow();
for (size_t i = 0; i < oox_lim->m_arrItems.size(); ++i)
convert(oox_lim->m_arrItems[i]);
endOfMrow();
endOfMrow();
}
void OoxConverter::convert(OOX::Logic::CLimLowPr *oox_lim_low_pr)
@ -679,16 +822,24 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CLimUpp *oox_lim_upp)
{
if (!oox_lim_upp) return;
CREATE_MATH_TAG(L"mover");
OPEN_MATH_TAG(elm);
annotation() += L"oper ";
mrow();
convert(oox_lim_upp->m_oElement.GetPointer());
endOfMrow();
/*if (annotation().find(L"lim") == -1)
annotation_flag() = false;*/
convert(oox_lim_upp->m_oLimUppPr.GetPointer());
convert(oox_lim_upp->m_oLim.GetPointer());
annotation() += L"to {";
convert(oox_lim_upp->m_oLim.GetPointer());
annotation() += L"} ";
CLOSE_MATH_TAG
}
@ -709,16 +860,24 @@ namespace Oox2Odf
void OoxConverter::convert(OOX::Logic::CMatrix *oox_matrix)
{
if (!oox_matrix) return;
int& matrix_row_counter = odf_context()->math_context()->matrix_row_counter;
if (oox_matrix->m_arrItems[0]->getType() == OOX::EElementType::et_m_mPr)
matrix_row_counter = oox_matrix->m_arrItems.size() - 1;
else
matrix_row_counter = oox_matrix->m_arrItems.size();
CREATE_MATH_TAG(L"mtable");
OPEN_MATH_TAG(elm);
annotation() += L"matrix{";
for (size_t i = 0; i < oox_matrix->m_arrItems.size(); ++i)
{
convert(oox_matrix->m_arrItems[i]);
}
CLOSE_MATH_TAG;
odf_context()->math_context()->matrix_row_counter = 0;
annotation() += L"} ";
}
void OoxConverter::convert(OOX::Logic::CMc *oox_mc)
@ -806,6 +965,8 @@ namespace Oox2Odf
{
if (!oox_mr) return;
int& matrix_row_counter = odf_context()->math_context()->matrix_row_counter;
CREATE_MATH_TAG(L"mtr");
OPEN_MATH_TAG(elm);
@ -815,9 +976,14 @@ namespace Oox2Odf
OPEN_MATH_TAG(elm);
convert(oox_mr->m_arrItems[i]);
CLOSE_MATH_TAG;
if( i != oox_mr->m_arrItems.size() - 1)
annotation() += L"# ";
}
CLOSE_MATH_TAG;
matrix_row_counter--;
if(matrix_row_counter > 0)
annotation() += L"## ";
}
void OoxConverter::convert(OOX::Logic::CMRun *oox_mrun)
@ -914,6 +1080,7 @@ namespace Oox2Odf
elm->add_text(sub_s_val);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += sub_s_val;
sub_s_val.clear();
}
CREATE_MATH_TAG(L"mtext");
@ -922,6 +1089,7 @@ namespace Oox2Odf
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += std::wstring(1, s_val[i]) + L" ";
}
else if (w_val <= 57 && w_val >= 48)
@ -932,6 +1100,7 @@ namespace Oox2Odf
elm->add_text(sub_s_val);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += sub_s_val + L" ";
sub_s_val.clear();
}
@ -941,6 +1110,7 @@ namespace Oox2Odf
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += std::wstring(1, s_val[i]) + L" ";
}
else if (mo.find(w_val) != mo.end())
{
@ -950,6 +1120,7 @@ namespace Oox2Odf
elm->add_text(sub_s_val);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += sub_s_val + L" ";
sub_s_val.clear();
}
@ -959,6 +1130,7 @@ namespace Oox2Odf
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += std::wstring(1, s_val[i]) + L" ";
}
else // <mi>
{
@ -971,6 +1143,7 @@ namespace Oox2Odf
elm->add_text(sub_s_val);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
annotation() += sub_s_val + L" ";
}
}
}
@ -1025,21 +1198,38 @@ namespace Oox2Odf
flag_nary = true;
}
std::pair<bool,bool> flags;
std::vector<bool> flags;
flags = convert(oox_nary->m_oNaryPr.GetPointer());
if (!flags.first)
std::wstring str1, str2;
if (flags[2])
{
str1 = L" from {";
str2 = L" to {";
}
else
{
str1 = L" csub {";
str2 = L" csup {";
}
if (!flags[0])
{
annotation() += str1;
//mrow();
convert(oox_nary->m_oSub.GetPointer());
//endOfMrow();
//endOfMrow();
annotation() += L"}";
}
if (!flags.second)
{
if (!flags[1])
{
annotation() += str2;
//mrow();
convert(oox_nary->m_oSup.GetPointer());
//endOfMrow();
//endOfMrow();
annotation() += L"} ";
}
@ -1052,21 +1242,22 @@ namespace Oox2Odf
{
CLOSE_MATH_TAG;
}
annotation() += L" {";
convert(oox_nary->m_oElement.GetPointer());
annotation() += L"} ";
endOfMrow();
}
std::pair<bool, bool> OoxConverter::convert(OOX::Logic::CNaryPr *oox_nary_pr)
std::vector<bool> OoxConverter::convert(OOX::Logic::CNaryPr *oox_nary_pr)
{
std::pair<bool, bool> result = { false, false};
std::vector<bool> result = { false, false, false};
if (!oox_nary_pr) return result;
convert(oox_nary_pr->m_oCtrlPr.GetPointer());
convert(oox_nary_pr->m_oChr.GetPointer());
result[2] = convert(oox_nary_pr->m_oChr.GetPointer());
convert(oox_nary_pr->m_oGrow.GetPointer());
result.first = convert(oox_nary_pr->m_oSubHide.GetPointer());
result.second = convert(oox_nary_pr->m_oSupHide.GetPointer());
result[0] = convert(oox_nary_pr->m_oSubHide.GetPointer());
result[1] = convert(oox_nary_pr->m_oSupHide.GetPointer());
return result;
}
@ -1091,8 +1282,9 @@ namespace Oox2Odf
return result;
}
void OoxConverter::convert(OOX::Logic::CChr * oox_chr)
{
bool OoxConverter::convert(OOX::Logic::CChr * oox_chr)
{
bool flag = false;
//if (!oox_chr) return;
CREATE_MATH_TAG(L"mo");
typedef odf_writer::math_mo* T;
@ -1103,19 +1295,28 @@ namespace Oox2Odf
tmp->stretchy_ = false;
}
if (!oox_chr)
elm->add_text(L"");
if (!oox_chr)
{
annotation() += L"int ";
elm->add_text(L"");
}
else
{
/*std::wstring ws = L"&#";
std::wstringstream ss;
ss << (oox_chr->m_val->GetValue()[0] & 0xFFFF);
ws += ss.str();
elm->add_text(ws);*/
elm->add_text(oox_chr->m_val->GetValue());
std::wstring val = oox_chr->m_val->GetValue();
std::map<std::wstring, std::wstring>& map = odf_context()->math_context()->annotation_operators;
if (map.count(val))
{
flag = true;
annotation() += map[val];
}
else
//annotation_flag() = false;
annotation() += (val + L" ");
elm->add_text(val);
}
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
return flag;
}
void OoxConverter::convert(OOX::Logic::CPhant *oox_phant)
@ -1176,9 +1377,11 @@ namespace Oox2Odf
{
CREATE_MATH_TAG(L"msqrt");
OPEN_MATH_TAG(elm);
annotation() += L"sqrt {";
mrow();
convert(oox_rad->m_oElement.GetPointer());
endOfMrow();
annotation() += L"}";
CLOSE_MATH_TAG;
}
else
@ -1212,20 +1415,28 @@ namespace Oox2Odf
{
if (!oox_deg) return;
if (oox_deg->m_arrItems.size() == 0) return;
CREATE_MATH_TAG(L"mroot")
OPEN_MATH_TAG(elm)
CREATE_MATH_TAG(L"mroot");
OPEN_MATH_TAG(elm);
size_t iterator = annotation().size();
convert(oox_elm);
mrow();
size_t rootSize = annotation().size() - iterator;
std::wstring root(&annotation()[iterator], rootSize);
mrow();
for (size_t i = 0; i < oox_deg->m_arrItems.size(); ++i)
convert(oox_deg->m_arrItems[i]);
endOfMrow();
size_t degreeSize = annotation().size() - rootSize - iterator;
std::wstring degree(&annotation()[iterator + rootSize], degreeSize);
annotation().erase(iterator);
annotation() += L"nroot {" + degree + L"} {" + root + L"}";
CLOSE_MATH_TAG
}
@ -1235,16 +1446,34 @@ namespace Oox2Odf
convert(oox_s_pre->m_oSPrePr.GetPointer());
CREATE_MATH_TAG(L"mmultiscripts")
OPEN_MATH_TAG(elm)
CREATE_MATH_TAG(L"mmultiscripts");
OPEN_MATH_TAG(elm);
annotation() += L"{";
mrow();
convert(oox_s_pre->m_oElement.GetPointer());
endOfMrow();
annotation() += L"} lsub {";
convert(oox_s_pre->m_oElement.GetPointer());
{
CREATE_MATH_TAG(L"mprescripts")
OPEN_MATH_TAG(elm)
CLOSE_MATH_TAG
convert(oox_s_pre->m_oSub.GetPointer());
convert(oox_s_pre->m_oSup.GetPointer());
CREATE_MATH_TAG(L"mprescripts");
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
mrow();
convert(oox_s_pre->m_oSub.GetPointer());
endOfMrow();
annotation() += L"} lsup {";
mrow();
convert(oox_s_pre->m_oSup.GetPointer());
endOfMrow();
annotation() += L"}";
}
CLOSE_MATH_TAG
@ -1265,10 +1494,14 @@ namespace Oox2Odf
CREATE_MATH_TAG(L"msup");
OPEN_MATH_TAG(elm);
annotation() += L"{";
mrow();
convert(oox_elm);
endOfMrow();
annotation() += L"}^{";
mrow();
for (size_t i = 0; i < oox_sup->m_arrItems.size(); ++i)
{
@ -1276,6 +1509,7 @@ namespace Oox2Odf
}
endOfMrow();
annotation() += L"}";
CLOSE_MATH_TAG
}
@ -1283,17 +1517,23 @@ namespace Oox2Odf
{
if (!oox_sub) return;
CREATE_MATH_TAG(L"msub")
OPEN_MATH_TAG(elm)
CREATE_MATH_TAG(L"msub");
OPEN_MATH_TAG(elm);
annotation() += L"{";
mrow();
convert(oox_elm);
endOfMrow();
annotation() += L"}_{";
for (size_t i = 0; i < oox_sub->m_arrItems.size(); ++i)
{
convert(oox_sub->m_arrItems[i]);
}
annotation() += L"}";
CLOSE_MATH_TAG
}
@ -1339,13 +1579,28 @@ namespace Oox2Odf
convert(oox_ssub_sup->m_oSSubSupPr.GetPointer());
CREATE_MATH_TAG(L"msubsup")
OPEN_MATH_TAG(elm)
CREATE_MATH_TAG(L"msubsup");
OPEN_MATH_TAG(elm);
convert(oox_ssub_sup->m_oElement.GetPointer());
convert(oox_ssub_sup->m_oSub.GetPointer());
convert(oox_ssub_sup->m_oSup.GetPointer());
annotation() += L"{";
mrow();
convert(oox_ssub_sup->m_oElement.GetPointer());
endOfMrow();
annotation() += L"}_{";
mrow();
convert(oox_ssub_sup->m_oSub.GetPointer());
endOfMrow();
annotation() += L"}^{";
mrow();
convert(oox_ssub_sup->m_oSup.GetPointer());
endOfMrow();
annotation() += L"}";
CLOSE_MATH_TAG
}
@ -1384,6 +1639,9 @@ namespace Oox2Odf
{
if (!oox_elm) return;
if (oox_elm->m_arrItems.empty())
annotation() += L"\"\"";
resizeBrackets();
if (!brackets()[lvl_of_me()].empty())

View File

@ -17,6 +17,8 @@ void BulletsConverter::FillPPr(PPTX::Logic::TextParagraphPr &oPPr, CParagraph &p
void BulletsConverter::ConvertPFRun(PPTX::Logic::TextParagraphPr &oPPr, CTextPFRun *pPF)
{
const int oneTabSize = 457200;
const int tabLvl = oPPr.lvl.get_value_or(0);
int leftMargin = 0;
if (pPF->leftMargin.is_init())
{
@ -25,7 +27,7 @@ void BulletsConverter::ConvertPFRun(PPTX::Logic::TextParagraphPr &oPPr, CTextPFR
}
if (pPF->indent.is_init())
{
if (pPF->hasBullet.get_value_or(false) && pPF->indent.get() != -leftMargin)
if (pPF->hasBullet.get_value_or(false) && tabLvl == -1)
{
oPPr.indent = pPF->indent.get() - leftMargin;
}
@ -35,7 +37,6 @@ void BulletsConverter::ConvertPFRun(PPTX::Logic::TextParagraphPr &oPPr, CTextPFR
}
} else if (pPF->hasBullet.get_value_or(false))
{
const int tabLvl = oPPr.lvl.get_value_or(0);
if (tabLvl != -1)
oPPr.indent = oneTabSize*tabLvl - leftMargin;
else
@ -154,82 +155,81 @@ void BulletsConverter::FillBuChar(PPTX::Logic::Bullet &oBullet, WCHAR symbol, CT
void BulletsConverter::ConvertAllBullets(PPTX::Logic::TextParagraphPr &oPPr, CTextPFRun *pPF)
{
if (pPF->hasBullet.is_init())
if (pPF->hasBullet.is_init() == false)
return;
if (pPF->hasBullet.get() == false)
{
if (pPF->hasBullet.get())
oPPr.buTypeface.m_Typeface.reset(new PPTX::Logic::BuNone);
return;
}
if (pPF->bulletColor.is_init())
{
FillBuClr(oPPr.buColor, pPF->bulletColor.get());
}
if (pPF->bulletSize.is_init())
{
PPTX::WrapperWritingElement* pBuSize(nullptr);
if (pPF->bulletSize.get() > 24 && pPF->bulletSize.get() < 401)
{
if (pPF->bulletColor.is_init())
{
FillBuClr(oPPr.buColor, pPF->bulletColor.get());
}
if (pPF->bulletSize.is_init())
{
PPTX::WrapperWritingElement* pBuSize(nullptr);
if (pPF->bulletSize.get() > 24 && pPF->bulletSize.get() < 401)
{
pBuSize = new PPTX::Logic::BuSzPct;
static_cast<PPTX::Logic::BuSzPct*>(pBuSize)->val = pPF->bulletSize.get() * 1000 ;
}
if (pPF->bulletSize.get() < 0 && pPF->bulletSize.get() > -4001)
{
pBuSize = new PPTX::Logic::BuSzPts;
static_cast<PPTX::Logic::BuSzPts*>(pBuSize)->val = - (pPF->bulletSize.get());
}
if (pBuSize != nullptr)
oPPr.buSize.m_Size = pBuSize;
}
if (pPF->bulletFontProperties.is_init())
{
auto pBuFont = new PPTX::Logic::TextFont;
pBuFont->m_name = L"a:buFont";
pBuFont->typeface = pPF->bulletFontProperties->Name;
if ( pPF->bulletFontProperties->PitchFamily > 0)
pBuFont->pitchFamily = std::to_wstring(pPF->bulletFontProperties->PitchFamily);
if ( pPF->bulletFontProperties->Charset > 0)
pBuFont->charset = std::to_wstring(pPF->bulletFontProperties->Charset);
oPPr.buTypeface.m_Typeface.reset(pBuFont);
}
// Bullets (numbering, else picture, else char, else default)
if (pPF->bulletBlip.is_init() && pPF->bulletBlip->tmpImagePath.size() && m_pRels != nullptr)
{
auto strRID = m_pRels->WriteImage(pPF->bulletBlip->tmpImagePath);
if (strRID.empty())
FillBuChar(oPPr.ParagraphBullet, L'\x2022'); // error rId
else
{
auto pBuBlip = new PPTX::Logic::BuBlip;
pBuBlip->blip.embed = new OOX::RId(strRID);
oPPr.ParagraphBullet.m_Bullet.reset(pBuBlip);
}
}
else if (pPF->bulletAutoNum.is_init())
{
auto pBuAutoNum = new PPTX::Logic::BuAutoNum;
oPPr.ParagraphBullet.m_Bullet.reset(pBuAutoNum);
if (pPF->bulletAutoNum->startAt.is_init() && pPF->bulletAutoNum->startAt.get() != 1)
pBuAutoNum->startAt = pPF->bulletAutoNum->startAt.get();
if (pPF->bulletAutoNum->type.is_init())
pBuAutoNum->type = pPF->bulletAutoNum->type.get();
}
else if (pPF->bulletChar.is_init())
{
FillBuChar(oPPr.ParagraphBullet, pPF->bulletChar.get(), pPF);
}
else
{
FillBuChar(oPPr.ParagraphBullet, L'\x2022');
}
pBuSize = new PPTX::Logic::BuSzPct;
static_cast<PPTX::Logic::BuSzPct*>(pBuSize)->val = pPF->bulletSize.get() * 1000 ;
}
if (pPF->bulletSize.get() < 0 && pPF->bulletSize.get() > -4001)
{
pBuSize = new PPTX::Logic::BuSzPts;
static_cast<PPTX::Logic::BuSzPts*>(pBuSize)->val = - (pPF->bulletSize.get());
}
if (pBuSize != nullptr)
oPPr.buSize.m_Size = pBuSize;
}
if (pPF->bulletFontProperties.is_init())
{
auto pBuFont = new PPTX::Logic::TextFont;
pBuFont->m_name = L"a:buFont";
pBuFont->typeface = pPF->bulletFontProperties->Name;
if ( pPF->bulletFontProperties->PitchFamily > 0)
pBuFont->pitchFamily = std::to_wstring(pPF->bulletFontProperties->PitchFamily);
if ( pPF->bulletFontProperties->Charset > 0)
pBuFont->charset = std::to_wstring(pPF->bulletFontProperties->Charset);
oPPr.buTypeface.m_Typeface.reset(pBuFont);
}
// Bullets (numbering, else picture, else char, else default)
if (pPF->bulletBlip.is_init() && pPF->bulletBlip->tmpImagePath.size() && m_pRels != nullptr)
{
auto strRID = m_pRels->WriteImage(pPF->bulletBlip->tmpImagePath);
if (strRID.empty())
FillBuChar(oPPr.ParagraphBullet, L'\x2022'); // error rId
else
{
oPPr.buTypeface.m_Typeface.reset(new PPTX::Logic::BuNone);
auto pBuBlip = new PPTX::Logic::BuBlip;
pBuBlip->blip.embed = new OOX::RId(strRID);
oPPr.ParagraphBullet.m_Bullet.reset(pBuBlip);
}
}
else if (pPF->bulletAutoNum.is_init())
{
auto pBuAutoNum = new PPTX::Logic::BuAutoNum;
oPPr.ParagraphBullet.m_Bullet.reset(pBuAutoNum);
if (pPF->bulletAutoNum->startAt.is_init() && pPF->bulletAutoNum->startAt.get() != 1)
pBuAutoNum->startAt = pPF->bulletAutoNum->startAt.get();
if (pPF->bulletAutoNum->type.is_init())
pBuAutoNum->type = pPF->bulletAutoNum->type.get();
}
else if (pPF->bulletChar.is_init())
{
FillBuChar(oPPr.ParagraphBullet, pPF->bulletChar.get(), pPF);
}
else
{
FillBuChar(oPPr.ParagraphBullet, L'\x2022');
}
}
void BulletsConverter::FillBuClr(PPTX::Logic::BulletColor &oBuClr, CColor &oColor)
{
auto pBuClr = new PPTX::Logic::BuClr;

View File

@ -598,6 +598,8 @@ void CPPTUserInfo::FromDocument()
pSlide->m_dEndTime = DurationSlide;
pSlide->m_dDuration = DurationSlide;
pSlide->m_lSlideID = pPair->first;
LoadSlide ( pPair->first, pSlide);
}
@ -1094,7 +1096,8 @@ void CPPTUserInfo::LoadGroupShapeContainer(CRecordGroupShapeContainer* pGroupCon
CElementPtr pElement = pShapeGroup->GetElement(m_current_level > 1, &m_oExMedia, pTheme, pLayout, pThemeWrapper, pSlideWrapper, pSlide);
CShapeElement* pShape = dynamic_cast<CShapeElement*>(pElement.get());
LoadBulletBlip(pShape);
// LoadBulletBlip(pShape);
LoadAutoNumBullet(pShape, pSlide ? pSlide->m_lSlideID : -1);
if (NULL != pElement)
{
pElement->m_pParentElements = pParentElements;
@ -2611,25 +2614,95 @@ void CPPTUserInfo::LoadBulletBlip(CShapeElement *pShape)
return;
auto& arrPars = pShape->m_pShape->m_oText.m_arParagraphs;
// TODO need to find BlipEntity;
IRecord* pRecPPT9 = arrDocInfoCont[0]->getDocBinaryTagExtension(___PPT9);
auto* pProgBinaryTag = dynamic_cast<CRecordPP9DocBinaryTagExtension*>(pRecPPT9);
if (pProgBinaryTag == nullptr || !pProgBinaryTag->m_blipCollectionContainer.is_init())
return;
const auto& arrBlipEntity = pProgBinaryTag->m_blipCollectionContainer.get().m_rgBlipEntityAtom;
// const auto& arrAutoNum = pProgBinaryTag->m_outlineTextPropsContainer.get()
if(arrBlipEntity.empty())
return;
for (auto& par : arrPars)
{
if (par.m_oPFRun.bulletBlip.IsInit())
{
auto& buBlip = par.m_oPFRun.bulletBlip.get();
if (buBlip.bulletBlipRef >= 0 && (UINT)buBlip.bulletBlipRef < arrBlipEntity.size())
{
buBlip.tmpImagePath = arrBlipEntity[buBlip.bulletBlipRef]->getTmpImgPath();
}
}
}
}
void CPPTUserInfo::LoadAutoNumBullet(CShapeElement *pShape, int slideID)
{
if (pShape == nullptr || pShape->m_pShape == nullptr) return;
std::vector<CRecordDocInfoListContainer*> arrDocInfoCont;
m_oDocument.GetRecordsByType(&arrDocInfoCont, false, true);
if (arrDocInfoCont.empty())
return;
auto& arrPars = pShape->m_pShape->m_oText.m_arParagraphs;
// TODO need to find BlipEntity;
IRecord* pRecPPT9 = arrDocInfoCont[0]->getDocBinaryTagExtension(___PPT9);
auto* pProgBinaryTag = dynamic_cast<CRecordPP9DocBinaryTagExtension*>(pRecPPT9);
if (pProgBinaryTag == nullptr || !pProgBinaryTag->m_blipCollectionContainer.is_init())
if (pProgBinaryTag == nullptr)
return;
const auto& arrBlipEntity = pProgBinaryTag->m_blipCollectionContainer.get().m_rgBlipEntityAtom;
if(arrBlipEntity.empty())
const auto& optOutlineCont = pProgBinaryTag->m_outlineTextPropsContainer;
if (optOutlineCont.IsInit() == false)
return;
const auto& vecOutline9Entry = optOutlineCont->m_rgOutlineTextProps9Entry;
std::vector<SStyleTextProp9>* arrStyleTextProp9 = nullptr;
for (const auto& entry : vecOutline9Entry)
if ((int)entry->m_slideIdRef == slideID)
{
arrStyleTextProp9 = &(entry->m_styleTextProp9Atom.m_rgStyleTextProp9);
break;
}
if (!arrStyleTextProp9)
return;
WORD pp9rt = 0;
for (auto& par : arrPars)
{
if (par.m_oPFRun.bulletBlip.IsInit())
if (par.m_arSpans.empty())
continue;
if (par.m_arSpans[0].m_oRun.pp9rt.is_init())
pp9rt = par.m_arSpans[0].m_oRun.pp9rt.get();
if (pp9rt >= arrStyleTextProp9->size())
continue;
auto& prop9 = (*arrStyleTextProp9)[pp9rt];
if (prop9.m_pf9.m_optBulletAutoNumberScheme.is_init() &&
prop9.m_pf9.m_optfBulletHasAutoNumber.get_value_or(false))
{
auto& buBlip = par.m_oPFRun.bulletBlip.get();
if (buBlip.bulletBlipRef >= 0 && (UINT)buBlip.bulletBlipRef < arrBlipEntity.size())
{
buBlip.tmpImagePath = arrBlipEntity[buBlip.bulletBlipRef]->getTmpImgPath();
}
auto* pBuAutoNum = new CBulletAutoNum;
pBuAutoNum->type = prop9.m_pf9.m_optBulletAutoNumberScheme->SchemeToStr();
pBuAutoNum->startAt = prop9.m_pf9.m_optBulletAutoNumberScheme->m_nStartNum;
par.m_oPFRun.bulletAutoNum.reset(pBuAutoNum);
}
if (prop9.m_pf9.m_optBulletBlipRef.is_init())
{
auto* pBuBlip = new CBulletBlip;
if (prop9.m_pf9.m_optBulletBlipRef.IsInit())
pBuBlip->bulletBlipRef = prop9.m_pf9.m_optBulletBlipRef.get();
else
pBuBlip->bulletBlipRef = -1;
par.m_oPFRun.bulletBlip.reset(pBuBlip);
}
}
}

View File

@ -159,6 +159,7 @@ public:
void LoadAutoNumbering(CRecordGroupShapeContainer* pGroupContainer, PPT_FORMAT::CTheme* pTheme);
void LoadBulletBlip(CShapeElement* pShape);
void LoadAutoNumBullet(CShapeElement* pShape, int slideID);
void CreateDefaultStyle(PPT_FORMAT::CTextStyles& pStyle, PPT_FORMAT::CTheme* pTheme);
void CorrectColorScheme(std::vector<CColor>& oScheme)
{

View File

@ -2097,9 +2097,9 @@ namespace NSBinPptxRW
}
LONG CBinaryFileReader::GetPos()
{
{
return m_lPos;
}
}
LONG CBinaryFileReader::GetSize()
{

View File

@ -226,6 +226,12 @@ namespace PPTX
unsigned int nXlsbWriterEndPos = oXlsbWriter.GetPositionAbsolute();
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
{
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareSi();
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareTableFormula();
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->ReadSheetData();
}
xlsxBinaryWriter.WriteMainTableStart(*oDrawingConverter.m_pBinaryWriter);
if (nXlsbWriterEndPos > nXlsbWriterStartPos)

View File

@ -472,13 +472,19 @@ namespace PPTX
pXlsxEmbedded->Read(oox_unpacked);
pXlsxEmbedded->PrepareWorkbook();
unsigned int nXlsbWriterEndPos = oXlsbWriter.GetPositionAbsolute();
unsigned int nXlsbWriterEndPos = oXlsbWriter.GetPositionAbsolute() ;
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
{
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareSi();
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareTableFormula();
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->ReadSheetData();
}
//startheader for test
//oDrawingConverter.m_pBinaryWriter->WriteStringUtf8(xlsxBinaryWriter.WriteFileHeader(0, BinXlsxRW::g_nFormatVersionNoBase64));
xlsxBinaryWriter.WriteMainTableStart(*oDrawingConverter.m_pBinaryWriter);
if (nXlsbWriterEndPos > nXlsbWriterStartPos)
if (nXlsbWriterEndPos > nXlsbWriterStartPos)
{
xlsxBinaryWriter.WriteBinaryTable(oXlsbWriter.GetBuffer() + nXlsbWriterStartPos, nXlsbWriterEndPos - nXlsbWriterStartPos);
}

View File

@ -0,0 +1,778 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "Records.h"
#include <boost/make_shared.hpp>
#include <map>
#include <locale>
#include "../../../UnicodeConverter/UnicodeConverter.h"
namespace VBA
{
const std::string int2str(const int val, const int radix)
{
static char num_buf[10] = {};
#if defined(_WIN32) || defined(_WIN64)
_itoa_s(val, num_buf, 9, radix);
#else
sprintf(num_buf, "%d", val);
#endif
return num_buf;
}
const std::wstring int2wstr(const int val, const int radix)
{
#if defined(_WIN32) || defined(_WIN64)
static wchar_t num_buf[20] = {};
_itow_s(val, num_buf, 19, radix);
return std::wstring(num_buf);
#else
static char num_buf[20] = {};
sprintf(num_buf, "%d", val);
std::string a_str(num_buf);
return std::wstring(a_str.begin(), a_str.end());
#endif
}
const std::wstring int2hex_wstr(const int val, const size_t size_of)
{
if (size_of > 4) return L"";
#if defined(_WIN32) || defined(_WIN64)
static wchar_t num_buf[10] = {};
std::wstring wstr = int2wstr(size_of << 1, 10);
swprintf_s(num_buf, 9, (L"%0" + wstr + L"X").c_str(), val);
return std::wstring(num_buf);
#else
char num_buf[10] = {};
std::string str = int2str(size_of << 1, 10);
snprintf(num_buf, 9, ("%0" + str + "X").c_str(), val);
std::string res(num_buf);
return std::wstring(res.begin(), res.end());
#endif
}
const std::wstring guid2bstr(const _GUID_ guid)
{
std::wstring guid_ret = L"{";
guid_ret += int2hex_wstr(guid.Data1, 4) + L"-" +
int2hex_wstr(guid.Data2, 2) + L"-" +
int2hex_wstr(guid.Data3, 2) + L"-" +
int2hex_wstr(guid.Data4[0], 1) + int2hex_wstr(guid.Data4[1], 1) + L"-" +
int2hex_wstr(guid.Data4[2], 1) + int2hex_wstr(guid.Data4[3], 1) +
int2hex_wstr(guid.Data4[4], 1) + int2hex_wstr(guid.Data4[5], 1) +
int2hex_wstr(guid.Data4[6], 1) + int2hex_wstr(guid.Data4[7], 1);
return guid_ret + L"}";
}
const std::wstring convert_string_icu(const char* buffer, const unsigned int& size, _UINT32 nCodePage)
{
if (!buffer || size < 1) return L"";
std::string sCodePage;
std::map<int, std::string>::const_iterator pFind = NSUnicodeConverter::mapEncodingsICU.find(nCodePage);
if (pFind != NSUnicodeConverter::mapEncodingsICU.end())
{
sCodePage = pFind->second;
}
if (!sCodePage.empty())
{
NSUnicodeConverter::CUnicodeConverter oConverter;
return oConverter.toUnicode(buffer, size, sCodePage.c_str(), true);
}
else if (nCodePage != 0)
{
NSUnicodeConverter::CUnicodeConverter oConverter;
return oConverter.toUnicode(buffer, size, nCodePage, true);
}
else
{//текущая локаль
std::locale loc("");
std::ctype<wchar_t> const &facet = std::use_facet<std::ctype<wchar_t> >(loc);
std::wstring result;
result.resize(size);
facet.widen(buffer, buffer + size, &result[0]);
return result;
}
}
//------------------------------------------------------------------------------------------
AnsiString::AnsiString(CVbaFileStreamPtr stream) { load(stream); }
BaseRecordPtr AnsiString::clone()
{
return BaseRecordPtr(new AnsiString(*this));
}
void AnsiString::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf;
if (sizeOf > 0)
{
char *buf = new char[sizeOf];
if (buf)
{
stream->read(buf, sizeOf);
value = convert_string_icu(buf, sizeOf, stream->CodePage);
}
}
}
//------------------------------------------------------------------------------------------
Utf16String::Utf16String(CVbaFileStreamPtr stream) { load(stream); }
BaseRecordPtr Utf16String::clone()
{
return BaseRecordPtr(new Utf16String(*this));
}
void Utf16String::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf;
if (sizeOf > 0)
{
UTF16 *buf = new UTF16[sizeOf / 2];
if (buf)
{
stream->read(buf, sizeOf);
if (sizeof(wchar_t) == 2)
{
value = std::wstring((wchar_t*)buf, sizeOf / 2);
}
else
{
value = convertUtf16ToWString(buf, sizeOf / 2);
}
}
}
}
//------------------------------------------------------------------------------------------
BaseRecordPtr MODULENAME::clone()
{
return BaseRecordPtr(new MODULENAME(*this));
}
void MODULENAME::load(CVbaFileStreamPtr stream)
{
ModuleName.load(stream);
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULENAMEUNICODE::clone()
{
return BaseRecordPtr(new MODULENAMEUNICODE(*this));
}
void MODULENAMEUNICODE::load(CVbaFileStreamPtr stream)
{
ModuleNameUnicode.load(stream);
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULESTREAMNAME::clone()
{
return BaseRecordPtr(new MODULESTREAMNAME(*this));
}
void MODULESTREAMNAME::load(CVbaFileStreamPtr stream)
{
_UINT16 Reserved;
StreamName.load(stream);
*stream >> Reserved;
StreamNameUnicode.load(stream);
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULEDOCSTRING::clone()
{
return BaseRecordPtr(new MODULEDOCSTRING(*this));
}
void MODULEDOCSTRING::load(CVbaFileStreamPtr stream)
{
_UINT16 Reserved;
DocString.load(stream);
*stream >> Reserved;
DocStringUnicode.load(stream);
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULEOFFSET::clone()
{
return BaseRecordPtr(new MODULEOFFSET(*this));
}
void MODULEOFFSET::load(CVbaFileStreamPtr stream)
{
_UINT32 SizeOf;
*stream >> SizeOf;
*stream >> TextOffset;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULEHELPCONTEXT::clone()
{
return BaseRecordPtr(new MODULEHELPCONTEXT(*this));
}
void MODULEHELPCONTEXT::load(CVbaFileStreamPtr stream)
{
_UINT32 SizeOf;
*stream >> SizeOf;
*stream >> HelpContext;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULECOOKIE::clone()
{
return BaseRecordPtr(new MODULECOOKIE(*this));
}
void MODULECOOKIE::load(CVbaFileStreamPtr stream)
{
_UINT32 SizeOf;
_UINT16 Cookie;
*stream >> SizeOf >> Cookie;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULETYPE::clone()
{
return BaseRecordPtr(new MODULETYPE(*this));
}
void MODULETYPE::load(CVbaFileStreamPtr stream)
{
_UINT32 Reserved;
*stream >> Reserved;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULEREADONLY::clone()
{
return BaseRecordPtr(new MODULEREADONLY(*this));
}
void MODULEREADONLY::load(CVbaFileStreamPtr stream)
{
_UINT32 Reserved;
*stream >> Reserved;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULEPRIVATE::clone()
{
return BaseRecordPtr(new MODULEPRIVATE(*this));
}
void MODULEPRIVATE::load(CVbaFileStreamPtr stream)
{
_UINT32 Reserved;
*stream >> Reserved;
}
//--------------------------------------------------------------------------------
BaseRecordPtr MODULE::clone()
{
return BaseRecordPtr(new MODULE(*this));
}
void MODULE::load(CVbaFileStreamPtr stream)
{
bool bEof = false;
while (!bEof && stream->checkFitRead(6))
{
_UINT16 Id;
*stream >> Id;
switch (Id)
{
case rt_MODULENAME: NameRecord = boost::make_shared<MODULENAME>(stream); break;
case rt_MODULENAMEUNICODE: NameUnicodeRecord = boost::make_shared<MODULENAMEUNICODE>(stream); break;
case rt_MODULESTREAMNAME: StreamNameRecord = boost::make_shared<MODULESTREAMNAME>(stream); break;
case rt_MODULEDOCSTRING: DocStringRecord = boost::make_shared<MODULEDOCSTRING>(stream); break;
case rt_MODULEOFFSET: OffsetRecord = boost::make_shared<MODULEOFFSET>(stream); break;
case rt_MODULEHELPCONTEXT: HelpContextRecord = boost::make_shared<MODULEHELPCONTEXT>(stream); break;
case rt_MODULECOOKIE: { MODULECOOKIE Cookie(stream); } break;
case rt_MODULEREADONLY: { bReadOnly = true; MODULEREADONLY ReadOnly(stream); } break;
case rt_MODULEPRIVATE: { bPrivate = true; MODULEPRIVATE Private(stream); } break;
case rt_MODULETYPE_Procedural:
bProceduralModule = true;
case rt_MODULETYPE_Class: { MODULETYPE type(stream); } break;
case rt_Terminator:
{
bEof = true;
_UINT32 Reserved;
*stream >> Reserved;
}break;
default:
_UINT32 SizeOf;
*stream >> SizeOf;
stream->skipBytes(SizeOf);
break;
}
}
}
//-------------------------------------------------------------------------------------------------------
PROJECTSYSKIND::PROJECTSYSKIND(CVbaFileStreamPtr stream) { load(stream); }
BaseRecordPtr PROJECTSYSKIND::clone()
{
return BaseRecordPtr(new PROJECTSYSKIND(*this));
}
void PROJECTSYSKIND::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> SysKind;
}
//-------------------------------------------------------------------------------
PROJECTCOMPATVERSION::PROJECTCOMPATVERSION(CVbaFileStreamPtr stream) { load(stream); }
PROJECTCOMPATVERSION::~PROJECTCOMPATVERSION() {}
BaseRecordPtr PROJECTCOMPATVERSION::clone()
{
return BaseRecordPtr(new PROJECTCOMPATVERSION(*this));
}
void PROJECTCOMPATVERSION::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> CompatVersion;
}
//-------------------------------------------------------------------------------
PROJECTLCID::PROJECTLCID(CVbaFileStreamPtr stream) { load(stream); }
PROJECTLCID::~PROJECTLCID() {}
BaseRecordPtr PROJECTLCID::clone()
{
return BaseRecordPtr(new PROJECTLCID(*this));
}
void PROJECTLCID::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> Lcid;
}
//-------------------------------------------------------------------------------
PROJECTLCIDINVOKE::PROJECTLCIDINVOKE(CVbaFileStreamPtr stream) { load(stream); }
PROJECTLCIDINVOKE::~PROJECTLCIDINVOKE() {}
BaseRecordPtr PROJECTLCIDINVOKE::clone()
{
return BaseRecordPtr(new PROJECTLCIDINVOKE(*this));
}
void PROJECTLCIDINVOKE::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> LcidInvoke;
}
//-------------------------------------------------------------------------------
PROJECTCODEPAGE::PROJECTCODEPAGE(CVbaFileStreamPtr stream) { load(stream); }
PROJECTCODEPAGE::~PROJECTCODEPAGE() {}
BaseRecordPtr PROJECTCODEPAGE::clone()
{
return BaseRecordPtr(new PROJECTCODEPAGE(*this));
}
void PROJECTCODEPAGE::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> CodePage;
stream->CodePage = CodePage;
}
//-------------------------------------------------------------------------------
PROJECTNAME::PROJECTNAME(CVbaFileStreamPtr stream) { load(stream); }
PROJECTNAME::~PROJECTNAME() {}
BaseRecordPtr PROJECTNAME::clone()
{
return BaseRecordPtr(new PROJECTNAME(*this));
}
void PROJECTNAME::load(CVbaFileStreamPtr stream)
{
ProjectName.load(stream);
}
//-------------------------------------------------------------------------------
PROJECTDOCSTRING::PROJECTDOCSTRING(CVbaFileStreamPtr stream) { load(stream); }
PROJECTDOCSTRING::~PROJECTDOCSTRING() {}
BaseRecordPtr PROJECTDOCSTRING::clone()
{
return BaseRecordPtr(new PROJECTDOCSTRING(*this));
}
void PROJECTDOCSTRING::load(CVbaFileStreamPtr stream)
{
unsigned short Reserved;
aDocString.load(stream);
*stream >> Reserved;
uDocString.load(stream);
}
//-------------------------------------------------------------------------------
PROJECTHELPFILEPATH::PROJECTHELPFILEPATH(CVbaFileStreamPtr stream) { load(stream); }
PROJECTHELPFILEPATH::~PROJECTHELPFILEPATH() {}
BaseRecordPtr PROJECTHELPFILEPATH::clone()
{
return BaseRecordPtr(new PROJECTHELPFILEPATH(*this));
}
void PROJECTHELPFILEPATH::load(CVbaFileStreamPtr stream)
{
unsigned short Reserved;
HelpFile1.load(stream);
*stream >> Reserved;
HelpFile2.load(stream);
}
//-------------------------------------------------------------------------------
PROJECTHELPCONTEXT::PROJECTHELPCONTEXT(CVbaFileStreamPtr stream) { load(stream); }
PROJECTHELPCONTEXT::~PROJECTHELPCONTEXT() {}
BaseRecordPtr PROJECTHELPCONTEXT::clone()
{
return BaseRecordPtr(new PROJECTHELPCONTEXT(*this));
}
void PROJECTHELPCONTEXT::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> HelpContext;
}
//-------------------------------------------------------------------------------
PROJECTLIBFLAGS::PROJECTLIBFLAGS(CVbaFileStreamPtr stream) { load(stream); }
PROJECTLIBFLAGS::~PROJECTLIBFLAGS() {}
BaseRecordPtr PROJECTLIBFLAGS::clone()
{
return BaseRecordPtr(new PROJECTLIBFLAGS(*this));
}
void PROJECTLIBFLAGS::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> ProjectLibFlags;
}
//-------------------------------------------------------------------------------
PROJECTVERSION::PROJECTVERSION(CVbaFileStreamPtr stream) { load(stream); }
PROJECTVERSION::~PROJECTVERSION() {}
BaseRecordPtr PROJECTVERSION::clone()
{
return BaseRecordPtr(new PROJECTVERSION(*this));
}
void PROJECTVERSION::load(CVbaFileStreamPtr stream)
{
_UINT32 sizeOf;
*stream >> sizeOf >> VersionMajor >> VersionMinor;
}
//-------------------------------------------------------------------------------
//Constants = Constant *(" : " Constant)
//Constant = ConstantName " = " ConstantValue
//ConstantName = VbaIdentifier
//ConstantValue = ["-"] 1 * 5DIGIT
PROJECTCONSTANTS::PROJECTCONSTANTS(CVbaFileStreamPtr stream) { load(stream); }
PROJECTCONSTANTS::~PROJECTCONSTANTS() {}
BaseRecordPtr PROJECTCONSTANTS::clone()
{
return BaseRecordPtr(new PROJECTCONSTANTS(*this));
}
void PROJECTCONSTANTS::load(CVbaFileStreamPtr stream)
{
unsigned short Reserved;
aConstants.load(stream);
*stream >> Reserved;
uConstants.load(stream);
}
//-------------------------------------------------------------------------------
REFERENCENAME::REFERENCENAME(CVbaFileStreamPtr stream) { load(stream); }
REFERENCENAME::~REFERENCENAME() {}
BaseRecordPtr REFERENCENAME::clone()
{
return BaseRecordPtr(new REFERENCENAME(*this));
}
void REFERENCENAME::load(CVbaFileStreamPtr stream)
{
unsigned short Reserved;
aName.load(stream);
*stream >> Reserved;
uName.load(stream);
}
//-------------------------------------------------------------------------------
REFERENCEORIGINAL::REFERENCEORIGINAL(CVbaFileStreamPtr stream) { load(stream); }
REFERENCEORIGINAL::~REFERENCEORIGINAL() {}
BaseRecordPtr REFERENCEORIGINAL::clone()
{
return BaseRecordPtr(new REFERENCEORIGINAL(*this));
}
void REFERENCEORIGINAL::load(CVbaFileStreamPtr stream)
{
LibidOriginal.load(stream);
}
//-------------------------------------------------------------------------------
REFERENCEREGISTERED::REFERENCEREGISTERED(CVbaFileStreamPtr stream) { load(stream); }
REFERENCEREGISTERED::~REFERENCEREGISTERED() {}
BaseRecordPtr REFERENCEREGISTERED::clone()
{
return BaseRecordPtr(new REFERENCEREGISTERED(*this));
}
void REFERENCEREGISTERED::load(CVbaFileStreamPtr stream)
{
_UINT32 Reserved1, Size;
_UINT16 Reserved2;
*stream >> Size;
Libid.load(stream);
*stream >> Reserved1 >> Reserved2;
}
//-------------------------------------------------------------------------------
REFERENCEPROJECT::REFERENCEPROJECT(CVbaFileStreamPtr stream) { load(stream); }
REFERENCEPROJECT::~REFERENCEPROJECT() {}
BaseRecordPtr REFERENCEPROJECT::clone()
{
return BaseRecordPtr(new REFERENCEPROJECT(*this));
}
void REFERENCEPROJECT::load(CVbaFileStreamPtr stream)
{
LibidAbsolute.load(stream);
LibidRelative.load(stream);
*stream >> MajorVersion >> MinorVersion;
}
//-------------------------------------------------------------------------------
REFERENCECONTROL::REFERENCECONTROL(CVbaFileStreamPtr stream) { load(stream); }
REFERENCECONTROL::~REFERENCECONTROL() {}
BaseRecordPtr REFERENCECONTROL::clone()
{
return BaseRecordPtr(new REFERENCECONTROL(*this));
}
void REFERENCECONTROL::load(CVbaFileStreamPtr stream)
{
_UINT32 Reserved1, Reserved4, SizeTwiddled, SizeExtended, Cookie;
_UINT16 Reserved2, Reserved3, Reserved5, Id;
*stream >> SizeTwiddled;
LibidTwiddled.load(stream);
*stream >> Reserved1 >> Reserved2;
*stream >> Id;
if (Id == 0x0016)
{
NameRecordExtended = boost::make_shared<REFERENCENAME>(stream);
*stream >> Reserved3;
}
else
{
Reserved3 = Id; // = 0x0030
}
*stream >> SizeExtended;
LibidExtended.load(stream);
*stream >> Reserved4 >> Reserved5 >> OriginalTypeLib >> Cookie;
}
//-------------------------------------------------------------------------------
PROJECTCOOKIE::PROJECTCOOKIE(CVbaFileStreamPtr stream) { load(stream); }
PROJECTCOOKIE::~PROJECTCOOKIE() {}
BaseRecordPtr PROJECTCOOKIE::clone()
{
return BaseRecordPtr(new PROJECTCOOKIE(*this));
}
void PROJECTCOOKIE::load(CVbaFileStreamPtr stream)
{
_UINT16 Id;
_UINT32 sizeOf;
*stream >> Id >> sizeOf >> Cookie;
}
//-----------------------------------------------------------------------------------
PROJECTMODULES::PROJECTMODULES(CVbaFileStreamPtr stream) { load(stream); }
PROJECTMODULES::~PROJECTMODULES() {}
BaseRecordPtr PROJECTMODULES::clone()
{
return BaseRecordPtr(new PROJECTMODULES(*this));
}
void PROJECTMODULES::load(CVbaFileStreamPtr stream)
{
_UINT16 Id, nCount;
_UINT32 sizeOf;
*stream >> Id >> sizeOf >> nCount;
ProjectCookieRecord = PROJECTCOOKIEPtr(new PROJECTCOOKIE(stream));
for (_UINT32 i = 0; i < nCount; i++)
{
modules.push_back(boost::make_shared<MODULE>(stream));
}
}
//----------------------------------------------------------------------------------
BaseRecordPtr PROJECTINFORMATION::clone()
{
return BaseRecordPtr(new PROJECTINFORMATION(*this));
}
void PROJECTINFORMATION::load(CVbaFileStreamPtr stream)
{
while (stream->checkFitRead(6))
{
_UINT16 Id;
*stream >> Id;
if (Id == 0x0016)
{//next union
stream->RollBack(2);
break;
}
switch (Id)
{
case rt_PROJECTSYSKIND:
{
SysKindRecord = boost::make_shared<PROJECTSYSKIND>(stream);
}break;
case rt_PROJECTCODEPAGE:
{
CodePageRecord = boost::make_shared<PROJECTCODEPAGE>(stream);
}break;
case rt_PROJECTCOMPATVERSION:
{
CompatVersionRecord = boost::make_shared<PROJECTCOMPATVERSION>(stream);
}break;
case rt_PROJECTLCID:
{
LcidRecord = boost::make_shared<PROJECTLCID>(stream);
}break;
case rt_PROJECTLCIDINVOKE:
{
LcidInvokeRecord = boost::make_shared<PROJECTLCIDINVOKE>(stream);
}break;
case rt_PROJECTNAME:
{
NameRecord = boost::make_shared<PROJECTNAME>(stream);
}break;
case rt_PROJECTDOCSTRING:
{
DocStringRecord = boost::make_shared<PROJECTDOCSTRING>(stream);
}break;
case rt_PROJECTHELPFILEPATH:
{
HelpFilePathRecord = boost::make_shared<PROJECTHELPFILEPATH>(stream);
}break;
case rt_PROJECTHELPCONTEXT:
{
HelpContextRecord = boost::make_shared<PROJECTHELPCONTEXT>(stream);
}break;
case rt_PROJECTLIBFLAGS:
{
LibFlagsRecord = boost::make_shared<PROJECTLIBFLAGS>(stream);
}break;
case rt_PROJECTVERSION:
{
VersionRecord = boost::make_shared<PROJECTVERSION>(stream);
}break;
case rt_PROJECTCONSTANTS:
{
ConstantsRecord = boost::make_shared<PROJECTCONSTANTS>(stream);
}break;
default://unknown .... skip
{
_UINT32 SizeOf;
*stream >> SizeOf;
stream->skipBytes(SizeOf);
}break;
}
}
}
//---------------------------------------------------------------------------------------
BaseRecordPtr PROJECTREFERENCES::clone()
{
return BaseRecordPtr(new PROJECTREFERENCES(*this));
}
void PROJECTREFERENCES::load(CVbaFileStreamPtr stream)
{
while (stream->checkFitRead(6))
{
_UINT16 Id;
*stream >> Id;
if (Id == rt_REFERENCENAME)
{
stream->RollBack(2);
ReferenceArray.push_back(boost::make_shared<REFERENCE>(stream));
}
else if (Id == rt_PROJECTMODULES)
{//next union
stream->RollBack(2);
break;
}
else
{
_UINT32 SizeOf;
*stream >> SizeOf;
stream->skipBytes(SizeOf);
}
}
}
//---------------------------------------------------------------------------------------
BaseRecordPtr REFERENCE::clone()
{
return BaseRecordPtr(new REFERENCE(*this));
}
void REFERENCE::load(CVbaFileStreamPtr stream)
{
while (stream->checkFitRead(6))
{
_UINT16 Id;
*stream >> Id;
if (Id == rt_PROJECTMODULES ||
(NameRecord && Id == rt_REFERENCENAME))
{//next union
stream->RollBack(2);
break;
}
switch (Id)
{
case rt_REFERENCENAME: NameRecord = boost::make_shared<REFERENCENAME>(stream); break;
case rt_REFERENCEORIGINAL: ReferenceRecord = boost::make_shared<REFERENCEORIGINAL>(stream); break;
case rt_REFERENCECONTROL: ReferenceRecord = boost::make_shared<REFERENCECONTROL>(stream); break;
case rt_REFERENCEREGISTERED: ReferenceRecord = boost::make_shared<REFERENCEREGISTERED>(stream); break;
case rt_REFERENCEPROJECT: ReferenceRecord = boost::make_shared<REFERENCEPROJECT>(stream); break;
default://unknown .... skip
{
_UINT32 SizeOf;
*stream >> SizeOf;
stream->skipBytes(SizeOf);
}break;
}
}
}
//---------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
//PROJECTMODULES::PROJECTMODULES() {}
//PROJECTMODULES::~PROJECTMODULES() {}
//BaseObjectPtr PROJECTMODULES::clone()
//{
// return BaseObjectPtr(new PROJECTMODULES(*this));
//}
//const bool PROJECTMODULES::loadContent(BinProcessor& proc)
//{
// BiffAttributeSimple<unsigned short> nCount;
// proc.nCount;
// if (proc.optional<PROJECTCOOKIE>())
// {
// ProjectCookieRecord = boost::make_shared<>(stream);
// elements_.pop_back();
// }
// for (unsigned short i = 0; i < nCount; i++)
// {
// MODULE *m = new MODULE();
// m->loadContent(proc);
// modules.push_back(BaseObjectPtr(m));
// }
//}
} // namespace VBA

View File

@ -0,0 +1,611 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "VbaRecordType.h"
#include "VbaBinary.h"
namespace VBA
{
const std::wstring convert_string_icu(const char* buffer, const unsigned int& size, _UINT32 nCodePage);
const std::wstring guid2bstr(const _GUID_ guid);
class BaseRecord;
typedef boost::shared_ptr<BaseRecord> BaseRecordPtr;
class BaseRecord
{
public:
virtual BaseRecordPtr clone() = 0;
virtual void load(CVbaFileStreamPtr stream) = 0;
virtual RecordType get_type() = 0;
virtual const std::string & getClassName() const = 0;
};
#define BASE_STRUCTURE_DEFINE_CLASS_NAME(class_name)\
private: \
static const RecordType type = rt_##class_name; \
public: \
const std::string & getClassName() const { static std::string str(#class_name); return str;}\
virtual RecordType get_type() { return type; }
//--------------------------------------------------------------------------------------------------
class AnsiString : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(AnsiString)
public:
AnsiString() {}
AnsiString(CVbaFileStreamPtr stream);
~AnsiString() {}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
std::wstring value;
};
typedef boost::shared_ptr<AnsiString> AnsiStringPtr;
//--------------------------------------------------------------------------------------------------
class Utf16String : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Utf16String)
public:
Utf16String() {}
Utf16String(CVbaFileStreamPtr stream);
~Utf16String() {}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
std::wstring value;
};
typedef boost::shared_ptr<Utf16String> Utf16StringPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTSYSKIND : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULESTREAMNAME)
public:
PROJECTSYSKIND(CVbaFileStreamPtr stream);
~PROJECTSYSKIND() {}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 SysKind;
};
typedef boost::shared_ptr<PROJECTSYSKIND> PROJECTSYSKINDPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTCOMPATVERSION : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTCOMPATVERSION)
public:
PROJECTCOMPATVERSION(CVbaFileStreamPtr stream);
~PROJECTCOMPATVERSION();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 CompatVersion;
};
typedef boost::shared_ptr<PROJECTCOMPATVERSION> PROJECTCOMPATVERSIONPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTLCID : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTLCID)
public:
PROJECTLCID(CVbaFileStreamPtr stream);
~PROJECTLCID();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 Lcid;
};
typedef boost::shared_ptr<PROJECTLCID> PROJECTLCIDPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTLCIDINVOKE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTLCIDINVOKE)
public:
PROJECTLCIDINVOKE(CVbaFileStreamPtr stream);
~PROJECTLCIDINVOKE();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 LcidInvoke;
};
typedef boost::shared_ptr<PROJECTLCIDINVOKE> PROJECTLCIDINVOKEPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTCODEPAGE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTCODEPAGE)
public:
PROJECTCODEPAGE(CVbaFileStreamPtr stream);
~PROJECTCODEPAGE();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
unsigned short CodePage;
};
typedef boost::shared_ptr<PROJECTCODEPAGE> PROJECTCODEPAGEPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTNAME : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTNAME)
public:
PROJECTNAME(CVbaFileStreamPtr stream);
~PROJECTNAME();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString ProjectName;
};
typedef boost::shared_ptr<PROJECTNAME> PROJECTNAMEPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTDOCSTRING : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTDOCSTRING)
public:
PROJECTDOCSTRING(CVbaFileStreamPtr stream);
~PROJECTDOCSTRING();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString aDocString;
Utf16String uDocString;
};
typedef boost::shared_ptr<PROJECTDOCSTRING> PROJECTDOCSTRINGPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTHELPFILEPATH : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTHELPFILEPATH)
public:
PROJECTHELPFILEPATH(CVbaFileStreamPtr stream);
~PROJECTHELPFILEPATH();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
Utf16String HelpFile1;
Utf16String HelpFile2;
};
typedef boost::shared_ptr<PROJECTHELPFILEPATH> PROJECTHELPFILEPATHPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTHELPCONTEXT : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTHELPCONTEXT)
public:
PROJECTHELPCONTEXT(CVbaFileStreamPtr stream);
~PROJECTHELPCONTEXT();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 HelpContext;
};
typedef boost::shared_ptr<PROJECTHELPCONTEXT> PROJECTHELPCONTEXTPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTLIBFLAGS : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTLIBFLAGS)
public:
PROJECTLIBFLAGS(CVbaFileStreamPtr stream);
~PROJECTLIBFLAGS();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 ProjectLibFlags;
};
typedef boost::shared_ptr<PROJECTLIBFLAGS> PROJECTLIBFLAGSPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTVERSION : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTVERSION)
public:
PROJECTVERSION(CVbaFileStreamPtr stream);
~PROJECTVERSION();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 VersionMajor;
_UINT16 VersionMinor;
};
typedef boost::shared_ptr<PROJECTVERSION> PROJECTVERSIONPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTCONSTANTS : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTCONSTANTS)
public:
PROJECTCONSTANTS(CVbaFileStreamPtr stream);
~PROJECTCONSTANTS();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString aConstants;
Utf16String uConstants;
};
typedef boost::shared_ptr<PROJECTCONSTANTS> PROJECTCONSTANTSPtr;
//--------------------------------------------------------------------------------------------------
class REFERENCENAME : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCENAME)
public:
REFERENCENAME(CVbaFileStreamPtr stream);
~REFERENCENAME();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString aName;
Utf16String uName;
};
typedef boost::shared_ptr<REFERENCENAME> REFERENCENAMEPtr;
//--------------------------------------------------------------------------------------------------
class REFERENCEORIGINAL : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCEORIGINAL)
public:
REFERENCEORIGINAL(CVbaFileStreamPtr stream);
~REFERENCEORIGINAL();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString LibidOriginal;
};
typedef boost::shared_ptr<REFERENCEORIGINAL> REFERENCEORIGINALPtr;
//--------------------------------------------------------------------------------------------------
class REFERENCEREGISTERED : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCEREGISTERED)
public:
REFERENCEREGISTERED(CVbaFileStreamPtr stream);
~REFERENCEREGISTERED();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString Libid;
};
typedef boost::shared_ptr<REFERENCEREGISTERED> REFERENCEREGISTEREDPtr;
//--------------------------------------------------------------------------------------------------
class REFERENCEPROJECT : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCEPROJECT)
public:
REFERENCEPROJECT(CVbaFileStreamPtr stream);
~REFERENCEPROJECT();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 MajorVersion;
_UINT16 MinorVersion;
AnsiString LibidAbsolute;
AnsiString LibidRelative;
};
typedef boost::shared_ptr<REFERENCEPROJECT> REFERENCEPROJECTPtr;
//--------------------------------------------------------------------------------------------------
class REFERENCECONTROL : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCECONTROL)
public:
REFERENCECONTROL(CVbaFileStreamPtr stream);
~REFERENCECONTROL();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString LibidTwiddled;
AnsiString LibidExtended;
REFERENCENAMEPtr NameRecordExtended;
_GUID_ OriginalTypeLib;
};
typedef boost::shared_ptr<REFERENCECONTROL> REFERENCECONTROLPtr;
//--------------------------------------------------------------------------------------------------
class PROJECTCOOKIE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTCOOKIE)
public:
PROJECTCOOKIE(CVbaFileStreamPtr stream);
~PROJECTCOOKIE();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
unsigned short Cookie;
};
typedef boost::shared_ptr<PROJECTCOOKIE> PROJECTCOOKIEPtr;
//-------------------------------------------------------------------------------------------------
class MODULENAME : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULENAME)
public:
MODULENAME(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString ModuleName;
};
typedef boost::shared_ptr<MODULENAME> MODULENAMEPtr;
//-----------------------------------------------------------------------------
class MODULENAMEUNICODE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULENAMEUNICODE)
public:
MODULENAMEUNICODE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
Utf16String ModuleNameUnicode;
};
typedef boost::shared_ptr<MODULENAMEUNICODE> MODULENAMEUNICODEPtr;
//-----------------------------------------------------------------------------
class MODULESTREAMNAME : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULESTREAMNAME)
public:
MODULESTREAMNAME(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString StreamName;
Utf16String StreamNameUnicode;
};
typedef boost::shared_ptr<MODULESTREAMNAME> MODULESTREAMNAMEPtr;
//-----------------------------------------------------------------------------
class MODULEDOCSTRING : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULEDOCSTRING)
public:
MODULEDOCSTRING(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
AnsiString DocString;
Utf16String DocStringUnicode;
};
typedef boost::shared_ptr<MODULEDOCSTRING> MODULEDOCSTRINGPtr;
//-----------------------------------------------------------------------------
class MODULEOFFSET : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULEOFFSET)
public:
MODULEOFFSET(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 TextOffset;
};
typedef boost::shared_ptr<MODULEOFFSET> MODULEOFFSETPtr;
//-----------------------------------------------------------------------------
class MODULEHELPCONTEXT : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULEHELPCONTEXT)
public:
MODULEHELPCONTEXT(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
_UINT32 HelpContext;
};
typedef boost::shared_ptr<MODULEHELPCONTEXT> MODULEHELPCONTEXTPtr;
//-----------------------------------------------------------------------------
class MODULECOOKIE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULECOOKIE)
public:
MODULECOOKIE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
};
typedef boost::shared_ptr<MODULECOOKIE> MODULECOOKIEPtr;
//-----------------------------------------------------------------------------
class MODULETYPE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULETYPE)
public:
MODULETYPE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
};
typedef boost::shared_ptr<MODULETYPE> MODULETYPEPtr;
//-----------------------------------------------------------------------------
class MODULEREADONLY : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULEREADONLY)
public:
MODULEREADONLY(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
};
typedef boost::shared_ptr<MODULEREADONLY> MODULEREADONLYPtr;
//-----------------------------------------------------------------------------
class MODULEPRIVATE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULEPRIVATE)
public:
MODULEPRIVATE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
};
typedef boost::shared_ptr<MODULEPRIVATE> MODULEPRIVATEPtr;
//------------------------------------------------------------------------------------
class MODULE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(MODULE)
public:
MODULE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
MODULENAMEPtr NameRecord;
MODULENAMEUNICODEPtr NameUnicodeRecord;
MODULESTREAMNAMEPtr StreamNameRecord;
MODULEDOCSTRINGPtr DocStringRecord;
MODULEOFFSETPtr OffsetRecord;
MODULEHELPCONTEXTPtr HelpContextRecord;
bool bReadOnly = false;
bool bPrivate = false;
bool bProceduralModule = false;
};
typedef boost::shared_ptr<MODULE> MODULEPtr;
//----------------------------------------------------------------------------------------
class PROJECTINFORMATION : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTINFORMATION)
public:
PROJECTINFORMATION(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
PROJECTSYSKINDPtr SysKindRecord;
PROJECTCOMPATVERSIONPtr CompatVersionRecord;
PROJECTLCIDPtr LcidRecord;
PROJECTLCIDINVOKEPtr LcidInvokeRecord;
PROJECTCODEPAGEPtr CodePageRecord;
PROJECTNAMEPtr NameRecord;
PROJECTDOCSTRINGPtr DocStringRecord;
PROJECTHELPFILEPATHPtr HelpFilePathRecord;
PROJECTHELPCONTEXTPtr HelpContextRecord;
PROJECTLIBFLAGSPtr LibFlagsRecord;
PROJECTVERSIONPtr VersionRecord;
PROJECTCONSTANTSPtr ConstantsRecord;
};
typedef boost::shared_ptr<PROJECTINFORMATION> PROJECTINFORMATIONPtr;
//-----------------------------------------------------------------------------
class REFERENCE : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(REFERENCE)
public:
REFERENCE(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
REFERENCENAMEPtr NameRecord;
BaseRecordPtr ReferenceRecord;
};
typedef boost::shared_ptr<REFERENCE> REFERENCEPtr;
class PROJECTREFERENCES : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTINFORMATION)
public:
PROJECTREFERENCES(CVbaFileStreamPtr stream)
{
load(stream);
}
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
std::vector<REFERENCEPtr> ReferenceArray;
};
typedef boost::shared_ptr<PROJECTREFERENCES> PROJECTREFERENCESPtr;
//----------------------------------------------------------------------------------------------
class PROJECTMODULES : public BaseRecord
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PROJECTMODULES)
public:
PROJECTMODULES(CVbaFileStreamPtr stream);
~PROJECTMODULES();
BaseRecordPtr clone();
virtual void load(CVbaFileStreamPtr stream);
std::vector<MODULEPtr> modules;
PROJECTCOOKIEPtr ProjectCookieRecord;
};
typedef boost::shared_ptr<PROJECTMODULES> PROJECTMODULESPtr;
} // namespace VBA

View File

@ -0,0 +1,56 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "StreamObjects.h"
#include "VbaRecordType.h"
#include <boost/make_shared.hpp>
namespace VBA
{;
bool DirStreamObject::loadContent()
{
InformationRecord = boost::make_shared<PROJECTINFORMATION>(reader);
ReferencesRecord = boost::make_shared<PROJECTREFERENCES>(reader);
ModulesRecord = boost::make_shared<PROJECTMODULES>(reader);
return (InformationRecord && ReferencesRecord && ModulesRecord);
}
bool ModuleStreamObject::loadContent()
{
SourceCode = convert_string_icu((char*)reader->getData(), (unsigned int)reader->getDataSize(), reader->CodePage);
return true;
}
} // namespace VBA

View File

@ -0,0 +1,73 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "Records.h"
class CVbaFileStream;
typedef boost::shared_ptr<CVbaFileStream> CVbaFileStreamPtr;
namespace VBA
{
class DirStreamObject
{
public:
DirStreamObject(CVbaFileStreamPtr _reader) { reader = _reader; }
~DirStreamObject() {}
bool loadContent();
PROJECTINFORMATIONPtr InformationRecord;
PROJECTREFERENCESPtr ReferencesRecord;
PROJECTMODULESPtr ModulesRecord;
private:
CVbaFileStreamPtr reader;
};
typedef boost::shared_ptr<DirStreamObject> DirStreamObjectPtr;
class ModuleStreamObject
{
public:
ModuleStreamObject(CVbaFileStreamPtr _reader) { reader = _reader; }
~ModuleStreamObject() {}
bool loadContent();
std::wstring SourceCode;
private:
CVbaFileStreamPtr reader;
};
typedef boost::shared_ptr<ModuleStreamObject> ModuleStreamObjectPtr;
} // namespace VBA

View File

@ -0,0 +1,237 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "VbaBinary.h"
#include <boost/bind.hpp>
#include <algorithm>
#include <sstream>
CVbaFile::~CVbaFile()
{
streams.clear();
if (storage_)delete storage_;
storage_ = NULL;
}
bool CVbaFile::isError()
{
if (storage_ != NULL) return false;
return true;
}
bool CVbaFile::Open(const std::wstring & file_path)
{
if (storage_) delete storage_;
storage_ = NULL;
storage_ = new POLE::Storage(file_path.c_str());
if (storage_ == NULL) return false;
if (storage_->open(false, false) == false)
{
delete storage_;
storage_ = NULL;
}
if (storage_ == NULL) return false;
return true;
}
CVbaFile::CVbaFile(const std::wstring & file_path)
{
storage_ = NULL;
Open(file_path);
}
CVbaFileStreamPtr CVbaFile::getNamedStream(const std::wstring& name, _UINT32 offset)
{
if (!streams[name])
{
POLE::Stream * pStream = openStream(name.c_str());
if (pStream)
streams[name].reset(new CVbaFileStream(pStream, offset));
}
return streams[name];
}
void CVbaFile::closeNamedStream(const std::wstring& name)
{
streams[name].reset();
}
POLE::Stream* CVbaFile::openStream(const std::wstring & stream_name)
{
if (storage_ == NULL) return NULL;
POLE::Stream* pStream = new POLE::Stream(storage_, stream_name);
if (pStream == NULL)
{
return NULL;
}
if ((pStream) && (pStream->size() > 0))
return pStream;
else return NULL;
}
const unsigned char VBASTREAM_SIGNATURE = 1;
const _UINT16 CHUNK_SIGMASK = 0x7000;
const _UINT16 CHUNK_SIG = 0x3000;
const _UINT16 CHUNK_COMPRESSED = 0x8000;
const _UINT16 CHUNK_LENMASK = 0x0FFF;
inline _UINT16 extract(_UINT16 nBitField, unsigned char nStartBit, unsigned char nBitCount)
{
_UINT64 nMask = 1; nMask <<= nBitCount; --nMask;
return static_cast< _UINT16 >(nMask & (nBitField >> nStartBit));
}
CVbaFileStream::CVbaFileStream(POLE::Stream* stream, _UINT32 offset)
{
size_t dataSize = stream->size();
unsigned char sig = 0;
stream->read(&sig, 1);
if (sig != 1)
{
stream->seek(0);
arrChunks.resize(dataSize);
stream->read(arrChunks.data(), dataSize);
return;
}
dataSize -= 1;
stream->seek(stream->tell() + offset);
dataSize -= offset;
//readchunks
unsigned char *data = new unsigned char[dataSize];
stream->read(data, dataSize);
unsigned char *dataCur = data;
size_t dataPos = 0;
while (dataPos + 2 < dataSize)
{
std::vector<unsigned char> arrChunk;
_UINT16 header = *((_UINT32*)dataCur); dataCur += 2;
bool bCompressed = ((header & CHUNK_COMPRESSED) != 0);
_UINT16 chunkSize = (header & CHUNK_LENMASK);
if ((header & CHUNK_SIGMASK) != CHUNK_SIG)
{
bCompressed = true;
chunkSize = 4094; //по факту
}
POLE::uint64 target = (dataCur - data) + chunkSize;
if (bCompressed)
{
unsigned char nBitCount = 4;
_UINT16 chunkPos = 0;
bool bEof = stream->eof();
while (!bEof && ((dataCur - data) > 0) && (chunkPos < chunkSize))
{
unsigned char nToken = *dataCur; dataCur++;
++chunkPos;
for (int bit = 0; !bEof && ((dataCur - data) > 0) && (bit < 8) && (chunkPos < chunkSize); ++bit, nToken >>= 1)
{
if (nToken & 1)
{
_UINT16 nCopyToken = *((_UINT32*)dataCur); dataCur += 2;
chunkPos += 2;
while ((static_cast<size_t>(1) << nBitCount) < arrChunk.size())
++nBitCount;
_UINT16 nLength = extract(nCopyToken, 0, 16 - nBitCount) + 3;
_UINT16 nOffset = extract(nCopyToken, 16 - nBitCount, nBitCount) + 1;
bEof = (nOffset > arrChunk.size()) || (arrChunk.size() + nLength > 4096);
if (!bEof)
{
arrChunk.resize(arrChunk.size() + nLength);
unsigned char* pnTo = &*(arrChunk.end() - nLength);
const unsigned char* pnEnd = pnTo + nLength;
const unsigned char* pnFrom = pnTo - nOffset;
size_t nRunLen = (std::min)(nLength, nOffset);
while (pnTo < pnEnd)
{
size_t nStepLen = (std::min)(nRunLen, (size_t)(pnEnd - pnTo));
memcpy(pnTo, pnFrom, nStepLen);
pnTo += nStepLen;
}
}
}
else
{
arrChunk.emplace_back();
arrChunk.back() = *dataCur; dataCur++;
++chunkPos;
}
}
}
}
else
{
arrChunk.resize(chunkSize);
memcpy(arrChunk.data(), dataCur, chunkSize); dataCur += chunkSize;
}
dataPos = target;
arrChunks.insert(arrChunks.end(), arrChunk.begin(), arrChunk.end());
}
}
CVbaFileStream::~CVbaFileStream()
{
arrChunks.clear();
}
void CVbaFileStream::read(void* buf, size_t size)
{
if (NULL == buf || arrChunks.empty())
{
return;
}
if (pos + size > arrChunks.size())
size = arrChunks.size() - pos;
memcpy(buf, arrChunks.data() + pos, size);
pos += size;
}

View File

@ -0,0 +1,144 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "../../../Common/3dParty/pole/pole.h"
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
#include <map>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
typedef struct
{
_UINT32 Data1;
_UINT16 Data2;
_UINT16 Data3;
unsigned char Data4[8];
} _GUID_;
class CVbaFileStream
{
public:
CVbaFileStream(POLE::Stream* stream, _UINT32 offset = 0);
~CVbaFileStream();
template<class Type>
CVbaFileStream& operator >> (Type& val)
{
read(&val, sizeof(Type));
return *this;
}
void read(void* buf, size_t size);
//---------------------------------------------------------------------
void skipBytes(const size_t n)
{
pos += n;
if (pos > arrChunks.size())
pos = arrChunks.size();
}
void RollBack(const size_t n)
{
if (pos - n >= 0)
{
pos -= n;
}
}
unsigned char* getData() { return arrChunks.data(); }
size_t getDataSize() { return arrChunks.size(); }
const bool checkFitReadSafe(const size_t size) const
{
return (!arrChunks.empty() && (pos + size < arrChunks.size()));
}
bool checkFitRead(const size_t size) const
{
if (!checkFitReadSafe(size))
{
return false;
}
return true;
}
template<class T>
bool loadAnyData(T& val) //for static size objects
{
size_t size = sizeof(T);
if (checkFitRead(size))
{
memcpy((unsigned char*)&val, arrChunks.data() + pos, size);
pos += size;
return true;
}
return false;
}
CVbaFileStream& operator >> (unsigned char& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (int& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (double& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (short& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (char& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (_GUID_& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (_UINT32& val) { loadAnyData(val); return *this; }
CVbaFileStream& operator >> (_UINT16& val) { loadAnyData(val); return *this; }
_UINT32 CodePage = 0;
private:
std::vector<unsigned char> arrChunks;
size_t pos = 0;
};
typedef boost::shared_ptr<CVbaFileStream> CVbaFileStreamPtr;
class CVbaFile
{
public:
CVbaFile(const std::wstring & file_path);
~CVbaFile();
bool Open(const std::wstring & file_path);
bool isError();
bool isDirectory(const std::wstring & name) { return (storage_ ? storage_->isDirectory(name) : false); }
CVbaFileStreamPtr getNamedStream(const std::wstring& name, _UINT32 offset = 0);
private:
POLE::Storage *storage_;
POLE::Stream* openStream(const std::wstring & stream_name); // Opens a stream in the storage (shall be called not more than once per stream)
void closeNamedStream(const std::wstring& name);
std::map<std::wstring, CVbaFileStreamPtr> streams;
};
typedef boost::shared_ptr<CVbaFile> CVbaFilePtr;

View File

@ -0,0 +1,165 @@
#include "VbaReader.h"
#include "StreamObjects.h"
#include "../Common/simple_xml_writer.h"
#include "../../../DesktopEditor/common/File.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
CVbaReader::CVbaReader(const std::wstring & vbaFileName, const std::wstring & vbaExtractFile)
{
vbaExtractFile_ = vbaExtractFile;
vbaProject_file_ = boost::shared_ptr<CVbaFile>(new CVbaFile(vbaFileName));
if (vbaProject_file_->isError()) return;
}
const std::wstring CVbaReader::convert()
{
_UINT32 code_page_ = 0;
CVbaFileStreamPtr strmPROJECT = vbaProject_file_->getNamedStream(L"PROJECT");
if (false == vbaProject_file_->isDirectory(L"VBA")) return L"";
CVbaFileStreamPtr strmDir = vbaProject_file_->getNamedStream(L"VBA/dir");
VBA::DirStreamObjectPtr DirStreamObject = VBA::DirStreamObjectPtr(new VBA::DirStreamObject(strmDir));
if (false == DirStreamObject->loadContent()) return L"";
code_page_ = strmDir->CodePage;
std::wstringstream strm;
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"Information")
{
if (DirStreamObject->InformationRecord->NameRecord)
CP_XML_ATTR(L"Name", DirStreamObject->InformationRecord->NameRecord->ProjectName.value);
if (DirStreamObject->InformationRecord->LcidRecord)
CP_XML_ATTR(L"Lcid", DirStreamObject->InformationRecord->LcidRecord->Lcid);
if (DirStreamObject->InformationRecord->ConstantsRecord)
CP_XML_ATTR(L"Constants", DirStreamObject->InformationRecord->ConstantsRecord->uConstants.value.empty() ?
DirStreamObject->InformationRecord->ConstantsRecord->aConstants.value :
DirStreamObject->InformationRecord->ConstantsRecord->uConstants.value);
}
CP_XML_NODE(L"References")
{
for (size_t i = 0; i < DirStreamObject->ReferencesRecord->ReferenceArray.size(); ++i)
{
CP_XML_NODE(L"Reference")
{
if (DirStreamObject->ReferencesRecord->ReferenceArray[i]->NameRecord)
CP_XML_ATTR(L"Name", DirStreamObject->ReferencesRecord->ReferenceArray[i]->NameRecord->uName.value.empty() ?
DirStreamObject->ReferencesRecord->ReferenceArray[i]->NameRecord->aName.value :
DirStreamObject->ReferencesRecord->ReferenceArray[i]->NameRecord->uName.value);
VBA::REFERENCEORIGINAL* original = dynamic_cast<VBA::REFERENCEORIGINAL*>(DirStreamObject->ReferencesRecord->ReferenceArray[i]->ReferenceRecord.get());
VBA::REFERENCECONTROL* control = dynamic_cast<VBA::REFERENCECONTROL*>(DirStreamObject->ReferencesRecord->ReferenceArray[i]->ReferenceRecord.get());
VBA::REFERENCEREGISTERED* registered = dynamic_cast<VBA::REFERENCEREGISTERED*>(DirStreamObject->ReferencesRecord->ReferenceArray[i]->ReferenceRecord.get());
VBA::REFERENCEPROJECT* project = dynamic_cast<VBA::REFERENCEPROJECT*>(DirStreamObject->ReferencesRecord->ReferenceArray[i]->ReferenceRecord.get());
if (original)
{
CP_XML_NODE(L"Original")
{
CP_XML_ATTR(L"val", original->LibidOriginal.value);
}
}
if (project)
{
CP_XML_NODE(L"Project")
{
if (!project->LibidAbsolute.value.empty())
CP_XML_ATTR(L"LibidAbsolute", project->LibidAbsolute.value);
if (!project->LibidRelative.value.empty())
CP_XML_ATTR(L"LibidRelative", project->LibidRelative.value);
}
}
if (control)
{
CP_XML_NODE(L"Control")
{
CP_XML_ATTR(L"TypeLib", VBA::guid2bstr(control->OriginalTypeLib));
if (!control->LibidTwiddled.value.empty())
CP_XML_ATTR(L"LibidTwiddled", control->LibidTwiddled.value);
if (!control->LibidExtended.value.empty())
CP_XML_ATTR(L"LibidExtended", control->LibidExtended.value);
}
}
if (registered)
{
CP_XML_NODE(L"Registered")
{
CP_XML_ATTR(L"val", registered->Libid.value);
}
}
}
}
}
CP_XML_NODE(L"Modules")
{
for (size_t i = 0; i < DirStreamObject->ModulesRecord->modules.size(); ++i)
{
CP_XML_NODE(L"Module")
{
if (DirStreamObject->ModulesRecord->modules[i]->StreamNameRecord)
{
if (DirStreamObject->ModulesRecord->modules[i]->NameUnicodeRecord)
CP_XML_ATTR(L"Name", DirStreamObject->ModulesRecord->modules[i]->NameUnicodeRecord->ModuleNameUnicode.value);
else if (DirStreamObject->ModulesRecord->modules[i]->NameRecord)
CP_XML_ATTR(L"Name", DirStreamObject->ModulesRecord->modules[i]->NameRecord->ModuleName.value);
CP_XML_ATTR(L"Type", DirStreamObject->ModulesRecord->modules[i]->bProceduralModule ? L"Procedural" : L"Class");
CP_XML_ATTR(L"ReadOnly", DirStreamObject->ModulesRecord->modules[i]->bReadOnly);
CP_XML_ATTR(L"Private", DirStreamObject->ModulesRecord->modules[i]->bPrivate);
std::wstring streamName = L"VBA/" + (DirStreamObject->ModulesRecord->modules[i]->StreamNameRecord->StreamNameUnicode.value.empty() ?
DirStreamObject->ModulesRecord->modules[i]->StreamNameRecord->StreamName.value :
DirStreamObject->ModulesRecord->modules[i]->StreamNameRecord->StreamNameUnicode.value);
_UINT32 offset = DirStreamObject->ModulesRecord->modules[i]->OffsetRecord ?
DirStreamObject->ModulesRecord->modules[i]->OffsetRecord->TextOffset : 0;//skip cache
CVbaFileStreamPtr strmModule = vbaProject_file_->getNamedStream(streamName, offset);
strmModule->CodePage = code_page_;
VBA::ModuleStreamObjectPtr ModuleStreamObject = VBA::ModuleStreamObjectPtr(new VBA::ModuleStreamObject(strmModule));
ModuleStreamObject->loadContent();
CP_XML_NODE(L"SourceCode")
{
CP_XML_STREAM() << XmlUtils::EncodeXmlString(ModuleStreamObject->SourceCode);
}
}
}
}
}
}
return strm.str();
}
bool CVbaReader::write()
{
const std::wstring sXml = convert();
NSFile::CFileBinary file;
if (file.CreateFileW(vbaExtractFile_))
{
std::string root = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
file.WriteFile((BYTE*)root.c_str(), (DWORD)root.length());
file.WriteStringUTF8(sXml);
file.CloseFile();
return true;
}
return false;
}
CVbaReader::~CVbaReader()
{
//if (vba_context) delete vba_context;
//if (output_document) delete output_document;
}

View File

@ -0,0 +1,21 @@
#pragma once
#include <string>
#include <boost/shared_ptr.hpp>
class CVbaFile;
typedef boost::shared_ptr<CVbaFile> CVbaFilePtr;
class CVbaReader
{
public:
CVbaReader(const std::wstring & vbaFileName, const std::wstring & vbaExtractFile);
~CVbaReader();
const std::wstring convert();
bool write();
private:
std::wstring vbaExtractFile_;
CVbaFilePtr vbaProject_file_;
};

View File

@ -0,0 +1,81 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
namespace VBA
{
typedef enum CF_RECORD_TYPE
{
rt_PROJECTSYSKIND = 0x0001,
rt_PROJECTCOMPATVERSION = 0x004A,
rt_PROJECTLCID = 0x0002,
rt_PROJECTLCIDINVOKE = 0x0014,
rt_PROJECTCODEPAGE = 0x0003,
rt_PROJECTNAME = 0x0004,
rt_PROJECTDOCSTRING = 0x0005,
rt_PROJECTHELPFILEPATH = 0x0006,
rt_PROJECTHELPCONTEXT = 0x0007,
rt_PROJECTLIBFLAGS = 0x0008,
rt_PROJECTVERSION = 0x0009,
rt_PROJECTCONSTANTS = 0x000C,
rt_REFERENCENAME = 0x0016,
rt_REFERENCEORIGINAL = 0x0033,
rt_REFERENCEREGISTERED = 0x000D,
rt_REFERENCEPROJECT = 0x000E,
rt_REFERENCECONTROL = 0x002F,
rt_PROJECTMODULES = 0x000F,
rt_PROJECTCOOKIE = 0x0013,
rt_MODULENAME = 0x0019,
rt_MODULENAMEUNICODE = 0x0047,
rt_MODULESTREAMNAME = 0x001A,
rt_MODULEDOCSTRING = 0x001C,
rt_MODULEOFFSET = 0x0031,
rt_MODULEHELPCONTEXT = 0x001E,
rt_MODULECOOKIE = 0x002C,
rt_MODULETYPE_Procedural = 0x0021,
rt_MODULETYPE_Class = 0x0022,
rt_MODULEREADONLY = 0x0025,
rt_MODULEPRIVATE = 0x0028,
rt_Terminator = 0x002B,
rt_TerminatorStream = 0x0010,
rt_PROJECTINFORMATION = 0xFF01,
rt_REFERENCE,
rt_MODULE,
rt_MODULETYPE,
rt_AnsiString,
rt_Utf16String,
rt_Unknown = 0xffff
} RecordType;
}

View File

@ -54,7 +54,7 @@ CFRecord::CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info)
unsigned long rec_data_pos = stream->getStreamPointer();
stream->read(data_, size_);
if(global_info->decryptor && 0 != size_)
if((global_info) && (global_info->decryptor) && (0 != size_))
{
size_t block_size = global_info->Version == 0x0500 ? 16 : 1024;
@ -161,6 +161,7 @@ CFRecord::CFRecord(NSBinPptxRW::CBinaryFileReader &reader, GlobalWorkbookInfoPtr
}
file_ptr += lenght;
sizeOfRecordTypeRecordLength = lenght;
/* auto lambdaDetectBusyByteCount = [] (int val) -> {
for (int i = 0; i < 4; ++i)
{
@ -252,6 +253,10 @@ const size_t CFRecord::getDataSize() const
return size_;
}
const BYTE CFRecord::getSizeOfRecordTypeRecordLength() const
{
return sizeOfRecordTypeRecordLength;
}
const size_t CFRecord::getMaxRecordSize() const
{

View File

@ -49,7 +49,7 @@ class CFRecord
public:
CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info); // Create a record an read its data from the stream
CFRecord(NSFile::CFileBinary &file, GlobalWorkbookInfoPtr global_info); // Create a record an read its data from the data stream
CFRecord(NSBinPptxRW::CBinaryFileReader &reader, GlobalWorkbookInfoPtr global_info); // Create a record an read its data from the data stream
CFRecord(NSBinPptxRW::CBinaryFileReader &reader, GlobalWorkbookInfoPtr global_info); // Create a record an read its data from the data stream
CFRecord(CFRecordType::TypeId type_id, GlobalWorkbookInfoPtr global_info); // Create an empty record
~CFRecord();
@ -63,6 +63,7 @@ public:
// Pointer to the beginning of the cached data
const char* getData() const ;
const size_t getDataSize() const;
const BYTE getSizeOfRecordTypeRecordLength() const;
const size_t getMaxRecordSize() const;
void appendRawData(CFRecordPtr where_from);
void appendRawData(const char* raw_data, const size_t size);
@ -129,7 +130,8 @@ private:
unsigned int file_ptr;
CFRecordType::TypeId type_id_;
size_t size_;
char* data_;
char* data_;
BYTE sizeOfRecordTypeRecordLength; //размер RecordType и RecordLength
size_t rdPtr;
static char intData[MAX_RECORD_SIZE];

View File

@ -409,7 +409,7 @@ bool FileStreamCacheReader::isEOF()
}
//---------------------------------------------------------------------------------------------------------
BinaryStreamCacheReader::BinaryStreamCacheReader( std::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream, GlobalWorkbookInfoPtr global_info)
BinaryStreamCacheReader::BinaryStreamCacheReader( boost::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream, GlobalWorkbookInfoPtr global_info)
: StreamCacheReader(global_info), binaryStream_(binaryStream)
{
@ -518,6 +518,17 @@ const size_t BinaryStreamCacheReader::readFromStream(const size_t num_of_records
return records_cache.size();
}
//Return current position in stream
const int BinaryStreamCacheReader::GetRecordPosition()
{
return binaryStream_->GetPos() - records_cache.front()->getDataSize() - records_cache.front()->getSizeOfRecordTypeRecordLength();
}
void BinaryStreamCacheReader::SetRecordPosition(const int position)
{
binaryStream_->Seek(position);
}
// Checks whether the next record is Continue and append its data to the real record if so
void BinaryStreamCacheReader::checkAndAppendContinueData()
{

View File

@ -65,6 +65,9 @@ public:
// Skip the specified number of unsigned chars without processing
virtual void skipNunBytes(const size_t n) = 0;
virtual const int GetRecordPosition() { return 0; }
virtual void SetRecordPosition(const int) {}
void SkipRecord();
// Seek to the next substream (Read all records till EOF then skip EOF)
// Doesn't generate EndOfStreamReached if the stream is the last one
@ -118,7 +121,7 @@ private:
class BinaryStreamCacheReader : public StreamCacheReader
{
public:
BinaryStreamCacheReader(std::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream, const GlobalWorkbookInfoPtr global_info);
BinaryStreamCacheReader(boost::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream, const GlobalWorkbookInfoPtr global_info);
virtual ~BinaryStreamCacheReader();
CFRecordPtr getNextRecord(const CFRecordType::TypeId desirable_type, const bool gen_except = false) override;
@ -127,6 +130,8 @@ public:
bool isEOF() override;
private:
const size_t readFromStream(const size_t num_of_records_min_necessary) override;
std::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream_;
const int GetRecordPosition() override;
void SetRecordPosition(const int) override;
boost::shared_ptr<NSBinPptxRW::CBinaryFileReader> binaryStream_;
};
} // namespace XLS

View File

@ -55,7 +55,7 @@ class BaseObject
{
public:
BaseObject(){}
~BaseObject(){}
virtual ~BaseObject(){}
virtual boost::shared_ptr<BaseObject> clone() = 0;

View File

@ -110,8 +110,8 @@ void Row::readFields(CFRecord& record)
{
record >> rw >> ixfe_val >> miyRw;
unsigned short flags;
unsigned char flags2;
_UINT16 flags;
BYTE flags2;
record >> flags >> flags2 >> ccolspan;

View File

@ -86,15 +86,16 @@ void Window1::readFields(CFRecord& record)
else
{
record >> xWn >> yWn >> dxWn >> dyWn >> wTabRatio >> itabFirst >> itabCur >> flags;
BYTE flags1;
record >> xWn >> yWn >> dxWn >> dyWn >> wTabRatio >> itabFirst >> itabCur >> flags1;
fHidden = GETBIT(flags, 0);
fVeryHidden = GETBIT(flags, 1);
fIconic = GETBIT(flags, 2);
fDspHScroll = GETBIT(flags, 3);
fDspVScroll = GETBIT(flags, 4);
fBotAdornment = GETBIT(flags, 5);
fNoAFDateGroup = GETBIT(flags, 6);
fHidden = GETBIT(flags1, 0);
fVeryHidden = GETBIT(flags1, 1);
fIconic = GETBIT(flags1, 2);
fDspHScroll = GETBIT(flags1, 3);
fDspVScroll = GETBIT(flags1, 4);
fBotAdornment = GETBIT(flags1, 5);
fNoAFDateGroup = GETBIT(flags1, 6);
}
}

View File

@ -69,7 +69,8 @@ void ArrayParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
}
}

View File

@ -63,7 +63,8 @@ void CFParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), true);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), true);
}
}

View File

@ -65,7 +65,8 @@ void CFVOParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), true);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), true);
}
}

View File

@ -75,7 +75,8 @@ void CellParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
}
}

View File

@ -53,8 +53,17 @@ BiffStructurePtr ExtNameParsedFormula::clone()
void ExtNameParsedFormula::load(CFRecord& record) // Maybe this class shouldn't be a ParsedFormulas's derived?
{
unsigned short cb;
record >> cb;
_UINT32 cb;
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
{
unsigned short cb_2b;
record >> cb_2b;
cb = cb_2b;
}
else
{
record >> cb;
}
if(cb && record.getDataSize() > record.getRdPtr())
{
unsigned char extPtg;

View File

@ -63,7 +63,8 @@ void ListParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), false);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), false);
}
}
//-------------------------------------------------------------------------------

View File

@ -46,11 +46,27 @@ BiffStructurePtr PivotParsedFormula::clone()
}
void PivotParsedFormula::load(CFRecord& record)
{
unsigned short cce;
{
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
{
unsigned short cce;
record >> cce >> cSxName;
rgce.load(record, cce);
record >> cce >> cSxName;
rgce.load(record, cce);
}
else
{
_UINT32 cce;
record >> cce;
rgce.load(record, cce);
_UINT32 cb;
record >> cb;
//rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
}
}
} // namespace XLS

View File

@ -200,7 +200,7 @@ PtgPtr PtgFactory::createPtg(const unsigned short type, const CellRef& cell_base
return PtgPtr(new PtgArray(type)); // *
case 0x1918:
return PtgPtr(new PtgList); // *
return PtgPtr(new PtgList(type)); // *
case 0x0021:
case 0x0041:
@ -215,7 +215,7 @@ PtgPtr PtgFactory::createPtg(const unsigned short type, const CellRef& cell_base
case 0x0023:
case 0x0043:
case 0x0063:
return PtgPtr(new PtgName(type)); // *
return PtgPtr(new PtgName(type)); // *
case 0x0024:
case 0x0044:

View File

@ -36,6 +36,9 @@
namespace XLS
{
PtgList::PtgList(const unsigned short full_ptg_id) : OperandPtg(full_ptg_id)
{
}
BiffStructurePtr PtgList::clone()
{

View File

@ -43,6 +43,8 @@ class PtgList: public OperandPtg
BASE_STRUCTURE_DEFINE_CLASS_NAME(PtgList)
public:
PtgList(const unsigned short full_ptg_id);
BiffStructurePtr clone();
virtual void loadFields(CFRecord& record);

View File

@ -68,7 +68,8 @@ void SharedParsedFormula::load(CFRecord& record)
unsigned int cb;
record >> cb;
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
if(cb > 0)
rgcb.load(record, rgce.getPtgs(), is_part_of_a_revision_);
}
}

View File

@ -41,8 +41,17 @@ BiffStructurePtr SXAxis::clone()
}
void SXAxis::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
unsigned short flags;
if(record.getGlobalWorkbookInfo()->Version < 0x0800)
{
record >> flags;
}
else
{
BYTE flags_1b;
record >> flags_1b;
flags = flags_1b;
}
bRw = GETBIT(flags, 0);
bCol = GETBIT(flags, 1);

View File

@ -45,6 +45,5 @@ void Xnum::load(CFRecord& record)
record.loadAnyData(data);
}
} // namespace XLS

View File

@ -60,6 +60,7 @@ public:
}bytes;
double value = 0.;
} data;
};
typedef Xnum DateAsNum;

View File

@ -62,19 +62,19 @@ const int BinProcessor::repeated(BaseObject& object, const int fromN, const int
bool at_least_one_read = false;
for(int i = 0; i < fromN; ++i)
{
mandatory(*object.clone());
{
mandatory(*object.clone());
count++;
at_least_one_read = true;
at_least_one_read = true;
}
for(int j = fromN; j < toN || !toN/*infinity*/; ++j)
{
if(!optional(*object.clone()))
{
if(!optional(*object.clone()))
{
break;
}
count++;
at_least_one_read = true;
at_least_one_read = true;
}
return count;
}
@ -253,7 +253,16 @@ void BinReaderProcessor::SkipRecord()
if (reader_)
reader_->SkipRecord();
}
const int BinReaderProcessor::GetRecordPosition()
{
if (reader_)
return reader_->GetRecordPosition();
}
void BinReaderProcessor::SetRecordPosition(const int position)
{
if (reader_)
reader_->SetRecordPosition(position);
}
} // namespace XLS

View File

@ -84,6 +84,8 @@ public:
virtual const bool getNextSubstreamType(_UINT16& type) = 0;
virtual void SeekToEOF() = 0;
virtual void SkipRecord() = 0;
virtual const int GetRecordPosition() = 0;
virtual void SetRecordPosition(const int position) = 0;
bool isBOF(CFRecordType::TypeId type);
@ -110,6 +112,8 @@ public:
void SeekToEOF();
void SkipRecord();
const int GetRecordPosition();
void SetRecordPosition(const int position);
private:
const bool readChild(BaseObject& object, const bool is_mandatory);

View File

@ -120,7 +120,9 @@ GlobalWorkbookInfo::GlobalWorkbookInfo(const unsigned short code_page, XlsConver
bMacrosExist = false;
bWorkbookProtectExist = false;
idPivotCache = 0;
idPivotCache = 0;
currentPivotCacheRecord = 0;
mapDefaultFormatCode.insert(std::make_pair(L"0", 1));
mapDefaultFormatCode.insert(std::make_pair(L"0.00", 2));

View File

@ -38,6 +38,7 @@
#include <unordered_map>
#include "Biff_structures/BorderFillInfo.h"
#include "XlsElementsType.h"
#include "../Crypt/Decryptor.h"
@ -150,6 +151,8 @@ public:
struct _xti
{
int iSup;
_INT32 itabFirst; //firstSheet in biff12
_INT32 itabLast; //lastSheet in biff12
std::wstring link;
std::vector<std::wstring>* pNames = NULL;
};
@ -205,11 +208,14 @@ public:
int connectionId;
std::map<std::wstring, int> connectionNames;
std::unordered_map<int, std::wstring> mapTableNames;
std::unordered_map<int, std::vector<std::wstring>> mapTableColumnNames;
std::unordered_map<std::wstring, int> mapTableGuidsIndex;
std::unordered_map<int, std::wstring> mapTableNames;
std::unordered_map<int, std::vector<std::wstring>> mapTableColumnNames;
std::unordered_map<std::wstring, int> mapTableGuidsIndex;
XlsConverter *xls_converter;
std::unordered_map<int, std::vector<XLS::ElementType>> pivotCacheRecordType;
int currentPivotCacheRecord;
XlsConverter *xls_converter;
};
typedef boost::shared_ptr<GlobalWorkbookInfo> GlobalWorkbookInfoPtr;

View File

@ -741,97 +741,181 @@ enum ElementType
typeOfficeArtClientData,
typeOfficeArtClientTextbox,
//xlsb static const XLS::ElementType type = XLS::typeSLICERCACHEOLAPIMPL;
typeCONDITIONALFORMATTING = 4000,
typeCONDITIONALFORMATTING14,
typeBeginConditionalFormatting,
typeBeginConditionalFormatting14,
typeCFRULE,
typeCFRULE14,
typeBeginCFRule,
typeBeginCFRule14,
typeuCFVO,
typeuCFVO14,
typeCFVO14,
typeCOLORSCALE,
typeCOLORSCALE14,
typeDATABAR,
typeBeginDatabar,
typeDATABAR14,
typeBeginDatabar14,
typeICONSET,
typeBeginIconSet,
typeICONSET14,
typeBeginIconSet14,
typeACFMT,
typeFmt,
typeFRTDXF,
typeFRTWORKSHEET,
typeFRTSTYLESHEET,
typeuDXF,
typeDXF14,
typeCUSTOMRICHFILTERS,
typeRICHFILTERS,
typeDynamicRichFilter,
typeTop10RichFilter,
typeRICHFILTERCONTENT,
typeACICONFILTER,
typeACFILTERS,
typeACCUSTOMFILTER,
typeCUSTOMFILTERS,
typeFILTERS,
typeACFILTERCONTENT,
typeDynamicFilter,
typeTop10Filter,
typeColorFilter,
typeIconFilter,
typeFRTTABLE,
typeSUPSAME,
typeSUPADDIN,
typeSupBookSrc,
typeDVALS,
typeDVALS14,
typeDVal14,
typeBeginDVals,
typeBeginDVals14,
typeFRTQSI,
typeFRTEXTCONNECTIONS,
typeEXTCONNECTION,
typeEXTCONN14,
typeEXTCONN15,
typeBeginExtConnection,
typeBeginExtConn14,
typeBeginExtConn15,
typeRangePr15,
typeSLICERCACHEOLAPIMPL,
typeSLICERCACHENATIVEITEMS,
typeFRTSLICERCACHE,
typeSLICERSEX,
typeTABLESLICERSEX,
typeSLICEREX,
typeTABLESLICEREX,
typeFRTWORKBOOK,
typeRWBRK,
typeCOLBRK,
typeBeginRwBrk,
typeBeginColBrk,
typeRangeProtection,
typeRangeProtectionIso,
typeCsProtection,
typeCsProtectionIso,
typeSheetProtection,
typeSheetProtectionIso,
typeCSVIEWS,
typeCSVIEW,
typeBeginCsView,
typeWSVIEWS2,
typeWSVIEW2,
typeBeginWsView,
typeCsPageSetup,
typePageSetup,
typeCsProp,
typeWsProp,
//xlsb static const XLS::ElementType type = XLS::typeSLICERCACHEOLAPIMPL;
typeCONDITIONALFORMATTING = 4000,
typeCONDITIONALFORMATTING14,
typeBeginConditionalFormatting,
typeBeginConditionalFormatting14,
typeCFRULE,
typeCFRULE14,
typeBeginCFRule,
typeBeginCFRule14,
typeuCFVO,
typeuCFVO14,
typeCFVO14,
typeCOLORSCALE,
typeCOLORSCALE14,
typeDATABAR,
typeBeginDatabar,
typeDATABAR14,
typeBeginDatabar14,
typeICONSET,
typeBeginIconSet,
typeICONSET14,
typeBeginIconSet14,
typeACFMT,
typeFmt,
typeFRTDXF,
typeFRTWORKSHEET,
typeFRTSTYLESHEET,
typeuDXF,
typeDXF14,
typeCUSTOMRICHFILTERS,
typeRICHFILTERS,
typeDynamicRichFilter,
typeTop10RichFilter,
typeRICHFILTERCONTENT,
typeACICONFILTER,
typeACFILTERS,
typeACCUSTOMFILTER,
typeCUSTOMFILTERS,
typeFILTERS,
typeACFILTERCONTENT,
typeDynamicFilter,
typeTop10Filter,
typeColorFilter,
typeIconFilter,
typeFRTTABLE,
typeSUPSAME,
typeSUPADDIN,
typeSupBookSrc,
typeDVALS,
typeDVALS14,
typeDVal14,
typeBeginDVals,
typeBeginDVals14,
typeFRTQSI,
typeFRTEXTCONNECTIONS,
typeEXTCONNECTION,
typeEXTCONN14,
typeEXTCONN15,
typeBeginExtConnection,
typeBeginExtConn14,
typeBeginExtConn15,
typeRangePr15,
typeSLICERCACHEOLAPIMPL,
typeSLICERCACHENATIVEITEMS,
typeFRTSLICERCACHE,
typeSLICERSEX,
typeTABLESLICERSEX,
typeSLICEREX,
typeTABLESLICEREX,
typeFRTWORKBOOK,
typeRWBRK,
typeCOLBRK,
typeBeginRwBrk,
typeBeginColBrk,
typeRangeProtection,
typeRangeProtectionIso,
typeCsProtection,
typeCsProtectionIso,
typeSheetProtection,
typeSheetProtectionIso,
typeCSVIEWS,
typeCSVIEW,
typeBeginCsView,
typeWSVIEWS2,
typeWSVIEW2,
typeBeginWsView,
typeCsPageSetup,
typePageSetup,
typeCsProp,
typeWsProp,
typePCRRecord,
typePIVOTCACHERECORDDT,
typePCDIMissing,
typePCDINumber,
typePCDIBoolean,
typePCDIError,
typePCDIString,
typePCDIDatetime,
typePCDIIndex,
typePCDIAMissing,
typePCDIANumber,
typePCDIABoolean,
typePCDIAError,
typePCDIAString,
typePCDIADatetime,
typePIVOTFILTERS,
typeBeginSXView,
typeEndSXView,
typeBeginSXView14,
typeEndSXView14,
typeSXCONDFMTS,
typeBeginSXCondFmts,
typeEndSXCondFmts,
typeSXCONDFMTS14,
typeBeginSXCondFmts14,
typeEndSXCondFmts14,
typeSXCONDFMT,
typeBeginSXCondFmt,
typeEndSXCondFmt,
typeSXCONDFMT14,
typeBeginSXCondFmt14,
typeEndSXCondFmt14,
typeBeginSXRules,
typeEndSXRules,
typeBeginSXRules14,
typeEndSXRules14,
typeBeginPRule,
typeEndPRule,
typeBeginPRule14,
typeEndPRule14,
typeBeginPRFilters,
typeEndPRFilters,
typeBeginPRFilters14,
typeEndPRFilters14,
typeBeginPRFilter,
typeEndPRFilter,
typeBeginPRFilter14,
typeEndPRFilter14,
typeBeginPRFItem,
typeEndPRFItem,
typeBeginPRFItem14,
typeEndPRFItem14,
typeSxvcellNum,
typeSxvcellStr,
typeSxvcellErr,
typeSxvcellBool,
typeSxvcellDate,
typeSxvcellNil,
typeBeginSXView16,
typeEndSXView16,
typePIVOTRULES,
typePIVOTRULES14,
typePIVOTRULE14,
typePRFILTERS,
typePRFILTERS14,
typePRFILTER14,
typePRFITEM,
typePRFITEM14,
typeBeginPivotCacheDef,
typePCDIRUN,
typePCDI,
typePCDIA,
typeISXVDRWS,
typeBeginISXVDRws,
typeISXVDCOLS,
typeBeginISXVDCols,
typeSXLIRWS,
typeSXLICOLS,
typePCDIDT,
typeFRTPIVOTCACHEDEF,
typePCD14,
typeTABLECELL,
typeDATACELL,
typeFMLACELL,
typeSHRFMLACELL,
};

View File

@ -0,0 +1,39 @@
#-------------------------------------------------
#
# Project created by QtCreator 2014-12-16T18:28:23
#
#-------------------------------------------------
QT -= core gui
TARGET = VbaFormatLib
TEMPLATE = lib
CONFIG += staticlib
CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD
CONFIG += core_x2t
include(../../../Common/base.pri)
DEFINES += UNICODE \
_UNICODE \
DONT_WRITE_EMBEDDED_FONTS
#BOOST
include($$PWD/../../../Common/3dParty/boost/boost.pri)
SOURCES += \
../VbaFormat/Records.cpp \
../VbaFormat/StreamObjects.cpp \
../VbaFormat/VbaBinary.cpp \
../VbaFormat/VbaReader.cpp
HEADERS += \
../VbaFormat/Records.h \
../VbaFormat/StreamObjects.h \
../VbaFormat/VbaBinary.h \
../VbaFormat/VbaReader.h \
../VbaFormat/VbaRecordType.h

View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\VbaFormat\VbaBinary.cpp" />
<ClCompile Include="..\VbaFormat\StreamObjects.cpp" />
<ClCompile Include="..\VbaFormat\Records.cpp" />
<ClCompile Include="..\VbaFormat\VbaReader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\VbaFormat\VbaBinary.h" />
<ClInclude Include="..\VbaFormat\StreamObjects.h" />
<ClInclude Include="..\VbaFormat\Records.h" />
<ClInclude Include="..\VbaFormat\VbaReader.h" />
<ClInclude Include="..\VbaFormat\VbaRecordType.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{041DD428-2D5C-4D97-8AB7-7207F3D5B801}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>VbaFormat</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>..\..\..\Common\3dParty\boost\build\win_32\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_32\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>..\..\..\Common\3dParty\boost\build\win_64\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_64\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\VbaFormat\VbaReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\VbaFormat\Records.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\VbaFormat\StreamObjects.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\VbaFormat\VbaBinary.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\VbaFormat\VbaReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\VbaFormat\Records.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\VbaFormat\StreamObjects.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\VbaFormat\VbaRecordType.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\VbaFormat\VbaBinary.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -23,7 +23,7 @@ namespace NSCSS
m_arParentsStyles(oStyle.m_arParentsStyles), m_sId(oStyle.m_sId),
m_nDpi(oStyle.m_nDpi), m_UnitMeasure(oStyle.m_UnitMeasure),
m_pFont(oStyle.m_pFont), m_pMargin(oStyle.m_pMargin), m_pBackground(oStyle.m_pBackground),
m_pText(oStyle.m_pText), m_pBorder(oStyle.m_pBorder){}
m_pText(oStyle.m_pText), m_pBorder(oStyle.m_pBorder), m_pDisplay(oStyle.m_pDisplay){}
CCompiledStyle::~CCompiledStyle()
{
@ -38,6 +38,7 @@ namespace NSCSS
m_pFont += oElement.m_pFont;
m_pMargin += oElement.m_pMargin;
m_pText += oElement.m_pText;
m_pDisplay += oElement.m_pDisplay;
return *this;
}
@ -55,6 +56,7 @@ namespace NSCSS
m_pFont = oElement.m_pFont;
m_pMargin = oElement.m_pMargin;
m_pText = oElement.m_pText;
m_pDisplay = oElement.m_pDisplay;
return *this;
}
@ -67,7 +69,8 @@ namespace NSCSS
m_pBorder == oStyle.m_pBorder &&
m_pFont == oStyle.m_pFont &&
m_pMargin == oStyle.m_pMargin &&
m_pText == oStyle.m_pText;
m_pText == oStyle.m_pText &&
m_pDisplay == oStyle.m_pDisplay;
}
void CCompiledStyle::StyleEquation(CCompiledStyle &oFirstStyle, CCompiledStyle &oSecondStyle)
@ -77,6 +80,7 @@ namespace NSCSS
NSConstValues::NSCssProperties::Background::BackgroundEquation(oFirstStyle.m_pBackground, oSecondStyle.m_pBackground);
NSConstValues::NSCssProperties::Text::TextEquation(oFirstStyle.m_pText, oSecondStyle.m_pText);
NSConstValues::NSCssProperties::Border::BorderEquation(oFirstStyle.m_pBorder, oSecondStyle.m_pBorder);
NSConstValues::NSCssProperties::Display::DisplayEquation(oFirstStyle.m_pDisplay, oSecondStyle.m_pDisplay);
oFirstStyle.ClearImportants();
oSecondStyle.ClearImportants();
@ -92,10 +96,20 @@ namespace NSCSS
m_UnitMeasure = enUnitMeasure;
}
void CCompiledStyle::SetSizeSourceWindow(const CSizeWindow &oSizeWindow)
{
m_oSourceWindow = oSizeWindow;
}
void CCompiledStyle::SetSizeDeviceWindow(const CSizeWindow &oSizeWindow)
{
m_oDeviceWindow = oSizeWindow;
}
bool CCompiledStyle::Empty() const
{
return m_pBackground.Empty() && m_pBorder.Empty() &&
m_pFont.Empty() && m_pMargin.Empty() && m_pText.Empty();
m_pFont.Empty() && m_pMargin.Empty() && m_pText.Empty() && m_pDisplay.Empty();
}
void CCompiledStyle::AddPropSel(const std::wstring& sProperty, const std::wstring& sValue, const unsigned int unLevel, const bool& bHardMode)
@ -245,13 +259,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddMargin(sValue, unLevel, true);
@ -268,13 +282,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddTopMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddTopMargin(sValue, unLevel, true);
@ -291,13 +305,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddRightMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddRightMargin(sValue, unLevel, true);
@ -313,13 +327,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddBottomMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddBottomMargin(sValue, unLevel, true);
@ -336,13 +350,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddLeftMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddLeftMargin(sValue, unLevel, true);
@ -352,6 +366,7 @@ namespace NSCSS
}
//PADDING
CASE(L"padding"):
CASE(L"mso-padding-alt"):
{
if (bIsThereBorder)
break;
@ -359,13 +374,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddMargin(sValue, unLevel, true);
@ -375,6 +390,7 @@ namespace NSCSS
break;
}
CASE(L"padding-top"):
CASE(L"mso-padding-top-alt"):
{
if (bIsThereBorder)
break;
@ -382,13 +398,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddTopMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddTopMargin(sValue, unLevel, true);
@ -398,6 +414,7 @@ namespace NSCSS
break;
}
CASE(L"padding-right"):
CASE(L"mso-padding-right-alt"):
{
if (bIsThereBorder)
break;
@ -406,13 +423,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddRightMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddRightMargin(sValue, unLevel, true);
@ -422,6 +439,7 @@ namespace NSCSS
break;
}
CASE(L"padding-bottom"):
CASE(L"mso-padding-bottom-alt"):
{
if (bIsThereBorder)
break;
@ -429,13 +447,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddBottomMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionY);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddBottomMargin(sValue, unLevel, true);
@ -445,6 +463,7 @@ namespace NSCSS
break;
}
CASE(L"padding-left"):
CASE(L"mso-padding-left-alt"):
{
if (bIsThereBorder)
break;
@ -452,13 +471,13 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddLeftMargin(sValue, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f);
const std::wstring sValue = ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX);
if (sValue.find_first_not_of(L" 0") != std::wstring::npos)
m_pMargin.AddLeftMargin(sValue, unLevel, true);
@ -488,11 +507,11 @@ namespace NSCSS
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
m_pText.SetIndent(ConvertUnitMeasure(pPropertie.second, 540.0f), unLevel, bHardMode);
m_pText.SetIndent(ConvertUnitMeasure(pPropertie.second, 540.0f, ScalingDirectionX), unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
m_pText.SetIndent(ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f), unLevel, true);
m_pText.SetIndent(ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), 540.0f, ScalingDirectionX), unLevel, true);
m_pText.SetImportantIndent(true);
}
@ -915,6 +934,71 @@ namespace NSCSS
break;
}
//DISPLAY
CASE(L"display"):
{
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
m_pDisplay.SetDisplay(pPropertie.second, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
m_pDisplay.SetDisplay(pPropertie.second.substr(0, unPositionImp - 1), unLevel, true);
m_pDisplay.SetImportantDisplay(true);
}
break;
}
//OTHER
CASE(L"width"):
{
if (bIsThereBorder)
break;
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second, m_oDeviceWindow.m_ushWidth, ScalingDirectionX), unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), m_oDeviceWindow.m_ushWidth, ScalingDirectionX), unLevel, true);
m_pDisplay.SetImportantWidth(true);
}
// std::wstring wsWidth;
// if (unPositionImp == std::wstring::npos)
// wsWidth = pPropertie.second;
// else
// wsWidth = pPropertie.second.substr(0, unPositionImp - 1);
// wsWidth = ConvertUnitMeasure(wsWidth, m_oDeviceWindow.m_ushWidth, ScalingDirectionX);
// int nWidth = std::stoi(wsWidth);
// if (m_oDeviceWindow.m_ushWidth != nWidth)
// m_pDisplay.SetWidth(m_oDeviceWindow.m_ushWidth - nWidth, unLevel);
break;
}
CASE(L"align"):
{
const size_t unPositionImp = pPropertie.second.find(L"!i");
if (unPositionImp == std::wstring::npos)
{
m_pDisplay.SetAlign(pPropertie.second, unLevel, bHardMode);
}
else if (unPositionImp != 0)
{
m_pDisplay.SetAlign(pPropertie.second.substr(0, unPositionImp - 1), unLevel, true);
m_pDisplay.SetImportantAlign(true);
}
break;
}
}
}
}
@ -990,7 +1074,7 @@ namespace NSCSS
m_pText .ClearImportants();
}
std::wstring CCompiledStyle::ConvertUnitMeasure(const std::wstring &sValue, const float& fPreviousValue) const
std::wstring CCompiledStyle::ConvertUnitMeasure(const std::wstring &sValue, const float& fPreviousValue, ScalingDirection enScalingDirection) const
{
if (sValue.empty())
return sValue;
@ -1031,7 +1115,11 @@ namespace NSCSS
}
else if (sValueTemp.find(L"px") != std::wstring::npos)
{
sValueString += ConvertPx(sValueTemp);
int nValue = ConvertPx(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1040,7 +1128,11 @@ namespace NSCSS
}
else if (sValueTemp.find(L"cm") != std::wstring::npos)
{
sValueString += ConvertCm(sValueTemp);
int nValue = ConvertCm(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1049,7 +1141,11 @@ namespace NSCSS
}
else if (sValueTemp.find(L"mm") != std::wstring::npos)
{
sValueString += ConvertMm(sValueTemp);
int nValue = ConvertMm(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1057,8 +1153,12 @@ namespace NSCSS
sValueString += L' ';
}
else if (sValueTemp.find(L"in") != std::wstring::npos)
{
sValueString += ConvertIn(sValueTemp);
{
int nValue = ConvertIn(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1067,7 +1167,11 @@ namespace NSCSS
}
else if (sValueTemp.find(L"pt") != std::wstring::npos)
{
sValueString += ConvertPt(sValueTemp);
int nValue = ConvertPt(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1076,7 +1180,11 @@ namespace NSCSS
}
else if (sValueTemp.find(L"pc") != std::wstring::npos)
{
sValueString += ConvertPc(sValueTemp);
int nValue = ConvertPc(sValueTemp);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
if (sValueTemp.find(L';') != std::wstring::npos)
sValueString += L';';
@ -1086,6 +1194,7 @@ namespace NSCSS
else if (sValueTemp.find(L"em") != std::wstring::npos)
{
const float fValue = wcstof(sValueTemp.c_str(), NULL) * m_pFont.GetSize();
sValueString += std::to_wstring(static_cast<short int>(fValue + 0.5f));
if (sValueTemp.find(L';') != std::wstring::npos)
@ -1095,7 +1204,16 @@ namespace NSCSS
}
else
{
sValueString += sValueTemp;
if (iswdigit(sValueTemp[0]))
{
int nValue = static_cast<int>(wcstof(sValueTemp.c_str(), NULL) + 0.5f);
Scale(nValue, enScalingDirection);
sValueString += std::to_wstring(nValue);
}
else
sValueString += sValueTemp;
if (sValueTemp.find(L";") != std::wstring::npos)
sValueString += L';';
@ -1110,10 +1228,26 @@ namespace NSCSS
return sValueString;
}
inline std::wstring CCompiledStyle::ConvertPx(const std::wstring& sValue) const
void CCompiledStyle::Scale(int &nValue, ScalingDirection enScalingDirection) const
{
if (ScalingDirectionNone == enScalingDirection)
return;
else if (ScalingDirectionX == enScalingDirection && 0 != m_oSourceWindow.m_ushWidth &&
0 != m_oDeviceWindow.m_ushWidth && m_oSourceWindow.m_ushWidth != m_oDeviceWindow.m_ushWidth)
{
nValue = static_cast<int>((double)nValue / m_oSourceWindow.m_ushWidth * m_oDeviceWindow.m_ushWidth + 0.5f);
}
else if (ScalingDirectionY == enScalingDirection && 0 != m_oSourceWindow.m_ushHeight &&
0 != m_oDeviceWindow.m_ushHeight && m_oSourceWindow.m_ushHeight != m_oDeviceWindow.m_ushHeight)
{
nValue = static_cast<int>((double)nValue / m_oSourceWindow.m_ushHeight * m_oDeviceWindow.m_ushHeight + 0.5f);
}
}
inline int CCompiledStyle::ConvertPx(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"px") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
@ -1121,7 +1255,7 @@ namespace NSCSS
switch (m_UnitMeasure)
{
case Pixel:
return std::to_wstring(static_cast<short int>(dValue));;
return static_cast<int>(dValue);
case Default:
case Point:
return ConvertPxToPt(dValue);
@ -1135,53 +1269,39 @@ namespace NSCSS
return ConvertPxToPc(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertPxToCm(const float& dValue) const
inline int CCompiledStyle::ConvertPxToCm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / static_cast<float>(m_nDpi) * 2.54f + 0.5f));
return static_cast<int>(dValue / m_nDpi * 2.54f);
}
inline std::wstring CCompiledStyle::ConvertPxToIn(const float& dValue) const
inline int CCompiledStyle::ConvertPxToIn(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(1.0f / static_cast<float>(m_nDpi) * dValue + 0.5f));
return static_cast<int>(1.0f / static_cast<float>(m_nDpi) * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPxToMm(const float& dValue) const
inline int CCompiledStyle::ConvertPxToMm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / static_cast<float>(m_nDpi) * 25.4f + 0.5f));
return static_cast<int>(dValue / static_cast<float>(m_nDpi) * 25.4f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPxToPc(const float& dValue) const
inline int CCompiledStyle::ConvertPxToPc(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(0.16667f / static_cast<float>(m_nDpi) * dValue + 0.5f));
return static_cast<int>(0.16667f / static_cast<float>(m_nDpi) * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPxToPt(const float& dValue) const
inline int CCompiledStyle::ConvertPxToPt(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(72.0f / static_cast<float>(m_nDpi) * dValue + 0.5f));
return static_cast<int>(72.0f / static_cast<float>(m_nDpi) * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertCm(const std::wstring& sValue) const
inline int CCompiledStyle::ConvertCm(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"cm") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
@ -1194,7 +1314,7 @@ namespace NSCSS
case Pixel:
return ConvertCmToPx(dValue);
case Cantimeter:
return std::to_wstring(static_cast<short int>(dValue));;
return static_cast<int>(dValue);
case Millimeter:
return ConvertCmToMm(dValue);
case Inch:
@ -1203,53 +1323,38 @@ namespace NSCSS
return ConvertCmToPc(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertCmToIn(const float& dValue) const
inline int CCompiledStyle::ConvertCmToIn(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 2.54f + 0.5f));
return static_cast<int>(dValue / 2.54f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertCmToMm(const float& dValue) const
inline int CCompiledStyle::ConvertCmToMm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 10.0f + 0.5f));
return static_cast<int>(dValue * 10.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertCmToPc(const float& dValue) const
inline int CCompiledStyle::ConvertCmToPc(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(2.36f * dValue + 0.5f));
return static_cast<int>(2.36f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertCmToPt(const float& dValue) const
inline int CCompiledStyle::ConvertCmToPt(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(28.35f * dValue + 0.5f));
return static_cast<int>(28.35f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertCmToPx(const float& dValue) const
inline int CCompiledStyle::ConvertCmToPx(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(static_cast<float>(m_nDpi) / 2.54f * dValue + 0.5f));
return static_cast<int>(static_cast<float>(m_nDpi) / 2.54f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertMm(const std::wstring& sValue) const
inline int CCompiledStyle::ConvertMm(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"mm") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
@ -1264,59 +1369,47 @@ namespace NSCSS
case Cantimeter:
return ConvertMmToCm(dValue);
case Millimeter:
return std::to_wstring(static_cast<short int>(dValue));;
return static_cast< int>(dValue);
case Inch:
return ConvertMmToIn(dValue);
case Peak:
return ConvertMmToPc(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertMmToIn(const float& dValue) const
inline int CCompiledStyle::ConvertMmToIn(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 25.4f + 0.5f));
return static_cast<int>(dValue / 25.4f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertMmToCm(const float& dValue) const
inline int CCompiledStyle::ConvertMmToCm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 10.0f + 0.5f));
return static_cast<int>(dValue / 10.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertMmToPc(const float& dValue) const
inline int CCompiledStyle::ConvertMmToPc(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(2.8346f * dValue + 0.5f));
return static_cast<int>(2.8346f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertMmToPt(const float& dValue) const
inline int CCompiledStyle::ConvertMmToPt(const float& dValue) const
{
if (dValue == 0)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(0.23262f * dValue + 0.5f));
return static_cast<int>(0.23262f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertMmToPx(const float& dValue) const
inline int CCompiledStyle::ConvertMmToPx(const float& dValue) const
{
if (dValue == 0)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(static_cast<float>(m_nDpi) / 25.4f * dValue + 0.5f));
return static_cast<int>(static_cast<float>(m_nDpi) / 25.4f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertIn(const std::wstring& sValue) const
inline int CCompiledStyle::ConvertIn(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"in") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
@ -1333,60 +1426,48 @@ namespace NSCSS
case Millimeter:
return ConvertInToMm(dValue);
case Inch:
return std::to_wstring(static_cast<short int>(dValue));;
return static_cast<int>(dValue);
case Peak:
return ConvertInToPc(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertInToMm(const float& dValue) const
inline int CCompiledStyle::ConvertInToMm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 25.4f + 0.5f));
return static_cast<int>(dValue * 25.4f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertInToCm(const float& dValue) const
inline int CCompiledStyle::ConvertInToCm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 2.54f + 0.5f));
return static_cast<int>(dValue * 2.54f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertInToPc(const float& dValue) const
inline int CCompiledStyle::ConvertInToPc(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 72.0f + 0.5f));
return static_cast<int>(dValue / 72.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertInToPt(const float& dValue) const
inline int CCompiledStyle::ConvertInToPt(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 6.0f + 0.5f));
return static_cast<int>(dValue / 6.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertInToPx(const float& dValue) const
inline int CCompiledStyle::ConvertInToPx(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * static_cast<float>(m_nDpi) + 0.5f));
return static_cast<short int>(dValue * static_cast<float>(m_nDpi) + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPt(const std::wstring& sValue) const
inline int CCompiledStyle::ConvertPt(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"pt") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
switch (m_UnitMeasure)
{
@ -1394,7 +1475,7 @@ namespace NSCSS
return ConvertPtToPx(dValue);
case Default:
case Point:
return std::to_wstring(static_cast<short int>(dValue));
return static_cast<int>(dValue + 0.5f);
case Cantimeter:
return ConvertPtToCm(dValue);
case Millimeter:
@ -1405,53 +1486,38 @@ namespace NSCSS
return ConvertPtToPc(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertPtToIn(const float& dValue) const
inline int CCompiledStyle::ConvertPtToIn(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring((dValue / 72.0f + 0.5f));
return static_cast<int>(dValue / 72.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPtToCm(const float& dValue) const
inline int CCompiledStyle::ConvertPtToCm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 0.03528f + 0.5f));
return static_cast<int>(dValue * 0.03528f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPtToPc(const float& dValue) const
inline int CCompiledStyle::ConvertPtToPc(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 12.0f + 0.5f));
return static_cast<int>(dValue / 12.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPtToMm(const float& dValue) const
inline int CCompiledStyle::ConvertPtToMm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring((dValue * 0.3528f + 0.5f));
return static_cast<int>(dValue * 0.3528f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPtToPx(const float& dValue) const
inline int CCompiledStyle::ConvertPtToPx(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(static_cast<float>(m_nDpi) / 72.0f * dValue + 0.5f));
return static_cast<short int>(static_cast<float>(m_nDpi) / 72.0f * dValue + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPc(const std::wstring& sValue) const
inline int CCompiledStyle::ConvertPc(const std::wstring& sValue) const
{
if (sValue.empty())
return std::wstring();
return 0;
const std::wstring& sConvertValue = sValue.substr(0, sValue.find_last_of(L"pc") - 1);
const float dValue = wcstof(sConvertValue.c_str(), NULL) * 2.0f;
@ -1470,50 +1536,35 @@ namespace NSCSS
case Inch:
return ConvertPcToIn(dValue);
case Peak:
return std::to_wstring(static_cast<short int>(dValue));
return static_cast<int>(dValue);
}
return std::wstring();
return 0;
}
inline std::wstring CCompiledStyle::ConvertPcToIn(const float& dValue) const
inline int CCompiledStyle::ConvertPcToIn(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue / 6.0f + 0.5f));
return static_cast<int>(dValue / 6.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPcToCm(const float& dValue) const
inline int CCompiledStyle::ConvertPcToCm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 0.423f + 0.5f));
return static_cast<int>(dValue * 0.423f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPcToPt(const float& dValue) const
inline int CCompiledStyle::ConvertPcToPt(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 12.0f + 0.5f));
return static_cast<int>(dValue * 12.0f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPcToMm(const float& dValue) const
inline int CCompiledStyle::ConvertPcToMm(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(dValue * 4.23f + 0.5f));
return static_cast<int>(dValue * 4.23f + 0.5f);
}
inline std::wstring CCompiledStyle::ConvertPcToPx(const float& dValue) const
inline int CCompiledStyle::ConvertPcToPx(const float& dValue) const
{
if (dValue == 0.0f)
return std::wstring(L"0");
return std::to_wstring(static_cast<short int>(static_cast<float>(m_nDpi) / 6.0f * dValue + 0.5f));
return static_cast<int>(static_cast<float>(m_nDpi) / 6.0f * dValue + 0.5f);
}
}

View File

@ -19,49 +19,54 @@ namespace NSCSS
unsigned short int m_nDpi;
UnitMeasure m_UnitMeasure;
std::wstring ConvertUnitMeasure(const std::wstring& sValue, const float& fPreviousValue) const;
CSizeWindow m_oSourceWindow;
CSizeWindow m_oDeviceWindow;
std::wstring ConvertPx(const std::wstring& sValue) const;
std::wstring ConvertPxToCm(const float& dValue) const;
std::wstring ConvertPxToIn(const float& dValue) const;
std::wstring ConvertPxToMm(const float& dValue) const;
std::wstring ConvertPxToPt(const float& dValue) const;
std::wstring ConvertPxToPc(const float& dValue) const;
std::wstring ConvertUnitMeasure(const std::wstring& sValue, const float& fPreviousValue, ScalingDirection enScalingDirection = ScalingDirectionNone) const;
std::wstring ConvertCm(const std::wstring& sValue) const;
std::wstring ConvertCmToPx(const float& dValue) const;
std::wstring ConvertCmToIn(const float& dValue) const;
std::wstring ConvertCmToMm(const float& dValue) const;
std::wstring ConvertCmToPt(const float& dValue) const;
std::wstring ConvertCmToPc(const float& dValue) const;
void Scale(int &nValue, ScalingDirection enScalingDirection) const;
std::wstring ConvertMm(const std::wstring& sValue) const;
std::wstring ConvertMmToPx(const float& dValue) const;
std::wstring ConvertMmToIn(const float& dValue) const;
std::wstring ConvertMmToCm(const float& dValue) const;
std::wstring ConvertMmToPt(const float& dValue) const;
std::wstring ConvertMmToPc(const float& dValue) const;
int ConvertPx(const std::wstring& sValue) const;
int ConvertPxToCm(const float& dValue) const;
int ConvertPxToIn(const float& dValue) const;
int ConvertPxToMm(const float& dValue) const;
int ConvertPxToPt(const float& dValue) const;
int ConvertPxToPc(const float& dValue) const;
std::wstring ConvertIn(const std::wstring& sValue) const;
std::wstring ConvertInToPx(const float& dValue) const;
std::wstring ConvertInToMm(const float& dValue) const;
std::wstring ConvertInToCm(const float& dValue) const;
std::wstring ConvertInToPt(const float& dValue) const;
std::wstring ConvertInToPc(const float& dValue) const;
int ConvertCm(const std::wstring& sValue) const;
int ConvertCmToPx(const float& dValue) const;
int ConvertCmToIn(const float& dValue) const;
int ConvertCmToMm(const float& dValue) const;
int ConvertCmToPt(const float& dValue) const;
int ConvertCmToPc(const float& dValue) const;
std::wstring ConvertPt(const std::wstring& sValue) const;
std::wstring ConvertPtToPx(const float& dValue) const;
std::wstring ConvertPtToMm(const float& dValue) const;
std::wstring ConvertPtToCm(const float& dValue) const;
std::wstring ConvertPtToIn(const float& dValue) const;
std::wstring ConvertPtToPc(const float& dValue) const;
int ConvertMm(const std::wstring& sValue) const;
int ConvertMmToPx(const float& dValue) const;
int ConvertMmToIn(const float& dValue) const;
int ConvertMmToCm(const float& dValue) const;
int ConvertMmToPt(const float& dValue) const;
int ConvertMmToPc(const float& dValue) const;
std::wstring ConvertPc(const std::wstring& sValue) const;
std::wstring ConvertPcToPx(const float& dValue) const;
std::wstring ConvertPcToMm(const float& dValue) const;
std::wstring ConvertPcToCm(const float& dValue) const;
std::wstring ConvertPcToIn(const float& dValue) const;
std::wstring ConvertPcToPt(const float& dValue) const;
int ConvertIn(const std::wstring& sValue) const;
int ConvertInToPx(const float& dValue) const;
int ConvertInToMm(const float& dValue) const;
int ConvertInToCm(const float& dValue) const;
int ConvertInToPt(const float& dValue) const;
int ConvertInToPc(const float& dValue) const;
int ConvertPt(const std::wstring& sValue) const;
int ConvertPtToPx(const float& dValue) const;
int ConvertPtToMm(const float& dValue) const;
int ConvertPtToCm(const float& dValue) const;
int ConvertPtToIn(const float& dValue) const;
int ConvertPtToPc(const float& dValue) const;
int ConvertPc(const std::wstring& sValue) const;
int ConvertPcToPx(const float& dValue) const;
int ConvertPcToMm(const float& dValue) const;
int ConvertPcToCm(const float& dValue) const;
int ConvertPcToIn(const float& dValue) const;
int ConvertPcToPt(const float& dValue) const;
public:
@ -70,6 +75,7 @@ namespace NSCSS
NSConstValues::NSCssProperties::Background m_pBackground;
NSConstValues::NSCssProperties::Text m_pText;
NSConstValues::NSCssProperties::Border m_pBorder;
NSConstValues::NSCssProperties::Display m_pDisplay;
CCompiledStyle();
explicit CCompiledStyle(const std::map<std::wstring, std::wstring>& mStyle);
@ -79,6 +85,8 @@ namespace NSCSS
void SetDpi(const unsigned short& uiDpi);
void SetUnitMeasure(const UnitMeasure& enUnitMeasure);
void SetSizeSourceWindow(const CSizeWindow& oSizeWindow);
void SetSizeDeviceWindow(const CSizeWindow& oSizeWindow);
bool Empty() const;

View File

@ -46,7 +46,27 @@ namespace NSCSS
void CCssCalculator::SetBodyTree(const CTree &oTree)
{
m_pInternal->SetBodyTree(oTree);
m_pInternal->SetBodyTree(oTree);
}
void CCssCalculator::SetSizeSourceWindow(const CSizeWindow &oSizeWindow)
{
m_pInternal->SetSizeSourceWindow(oSizeWindow);
}
void CCssCalculator::SetSizeDeviceWindow(const CSizeWindow &oSizeWindow)
{
m_pInternal->SetSizeDeviceWindow(oSizeWindow);
}
CSizeWindow CCssCalculator::GetSizeSourceWindow() const
{
return m_pInternal->GetSizeSourceWindow();
}
CSizeWindow CCssCalculator::GetSizeDeviceWindow() const
{
return m_pInternal->GetSizeDeviceWindow();
}
UnitMeasure CCssCalculator::GetUnitMeasure() const

View File

@ -30,6 +30,11 @@ namespace NSCSS
void SetDpi(const unsigned short int& nValue);
void SetBodyTree(const CTree &oTree);
void SetSizeSourceWindow(const CSizeWindow& oSizeWindow);
void SetSizeDeviceWindow(const CSizeWindow& oSizeWindow);
CSizeWindow GetSizeSourceWindow() const;
CSizeWindow GetSizeDeviceWindow() const;
UnitMeasure GetUnitMeasure() const;
std::wstring GetEncoding() const;

View File

@ -326,13 +326,19 @@ namespace NSCSS
oStyle.SetUnitMeasure(m_UnitMeasure);
oStyle.SetID(arSelectors.back().m_sName + ((!arSelectors.back().m_sClass.empty()) ? L'.' + arSelectors.back().m_sClass : L"") + ((arSelectors.back().m_sId.empty()) ? L"" : L'#' + arSelectors.back().m_sId) + L'-' + std::to_wstring(++m_nCountNodes));
oStyle.SetSizeDeviceWindow(m_oDeviceWindow);
oStyle.SetSizeSourceWindow(m_oSourceWindow);
return oStyle;
}
CCompiledStyle *oStyle = new CCompiledStyle();
CCompiledStyle *pStyle = new CCompiledStyle();
oStyle->SetDpi(m_nDpi);
oStyle->SetUnitMeasure(m_UnitMeasure);
pStyle->SetDpi(m_nDpi);
pStyle->SetUnitMeasure(m_UnitMeasure);
pStyle->SetSizeDeviceWindow(m_oDeviceWindow);
pStyle->SetSizeSourceWindow(m_oSourceWindow);
std::vector<std::wstring> arWords;
arWords.reserve(arSelectors.size() * 2);
@ -345,10 +351,10 @@ namespace NSCSS
arWords.push_back(oNode->m_sName);
if (oNode->m_sName == L"td")
oStyle->m_pMargin.SetPermission(false);
pStyle->m_pMargin.SetPermission(false);
if (oNode->m_sName == L"table")
oStyle->m_pBorder.Block();
pStyle->m_pBorder.Block();
if (!oNode->m_sClass.empty())
{
@ -415,7 +421,7 @@ namespace NSCSS
sName = arWords.back();
arWords.pop_back();
arNextNodes.push_back(sName);
oStyle->AddParent(sName);
pStyle->AddParent(sName);
const std::map<std::wstring, CElement*>::const_iterator oFindName = m_mData.find(sName);
std::map<std::wstring, CElement*>::const_iterator oFindId;
@ -496,25 +502,27 @@ namespace NSCSS
});
}
pStyle->AddStyle(arSelectors[i].m_mAttrs, i + 1);
for (const CElement* oElement : arFindElements)
oStyle->AddStyle(oElement->GetStyle(), i + 1);
pStyle->AddStyle(oElement->GetStyle(), i + 1);
std::map<StatistickElement, unsigned int>::const_iterator oFindCountStyle = m_mStatictics->find(StatistickElement{StatistickElement::IsStyle, arSelectors[i].m_sStyle});
if(oFindCountStyle != m_mStatictics->end())
if ((bIsSettings && oFindCountStyle->second < MaxNumberRepetitions) ||
(!bIsSettings && oFindCountStyle->second >= MaxNumberRepetitions))
oStyle->AddStyle(arSelectors[i].m_sStyle, i + 1, true);
pStyle->AddStyle(arSelectors[i].m_sStyle, i + 1, true);
}
if (!bIsSettings)
{
oStyle->SetID(arSelectors.back().m_sName + ((!arSelectors.back().m_sClass.empty()) ? L'.' + arSelectors.back().m_sClass : L"") + ((arSelectors.back().m_sId.empty()) ? L"" : L'#' + arSelectors.back().m_sId) + L'-' + std::to_wstring(++m_nCountNodes));
m_mUsedStyles[arSelectors] = oStyle;
pStyle->SetID(arSelectors.back().m_sName + ((!arSelectors.back().m_sClass.empty()) ? L'.' + arSelectors.back().m_sClass : L"") + ((arSelectors.back().m_sId.empty()) ? L"" : L'#' + arSelectors.back().m_sId) + L'-' + std::to_wstring(++m_nCountNodes));
m_mUsedStyles[arSelectors] = pStyle;
}
return *oStyle;
return *pStyle;
}
void CCssCalculator_Private::AddStyles(const std::string &sStyle)
@ -558,6 +566,26 @@ namespace NSCSS
CTree::CountingNumberRepetitions(oTree, *m_mStatictics);
}
void CCssCalculator_Private::SetSizeSourceWindow(const CSizeWindow &oSizeWindow)
{
m_oSourceWindow = oSizeWindow;
}
void CCssCalculator_Private::SetSizeDeviceWindow(const CSizeWindow &oSizeWindow)
{
m_oDeviceWindow = oSizeWindow;
}
CSizeWindow CCssCalculator_Private::GetSizeSourceWindow() const
{
return m_oSourceWindow;
}
CSizeWindow CCssCalculator_Private::GetSizeDeviceWindow() const
{
return m_oDeviceWindow;
}
void CCssCalculator_Private::SetUnitMeasure(const UnitMeasure& nType)
{
m_UnitMeasure = nType;
@ -587,6 +615,9 @@ namespace NSCSS
m_mData.clear();
m_arFiles.clear();
m_oDeviceWindow.Clear();
m_oSourceWindow.Clear();
}
}
inline static std::wstring StringifyValueList(const KatanaArray* oValues)

View File

@ -27,6 +27,9 @@ namespace NSCSS
std::wstring m_sEncoding;
CSizeWindow m_oSourceWindow;
CSizeWindow m_oDeviceWindow;
void GetStylesheet(const KatanaStylesheet* oStylesheet);
void GetRule(const KatanaRule* oRule);
@ -56,6 +59,12 @@ namespace NSCSS
void SetDpi(unsigned short int nValue);
void SetBodyTree(const CTree &oTree);
void SetSizeSourceWindow(const CSizeWindow& oSizeWindow);
void SetSizeDeviceWindow(const CSizeWindow& oSizeWindow);
CSizeWindow GetSizeSourceWindow() const;
CSizeWindow GetSizeDeviceWindow() const;
UnitMeasure GetUnitMeasure() const;
std::wstring GetEncoding() const;
unsigned short int GetDpi() const;

View File

@ -3,6 +3,7 @@
#include <string>
#include <vector>
#include <map>
namespace NSCSS
{
@ -12,6 +13,7 @@ namespace NSCSS
std::wstring m_sClass; // Класс тэга
std::wstring m_sId; // Id тэга
std::wstring m_sStyle; // Стиль тэга
std::map<std::wstring, std::wstring> m_mAttrs; // Остальные аттрибуты тэга
CNode(){};
CNode(std::wstring sName, std::wstring sClass, std::wstring sId) : m_sName(sName), m_sClass(sClass), m_sId(sId){};

View File

@ -19,6 +19,43 @@ namespace NSCSS
Peak
} UnitMeasure;
typedef enum
{
ScalingDirectionNone = 0,
ScalingDirectionX = 1,
ScalingDirectionY = 2
} ScalingDirection;
struct CSizeWindow
{
unsigned short m_ushWidth;
unsigned short m_ushHeight;
CSizeWindow()
: m_ushWidth(0), m_ushHeight(0) {};
CSizeWindow(unsigned short unWidth, unsigned short unHeight)
: m_ushWidth(unWidth), m_ushHeight(unHeight) {};
bool Empty() const
{
return ((0 == m_ushWidth) && (0 == m_ushHeight));
}
void Clear()
{
m_ushWidth = m_ushHeight = 0;
}
bool operator==(const CSizeWindow& oSizeWindow) const
{
return ((m_ushWidth == oSizeWindow.m_ushWidth) && (m_ushHeight == oSizeWindow.m_ushHeight));
}
bool operator!=(const CSizeWindow& oSizeWindow) const
{
return ((m_ushWidth != oSizeWindow.m_ushWidth) || (m_ushHeight != oSizeWindow.m_ushHeight));
}
};
struct StatistickElement
{
enum TypeElement
@ -121,6 +158,31 @@ namespace NSCSS
};
}
static const std::vector<std::wstring> arDisplayValues =
{
/* <display-outside> values */
L"block", L"inline", L"run-in",
/* <display-inside> values */
L"flow", L"flow-root", L"table", L"flex", L"grid", L"ruby",
/* <display-outside> plus <display-inside> values */
L"block flow", L"inline table", L"flex run-in",
/* <display-listitem> values */
L"list-item", L"list-item block", L"list-item inline", L"list-item flow",
L"list-item flow-root", L"list-item block flow",
L"list-item block flow-root", L"flow list-item block",
/* <display-internal> values */
L"table-row-group", L"table-header-group", L"table-footer-group",
L"table-row", L"table-cell", L"table-column-group", L"table-column",
L"table-caption", L"ruby-base", L"ruby-text", L"ruby-base-container",
L"ruby-text-container",
/* <display-box> values */
L"contents", L"none",
/* <display-legacy> values */
L"inline-block", L"inline-table", L"inline-flex", L"inline-grid",
/* Global values */
L"inherit", L"initial", L"unset"
};
namespace NSProperties {
typedef enum
@ -1301,7 +1363,7 @@ namespace NSCSS
normal
};
enum class TextAlign
enum class Align
{
none = 0,
left,
@ -1313,7 +1375,7 @@ namespace NSCSS
class Text
{
float fIndent;
TextAlign enAlign;
Align enAlign;
TextDecoration enDecoration;
std::wstring sColor; //HEX color
@ -1323,7 +1385,7 @@ namespace NSCSS
public:
Text() : fIndent (fNoneValue),
enAlign (TextAlign::none),
enAlign (Align::none),
enDecoration (TextDecoration::none),
bImportants ({false, false, false, false}),
arLevels ({0, 0, 0, 0}){}
@ -1337,7 +1399,7 @@ namespace NSCSS
{
if (oText.fIndent != fNoneValue)
fIndent = oText.fIndent;
if (oText.enAlign != TextAlign::none)
if (oText.enAlign != Align::none)
enAlign = oText.enAlign;
if (oText.enDecoration != TextDecoration::none)
enDecoration = oText.enDecoration;
@ -1363,16 +1425,16 @@ namespace NSCSS
oSecondText.fIndent = fNoneValue;
}
if (oFirstText.bImportants[1] && !oSecondText.bImportants[1] && oFirstText.enAlign != TextAlign::none)
oSecondText.enAlign = TextAlign::none;
else if (oSecondText.bImportants[1] && !oFirstText.bImportants[1] && oSecondText.enAlign != TextAlign::none)
oFirstText.enAlign = TextAlign::none;
else if (oFirstText.enAlign != TextAlign::none && oSecondText.enAlign != TextAlign::none)
if (oFirstText.bImportants[1] && !oSecondText.bImportants[1] && oFirstText.enAlign != Align::none)
oSecondText.enAlign = Align::none;
else if (oSecondText.bImportants[1] && !oFirstText.bImportants[1] && oSecondText.enAlign != Align::none)
oFirstText.enAlign = Align::none;
else if (oFirstText.enAlign != Align::none && oSecondText.enAlign != Align::none)
{
if (oFirstText.arLevels[1] < oSecondText.arLevels[1])
oFirstText.enAlign = TextAlign::none;
oFirstText.enAlign = Align::none;
else
oSecondText.enAlign = TextAlign::none;
oSecondText.enAlign = Align::none;
}
if (oFirstText.bImportants[2] && !oSecondText.bImportants[2] && oFirstText.enDecoration != TextDecoration::none)
@ -1410,7 +1472,7 @@ namespace NSCSS
bool Empty() const
{
return fIndent == fNoneValue && enAlign == TextAlign::none &&
return fIndent == fNoneValue && enAlign == Align::none &&
enDecoration == TextDecoration::none && sColor.empty();
}
@ -1422,22 +1484,22 @@ namespace NSCSS
if (sAlign == L"center")
{
arLevels[1] = unLevel;
enAlign = NSConstValues::NSCssProperties::TextAlign::center;
enAlign = NSConstValues::NSCssProperties::Align::center;
}
else if(sAlign == L"justify")
{
arLevels[1] = unLevel;
enAlign = NSConstValues::NSCssProperties::TextAlign::justify;
enAlign = NSConstValues::NSCssProperties::Align::justify;
}
else if(sAlign == L"left" || sAlign == L"start")
{
arLevels[1] = unLevel;
enAlign = NSConstValues::NSCssProperties::TextAlign::left;
enAlign = NSConstValues::NSCssProperties::Align::left;
}
else if(sAlign == L"right" || sAlign == L"end")
{
arLevels[1] = unLevel;
enAlign = NSConstValues::NSCssProperties::TextAlign::right;
enAlign = NSConstValues::NSCssProperties::Align::right;
}
}
@ -1560,13 +1622,13 @@ namespace NSCSS
std::wstring GetAlign() const
{
if (enAlign == TextAlign::left)
if (enAlign == Align::left)
return L"left";
if (enAlign == TextAlign::center)
if (enAlign == Align::center)
return L"center";
if (enAlign == TextAlign::right)
if (enAlign == Align::right)
return L"right";
if (enAlign == TextAlign::justify)
if (enAlign == Align::justify)
return L"both";
return std::wstring();
@ -1701,7 +1763,7 @@ namespace NSCSS
bool Empty() const
{
return fWidth <= 0;
return fWidth < 0;
}
void SetWidthWithoutChecking(const float& fWidth, const unsigned int& unLevel, const bool &bHardMode = false)
@ -1889,7 +1951,10 @@ namespace NSCSS
std::wstring GetStyle() const
{
return (bBlock) ? L"auto" : sStyle;
if (bBlock) return L"auto";
if (0 == fWidth) return L"none";
else if (L"auto" == sStyle) return L"single";
else return sStyle;
}
std::wstring GetColor() const
@ -1942,7 +2007,7 @@ namespace NSCSS
else if (iswdigit(sValue[0]))
{
const float fWidth = wcstof(sValue.c_str(), NULL);
if (fWidth > 0.0f)
if (fWidth >= 0.0f)
oBorderSide.fWidth = fWidth;
}
else if (sValue.substr(0, 3) == L"rgb")
@ -2444,8 +2509,10 @@ namespace NSCSS
Background operator+=(const Background& oBackground)
{
if (oBackground.sColor.empty())
sColor = oBackground.sColor;
if (oBackground.sColor.empty() || (bImportants[0] && !oBackground.bImportants[0]))
return *this;
sColor = oBackground.sColor;
return *this;
}
@ -2587,6 +2654,165 @@ namespace NSCSS
return L"";
}
};
class Display
{
std::wstring wsDisplay;
int nWidth;
std::wstring wsAlign;
std::vector<bool> bImportants;
std::vector<unsigned int> arLevels;
public:
Display() : wsDisplay(L"inline"), nWidth(-1), wsAlign(), bImportants{false, false, false}, arLevels{0, 0, 0} {};
void ClearImportants()
{
bImportants = {false, false, false};
}
Display operator+=(const Display& oDisplay)
{
if (oDisplay.Empty())
return *this;
wsDisplay = oDisplay.wsDisplay;
nWidth = oDisplay.nWidth;
wsAlign = oDisplay.wsAlign;
return *this;
}
static void DisplayEquation(Display &oFirstDisplay, Display &oSecondDisplay)
{
if (oFirstDisplay.bImportants[0] && !oSecondDisplay.bImportants[0] && !oFirstDisplay.wsDisplay.empty())
oSecondDisplay.wsDisplay.clear();
else if (oSecondDisplay.bImportants[0] && !oFirstDisplay.bImportants[0] && !oSecondDisplay.wsDisplay.empty())
oFirstDisplay.wsDisplay.clear();
else if (!oSecondDisplay.wsDisplay.empty())
{
if (oFirstDisplay.arLevels[0] < oSecondDisplay.arLevels[0])
oFirstDisplay.wsDisplay.clear();
else
oSecondDisplay.wsDisplay.clear();
}
if (oFirstDisplay.bImportants[1] && !oSecondDisplay.bImportants[1] && oFirstDisplay.nWidth > 0)
oSecondDisplay.nWidth = -1;
else if (oSecondDisplay.bImportants[1] && !oFirstDisplay.bImportants[1] && oSecondDisplay.nWidth > 0)
oFirstDisplay.nWidth = -1;
else if (oSecondDisplay.nWidth > 0)
{
if (oFirstDisplay.arLevels[1] < oSecondDisplay.arLevels[1])
oFirstDisplay.nWidth = -1;
else
oSecondDisplay.nWidth = -1;
}
if (oFirstDisplay.bImportants[2] && !oSecondDisplay.bImportants[2] && !oFirstDisplay.wsAlign.empty())
oSecondDisplay.wsAlign.clear();
else if (oSecondDisplay.bImportants[2] && !oFirstDisplay.bImportants[2] && !oSecondDisplay.wsAlign.empty())
oFirstDisplay.wsAlign.clear();
else if (!oSecondDisplay.wsAlign.empty())
{
if (oFirstDisplay.arLevels[2] < oSecondDisplay.arLevels[2])
oFirstDisplay.wsAlign.clear();
else
oSecondDisplay.wsAlign.clear();
}
}
bool operator==(const Display& oDisplay) const
{
return wsDisplay == oDisplay.wsDisplay && nWidth == oDisplay.nWidth && wsAlign == oDisplay.wsAlign;
}
bool Empty() const
{
return (L"inline" == wsDisplay || wsDisplay.empty()) && (nWidth < 0) && (wsAlign.empty());
}
void SetImportantAll(const bool &bImportant)
{
bImportants = {bImportant, bImportant, bImportant};
}
void SetImportantDisplay(const bool &bImportant)
{
bImportants[0] = bImportant;
}
void SetImportantWidth(const bool &bImportant)
{
bImportants[1] = bImportant;
}
void SetImportantAlign(const bool& bImportant)
{
bImportants[2] = bImportant;
}
void SetDisplay(const std::wstring& wsNewDisplay, const unsigned int& unLevel, const bool &bHardMode = false)
{
if (wsNewDisplay.empty() || (bImportants[0] && !bHardMode))
return;
if (arDisplayValues.end() != std::find(arDisplayValues.begin(), arDisplayValues.end(), wsNewDisplay))
{
wsDisplay = wsNewDisplay;
arLevels[0] = unLevel;
}
}
void SetWidth(const std::wstring& wsNewValue, const unsigned int& unLevel, const bool &bHardMode = false)
{
if (wsNewValue.empty() || !iswdigit(wsNewValue[0]) || (bImportants[1] && !bHardMode))
return;
arLevels[1] = unLevel;
nWidth = std::stoi(wsNewValue);
}
void SetWidth(int nValue, const unsigned int& unLevel, const bool &bHardMode = false)
{
if (bImportants[1] && !bHardMode)
return;
arLevels[1] = unLevel;
nWidth = nValue;
}
void SetAlign(const std::wstring& sAlign, const unsigned int& unLevel, const bool& bHardMode = false)
{
if (sAlign.empty() || (bImportants[2] && !bHardMode))
return;
if (L"center" == sAlign || L"left" == sAlign || L"start" == sAlign ||
L"right" == sAlign || L"end" == sAlign)
{
arLevels[2] = unLevel;
wsAlign = sAlign;
}
}
std::wstring GetDisplay() const
{
return wsDisplay;
}
std::wstring GetWidthW() const
{
if (nWidth < 0)
return std::wstring();
return std::to_wstring(nWidth);
}
std::wstring GetAlign() const
{
return wsAlign;
}
};
}
const std::vector<std::wstring> arPseudoClasses {

View File

@ -279,6 +279,8 @@ namespace NSCSS
sSpacingValue += L"w:after=\"" + oStyle.m_pMargin.GetTopSide() + L"\" ";
sSpacingValue += L"w:before=\"" + oStyle.m_pMargin.GetTopSide() + L"\" ";
}
else if (!oStyle.m_pBorder.Empty())
sSpacingValue += L"w:after=\"0\" w:before=\"0\" ";
const std::wstring &sLineHeight = oStyle.m_pFont.GetLineHeight();
if (!sLineHeight.empty())
@ -286,6 +288,8 @@ namespace NSCSS
sSpacingValue += L"w:line=\"" + sLineHeight + L"\" ";
sSpacingValue += L"w:lineRule=\"auto\"";
}
else if (!oStyle.m_pBorder.Empty())
sSpacingValue += L"w:line=\"240\" w:lineRule=\"auto\" ";
if (!sSpacingValue.empty())
{
@ -308,7 +312,7 @@ namespace NSCSS
const std::wstring sBorderStyle = oStyle.m_pBorder.GetStyleBottomSide();
const std::wstring sBorderWidth = oStyle.m_pBorder.GetWidthBottomSideW();
const std::wstring sBorder = L" w:color=\"" + sBorderColor + L"\" w:space=\"4\" w:sz=\"" +
const std::wstring sBorder = L" w:color=\"" + sBorderColor + L"\" w:space=\"0\" w:sz=\"" +
sBorderWidth + L"\" w:val=\"" + sBorderStyle + L"\"";
oXmlElement.AddPropertiesInP(NSConstValues::NSProperties::ParagraphProperties::P_TopBorder, sBorder);

View File

@ -34,30 +34,33 @@ static void replace_all(std::string& s, const std::string& s1, const std::string
}
}
static std::wstring htmlToXhtml(std::string& sFileContent)
static std::wstring htmlToXhtml(std::string& sFileContent, bool bNeedConvert)
{
// Распознование кодировки
size_t posEncoding = sFileContent.find("charset=");
if (posEncoding == std::string::npos)
posEncoding = sFileContent.find("encoding=");
if (posEncoding != std::string::npos)
if (bNeedConvert)
{
posEncoding = sFileContent.find("=", posEncoding) + 1;
char quoteSymbol = '\"';
if(sFileContent[posEncoding] == '\"' || sFileContent[posEncoding] == '\'')
size_t posEncoding = sFileContent.find("charset=");
if (posEncoding == std::string::npos)
posEncoding = sFileContent.find("encoding=");
if (posEncoding != std::string::npos)
{
quoteSymbol = sFileContent[posEncoding];
posEncoding += 1;
}
size_t posEnd = sFileContent.find(quoteSymbol, posEncoding);
if (std::string::npos != posEnd)
{
std::string sEncoding = sFileContent.substr(posEncoding, posEnd - posEncoding);
if (sEncoding != "utf-8" && sEncoding != "UTF-8")
posEncoding = sFileContent.find("=", posEncoding) + 1;
char quoteSymbol = '\"';
if(sFileContent[posEncoding] == '\"' || sFileContent[posEncoding] == '\'')
{
NSUnicodeConverter::CUnicodeConverter oConverter;
sFileContent = U_TO_UTF8(oConverter.toUnicode(sFileContent, sEncoding.c_str()));
quoteSymbol = sFileContent[posEncoding];
posEncoding += 1;
}
size_t posEnd = sFileContent.find(quoteSymbol, posEncoding);
if (std::string::npos != posEnd)
{
std::string sEncoding = sFileContent.substr(posEncoding, posEnd - posEncoding);
if (sEncoding != "utf-8" && sEncoding != "UTF-8")
{
NSUnicodeConverter::CUnicodeConverter oConverter;
sFileContent = U_TO_UTF8(oConverter.toUnicode(sFileContent, sEncoding.c_str()));
}
}
}
}
@ -423,11 +426,8 @@ static std::string mhtTohtml(std::string& sFileContent)
return sFile;
}
static std::wstring mhtToXhtml(const std::wstring& sFile)
static std::wstring mhtToXhtml(std::string& sFileContent)
{
std::string sFileContent;
if(!NSFile::CFileBinary::ReadAllTextUtf8A(sFile, sFileContent))
return L"";
sFileContent = mhtTohtml(sFileContent);
// Gumbo

View File

@ -94,6 +94,8 @@ SOURCES += \
../Source/XlsxFormat/Slicer/SlicerCacheExt.cpp \
../Source/XlsxFormat/Slicer/Slicer.cpp \
../Source/XlsxFormat/NamedSheetViews/NamedSheetViews.cpp \
../Source/XlsxFormat/Pivot/PivotCacheDefinitionExt.cpp \
../Source/XlsxFormat/Workbook/Workbook.cpp
}
@ -270,6 +272,7 @@ HEADERS += docxformatlib.h \
../Source/DocxFormat/Diagram/DiagramQuickStyle.h \
../Source/XlsxFormat/Pivot/PivotTable.h \
../Source/XlsxFormat/Pivot/PivotCacheDefinition.h \
../Source/XlsxFormat/Pivot/PivotCacheDefinitionExt.h \
../Source/XlsxFormat/Pivot/PivotCacheRecords.h \
../Source/XlsxFormat/Slicer/SlicerCache.h \
../Source/XlsxFormat/Slicer/SlicerCacheExt.h \

View File

@ -42,6 +42,10 @@ SOURCES += \
../Source/XlsbFormat/SlicersStream.cpp \
../Source/XlsbFormat/SlicerCachesStream.cpp \
../Source/XlsbFormat/ChartSheetStream.cpp \
../Source/XlsbFormat/ExternalLinkStream.cpp \
../Source/XlsbFormat/PivotCacheRecordsStream.cpp \
../Source/XlsbFormat/PivotTableStream.cpp \
../Source/XlsbFormat/PivotCacheDefStream.cpp \
### Biff12_records
../Source/XlsbFormat/Biff12_records/BeginBook.cpp \
../Source/XlsbFormat/Biff12_records/FRTBegin.cpp \
@ -276,8 +280,12 @@ SOURCES += \
../Source/XlsbFormat/Biff12_records/BeginEcWpTables.cpp \
../Source/XlsbFormat/Biff12_records/EndECWPTables.cpp \
../Source/XlsbFormat/Biff12_records/PCDIMissing.cpp \
../Source/XlsbFormat/Biff12_records/PCDIIndex.cpp \
../Source/XlsbFormat/Biff12_records/PCDINumber.cpp \
../Source/XlsbFormat/Biff12_records/PCDIBoolean.cpp \
../Source/XlsbFormat/Biff12_records/PCDIError.cpp \
../Source/XlsbFormat/Biff12_records/PCDIString.cpp \
../Source/XlsbFormat/Biff12_records/PCDIDatetime.cpp \
../Source/XlsbFormat/Biff12_records/PCDIIndex.cpp \
../Source/XlsbFormat/Biff12_records/BeginECTxtWiz.cpp \
../Source/XlsbFormat/Biff12_records/EndECTxtWiz.cpp \
../Source/XlsbFormat/Biff12_records/BeginECTWFldInfoLst.cpp \
@ -410,6 +418,269 @@ SOURCES += \
../Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp \
../Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp \
../Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp \
../Source/XlsbFormat/Biff12_records/ExternValueMeta.cpp \
../Source/XlsbFormat/Biff12_records/ExternRowHdr.cpp \
../Source/XlsbFormat/Biff12_records/ExternTableStart.cpp \
../Source/XlsbFormat/Biff12_records/ExternTableEnd.cpp \
../Source/XlsbFormat/Biff12_records/SupNameValueStart.cpp \
../Source/XlsbFormat/Biff12_records/SupNameValueEnd.cpp \
../Source/XlsbFormat/Biff12_records/SupNameStart.cpp \
../Source/XlsbFormat/Biff12_records/SupNameFmla.cpp \
../Source/XlsbFormat/Biff12_records/SupNameBits.cpp \
../Source/XlsbFormat/Biff12_records/SupNameEnd.cpp \
../Source/XlsbFormat/Biff12_records/SupTabs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSupBook.cpp \
../Source/XlsbFormat/Biff12_records/EndSupBook.cpp \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheRecords.cpp \
../Source/XlsbFormat/Biff12_records/EndPivotCacheRecords.cpp \
../Source/XlsbFormat/Biff12_records/PCRRecord.cpp \
../Source/XlsbFormat/Biff12_records/PCRRecordDt.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXView.cpp \
../Source/XlsbFormat/Biff12_records/EndSXView.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXLocation.cpp \
../Source/XlsbFormat/Biff12_records/EndSXLocation.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXVDs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXVDs.cpp \
../Source/XlsbFormat/Biff12_records/BeginISXVDRws.cpp \
../Source/XlsbFormat/Biff12_records/EndISXVDRws.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXVD.cpp \
../Source/XlsbFormat/Biff12_records/EndSXVD.cpp \
../Source/XlsbFormat/Biff12_records/BeginAutoSortScope.cpp \
../Source/XlsbFormat/Biff12_records/EndAutoSortScope.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRule.cpp \
../Source/XlsbFormat/Biff12_records/EndPRule.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFilters.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFilters.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFilter.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFilter.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFItem.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFItem.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXVIs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXVIs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXVI.cpp \
../Source/XlsbFormat/Biff12_records/EndSXVI.cpp \
../Source/XlsbFormat/Biff12_records/SXVD14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXLIRws.cpp \
../Source/XlsbFormat/Biff12_records/EndSXLIRws.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXLI.cpp \
../Source/XlsbFormat/Biff12_records/EndSXLI.cpp \
../Source/XlsbFormat/Biff12_records/BeginISXVIs.cpp \
../Source/XlsbFormat/Biff12_records/EndISXVIs.cpp \
../Source/XlsbFormat/Biff12_records/BeginISXVDCols.cpp \
../Source/XlsbFormat/Biff12_records/EndISXVDCols.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXLICols.cpp \
../Source/XlsbFormat/Biff12_records/EndSXLICols.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXPIs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXPIs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXPI.cpp \
../Source/XlsbFormat/Biff12_records/EndSXPI.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXDIs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXDIs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXDI.cpp \
../Source/XlsbFormat/Biff12_records/EndSXDI.cpp \
../Source/XlsbFormat/Biff12_records/SXDI14.cpp \
../Source/XlsbFormat/Biff12_records/SXDI15.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXFormats.cpp \
../Source/XlsbFormat/Biff12_records/EndSXFormats.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXFormat.cpp \
../Source/XlsbFormat/Biff12_records/EndSXFormat.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmts.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCondFmts.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmt.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCondFmt.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCrtFormats.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCrtFormats.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCrtFormat.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCrtFormat.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTHs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTHs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTH.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTH.cpp \
../Source/XlsbFormat/Biff12_records/SXTH14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTHItems.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTHItems.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTHItem.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTHItem.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTDMPs.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTDMPs.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXTDMP.cpp \
../Source/XlsbFormat/Biff12_records/SXTDMPOrder.cpp \
../Source/XlsbFormat/Biff12_records/EndSXTDMP.cpp \
../Source/XlsbFormat/Biff12_records/BeginISXTHRws.cpp \
../Source/XlsbFormat/Biff12_records/EndISXTHRws.cpp \
../Source/XlsbFormat/Biff12_records/BeginISXTHCols.cpp \
../Source/XlsbFormat/Biff12_records/EndISXTHCols.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXFilters.cpp \
../Source/XlsbFormat/Biff12_records/EndSXFilters.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXFilter.cpp \
../Source/XlsbFormat/Biff12_records/EndSXFilter.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXRules.cpp \
../Source/XlsbFormat/Biff12_records/EndSXRules.cpp \
../Source/XlsbFormat/Biff12_records/SxFilter15.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXView14.cpp \
../Source/XlsbFormat/Biff12_records/EndSXView14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXChanges.cpp \
../Source/XlsbFormat/Biff12_records/EndSXChanges.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXChange.cpp \
../Source/XlsbFormat/Biff12_records/SXTupleItems.cpp \
../Source/XlsbFormat/Biff12_records/EndSXChange.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXEdits.cpp \
../Source/XlsbFormat/Biff12_records/EndSXEdits.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXEdit.cpp \
../Source/XlsbFormat/Biff12_records/EndSXEdit.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmts14.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCondFmts14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmt14.cpp \
../Source/XlsbFormat/Biff12_records/EndSXCondFmt14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXRules14.cpp \
../Source/XlsbFormat/Biff12_records/EndSXRules14.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRule14.cpp \
../Source/XlsbFormat/Biff12_records/EndPRule14.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFilters14.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFilters14.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFilter14.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFilter14.cpp \
../Source/XlsbFormat/Biff12_records/BeginPRFItem14.cpp \
../Source/XlsbFormat/Biff12_records/EndPRFItem14.cpp \
../Source/XlsbFormat/Biff12_records/BeginSxvcells.cpp \
../Source/XlsbFormat/Biff12_records/EndSxvcells.cpp \
../Source/XlsbFormat/Biff12_records/BeginSxRow.cpp \
../Source/XlsbFormat/Biff12_records/EndSxRow.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellNum.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellStr.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellErr.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellBool.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellDate.cpp \
../Source/XlsbFormat/Biff12_records/SxvcellNil.cpp \
../Source/XlsbFormat/Biff12_records/BeginPivotTableUISettings.cpp \
../Source/XlsbFormat/Biff12_records/FieldListActiveItem.cpp \
../Source/XlsbFormat/Biff12_records/EndPivotTableUISettings.cpp \
../Source/XlsbFormat/Biff12_records/BeginSXView16.cpp \
../Source/XlsbFormat/Biff12_records/EndSXView16.cpp \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheDef.cpp \
../Source/XlsbFormat/Biff12_records/EndPivotCacheDef.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSource.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSource.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSRange.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSRange.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSConsol.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSConsol.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPages.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSCPages.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPage.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSCPage.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPItem.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSCPItem.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSCSets.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSCSets.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSCSet.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSCSet.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFields.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFields.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDField.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDField.cpp \
../Source/XlsbFormat/Biff12_records/PCDField14.cpp \
../Source/XlsbFormat/Biff12_records/BeginItemUniqueNames.cpp \
../Source/XlsbFormat/Biff12_records/ItemUniqueName.cpp \
../Source/XlsbFormat/Biff12_records/EndItemUniqueNames.cpp \
../Source/XlsbFormat/Biff12_records/BeginPNames.cpp \
../Source/XlsbFormat/Biff12_records/EndPNames.cpp \
../Source/XlsbFormat/Biff12_records/BeginPName.cpp \
../Source/XlsbFormat/Biff12_records/EndPName.cpp \
../Source/XlsbFormat/Biff12_records/BeginPNPairs.cpp \
../Source/XlsbFormat/Biff12_records/EndPNPairs.cpp \
../Source/XlsbFormat/Biff12_records/BeginPNPair.cpp \
../Source/XlsbFormat/Biff12_records/EndPNPair.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFAtbl.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFAtbl.cpp \
../Source/XlsbFormat/Biff12_records/PCDIAMissing.cpp \
../Source/XlsbFormat/Biff12_records/PCDIANumber.cpp \
../Source/XlsbFormat/Biff12_records/PCDIABoolean.cpp \
../Source/XlsbFormat/Biff12_records/PCDIAError.cpp \
../Source/XlsbFormat/Biff12_records/PCDIAString.cpp \
../Source/XlsbFormat/Biff12_records/PCDIADatetime.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDIRun.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDIRun.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFGroup.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFGroup.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFGRange.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFGRange.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFGDiscrete.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFGDiscrete.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDFGItems.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDFGItems.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcItems.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDCalcItems.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcItem.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDCalcItem.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHierarchies.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHierarchies.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHierarchy.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHierarchy.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHFieldsUsage.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHFieldsUsage.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLevels.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLevels.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLevel.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLevel.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroups.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGroups.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroup.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGroup.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMembers.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGMembers.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMember.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGMember.cpp \
../Source/XlsbFormat/Biff12_records/PCDH14.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDKPIs.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDKPIs.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDKPI.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDKPI.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcMems.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDCalcMems.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcMem.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDCalcMem.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTupleCache.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTupleCache.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEntries.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEntries.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembers.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMembers.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMember.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMember.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSets.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCSets.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSet.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCSet.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembersSortBy.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQueries.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCQueries.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQuery.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCQuery.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCDSFCIEntries.cpp \
../Source/XlsbFormat/Biff12_records/PCDSFCIEntry.cpp \
../Source/XlsbFormat/Biff12_records/EndPCDSFCIEntries.cpp \
../Source/XlsbFormat/Biff12_records/BeginDims.cpp \
../Source/XlsbFormat/Biff12_records/EndDims.cpp \
../Source/XlsbFormat/Biff12_records/BeginDim.cpp \
../Source/XlsbFormat/Biff12_records/EndDim.cpp \
../Source/XlsbFormat/Biff12_records/BeginMGs.cpp \
../Source/XlsbFormat/Biff12_records/EndMGs.cpp \
../Source/XlsbFormat/Biff12_records/BeginMG.cpp \
../Source/XlsbFormat/Biff12_records/EndMG.cpp \
../Source/XlsbFormat/Biff12_records/BeginMGMaps.cpp \
../Source/XlsbFormat/Biff12_records/EndMGMaps.cpp \
../Source/XlsbFormat/Biff12_records/BeginMap.cpp \
../Source/XlsbFormat/Biff12_records/EndMap.cpp \
../Source/XlsbFormat/Biff12_records/BeginPCD14.cpp \
../Source/XlsbFormat/Biff12_records/EndPCD14.cpp \
../Source/XlsbFormat/Biff12_records/PivotCacheConnectionName.cpp \
../Source/XlsbFormat/Biff12_records/PivotCacheIdVersion.cpp \
../Source/XlsbFormat/Biff12_records/PCDH15.cpp \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheIDs.cpp \
../Source/XlsbFormat/Biff12_records/EndPivotCacheIDs.cpp \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheID.cpp \
../Source/XlsbFormat/Biff12_records/EndPivotCacheID.cpp \
### Biff12_structures
../Source/XlsbFormat/Biff12_structures/LPByteBuf.cpp \
../Source/XlsbFormat/Biff12_structures/IsoPasswordData.cpp \
@ -464,6 +735,21 @@ SOURCES += \
../Source/XlsbFormat/Biff12_structures/SlicerCacheLevelData.cpp \
../Source/XlsbFormat/Biff12_structures/RangeProtectionTitleSDRel.cpp \
../Source/XlsbFormat/Biff12_structures/Tws.cpp \
../Source/XlsbFormat/Biff12_structures/ExternalNameProperties.cpp \
../Source/XlsbFormat/Biff12_structures/DDEItemProperties.cpp \
../Source/XlsbFormat/Biff12_structures/OLEItemProperties.cpp \
../Source/XlsbFormat/Biff12_structures/ExternalReferenceType.cpp \
../Source/XlsbFormat/Biff12_structures/PCDIDateTime_bs.cpp \
../Source/XlsbFormat/Biff12_structures/PRuleHeaderData.cpp \
../Source/XlsbFormat/Biff12_structures/PRFilter_bs.cpp \
../Source/XlsbFormat/Biff12_structures/PivotItemType.cpp \
../Source/XlsbFormat/Biff12_structures/DataConsolidationFunction.cpp \
../Source/XlsbFormat/Biff12_structures/ShowDataAs.cpp \
../Source/XlsbFormat/Biff12_structures/PivotNumFmt.cpp \
../Source/XlsbFormat/Biff12_structures/SXMA.cpp \
../Source/XlsbFormat/Biff12_structures/SXET.cpp \
../Source/XlsbFormat/Biff12_structures/PCDIAddlInfo.cpp \
../Source/XlsbFormat/Biff12_structures/SdSetSortOrder.cpp \
### Biff12_unions
../Source/XlsbFormat/Biff12_unions/FRT.cpp \
../Source/XlsbFormat/Biff12_unions/ACUID.cpp \
@ -480,7 +766,7 @@ SOURCES += \
../Source/XlsbFormat/Biff12_unions/MERGECELLS.cpp \
../Source/XlsbFormat/Biff12_unions/CELLTABLE.cpp \
../Source/XlsbFormat/Biff12_unions/ACCELLTABLE.cpp \
../Source/XlsbFormat/Biff12_unions/CELL_bu.cpp \
../Source/XlsbFormat/Biff12_unions/CELL_12bu.cpp \
../Source/XlsbFormat/Biff12_unions/DATACELL.cpp \
../Source/XlsbFormat/Biff12_unions/FMLACELL.cpp \
../Source/XlsbFormat/Biff12_unions/SHRFMLACELL.cpp \
@ -634,6 +920,150 @@ SOURCES += \
../Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp \
../Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp \
../Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNVALUEDATA.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNVALUE.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNROW.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNTABLE.cpp \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUE.cpp \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUES.cpp \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEM.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNNAME.cpp \
../Source/XlsbFormat/Biff12_unions/DDEOLELINK.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNALBOOK.cpp \
../Source/XlsbFormat/Biff12_unions/EXTERNALLINK.cpp \
../Source/XlsbFormat/Biff12_unions/PCDIDT.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDDT.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORD.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDS.cpp \
../Source/XlsbFormat/Biff12_unions/PRFITEM.cpp \
../Source/XlsbFormat/Biff12_unions/PRFILTER.cpp \
../Source/XlsbFormat/Biff12_unions/PRFILTERS.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTRULE.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXVD.cpp \
../Source/XlsbFormat/Biff12_unions/SXVI.cpp \
../Source/XlsbFormat/Biff12_unions/SXVIS.cpp \
../Source/XlsbFormat/Biff12_unions/AUTOSORTSCOPE.cpp \
../Source/XlsbFormat/Biff12_unions/SXVD.cpp \
../Source/XlsbFormat/Biff12_unions/ISXVDRWS.cpp \
../Source/XlsbFormat/Biff12_unions/SXVDS.cpp \
../Source/XlsbFormat/Biff12_unions/SXLOCATION.cpp \
../Source/XlsbFormat/Biff12_unions/SXLIRWS.cpp \
../Source/XlsbFormat/Biff12_unions/SXLI_bu.cpp \
../Source/XlsbFormat/Biff12_unions/ISXVIS.cpp \
../Source/XlsbFormat/Biff12_unions/ISXVDCOLS.cpp \
../Source/XlsbFormat/Biff12_unions/SXLICOLS.cpp \
../Source/XlsbFormat/Biff12_unions/SXPIS.cpp \
../Source/XlsbFormat/Biff12_unions/SXPI.cpp \
../Source/XlsbFormat/Biff12_unions/SXDIS.cpp \
../Source/XlsbFormat/Biff12_unions/SXDI.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXDI.cpp \
../Source/XlsbFormat/Biff12_unions/SXFORMATS.cpp \
../Source/XlsbFormat/Biff12_unions/SXFORMAT.cpp \
../Source/XlsbFormat/Biff12_unions/SXCONDFMTS.cpp \
../Source/XlsbFormat/Biff12_unions/SXCONDFMT.cpp \
../Source/XlsbFormat/Biff12_unions/SXCRTFORMATS.cpp \
../Source/XlsbFormat/Biff12_unions/SXCRTFORMAT.cpp \
../Source/XlsbFormat/Biff12_unions/SXTHS.cpp \
../Source/XlsbFormat/Biff12_unions/SXTH.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXTH.cpp \
../Source/XlsbFormat/Biff12_unions/SXTHITEMS.cpp \
../Source/XlsbFormat/Biff12_unions/SXTHITEM.cpp \
../Source/XlsbFormat/Biff12_unions/SXTDMPS.cpp \
../Source/XlsbFormat/Biff12_unions/SXTDMP.cpp \
../Source/XlsbFormat/Biff12_unions/ISXTHRWS.cpp \
../Source/XlsbFormat/Biff12_unions/ISXTHCOLS.cpp \
../Source/XlsbFormat/Biff12_unions/SXFILTERS.cpp \
../Source/XlsbFormat/Biff12_unions/SXFILTER.cpp \
../Source/XlsbFormat/Biff12_unions/AFILTER.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTFILTERCOLUMN.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTFILTERS.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTRULES.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXFILTER.cpp \
../Source/XlsbFormat/Biff12_unions/SXVIEW14.cpp \
../Source/XlsbFormat/Biff12_unions/SXCHANGE.cpp \
../Source/XlsbFormat/Biff12_unions/SXCHANGES.cpp \
../Source/XlsbFormat/Biff12_unions/SXEDIT.cpp \
../Source/XlsbFormat/Biff12_unions/SXEDITS.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXVIEW.cpp \
../Source/XlsbFormat/Biff12_unions/SXCONDFMTS14.cpp \
../Source/XlsbFormat/Biff12_unions/SXCONDFMT14.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTRULES14.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTRULE14.cpp \
../Source/XlsbFormat/Biff12_unions/PRFILTERS14.cpp \
../Source/XlsbFormat/Biff12_unions/PRFILTER14.cpp \
../Source/XlsbFormat/Biff12_unions/PRFITEM14.cpp \
../Source/XlsbFormat/Biff12_unions/FRTSXVIEW15.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELLS15.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTROWS15.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELL15.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTTABLEUISETTINGS.cpp \
../Source/XlsbFormat/Biff12_unions/SXVIEW16.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSOURCE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSRANGE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCONSOL.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCPAGES.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCPAGE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCPITEM.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCSETS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSCSET.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFIELDS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFIELD.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD14.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD15.cpp \
../Source/XlsbFormat/Biff12_unions/ITEMUNIQUENAMES.cpp \
../Source/XlsbFormat/Biff12_unions/PNAMES.cpp \
../Source/XlsbFormat/Biff12_unions/PNAME.cpp \
../Source/XlsbFormat/Biff12_unions/PNPAIRS.cpp \
../Source/XlsbFormat/Biff12_unions/PNPAIR.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFATBL.cpp \
../Source/XlsbFormat/Biff12_unions/PCDIA.cpp \
../Source/XlsbFormat/Biff12_unions/PCDIRUN.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFGROUP.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFGRANGE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFGDISCRETE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDFGITEMS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDCALCITEMS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDCALCITEM.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHIERARCHIES.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHIERARCHY.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHFIELDSUSAGE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLEVELS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLEVEL.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLGROUPS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLGROUP.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBERS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBER.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPCDHIERARCHY.cpp \
../Source/XlsbFormat/Biff12_unions/PCDKPIS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDKPI.cpp \
../Source/XlsbFormat/Biff12_unions/PCDCALCMEMS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDCALCMEM.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPCDCALCMEM.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTUPLECACHE.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRIES.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRY.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBER.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCSETS.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCSET.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERSSORTBY.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERIES.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERY.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSFCIENTRIES.cpp \
../Source/XlsbFormat/Biff12_unions/DIMS.cpp \
../Source/XlsbFormat/Biff12_unions/DIM.cpp \
../Source/XlsbFormat/Biff12_unions/MGS.cpp \
../Source/XlsbFormat/Biff12_unions/MG.cpp \
../Source/XlsbFormat/Biff12_unions/MGMAPS.cpp \
../Source/XlsbFormat/Biff12_unions/MAP.cpp \
../Source/XlsbFormat/Biff12_unions/FRTPIVOTCACHEDEF.cpp \
../Source/XlsbFormat/Biff12_unions/PCD14.cpp \
../Source/XlsbFormat/Biff12_unions/PCDSOURCE14.cpp \
../Source/XlsbFormat/Biff12_unions/PCD15.cpp \
../Source/XlsbFormat/Biff12_unions/PCDH15_bu.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHEIDS.cpp \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHEID.cpp \
}
HEADERS += \
../Source/XlsbFormat/Biff12_unions/COMMENTS.h \
@ -648,6 +1078,10 @@ HEADERS += \
../Source/XlsbFormat/SlicersStream.h \
../Source/XlsbFormat/SlicerCachesStream.h \
../Source/XlsbFormat/ChartSheetStream.h \
../Source/XlsbFormat/ExternalLinkStream.h \
../Source/XlsbFormat/PivotCacheRecordsStream.h \
../Source/XlsbFormat/PivotTableStream.h \
../Source/XlsbFormat/PivotCacheDefStream.h \
../Source/XlsbFormat/Xlsb.h \
../Source/XlsbFormat/XlsbElementsType.h \
### Biff12_records
@ -888,8 +1322,12 @@ HEADERS += \
../Source/XlsbFormat/Biff12_records/BeginEcWpTables.h \
../Source/XlsbFormat/Biff12_records/EndECWPTables.h \
../Source/XlsbFormat/Biff12_records/PCDIMissing.h \
../Source/XlsbFormat/Biff12_records/PCDIIndex.h \
../Source/XlsbFormat/Biff12_records/PCDINumber.h \
../Source/XlsbFormat/Biff12_records/PCDIBoolean.h \
../Source/XlsbFormat/Biff12_records/PCDIError.h \
../Source/XlsbFormat/Biff12_records/PCDIString.h \
../Source/XlsbFormat/Biff12_records/PCDIDatetime.h \
../Source/XlsbFormat/Biff12_records/PCDIIndex.h \
../Source/XlsbFormat/Biff12_records/BeginECTxtWiz.h \
../Source/XlsbFormat/Biff12_records/EndECTxtWiz.h \
../Source/XlsbFormat/Biff12_records/BeginECTWFldInfoLst.h \
@ -1022,6 +1460,271 @@ HEADERS += \
../Source/XlsbFormat/Biff12_records/EndWebPubItems.h \
../Source/XlsbFormat/Biff12_records/BeginWebPubItem.h \
../Source/XlsbFormat/Biff12_records/EndWebPubItem.h \
../Source/XlsbFormat/Biff12_records/ExternCell.h \
../Source/XlsbFormat/Biff12_records/ExternValueMeta.h \
../Source/XlsbFormat/Biff12_records/ExternRowHdr.h \
../Source/XlsbFormat/Biff12_records/ExternTableStart.h \
../Source/XlsbFormat/Biff12_records/ExternTableEnd.h \
../Source/XlsbFormat/Biff12_records/SupName.h \
../Source/XlsbFormat/Biff12_records/SupNameValueStart.h \
../Source/XlsbFormat/Biff12_records/SupNameValueEnd.h \
../Source/XlsbFormat/Biff12_records/SupNameStart.h \
../Source/XlsbFormat/Biff12_records/SupNameFmla.h \
../Source/XlsbFormat/Biff12_records/SupNameBits.h \
../Source/XlsbFormat/Biff12_records/SupNameEnd.h \
../Source/XlsbFormat/Biff12_records/SupTabs.h \
../Source/XlsbFormat/Biff12_records/BeginSupBook.h \
../Source/XlsbFormat/Biff12_records/EndSupBook.h \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheRecords.h \
../Source/XlsbFormat/Biff12_records/EndPivotCacheRecords.h \
../Source/XlsbFormat/Biff12_records/PCRRecord.h \
../Source/XlsbFormat/Biff12_records/PCRRecordDt.h \
../Source/XlsbFormat/Biff12_records/BeginSXView.h \
../Source/XlsbFormat/Biff12_records/EndSXView.h \
../Source/XlsbFormat/Biff12_records/BeginSXLocation.h \
../Source/XlsbFormat/Biff12_records/EndSXLocation.h \
../Source/XlsbFormat/Biff12_records/BeginSXVDs.h \
../Source/XlsbFormat/Biff12_records/EndSXVDs.h \
../Source/XlsbFormat/Biff12_records/BeginISXVDRws.h \
../Source/XlsbFormat/Biff12_records/EndISXVDRws.h \
../Source/XlsbFormat/Biff12_records/BeginSXVD.h \
../Source/XlsbFormat/Biff12_records/EndSXVD.h \
../Source/XlsbFormat/Biff12_records/BeginAutoSortScope.h \
../Source/XlsbFormat/Biff12_records/EndAutoSortScope.h \
../Source/XlsbFormat/Biff12_records/BeginPRule.h \
../Source/XlsbFormat/Biff12_records/EndPRule.h \
../Source/XlsbFormat/Biff12_records/BeginPRFilters.h \
../Source/XlsbFormat/Biff12_records/EndPRFilters.h \
../Source/XlsbFormat/Biff12_records/BeginPRFilter.h \
../Source/XlsbFormat/Biff12_records/EndPRFilter.h \
../Source/XlsbFormat/Biff12_records/BeginPRFItem.h \
../Source/XlsbFormat/Biff12_records/EndPRFItem.h \
../Source/XlsbFormat/Biff12_records/BeginSXVIs.h \
../Source/XlsbFormat/Biff12_records/EndSXVIs.h \
../Source/XlsbFormat/Biff12_records/BeginSXVI.h \
../Source/XlsbFormat/Biff12_records/EndSXVI.h \
../Source/XlsbFormat/Biff12_records/SXVD14.h \
../Source/XlsbFormat/Biff12_records/BeginSXLIRws.h \
../Source/XlsbFormat/Biff12_records/EndSXLIRws.h \
../Source/XlsbFormat/Biff12_records/BeginSXLI.h \
../Source/XlsbFormat/Biff12_records/EndSXLI.h \
../Source/XlsbFormat/Biff12_records/BeginISXVIs.h \
../Source/XlsbFormat/Biff12_records/EndISXVIs.h \
../Source/XlsbFormat/Biff12_records/BeginISXVDCols.h \
../Source/XlsbFormat/Biff12_records/EndISXVDCols.h \
../Source/XlsbFormat/Biff12_records/BeginSXLICols.h \
../Source/XlsbFormat/Biff12_records/EndSXLICols.h \
../Source/XlsbFormat/Biff12_records/BeginSXPIs.h \
../Source/XlsbFormat/Biff12_records/EndSXPIs.h \
../Source/XlsbFormat/Biff12_records/BeginSXPI.h \
../Source/XlsbFormat/Biff12_records/EndSXPI.h \
../Source/XlsbFormat/Biff12_records/BeginSXDIs.h \
../Source/XlsbFormat/Biff12_records/EndSXDIs.h \
../Source/XlsbFormat/Biff12_records/BeginSXDI.h \
../Source/XlsbFormat/Biff12_records/EndSXDI.h \
../Source/XlsbFormat/Biff12_records/SXDI14.h \
../Source/XlsbFormat/Biff12_records/SXDI15.h \
../Source/XlsbFormat/Biff12_records/BeginSXFormats.h \
../Source/XlsbFormat/Biff12_records/EndSXFormats.h \
../Source/XlsbFormat/Biff12_records/BeginSXFormat.h \
../Source/XlsbFormat/Biff12_records/EndSXFormat.h \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmts.h \
../Source/XlsbFormat/Biff12_records/EndSXCondFmts.h \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmt.h \
../Source/XlsbFormat/Biff12_records/EndSXCondFmt.h \
../Source/XlsbFormat/Biff12_records/BeginSXCrtFormats.h \
../Source/XlsbFormat/Biff12_records/EndSXCrtFormats.h \
../Source/XlsbFormat/Biff12_records/BeginSXCrtFormat.h \
../Source/XlsbFormat/Biff12_records/EndSXCrtFormat.h \
../Source/XlsbFormat/Biff12_records/BeginSXTHs.h \
../Source/XlsbFormat/Biff12_records/EndSXTHs.h \
../Source/XlsbFormat/Biff12_records/BeginSXTH.h \
../Source/XlsbFormat/Biff12_records/EndSXTH.h \
../Source/XlsbFormat/Biff12_records/SXTH14.h \
../Source/XlsbFormat/Biff12_records/BeginSXTHItems.h \
../Source/XlsbFormat/Biff12_records/EndSXTHItems.h \
../Source/XlsbFormat/Biff12_records/BeginSXTHItem.h \
../Source/XlsbFormat/Biff12_records/EndSXTHItem.h \
../Source/XlsbFormat/Biff12_records/BeginSXTDMPs.h \
../Source/XlsbFormat/Biff12_records/EndSXTDMPs.h \
../Source/XlsbFormat/Biff12_records/BeginSXTDMP.h \
../Source/XlsbFormat/Biff12_records/SXTDMPOrder.h \
../Source/XlsbFormat/Biff12_records/EndSXTDMP.h \
../Source/XlsbFormat/Biff12_records/BeginISXTHRws.h \
../Source/XlsbFormat/Biff12_records/EndISXTHRws.h \
../Source/XlsbFormat/Biff12_records/BeginISXTHCols.h \
../Source/XlsbFormat/Biff12_records/EndISXTHCols.h \
../Source/XlsbFormat/Biff12_records/BeginSXFilters.h \
../Source/XlsbFormat/Biff12_records/EndSXFilters.h \
../Source/XlsbFormat/Biff12_records/BeginSXFilter.h \
../Source/XlsbFormat/Biff12_records/EndSXFilter.h \
../Source/XlsbFormat/Biff12_records/BeginSXRules.h \
../Source/XlsbFormat/Biff12_records/EndSXRules.h \
../Source/XlsbFormat/Biff12_records/SxFilter15.h \
../Source/XlsbFormat/Biff12_records/BeginSXView14.h \
../Source/XlsbFormat/Biff12_records/EndSXView14.h \
../Source/XlsbFormat/Biff12_records/BeginSXChanges.h \
../Source/XlsbFormat/Biff12_records/EndSXChanges.h \
../Source/XlsbFormat/Biff12_records/BeginSXChange.h \
../Source/XlsbFormat/Biff12_records/SXTupleItems.h \
../Source/XlsbFormat/Biff12_records/EndSXChange.h \
../Source/XlsbFormat/Biff12_records/BeginSXEdits.h \
../Source/XlsbFormat/Biff12_records/EndSXEdits.h \
../Source/XlsbFormat/Biff12_records/BeginSXEdit.h \
../Source/XlsbFormat/Biff12_records/EndSXEdit.h \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmts14.h \
../Source/XlsbFormat/Biff12_records/EndSXCondFmts14.h \
../Source/XlsbFormat/Biff12_records/BeginSXCondFmt14.h \
../Source/XlsbFormat/Biff12_records/EndSXCondFmt14.h \
../Source/XlsbFormat/Biff12_records/BeginSXRules14.h \
../Source/XlsbFormat/Biff12_records/EndSXRules14.h \
../Source/XlsbFormat/Biff12_records/BeginPRule14.h \
../Source/XlsbFormat/Biff12_records/EndPRule14.h \
../Source/XlsbFormat/Biff12_records/BeginPRFilters14.h \
../Source/XlsbFormat/Biff12_records/EndPRFilters14.h \
../Source/XlsbFormat/Biff12_records/BeginPRFilter14.h \
../Source/XlsbFormat/Biff12_records/EndPRFilter14.h \
../Source/XlsbFormat/Biff12_records/BeginPRFItem14.h \
../Source/XlsbFormat/Biff12_records/EndPRFItem14.h \
../Source/XlsbFormat/Biff12_records/BeginSxvcells.h \
../Source/XlsbFormat/Biff12_records/EndSxvcells.h \
../Source/XlsbFormat/Biff12_records/BeginSxRow.h \
../Source/XlsbFormat/Biff12_records/EndSxRow.h \
../Source/XlsbFormat/Biff12_records/SxvcellNum.h \
../Source/XlsbFormat/Biff12_records/SxvcellStr.h \
../Source/XlsbFormat/Biff12_records/SxvcellErr.h \
../Source/XlsbFormat/Biff12_records/SxvcellBool.h \
../Source/XlsbFormat/Biff12_records/SxvcellDate.h \
../Source/XlsbFormat/Biff12_records/SxvcellNil.h \
../Source/XlsbFormat/Biff12_records/BeginPivotTableUISettings.h \
../Source/XlsbFormat/Biff12_records/FieldListActiveItem.h \
../Source/XlsbFormat/Biff12_records/EndPivotTableUISettings.h \
../Source/XlsbFormat/Biff12_records/BeginSXView16.h \
../Source/XlsbFormat/Biff12_records/EndSXView16.h \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheDef.h \
../Source/XlsbFormat/Biff12_records/EndPivotCacheDef.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSource.h \
../Source/XlsbFormat/Biff12_records/EndPCDSource.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSRange.h \
../Source/XlsbFormat/Biff12_records/EndPCDSRange.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSConsol.h \
../Source/XlsbFormat/Biff12_records/EndPCDSConsol.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPages.h \
../Source/XlsbFormat/Biff12_records/EndPCDSCPages.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPage.h \
../Source/XlsbFormat/Biff12_records/EndPCDSCPage.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSCPItem.h \
../Source/XlsbFormat/Biff12_records/EndPCDSCPItem.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSCSets.h \
../Source/XlsbFormat/Biff12_records/EndPCDSCSets.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSCSet.h \
../Source/XlsbFormat/Biff12_records/EndPCDSCSet.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFields.h \
../Source/XlsbFormat/Biff12_records/EndPCDFields.h \
../Source/XlsbFormat/Biff12_records/BeginPCDField.h \
../Source/XlsbFormat/Biff12_records/EndPCDField.h \
../Source/XlsbFormat/Biff12_records/PCDField14.h \
../Source/XlsbFormat/Biff12_records/BeginItemUniqueNames.h \
../Source/XlsbFormat/Biff12_records/ItemUniqueName.h \
../Source/XlsbFormat/Biff12_records/EndItemUniqueNames.h \
../Source/XlsbFormat/Biff12_records/BeginPNames.h \
../Source/XlsbFormat/Biff12_records/EndPNames.h \
../Source/XlsbFormat/Biff12_records/BeginPName.h \
../Source/XlsbFormat/Biff12_records/EndPName.h \
../Source/XlsbFormat/Biff12_records/BeginPNPairs.h \
../Source/XlsbFormat/Biff12_records/EndPNPairs.h \
../Source/XlsbFormat/Biff12_records/BeginPNPair.h \
../Source/XlsbFormat/Biff12_records/EndPNPair.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFAtbl.h \
../Source/XlsbFormat/Biff12_records/EndPCDFAtbl.h \
../Source/XlsbFormat/Biff12_records/PCDIAMissing.h \
../Source/XlsbFormat/Biff12_records/PCDIANumber.h \
../Source/XlsbFormat/Biff12_records/PCDIABoolean.h \
../Source/XlsbFormat/Biff12_records/PCDIAError.h \
../Source/XlsbFormat/Biff12_records/PCDIAString.h \
../Source/XlsbFormat/Biff12_records/PCDIADatetime.h \
../Source/XlsbFormat/Biff12_records/BeginPCDIRun.h \
../Source/XlsbFormat/Biff12_records/EndPCDIRun.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFGroup.h \
../Source/XlsbFormat/Biff12_records/EndPCDFGroup.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFGRange.h \
../Source/XlsbFormat/Biff12_records/EndPCDFGRange.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFGDiscrete.h \
../Source/XlsbFormat/Biff12_records/EndPCDFGDiscrete.h \
../Source/XlsbFormat/Biff12_records/BeginPCDFGItems.h \
../Source/XlsbFormat/Biff12_records/EndPCDFGItems.h \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcItems.h \
../Source/XlsbFormat/Biff12_records/EndPCDCalcItems.h \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcItem.h \
../Source/XlsbFormat/Biff12_records/EndPCDCalcItem.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHierarchies.h \
../Source/XlsbFormat/Biff12_records/EndPCDHierarchies.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHierarchy.h \
../Source/XlsbFormat/Biff12_records/EndPCDHierarchy.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHFieldsUsage.h \
../Source/XlsbFormat/Biff12_records/EndPCDHFieldsUsage.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLevels.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLevels.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLevel.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLevel.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroups.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGroups.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroup.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGroup.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMembers.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGMembers.h \
../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMember.h \
../Source/XlsbFormat/Biff12_records/EndPCDHGLGMember.h \
../Source/XlsbFormat/Biff12_records/PCDH14.h \
../Source/XlsbFormat/Biff12_records/BeginPCDKPIs.h \
../Source/XlsbFormat/Biff12_records/EndPCDKPIs.h \
../Source/XlsbFormat/Biff12_records/BeginPCDKPI.h \
../Source/XlsbFormat/Biff12_records/EndPCDKPI.h \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcMems.h \
../Source/XlsbFormat/Biff12_records/EndPCDCalcMems.h \
../Source/XlsbFormat/Biff12_records/BeginPCDCalcMem.h \
../Source/XlsbFormat/Biff12_records/EndPCDCalcMem.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTupleCache.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTupleCache.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEntries.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEntries.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembers.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMembers.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMember.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMember.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSets.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCSets.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSet.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCSet.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembersSortBy.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQueries.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCQueries.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQuery.h \
../Source/XlsbFormat/Biff12_records/EndPCDSDTCQuery.h \
../Source/XlsbFormat/Biff12_records/BeginPCDSFCIEntries.h \
../Source/XlsbFormat/Biff12_records/PCDSFCIEntry.h \
../Source/XlsbFormat/Biff12_records/EndPCDSFCIEntries.h \
../Source/XlsbFormat/Biff12_records/BeginDims.h \
../Source/XlsbFormat/Biff12_records/EndDims.h \
../Source/XlsbFormat/Biff12_records/BeginDim.h \
../Source/XlsbFormat/Biff12_records/EndDim.h \
../Source/XlsbFormat/Biff12_records/BeginMGs.h \
../Source/XlsbFormat/Biff12_records/EndMGs.h \
../Source/XlsbFormat/Biff12_records/BeginMG.h \
../Source/XlsbFormat/Biff12_records/EndMG.h \
../Source/XlsbFormat/Biff12_records/BeginMGMaps.h \
../Source/XlsbFormat/Biff12_records/EndMGMaps.h \
../Source/XlsbFormat/Biff12_records/BeginMap.h \
../Source/XlsbFormat/Biff12_records/EndMap.h \
../Source/XlsbFormat/Biff12_records/BeginPCD14.h \
../Source/XlsbFormat/Biff12_records/EndPCD14.h \
../Source/XlsbFormat/Biff12_records/PivotCacheConnectionName.h \
../Source/XlsbFormat/Biff12_records/PivotCacheIdVersion.h \
../Source/XlsbFormat/Biff12_records/PCDH15.h \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheIDs.h \
../Source/XlsbFormat/Biff12_records/EndPivotCacheIDs.h \
../Source/XlsbFormat/Biff12_records/BeginPivotCacheID.h \
../Source/XlsbFormat/Biff12_records/EndPivotCacheID.h \
### Biff12_structures
../Source/XlsbFormat/Biff12_structures/ACProductVersion.h \
../Source/XlsbFormat/Biff12_structures/Blxf.h \
@ -1079,6 +1782,21 @@ HEADERS += \
../Source/XlsbFormat/Biff12_structures/SlicerCacheLevelData.h \
../Source/XlsbFormat/Biff12_structures/RangeProtectionTitleSDRel.h \
../Source/XlsbFormat/Biff12_structures/Tws.h \
../Source/XlsbFormat/Biff12_structures/ExternalNameProperties.h \
../Source/XlsbFormat/Biff12_structures/DDEItemProperties.h \
../Source/XlsbFormat/Biff12_structures/OLEItemProperties.h \
../Source/XlsbFormat/Biff12_structures/ExternalReferenceType.h \
../Source/XlsbFormat/Biff12_structures/PCDIDateTime.h \
../Source/XlsbFormat/Biff12_structures/PRuleHeaderData.h \
../Source/XlsbFormat/Biff12_structures/PRFilter.h \
../Source/XlsbFormat/Biff12_structures/PivotItemType.h \
../Source/XlsbFormat/Biff12_structures/DataConsolidationFunction.h \
../Source/XlsbFormat/Biff12_structures/ShowDataAs.h \
../Source/XlsbFormat/Biff12_structures/PivotNumFmt.h \
../Source/XlsbFormat/Biff12_structures/SXMA.h \
../Source/XlsbFormat/Biff12_structures/SXET.h \
../Source/XlsbFormat/Biff12_structures/PCDIAddlInfo.h \
../Source/XlsbFormat/Biff12_structures/SdSetSortOrder.h \
### Biff12_unions
../Source/XlsbFormat/Biff12_unions/ACABSPATH.h \
../Source/XlsbFormat/Biff12_unions/ACCELLTABLE.h \
@ -1249,3 +1967,147 @@ HEADERS += \
../Source/XlsbFormat/Biff12_unions/USERCSVIEW.h \
../Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h \
../Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h \
../Source/XlsbFormat/Biff12_unions/EXTERNVALUEDATA.h \
../Source/XlsbFormat/Biff12_unions/EXTERNVALUE.h \
../Source/XlsbFormat/Biff12_unions/EXTERNROW.h \
../Source/XlsbFormat/Biff12_unions/EXTERNTABLE.h \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUE.h \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUES.h \
../Source/XlsbFormat/Biff12_unions/DDEOLEITEM.h \
../Source/XlsbFormat/Biff12_unions/EXTERNNAME.h \
../Source/XlsbFormat/Biff12_unions/DDEOLELINK.h \
../Source/XlsbFormat/Biff12_unions/EXTERNALBOOK.h \
../Source/XlsbFormat/Biff12_unions/EXTERNALLINK.h \
../Source/XlsbFormat/Biff12_unions/PCDIDT.h \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDDT.h \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORD.h \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDS.h \
../Source/XlsbFormat/Biff12_unions/PRFITEM.h \
../Source/XlsbFormat/Biff12_unions/PRFILTER.h \
../Source/XlsbFormat/Biff12_unions/PRFILTERS.h \
../Source/XlsbFormat/Biff12_unions/PIVOTRULE.h \
../Source/XlsbFormat/Biff12_unions/FRTSXVD.h \
../Source/XlsbFormat/Biff12_unions/SXVI.h \
../Source/XlsbFormat/Biff12_unions/SXVIS.h \
../Source/XlsbFormat/Biff12_unions/AUTOSORTSCOPE.h \
../Source/XlsbFormat/Biff12_unions/SXVD.h \
../Source/XlsbFormat/Biff12_unions/ISXVDRWS.h \
../Source/XlsbFormat/Biff12_unions/SXVDS.h \
../Source/XlsbFormat/Biff12_unions/SXLOCATION.h \
../Source/XlsbFormat/Biff12_unions/SXLIRWS.h \
../Source/XlsbFormat/Biff12_unions/SXLI.h \
../Source/XlsbFormat/Biff12_unions/ISXVIS.h \
../Source/XlsbFormat/Biff12_unions/ISXVDCOLS.h \
../Source/XlsbFormat/Biff12_unions/SXLICOLS.h \
../Source/XlsbFormat/Biff12_unions/SXPIS.h \
../Source/XlsbFormat/Biff12_unions/SXPI.h \
../Source/XlsbFormat/Biff12_unions/SXDIS.h \
../Source/XlsbFormat/Biff12_unions/SXDI.h \
../Source/XlsbFormat/Biff12_unions/FRTSXDI.h \
../Source/XlsbFormat/Biff12_unions/SXFORMATS.h \
../Source/XlsbFormat/Biff12_unions/SXFORMAT.h \
../Source/XlsbFormat/Biff12_unions/SXCONDFMTS.h \
../Source/XlsbFormat/Biff12_unions/SXCONDFMT.h \
../Source/XlsbFormat/Biff12_unions/SXCRTFORMATS.h \
../Source/XlsbFormat/Biff12_unions/SXCRTFORMAT.h \
../Source/XlsbFormat/Biff12_unions/SXTHS.h \
../Source/XlsbFormat/Biff12_unions/SXTH.h \
../Source/XlsbFormat/Biff12_unions/FRTSXTH.h \
../Source/XlsbFormat/Biff12_unions/SXTHITEMS.h \
../Source/XlsbFormat/Biff12_unions/SXTHITEM.h \
../Source/XlsbFormat/Biff12_unions/SXTDMPS.h \
../Source/XlsbFormat/Biff12_unions/SXTDMP.h \
../Source/XlsbFormat/Biff12_unions/ISXTHRWS.h \
../Source/XlsbFormat/Biff12_unions/ISXTHCOLS.h \
../Source/XlsbFormat/Biff12_unions/SXFILTERS.h \
../Source/XlsbFormat/Biff12_unions/SXFILTER.h \
../Source/XlsbFormat/Biff12_unions/AFILTER.h \
../Source/XlsbFormat/Biff12_unions/PIVOTFILTERCOLUMN.h \
../Source/XlsbFormat/Biff12_unions/PIVOTFILTERS.h \
../Source/XlsbFormat/Biff12_unions/PIVOTRULES.h \
../Source/XlsbFormat/Biff12_unions/FRTSXFILTER.h \
../Source/XlsbFormat/Biff12_unions/FRTSXVIEW.h \
../Source/XlsbFormat/Biff12_unions/SXVIEW14.h \
../Source/XlsbFormat/Biff12_unions/SXCHANGE.h \
../Source/XlsbFormat/Biff12_unions/SXCHANGES.h \
../Source/XlsbFormat/Biff12_unions/SXEDIT.h \
../Source/XlsbFormat/Biff12_unions/SXEDITS.h \
../Source/XlsbFormat/Biff12_unions/SXCONDFMTS14.h \
../Source/XlsbFormat/Biff12_unions/SXCONDFMT14.h \
../Source/XlsbFormat/Biff12_unions/PIVOTRULES14.h \
../Source/XlsbFormat/Biff12_unions/PIVOTRULE14.h \
../Source/XlsbFormat/Biff12_unions/PRFILTERS14.h \
../Source/XlsbFormat/Biff12_unions/PRFILTER14.h \
../Source/XlsbFormat/Biff12_unions/PRFITEM14.h \
../Source/XlsbFormat/Biff12_unions/FRTSXVIEW15.h \
../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELLS15.h \
../Source/XlsbFormat/Biff12_unions/PIVOTROWS15.h \
../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELL15.h \
../Source/XlsbFormat/Biff12_unions/PIVOTTABLEUISETTINGS.h \
../Source/XlsbFormat/Biff12_unions/SXVIEW16.h \
../Source/XlsbFormat/Biff12_unions/PCDSOURCE.h \
../Source/XlsbFormat/Biff12_unions/PCDSRANGE.h \
../Source/XlsbFormat/Biff12_unions/PCDSCONSOL.h \
../Source/XlsbFormat/Biff12_unions/PCDSCPAGES.h \
../Source/XlsbFormat/Biff12_unions/PCDSCPAGE.h \
../Source/XlsbFormat/Biff12_unions/PCDSCPITEM.h \
../Source/XlsbFormat/Biff12_unions/PCDSCSETS.h \
../Source/XlsbFormat/Biff12_unions/PCDSCSET.h \
../Source/XlsbFormat/Biff12_unions/PCDFIELDS.h \
../Source/XlsbFormat/Biff12_unions/PCDFIELD.h \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD.h \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD14.h \
../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD15.h \
../Source/XlsbFormat/Biff12_unions/ITEMUNIQUENAMES.h \
../Source/XlsbFormat/Biff12_unions/PNAMES.h \
../Source/XlsbFormat/Biff12_unions/PNAME.h \
../Source/XlsbFormat/Biff12_unions/PNPAIRS.h \
../Source/XlsbFormat/Biff12_unions/PNPAIR.h \
../Source/XlsbFormat/Biff12_unions/PCDFATBL.h \
../Source/XlsbFormat/Biff12_unions/PCDIA.h \
../Source/XlsbFormat/Biff12_unions/PCDIRUN.h \
../Source/XlsbFormat/Biff12_unions/PCDFGROUP.h \
../Source/XlsbFormat/Biff12_unions/PCDFGRANGE.h \
../Source/XlsbFormat/Biff12_unions/PCDFGDISCRETE.h \
../Source/XlsbFormat/Biff12_unions/PCDFGITEMS.h \
../Source/XlsbFormat/Biff12_unions/PCDCALCITEMS.h \
../Source/XlsbFormat/Biff12_unions/PCDCALCITEM.h \
../Source/XlsbFormat/Biff12_unions/PCDHIERARCHIES.h \
../Source/XlsbFormat/Biff12_unions/PCDHIERARCHY.h \
../Source/XlsbFormat/Biff12_unions/PCDHFIELDSUSAGE.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLEVELS.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLEVEL.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLGROUPS.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLGROUP.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBERS.h \
../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBER.h \
../Source/XlsbFormat/Biff12_unions/FRTPCDHIERARCHY.h \
../Source/XlsbFormat/Biff12_unions/PCDKPIS.h \
../Source/XlsbFormat/Biff12_unions/PCDKPI.h \
../Source/XlsbFormat/Biff12_unions/PCDCALCMEMS.h \
../Source/XlsbFormat/Biff12_unions/PCDCALCMEM.h \
../Source/XlsbFormat/Biff12_unions/FRTPCDCALCMEM.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTUPLECACHE.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRIES.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRY.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERS.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBER.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCSETS.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCSET.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERSSORTBY.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERIES.h \
../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERY.h \
../Source/XlsbFormat/Biff12_unions/PCDSFCIENTRIES.h \
../Source/XlsbFormat/Biff12_unions/DIMS.h \
../Source/XlsbFormat/Biff12_unions/DIM.h \
../Source/XlsbFormat/Biff12_unions/MGS.h \
../Source/XlsbFormat/Biff12_unions/MG.h \
../Source/XlsbFormat/Biff12_unions/MGMAPS.h \
../Source/XlsbFormat/Biff12_unions/MAP.h \
../Source/XlsbFormat/Biff12_unions/FRTPIVOTCACHEDEF.h \
../Source/XlsbFormat/Biff12_unions/PCD14.h \
../Source/XlsbFormat/Biff12_unions/PCDSOURCE14.h \
../Source/XlsbFormat/Biff12_unions/PCD15.h \
../Source/XlsbFormat/Biff12_unions/PCDH15.h \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHEIDS.h \
../Source/XlsbFormat/Biff12_unions/PIVOTCACHEID.h \

View File

@ -42,6 +42,10 @@
#include "../Source/XlsbFormat/SlicersStream.cpp"
#include "../Source/XlsbFormat/SlicerCachesStream.cpp"
#include "../Source/XlsbFormat/ChartSheetStream.cpp"
#include "../Source/XlsbFormat/ExternalLinkStream.cpp"
#include "../Source/XlsbFormat/PivotCacheRecordsStream.cpp"
#include "../Source/XlsbFormat/PivotTableStream.cpp"
#include "../Source/XlsbFormat/PivotCacheDefStream.cpp"
// Biff12_records
#include "../Source/XlsbFormat/Biff12_records/BeginBook.cpp"
#include "../Source/XlsbFormat/Biff12_records/FRTBegin.cpp"
@ -276,8 +280,12 @@
#include "../Source/XlsbFormat/Biff12_records/BeginEcWpTables.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndECWPTables.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIMissing.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIIndex.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDINumber.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIBoolean.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIError.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIString.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIDatetime.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIIndex.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginECTxtWiz.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndECTxtWiz.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginECTWFldInfoLst.cpp"
@ -408,6 +416,269 @@
#include "../Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/ExternValueMeta.cpp"
#include "../Source/XlsbFormat/Biff12_records/ExternRowHdr.cpp"
#include "../Source/XlsbFormat/Biff12_records/ExternTableStart.cpp"
#include "../Source/XlsbFormat/Biff12_records/ExternTableEnd.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameValueStart.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameValueEnd.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameStart.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameFmla.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameBits.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupNameEnd.cpp"
#include "../Source/XlsbFormat/Biff12_records/SupTabs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSupBook.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSupBook.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPivotCacheRecords.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPivotCacheRecords.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCRRecord.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCRRecordDt.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXView.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXView.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXLocation.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXLocation.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXVDs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXVDs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginISXVDRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndISXVDRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXVD.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXVD.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginAutoSortScope.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndAutoSortScope.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRule.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRule.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFilters.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFilters.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFilter.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFilter.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXVIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXVIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXVI.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXVI.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXVD14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXLIRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXLIRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXLI.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXLI.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginISXVIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndISXVIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginISXVDCols.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndISXVDCols.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXLICols.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXLICols.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXPIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXPIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXPI.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXPI.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXDIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXDIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXDI.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXDI.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXDI14.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXDI15.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXFormats.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXFormats.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXFormat.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXFormat.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCondFmts.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCondFmts.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCondFmt.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCondFmt.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCrtFormats.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCrtFormats.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCrtFormat.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCrtFormat.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTHs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTHs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTH.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTH.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXTH14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTHItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTHItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTHItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTHItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTDMPs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTDMPs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXTDMP.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXTDMPOrder.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXTDMP.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginISXTHRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndISXTHRws.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginISXTHCols.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndISXTHCols.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXFilters.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXFilters.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXFilter.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXFilter.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXRules.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXRules.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxFilter15.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXView14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXView14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXChanges.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXChanges.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXChange.cpp"
#include "../Source/XlsbFormat/Biff12_records/SXTupleItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXChange.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXEdits.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXEdits.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXEdit.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXEdit.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCondFmts14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCondFmts14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXCondFmt14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXCondFmt14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXRules14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXRules14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRule14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRule14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFilters14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFilters14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFilter14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFilter14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPRFItem14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPRFItem14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSxvcells.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSxvcells.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSxRow.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSxRow.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellNum.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellStr.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellErr.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellBool.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellDate.cpp"
#include "../Source/XlsbFormat/Biff12_records/SxvcellNil.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPivotTableUISettings.cpp"
#include "../Source/XlsbFormat/Biff12_records/FieldListActiveItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPivotTableUISettings.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginSXView16.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndSXView16.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPivotCacheDef.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPivotCacheDef.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSource.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSource.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSRange.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSRange.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSConsol.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSConsol.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSCPages.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSCPages.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSCPage.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSCPage.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSCPItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSCPItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSCSets.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSCSets.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSCSet.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSCSet.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFields.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFields.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDField.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDField.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDField14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginItemUniqueNames.cpp"
#include "../Source/XlsbFormat/Biff12_records/ItemUniqueName.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndItemUniqueNames.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPNames.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPNames.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPName.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPName.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPNPairs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPNPairs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPNPair.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPNPair.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFAtbl.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFAtbl.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIAMissing.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIANumber.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIABoolean.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIAError.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIAString.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDIADatetime.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDIRun.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDIRun.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFGroup.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFGroup.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFGRange.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFGRange.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFGDiscrete.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFGDiscrete.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDFGItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDFGItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDCalcItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDCalcItems.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDCalcItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDCalcItem.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHierarchies.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHierarchies.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHierarchy.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHierarchy.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHFieldsUsage.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHFieldsUsage.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLevels.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLevels.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLevel.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLevel.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroups.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLGroups.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLGroup.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLGroup.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMembers.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLGMembers.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDHGLGMember.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDHGLGMember.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDH14.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDKPIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDKPIs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDKPI.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDKPI.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDCalcMems.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDCalcMems.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDCalcMem.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDCalcMem.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTupleCache.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTupleCache.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEntries.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCEntries.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembers.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMembers.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMember.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCEMember.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSets.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCSets.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCSet.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCSet.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCEMembersSortBy.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQueries.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCQueries.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSDTCQuery.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSDTCQuery.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCDSFCIEntries.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDSFCIEntry.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCDSFCIEntries.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginDims.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndDims.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginDim.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndDim.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginMGs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndMGs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginMG.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndMG.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginMGMaps.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndMGMaps.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginMap.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndMap.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPCD14.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPCD14.cpp"
#include "../Source/XlsbFormat/Biff12_records/PivotCacheConnectionName.cpp"
#include "../Source/XlsbFormat/Biff12_records/PivotCacheIdVersion.cpp"
#include "../Source/XlsbFormat/Biff12_records/PCDH15.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPivotCacheIDs.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPivotCacheIDs.cpp"
#include "../Source/XlsbFormat/Biff12_records/BeginPivotCacheID.cpp"
#include "../Source/XlsbFormat/Biff12_records/EndPivotCacheID.cpp"
// Biff12_structures
#include "../Source/XlsbFormat/Biff12_structures/LPByteBuf.cpp"
#include "../Source/XlsbFormat/Biff12_structures/IsoPasswordData.cpp"
@ -462,6 +733,21 @@
#include "../Source/XlsbFormat/Biff12_structures/SlicerCacheLevelData.cpp"
#include "../Source/XlsbFormat/Biff12_structures/RangeProtectionTitleSDRel.cpp"
#include "../Source/XlsbFormat/Biff12_structures/Tws.cpp"
#include "../Source/XlsbFormat/Biff12_structures/ExternalNameProperties.cpp"
#include "../Source/XlsbFormat/Biff12_structures/DDEItemProperties.cpp"
#include "../Source/XlsbFormat/Biff12_structures/OLEItemProperties.cpp"
#include "../Source/XlsbFormat/Biff12_structures/ExternalReferenceType.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PCDIDateTime_bs.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PRuleHeaderData.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PRFilter_bs.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PivotItemType.cpp"
#include "../Source/XlsbFormat/Biff12_structures/DataConsolidationFunction.cpp"
#include "../Source/XlsbFormat/Biff12_structures/ShowDataAs.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PivotNumFmt.cpp"
#include "../Source/XlsbFormat/Biff12_structures/SXMA.cpp"
#include "../Source/XlsbFormat/Biff12_structures/SXET.cpp"
#include "../Source/XlsbFormat/Biff12_structures/PCDIAddlInfo.cpp"
#include "../Source/XlsbFormat/Biff12_structures/SdSetSortOrder.cpp"
// Biff12_unions
#include "../Source/XlsbFormat/Biff12_unions/FRT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ACUID.cpp"
@ -478,7 +764,7 @@
#include "../Source/XlsbFormat/Biff12_unions/MERGECELLS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/CELLTABLE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ACCELLTABLE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/CELL_bu.cpp"
#include "../Source/XlsbFormat/Biff12_unions/CELL_12bu.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DATACELL.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FMLACELL.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SHRFMLACELL.cpp"
@ -633,3 +919,147 @@
#include "../Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp"
#include "../Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNVALUEDATA.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNVALUE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNROW.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNTABLE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DDEOLEITEMVALUES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DDEOLEITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNNAME.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DDEOLELINK.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNALBOOK.cpp"
#include "../Source/XlsbFormat/Biff12_unions/EXTERNALLINK.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDIDT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDDT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORD.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTCACHERECORDS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFILTER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFILTERS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTRULE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXVD.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVI.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVIS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/AUTOSORTSCOPE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVD.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ISXVDRWS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVDS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXLOCATION.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXLIRWS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXLI_bu.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ISXVIS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ISXVDCOLS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXLICOLS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXPIS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXPI.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXDIS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXDI.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXDI.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXFORMATS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXFORMAT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCONDFMTS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCONDFMT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCRTFORMATS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCRTFORMAT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTHS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTH.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXTH.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTHITEMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTHITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTDMPS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXTDMP.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ISXTHRWS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ISXTHCOLS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXFILTERS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXFILTER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/AFILTER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTFILTERCOLUMN.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTFILTERS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTRULES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXFILTER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVIEW14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCHANGE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCHANGES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXEDIT.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXEDITS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXVIEW.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCONDFMTS14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXCONDFMT14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTRULES14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTRULE14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFILTERS14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFILTER14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PRFITEM14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTSXVIEW15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELLS15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTROWS15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTVALUECELL15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTTABLEUISETTINGS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/SXVIEW16.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSOURCE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSRANGE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCONSOL.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCPAGES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCPAGE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCPITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCSETS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSCSET.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFIELDS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFIELD.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPCDFIELD15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/ITEMUNIQUENAMES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PNAMES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PNAME.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PNPAIRS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PNPAIR.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFATBL.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDIA.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDIRUN.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFGROUP.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFGRANGE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFGDISCRETE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDFGITEMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDCALCITEMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDCALCITEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHIERARCHIES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHIERARCHY.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHFIELDSUSAGE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLEVELS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLEVEL.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLGROUPS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLGROUP.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBERS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDHGLGMEMBER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPCDHIERARCHY.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDKPIS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDKPI.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDCALCMEMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDCALCMEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPCDCALCMEM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTUPLECACHE.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRIES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCENTRY.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBER.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCSETS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCSET.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCEMEMBERSSORTBY.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERIES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSDTCQUERY.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSFCIENTRIES.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DIMS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/DIM.cpp"
#include "../Source/XlsbFormat/Biff12_unions/MGS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/MG.cpp"
#include "../Source/XlsbFormat/Biff12_unions/MGMAPS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/MAP.cpp"
#include "../Source/XlsbFormat/Biff12_unions/FRTPIVOTCACHEDEF.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCD14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDSOURCE14.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCD15.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PCDH15_bu.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTCACHEIDS.cpp"
#include "../Source/XlsbFormat/Biff12_unions/PIVOTCACHEID.cpp"

View File

@ -50,4 +50,5 @@
#include "../Source/XlsxFormat/Slicer/SlicerCacheExt.cpp"
#include "../Source/XlsxFormat/Slicer/Slicer.cpp"
#include "../Source/XlsxFormat/NamedSheetViews/NamedSheetViews.cpp"
#include "../Source/XlsxFormat/Pivot/PivotCacheDefinitionExt.cpp"
#include "../Source/XlsxFormat/Workbook/Workbook.cpp"

View File

@ -357,6 +357,7 @@
<ClInclude Include="..\Source\XlsxFormat\NamedSheetViews\NamedSheetViews.h" />
<ClInclude Include="..\Source\XlsxFormat\Ole\OleObjects.h" />
<ClInclude Include="..\Source\XlsxFormat\Pivot\PivotCacheDefinition.h" />
<ClInclude Include="..\Source\XlsxFormat\Pivot\PivotCacheDefinitionExt.h" />
<ClInclude Include="..\Source\XlsxFormat\Pivot\PivotCacheRecords.h" />
<ClInclude Include="..\Source\XlsxFormat\Pivot\PivotTable.h" />
<ClInclude Include="..\Source\XlsxFormat\SharedStrings\PhoneticPr.h" />
@ -591,6 +592,7 @@
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\Source\XlsxFormat\NamedSheetViews\NamedSheetViews.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Pivot\PivotCacheDefinitionExt.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Pivot\Pivots.cpp" />
<ClCompile Include="..\Source\XlsxFormat\SharedStrings\Si.cpp" />
<ClCompile Include="..\Source\XlsxFormat\SharedStrings\Text.cpp" />
@ -599,6 +601,7 @@
<ClCompile Include="..\Source\XlsxFormat\Slicer\SlicerCacheExt.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Styles\rPr.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Table\Tables.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Workbook\Workbook.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Worksheets\ConditionalFormatting.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Worksheets\DataValidation.cpp" />
<ClCompile Include="..\Source\XlsxFormat\Worksheets\SheetData.cpp" />

View File

@ -679,6 +679,9 @@
<ClInclude Include="..\Source\Common\Unit.h">
<Filter>Logic\Common</Filter>
</ClInclude>
<ClInclude Include="..\Source\XlsxFormat\Pivot\PivotCacheDefinitionExt.h">
<Filter>XlsxFormat\Pivots</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Source\DocxFormat\Logic\Table.cpp">
@ -871,5 +874,11 @@
<ClCompile Include="..\Source\DocxFormat\Media\Media.cpp">
<Filter>Media</Filter>
</ClCompile>
<ClCompile Include="..\Source\XlsxFormat\Pivot\PivotCacheDefinitionExt.cpp">
<Filter>XlsxFormat\Pivots</Filter>
</ClCompile>
<ClCompile Include="..\Source\XlsxFormat\Workbook\Workbook.cpp">
<Filter>XlsxFormat\Workbook</Filter>
</ClCompile>
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,7 @@
#include "../../XlsxFormat/Worksheets/DataValidation.h"
#include "../../XlsxFormat/Slicer/SlicerCache.h"
#include "../../XlsxFormat/Slicer/SlicerCacheExt.h"
#include "../../XlsxFormat/Pivot/PivotCacheDefinitionExt.h"
#include "../Comments.h"
#include "../../XlsbFormat/Biff12_unions/FRTWORKSHEET.h"
@ -61,6 +62,7 @@
#include "../../XlsbFormat/Biff12_unions/SLICERSEX.h"
#include "../../XlsbFormat/Biff12_unions/TABLESLICERSEX.h"
#include "../../XlsbFormat/Biff12_unions/FRTWORKBOOK.h"
#include "../../XlsbFormat/Biff12_unions/FRTPIVOTCACHEDEF.h"
namespace OOX
{
@ -728,6 +730,7 @@ namespace OOX
m_oSlicerStyles.reset();
m_oTableSlicerCache.reset();
m_oSlicerCacheHideItemsWithNoData.reset();
m_oPivotCacheDefinitionExt.reset();
for (size_t nIndex = 0; nIndex < m_arrConditionalFormatting.size(); ++nIndex)
{
@ -762,6 +765,7 @@ namespace OOX
*m_sUri == L"{46F421CA-312F-682f-3DD2-61675219B42D}" ||
*m_sUri == L"{DE250136-89BD-433C-8126-D09CA5730AF9}" ||
*m_sUri == L"{19B8F6BF-5375-455C-9EA6-DF929625EA0E}" ||
*m_sUri == L"{725AE2AE-9491-48be-B2B4-4EB974FC3084}" ||
*m_sUri == L"http://schemas.microsoft.com/office/drawing/2008/diagram"))
{
int nCurDepth = oReader.GetDepth();
@ -860,6 +864,10 @@ namespace OOX
{
m_oPresenceInfo = oReader;
}
else if (sName == L"pivotCacheDefinition")
{
m_oPivotCacheDefinitionExt = oReader;
}
}
}
else
@ -992,6 +1000,12 @@ namespace OOX
m_oSlicerCacheHideItemsWithNoData->toXML(writer, L"x15:slicerCacheHideItemsWithNoData");
sResult += writer.GetData().c_str();
}
if(m_oPivotCacheDefinitionExt.IsInit())
{
NSStringUtils::CStringBuilder writer;
m_oPivotCacheDefinitionExt->toXML(writer, L"x14:pivotCacheDefinition");
sResult += writer.GetData().c_str();
}
if (m_oId.IsInit())
{
sResult += L"<" + sNamespace + L"id>" + m_oId.get2() + L"</" + sNamespace + L"id>";
@ -1035,10 +1049,22 @@ namespace OOX
if(ptr != nullptr)
{
if(ptr->m_TABLESLICERCACHEIDS != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{46BE6895-7355-4a93-B00E-2C351335B9C9}"));
oExt->m_oSlicerCachesExt = ptr->m_TABLESLICERCACHEIDS;
if (oExt)
m_arrExt.push_back( oExt );
}
if(ptr->m_SLICERCACHEIDS != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{BBE1A952-AA13-448E-AADC-164F8A28A991}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{BBE1A952-AA13-448e-AADC-164F8A28A991}"));
oExt->m_oSlicerCaches = ptr->m_SLICERCACHEIDS;
if (oExt)
@ -1047,7 +1073,7 @@ namespace OOX
}
}
if(obj->get_type() == XLS::typeFRTWORKSHEET)
else if(obj->get_type() == XLS::typeFRTWORKSHEET)
{
auto ptr = static_cast<XLSB::FRTWORKSHEET*>(obj.get());
@ -1056,10 +1082,11 @@ namespace OOX
if(ptr->m_CONDITIONALFORMATTINGS != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{78C0D931-6437-407d-A8EE-F0AAD7539E65}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{78C0D931-6437-407d-A8EE-F0AAD7539E65}"));
auto arCF14 = static_cast<XLSB::CONDITIONALFORMATTINGS*>(ptr->m_CONDITIONALFORMATTINGS.get())->m_arCONDITIONALFORMATTING14;
for(auto &item : arCF14)
auto oCONDITIONALFORMATTINGS = static_cast<XLSB::CONDITIONALFORMATTINGS*>(ptr->m_CONDITIONALFORMATTINGS.get());
for(auto &item : oCONDITIONALFORMATTINGS->m_arCONDITIONALFORMATTING14)
oExt->m_arrConditionalFormatting.push_back(new OOX::Spreadsheet::CConditionalFormatting(item));
if (oExt)
@ -1069,7 +1096,8 @@ namespace OOX
if(ptr->m_DVALS14 != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}"));
oExt->m_oDataValidations = ptr->m_DVALS14;
if (oExt)
@ -1079,33 +1107,36 @@ namespace OOX
if(ptr->m_SPARKLINEGROUPS != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{05C60535-1F16-4fd2-B633-F4F36F0B64E0}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"));
oExt->m_oSparklineGroups = ptr->m_SPARKLINEGROUPS;
if (oExt)
m_arrExt.push_back( oExt );
}
if(ptr->m_SLICERSEX != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{A8765BA9-456A-4dab-B4F3-ACF838C121DE}";
oExt->m_oSlicerList = ptr->m_SLICERSEX;
if (oExt)
m_arrExt.push_back( oExt );
}
if(ptr->m_TABLESLICERSEX != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{A8765BA9-456A-4dab-B4F3-ACF838C121DE}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{A8765BA9-456A-4dab-B4F3-ACF838C121DE}"));
oExt->m_oSlicerList = ptr->m_TABLESLICERSEX;
if (oExt)
m_arrExt.push_back( oExt );
}
if(ptr->m_SLICERSEX != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{A8765BA9-456A-4dab-B4F3-ACF838C121DE}"));
oExt->m_oSlicerList = ptr->m_SLICERSEX;
if (oExt)
m_arrExt.push_back( oExt );
}
}
}
@ -1118,7 +1149,8 @@ namespace OOX
if(ptr->m_STYLESHEET14 != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{EB79DEF2-80B8-43E5-95BD-54CBDDF9020C}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{EB79DEF2-80B8-43E5-95BD-54CBDDF9020C}"));
oExt->m_oSlicerStyles = ptr->m_STYLESHEET14;
if (oExt)
@ -1128,7 +1160,8 @@ namespace OOX
if(ptr->m_DXF14S != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{46F421CA-312F-682F-3DD2-61675219B42D}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{46F421CA-312F-682F-3DD2-61675219B42D}"));
oExt->m_oDxfs = static_cast<XLSB::DXF14S*>(ptr->m_DXF14S.get())->m_arDXF14;
if (oExt)
@ -1147,7 +1180,8 @@ namespace OOX
if(ptr->m_BrtList14 != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{504A1905-F514-4f6f-8877-14C23A59335A}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{504A1905-F514-4f6f-8877-14C23A59335A}"));
oExt->m_oAltTextTable = ptr->m_BrtList14;
if (oExt)
@ -1185,7 +1219,8 @@ namespace OOX
if(ptr->m_EXTCONN15 != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{DE250136-89BD-433C-8126-D09CA5730AF9}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{DE250136-89BD-433C-8126-D09CA5730AF9}"));
oExt->m_oConnection = ptr->m_EXTCONN15;
if (oExt)
@ -1207,7 +1242,8 @@ namespace OOX
if(ptr1->m_BrtSlicerCacheBookPivotTables != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{03082B11-2C62-411c-B77F-237D8FCFBE4C}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{03082B11-2C62-411c-B77F-237D8FCFBE4C}"));
auto ptrSCPT = static_cast<XLSB::SlicerCacheBookPivotTables*>(ptr1->m_BrtSlicerCacheBookPivotTables.get());
for(auto &item : ptrSCPT->pivotTables)
@ -1227,7 +1263,8 @@ namespace OOX
{
auto ptr1 = static_cast<XLSB::TABLESLICERCACHE*>(ptr->m_TABLESLICERCACHE.get());
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}"));
oExt->m_oTableSlicerCache = ptr1->m_BrtBeginTableSlicerCache;
if (oExt)
@ -1238,7 +1275,8 @@ namespace OOX
{
auto ptr1 = static_cast<XLSB::SLICERCACHECROSSFILTEREXT*>(ptr->m_SLICERCACHECROSSFILTEREXT.get());
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri == L"{470722E0-AACD-4C17-9CDC-17EF765DBC7E}";
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{470722E0-AACD-4C17-9CDC-17EF765DBC7E}"));
oExt->m_oSlicerCacheHideItemsWithNoData = ptr1->m_BrtSlicerCacheHideItemsWithNoData;
if (oExt)
@ -1248,6 +1286,24 @@ namespace OOX
}
}
else if(obj->get_type() == XLS::typeFRTPIVOTCACHEDEF)
{
auto ptr = static_cast<XLSB::FRTPIVOTCACHEDEF*>(obj.get());
if(ptr != nullptr)
{
if(ptr->m_PCD14 != nullptr)
{
OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension();
oExt->m_sUri.Init();
oExt->m_sUri->append(_T("{725AE2AE-9491-48be-B2B4-4EB974FC3084}"));
oExt->m_oPivotCacheDefinitionExt = ptr->m_PCD14;
if (oExt)
m_arrExt.push_back( oExt );
}
}
}
}
}
}

View File

@ -51,6 +51,7 @@ namespace OOX
class CTableSlicerCache;
class CSlicerCacheHideNoData;
class CConnection;
class CPivotCacheDefinitionExt;
}
namespace Drawing
{
@ -171,28 +172,30 @@ namespace OOX
public:
nullable<std::wstring> m_sUri;
std::wstring m_sAdditionalNamespace;
nullable<std::wstring> m_sUri;
std::wstring m_sAdditionalNamespace;
nullable<CCompatExt> m_oCompatExt;
nullable<OOX::Spreadsheet::CSparklineGroups> m_oSparklineGroups;
nullable<CDataModelExt> m_oDataModelExt;
nullable<OOX::Spreadsheet::CAltTextTable> m_oAltTextTable;
nullable<std::wstring> m_oId;
nullable<OOX::Spreadsheet::CDataValidations> m_oDataValidations;
nullable<CCompatExt> m_oCompatExt;
nullable<OOX::Spreadsheet::CSparklineGroups> m_oSparklineGroups;
nullable<CDataModelExt> m_oDataModelExt;
nullable<OOX::Spreadsheet::CAltTextTable> m_oAltTextTable;
nullable<std::wstring> m_oId;
nullable<OOX::Spreadsheet::CDataValidations> m_oDataValidations;
nullable<OOX::Spreadsheet::CConnection> m_oConnection;
nullable<OOX::Spreadsheet::CDxfs> m_oDxfs;
nullable<OOX::Spreadsheet::CConnection> m_oConnection;
nullable<OOX::Spreadsheet::CDxfs> m_oDxfs;
nullable<OOX::Spreadsheet::CSlicerRefs> m_oSlicerList;
nullable<OOX::Spreadsheet::CSlicerRefs> m_oSlicerListExt;
nullable<OOX::Spreadsheet::CSlicerCaches> m_oSlicerCaches;
nullable<OOX::Spreadsheet::CSlicerCaches> m_oSlicerCachesExt;
nullable<OOX::Spreadsheet::CSlicerStyles> m_oSlicerStyles;
nullable<OOX::Spreadsheet::CSlicerRefs> m_oSlicerList;
nullable<OOX::Spreadsheet::CSlicerRefs> m_oSlicerListExt;
nullable<OOX::Spreadsheet::CSlicerCaches> m_oSlicerCaches;
nullable<OOX::Spreadsheet::CSlicerCaches> m_oSlicerCachesExt;
nullable<OOX::Spreadsheet::CSlicerStyles> m_oSlicerStyles;
nullable<OOX::Spreadsheet::CPivotCacheDefinitionExt> m_oPivotCacheDefinitionExt;
std::vector<OOX::Spreadsheet::CSlicerCachePivotTable*> m_oSlicerCachePivotTables;
nullable<OOX::Spreadsheet::CTableSlicerCache> m_oTableSlicerCache;
nullable<OOX::Spreadsheet::CSlicerCacheHideNoData> m_oSlicerCacheHideItemsWithNoData;
nullable<OOX::Spreadsheet::CTableSlicerCache> m_oTableSlicerCache;
nullable<OOX::Spreadsheet::CSlicerCacheHideNoData> m_oSlicerCacheHideItemsWithNoData;
std::vector<OOX::Spreadsheet::CConditionalFormatting*> m_arrConditionalFormatting;

View File

@ -617,7 +617,14 @@ namespace XmlUtils
{
while ((m_lSizeCur + nSize) > m_lSize)
{
m_lSize *= 2;
if (m_lSize > 10485760/*10 * 1024 * 1024*/)
{
m_lSize += (std::max)((int)nSize * 10, 1048576/*1024 * 1024*/);
}
else
{
m_lSize *= 2;
}
}
wchar_t* pRealloc = (wchar_t*)realloc(m_pData, m_lSize * sizeof(wchar_t));

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(ACBegin)
public:
ACBegin();
virtual ~ACBegin();
~ACBegin();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(ACEnd)
public:
ACEnd();
virtual ~ACEnd();
~ACEnd();
XLS::BaseObjectPtr clone();

View File

@ -44,7 +44,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(AFilterDateGroupItem)
public:
AFilterDateGroupItem();
virtual ~AFilterDateGroupItem();
~AFilterDateGroupItem();
XLS::BaseObjectPtr clone();

View File

@ -45,7 +45,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(AbsPath15)
public:
AbsPath15();
virtual ~AbsPath15();
~AbsPath15();
XLS::BaseObjectPtr clone();

View File

@ -45,7 +45,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(ActiveX)
public:
ActiveX();
virtual ~ActiveX();
~ActiveX();
XLS::BaseObjectPtr clone();

View File

@ -44,7 +44,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginAFilter)
public:
BeginAFilter();
virtual ~BeginAFilter();
~BeginAFilter();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginActiveXControls)
public:
BeginActiveXControls();
virtual ~BeginActiveXControls();
~BeginActiveXControls();
XLS::BaseObjectPtr clone();

View File

@ -0,0 +1,58 @@
/*
* (c) Copyright Ascensio System SIA 2010-2021
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "BeginAutoSortScope.h"
using namespace XLS;
namespace XLSB
{
BeginAutoSortScope::BeginAutoSortScope()
{
}
BeginAutoSortScope::~BeginAutoSortScope()
{
}
BaseObjectPtr BeginAutoSortScope::clone()
{
return BaseObjectPtr(new BeginAutoSortScope(*this));
}
void BeginAutoSortScope::readFields(XLS::CFRecord& record)
{
}
} // namespace XLSB

View File

@ -0,0 +1,55 @@
/*
* (c) Copyright Ascensio System SIA 2010-2021
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h"
#include "../../XlsxFormat/WritingElement.h"
#include "../Biff12_structures/CellRangeRef.h"
namespace XLSB
{
// Logical representation of BrtBeginAutoSortScope record in BIFF12
class BeginAutoSortScope: public XLS::BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(BeginAutoSortScope)
BASE_OBJECT_DEFINE_CLASS_NAME(BeginAutoSortScope)
public:
BeginAutoSortScope();
~BeginAutoSortScope();
XLS::BaseObjectPtr clone();
void readFields(XLS::CFRecord& record);
};
} // namespace XLSB

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginBook)
public:
BeginBook();
virtual ~BeginBook();
~BeginBook();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginBookViews)
public:
BeginBookViews();
virtual ~BeginBookViews();
~BeginBookViews();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginBorders)
public:
BeginBorders();
virtual ~BeginBorders();
~BeginBorders();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginBundleShs)
public:
BeginBundleShs();
virtual ~BeginBundleShs();
~BeginBundleShs();
XLS::BaseObjectPtr clone();

View File

@ -49,7 +49,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginCFRule)
public:
BeginCFRule(const XLS::CellRef& cell_base_ref);
virtual ~BeginCFRule();
~BeginCFRule();
XLS::BaseObjectPtr clone();

View File

@ -50,7 +50,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginCFRule14)
public:
BeginCFRule14();
virtual ~BeginCFRule14();
~BeginCFRule14();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginCellStyleXFs)
public:
BeginCellStyleXFs();
virtual ~BeginCellStyleXFs();
~BeginCellStyleXFs();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginCellXFs)
public:
BeginCellXFs();
virtual ~BeginCellXFs();
~BeginCellXFs();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginColBrk)
public:
BeginColBrk();
virtual ~BeginColBrk();
~BeginColBrk();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginColInfos)
public:
BeginColInfos();
virtual ~BeginColInfos();
~BeginColInfos();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginColorPalette)
public:
BeginColorPalette();
virtual ~BeginColorPalette();
~BeginColorPalette();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginColorScale)
public:
BeginColorScale();
virtual ~BeginColorScale();
~BeginColorScale();
XLS::BaseObjectPtr clone();

View File

@ -43,7 +43,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginColorScale14)
public:
BeginColorScale14();
virtual ~BeginColorScale14();
~BeginColorScale14();
XLS::BaseObjectPtr clone();

View File

@ -44,7 +44,7 @@ namespace XLSB
BASE_OBJECT_DEFINE_CLASS_NAME(BeginComment)
public:
BeginComment();
virtual ~BeginComment();
~BeginComment();
XLS::BaseObjectPtr clone();

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