Mercurial > clickerconvert
annotate src/xlsx/xlsxworksheet_p.h @ 28:6f38bb40a441
Added tag 0.8 for changeset 0129971c7046
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 11 Apr 2016 13:09:28 +0200 |
parents | 93d3106bb9a4 |
children |
rev | line source |
---|---|
1
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 /**************************************************************************** |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 ** Copyright (c) 2013-2014 Debao Zhang <hello@debao.me> |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 ** All right reserved. |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 ** |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 ** Permission is hereby granted, free of charge, to any person obtaining |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 ** a copy of this software and associated documentation files (the |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
7 ** "Software"), to deal in the Software without restriction, including |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
8 ** without limitation the rights to use, copy, modify, merge, publish, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
9 ** distribute, sublicense, and/or sell copies of the Software, and to |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
10 ** permit persons to whom the Software is furnished to do so, subject to |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
11 ** the following conditions: |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
12 ** |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
13 ** The above copyright notice and this permission notice shall be |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
14 ** included in all copies or substantial portions of the Software. |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
15 ** |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
19 ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
20 ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
23 ** |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
24 ****************************************************************************/ |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 #ifndef XLSXWORKSHEET_P_H |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
26 #define XLSXWORKSHEET_P_H |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 // |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 // W A R N I N G |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
30 // ------------- |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
31 // |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
32 // This file is not part of the Qt Xlsx API. It exists for the convenience |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
33 // of the Qt Xlsx. This header file may change from |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
34 // version to version without notice, or even be removed. |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
35 // |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
36 // We mean it. |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
37 // |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
38 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
39 #include "xlsxworksheet.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
40 #include "xlsxabstractsheet_p.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
41 #include "xlsxcell.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
42 #include "xlsxdatavalidation.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
43 #include "xlsxconditionalformatting.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
44 #include "xlsxcellformula.h" |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
45 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
46 #include <QImage> |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
47 #include <QSharedPointer> |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
48 #include <QRegularExpression> |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
49 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
50 class QXmlStreamWriter; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
51 class QXmlStreamReader; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
52 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
53 namespace QXlsx { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
54 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
55 const int XLSX_ROW_MAX = 1048576; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
56 const int XLSX_COLUMN_MAX = 16384; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
57 const int XLSX_STRING_MAX = 32767; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
58 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
59 class SharedStrings; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
60 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
61 struct XlsxHyperlinkData |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
62 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
63 enum LinkType |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
64 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
65 External, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
66 Internal |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
67 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
68 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
69 XlsxHyperlinkData(LinkType linkType=External, const QString &target=QString(), const QString &location=QString() |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
70 , const QString &display=QString(), const QString &tip=QString()) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
71 :linkType(linkType), target(target), location(location), display(display), tooltip(tip) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
72 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
73 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
74 } |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
75 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
76 LinkType linkType; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
77 QString target; //For External link |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
78 QString location; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
79 QString display; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
80 QString tooltip; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
81 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
82 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
83 // ECMA-376 Part1 18.3.1.81 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
84 struct XlsxSheetFormatProps |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
85 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
86 XlsxSheetFormatProps(int baseColWidth = 8, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
87 bool customHeight = false, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
88 double defaultColWidth = 0.0, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
89 double defaultRowHeight = 15, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
90 quint8 outlineLevelCol = 0, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
91 quint8 outlineLevelRow = 0, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
92 bool thickBottom = false, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
93 bool thickTop = false, |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
94 bool zeroHeight = false) : |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
95 baseColWidth(baseColWidth), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
96 customHeight(customHeight), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
97 defaultColWidth(defaultColWidth), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
98 defaultRowHeight(defaultRowHeight), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
99 outlineLevelCol(outlineLevelCol), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
100 outlineLevelRow(outlineLevelRow), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
101 thickBottom(thickBottom), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
102 thickTop(thickTop), |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
103 zeroHeight(zeroHeight) { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
104 } |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
105 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
106 int baseColWidth; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
107 bool customHeight; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
108 double defaultColWidth; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
109 double defaultRowHeight; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
110 quint8 outlineLevelCol; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
111 quint8 outlineLevelRow; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
112 bool thickBottom; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
113 bool thickTop; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
114 bool zeroHeight; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
115 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
116 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
117 struct XlsxRowInfo |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
118 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
119 XlsxRowInfo(double height=0, const Format &format=Format(), bool hidden=false) : |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
120 customHeight(false), height(height), format(format), hidden(hidden), outlineLevel(0) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
121 , collapsed(false) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
122 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
123 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
124 } |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
125 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
126 bool customHeight; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
127 double height; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
128 Format format; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
129 bool hidden; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
130 int outlineLevel; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
131 bool collapsed; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
132 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
133 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
134 struct XlsxColumnInfo |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
135 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
136 XlsxColumnInfo(int firstColumn=0, int lastColumn=1, double width=0, const Format &format=Format(), bool hidden=false) : |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
137 firstColumn(firstColumn), lastColumn(lastColumn), customWidth(false), width(width), format(format), hidden(hidden) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
138 , outlineLevel(0), collapsed(false) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
139 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
140 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
141 } |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
142 int firstColumn; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
143 int lastColumn; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
144 bool customWidth; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
145 double width; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
146 Format format; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
147 bool hidden; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
148 int outlineLevel; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
149 bool collapsed; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
150 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
151 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
152 class XLSX_AUTOTEST_EXPORT WorksheetPrivate : public AbstractSheetPrivate |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
153 { |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
154 Q_DECLARE_PUBLIC(Worksheet) |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
155 public: |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
156 WorksheetPrivate(Worksheet *p, Worksheet::CreateFlag flag); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
157 ~WorksheetPrivate(); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
158 int checkDimensions(int row, int col, bool ignore_row=false, bool ignore_col=false); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
159 Format cellFormat(int row, int col) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
160 QString generateDimensionString() const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
161 void calculateSpans() const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
162 void splitColsInfo(int colFirst, int colLast); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
163 void validateDimension(); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
164 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
165 void saveXmlSheetData(QXmlStreamWriter &writer) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
166 void saveXmlCellData(QXmlStreamWriter &writer, int row, int col, QSharedPointer<Cell> cell) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
167 void saveXmlMergeCells(QXmlStreamWriter &writer) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
168 void saveXmlHyperlinks(QXmlStreamWriter &writer) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
169 void saveXmlDrawings(QXmlStreamWriter &writer) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
170 void saveXmlDataValidations(QXmlStreamWriter &writer) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
171 int rowPixelsSize(int row) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
172 int colPixelsSize(int col) const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
173 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
174 void loadXmlSheetData(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
175 void loadXmlColumnsInfo(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
176 void loadXmlMergeCells(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
177 void loadXmlDataValidations(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
178 void loadXmlSheetFormatProps(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
179 void loadXmlSheetViews(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
180 void loadXmlHyperlinks(QXmlStreamReader &reader); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
181 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
182 QList<QSharedPointer<XlsxRowInfo> > getRowInfoList(int rowFirst, int rowLast); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
183 QList <QSharedPointer<XlsxColumnInfo> > getColumnInfoList(int colFirst, int colLast); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
184 QList<int> getColumnIndexes(int colFirst, int colLast); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
185 bool isColumnRangeValid(int colFirst, int colLast); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
186 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
187 SharedStrings *sharedStrings() const; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
188 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
189 QMap<int, QMap<int, QSharedPointer<Cell> > > cellTable; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
190 QMap<int, QMap<int, QString> > comments; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
191 QMap<int, QMap<int, QSharedPointer<XlsxHyperlinkData> > > urlTable; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
192 QList<CellRange> merges; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
193 QMap<int, QSharedPointer<XlsxRowInfo> > rowsInfo; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
194 QMap<int, QSharedPointer<XlsxColumnInfo> > colsInfo; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
195 QMap<int, QSharedPointer<XlsxColumnInfo> > colsInfoHelper; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
196 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
197 QList<DataValidation> dataValidationsList; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
198 QList<ConditionalFormatting> conditionalFormattingList; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
199 QMap<int, CellFormula> sharedFormulaMap; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
200 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
201 CellRange dimension; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
202 int previous_row; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
203 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
204 mutable QMap<int, QString> row_spans; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
205 QMap<int, double> row_sizes; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
206 QMap<int, double> col_sizes; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
207 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
208 int outline_row_level; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
209 int outline_col_level; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
210 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
211 int default_row_height; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
212 bool default_row_zeroed; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
213 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
214 XlsxSheetFormatProps sheetFormatProps; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
215 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
216 bool windowProtection; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
217 bool showFormulas; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
218 bool showGridLines; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
219 bool showRowColHeaders; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
220 bool showZeros; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
221 bool rightToLeft; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
222 bool tabSelected; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
223 bool showRuler; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
224 bool showOutlineSymbols; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
225 bool showWhiteSpace; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
226 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
227 QRegularExpression urlPattern; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
228 private: |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
229 static double calculateColWidth(int characters); |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
230 }; |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
231 |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
232 } |
93d3106bb9a4
Add qt xlsx library
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
233 #endif // XLSXWORKSHEET_P_H |