filters

excel.h
1/* Swinder - Portable library for spreadsheet
2 Copyright (C) 2003-2006 Ariya Hidayat <ariya@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA
18*/
19
20#ifndef SWINDER_EXCEL_H
21#define SWINDER_EXCEL_H
22
23#include <string>
24#include <iostream>
25#include <vector>
26
27#include "swinder.h"
28
29namespace Swinder
30{
31
35enum { UnknownExcel = 0, Excel95, Excel97, Excel2000 };
36
37class Record;
38
39// rich-text, unicode, far-east support Excel string
40
41class EString
42{
43public:
44
45 EString();
46
47 EString( const EString& );
48
49 EString& operator=( const EString& );
50
51 ~EString();
52
53 bool unicode() const;
54
55 void setUnicode( bool u );
56
57 bool richText() const;
58
59 void setRichText( bool r );
60
61 UString str() const;
62
63 void setStr( const UString& str );
64
65 // space allocate for the string, not length (use string.length() for that)
66 unsigned size() const;
67 void setSize( unsigned size ); // HACKS
68
69
70 static EString fromUnicodeString( const void* p, bool longString, unsigned maxsize = 0 );
71
72 static EString fromSheetName( const void* p, unsigned maxsize = 0 );
73
74 // from the buffer
75 // longstring means 16-bit string length, usually for label
76 // longstring=false is normally for sheet name
77 static EString fromByteString( const void* p, bool longString, unsigned maxsize = 0 );
78
79private:
80 class Private;
81 Private* d;
82};
83
84class FormulaToken
85{
86public:
87
88 enum
89 {
90 // should match Excel's PTG
91 Unused = 0x00,
92 Matrix = 0x01,
93 Table = 0x02,
94 Add = 0x03,
95 Sub = 0x04,
96 Mul = 0x05,
97 Div = 0x06,
98 Power = 0x07,
99 Concat = 0x08,
100 LT = 0x09,
101 LE = 0x0a,
102 EQ = 0x0b,
103 GE = 0x0c,
104 GT = 0x0d,
105 NE = 0x0e,
106 Intersect = 0x0f,
107 List = 0x10,
108 Range = 0x11,
109 UPlus = 0x12,
110 UMinus = 0x13,
111 Percent = 0x14,
112 Paren = 0x15,
113 MissArg = 0x16,
114 String = 0x17,
115 NatFormula = 0x18,
116 Attr = 0x19,
117 Sheet = 0x1a,
118 EndSheet = 0x1b,
119 ErrorCode = 0x1c,
120 Bool = 0x1d,
121 Integer = 0x1e,
122 Float = 0x1f,
123 Array = 0x20,
124 Function = 0x21,
125 FunctionVar = 0x22,
126 Name = 0x23,
127 Ref = 0x24,
128 Area = 0x25,
129 MemArea = 0x26,
130 MemErr = 0x27,
131 MemNoMem = 0x28,
132 MemFunc = 0x29,
133 RefErr = 0x2a,
134 AreaErr = 0x2b,
135 RefN = 0x2c,
136 AreaN = 0x2d,
137 MemAreaN = 0x2e,
138 MemNoMemN = 0x2f,
139 NameX = 0x39,
140 Ref3d = 0x3a,
141 Area3d = 0x3b,
142 RefErr3d = 0x3c,
143 AreaErr3d = 0x3d
144 };
145
146 FormulaToken();
147 FormulaToken( unsigned id );
148 FormulaToken( const FormulaToken& );
149 ~FormulaToken();
150
151 // token id, excluding token class
152 unsigned id() const;
153 const char* idAsString() const;
154
155 // Excel version
156 unsigned version() const;
157 void setVersion( unsigned version ); // Excel version
158
159 // size of data, EXCLUDING the byte for token id
160 unsigned size() const;
161 void setData( unsigned size, const unsigned char* data );
162
163 // only when id returns ErrorCode, Bool, Integer, Float, or String
164 Value value() const;
165
166 // only when id is Function or FunctionVar
167 unsigned functionIndex() const;
168 const char* functionName() const; // for non external function
169 unsigned functionParams() const;
170
171 // only when id is Ref or Ref3d
172 UString ref( unsigned row, unsigned col ) const;
173
174 // only when id is Area or Area3d
175 UString area( unsigned row, unsigned col ) const;
176
177 // only when id is Ref3d or Area3d
178 unsigned externSheetRef() const;
179
180 // only when id is Attr
181 unsigned attr() const;
182
183 // only when id is NameX
184 unsigned nameIndex() const;
185
186 // only when id is Matrix
187 unsigned refRow() const;
188 unsigned refColumn() const;
189
190private:
191 class Private;
192 Private *d;
193};
194
195typedef std::vector<FormulaToken> FormulaTokens;
196
197std::ostream& operator<<( std::ostream& s, FormulaToken token );
198
205{
206public:
207
212 static const unsigned int id;
213
214 virtual unsigned int rtti(){
215 return this->id;
216 }
217
221 Record();
222
226 virtual ~Record();
227
231 static Record* create( unsigned type );
232
233 void setVersion( unsigned v ){ ver = v; };
234
235 unsigned version(){ return ver; };
236
240 virtual void setData( unsigned size, const unsigned char* data );
241
246 void setPosition( unsigned pos );
247
251 unsigned position() const;
252
256 virtual const char* name(){ return "Unknown"; }
257
261 virtual void dump( std::ostream& out ) const;
262
263protected:
264
265 // position of this record in the OLE stream
266 unsigned stream_position;
267
268 // in which version does this record denote ?
269 unsigned ver;
270
271private:
272 // no copy or assign
273 Record( const Record& );
274 Record& operator=( const Record& );
275
276};
277
284{
285public:
286
290 CellInfo();
291
295 virtual ~CellInfo();
296
303 virtual unsigned row() const;
304
311 virtual unsigned column() const;
312
318 virtual unsigned xfIndex() const;
319
326 virtual void setRow( unsigned r );
327
334 virtual void setColumn( unsigned c );
335
341 virtual void setXfIndex( unsigned i );
342
343private:
344 // no copy or assign
345 CellInfo( const CellInfo& );
346 CellInfo& operator=( const CellInfo& );
347
348 class Private;
349 Private* info;
350};
351
358{
359public:
360
365
369 virtual ~ColumnSpanInfo();
370
377 virtual unsigned firstColumn() const;
378
385 virtual unsigned lastColumn() const;
386
393 virtual void setFirstColumn( unsigned c );
394
401 virtual void setLastColumn( unsigned c );
402
403private:
404 // no copy or assign
406 ColumnSpanInfo& operator=( const ColumnSpanInfo& );
407
408 class Private;
409 Private* spaninfo;
410};
411
418class BackupRecord : public Record
419{
420public:
421
422 static const unsigned int id;
423
427 BackupRecord();
428
433
434 unsigned int rtti(){
435 return this->id;
436 }
442 bool backup() const;
443
449 void setBackup( bool r );
450
451 virtual void setData( unsigned size, const unsigned char* data );
452
453 virtual const char* name(){ return "BACKUP"; }
454
455 virtual void dump( std::ostream& out ) const;
456
457private:
458 // no copy or assign
459 BackupRecord( const BackupRecord& );
460 BackupRecord& operator=( const BackupRecord& );
461
462 class Private;
463 Private* d;
464};
465
466
480class BOFRecord : public Record
481{
482public:
483
487 static const unsigned int id;
488
489 unsigned int rtti(){
490 return this->id;
491 }
492
496 enum { UnknownType = 0, Workbook, Worksheet, Chart, VBModule, MacroSheet, Workspace };
497
501 BOFRecord();
502
506 virtual ~BOFRecord();
507
508 virtual void setData( unsigned size, const unsigned char* data );
509
516 unsigned version() const;
517
521 const char* versionAsString() const;
522
526 unsigned type() const;
527
531 const char* typeAsString() const;
532
533 virtual const char* name(){ return "BOF"; }
534
535 virtual void dump( std::ostream& out ) const;
536
537private:
538 // no copy or assign
539 BOFRecord( const BOFRecord& );
540 BOFRecord& operator=( const BOFRecord& );
541
542 class Private;
543 Private *d;
544};
545
552class BlankRecord : public Record, public CellInfo
553{
554public:
555
556 static const unsigned int id;
557
558 unsigned int rtti(){
559 return this->id;
560 }
561
565 BlankRecord();
566
567 virtual void setData( unsigned size, const unsigned char* data );
568
569 virtual const char* name(){ return "BLANK"; }
570
571 virtual void dump( std::ostream& out ) const;
572
573private:
574 // no copy or assign
575 BlankRecord( const BlankRecord& );
576 BlankRecord& operator=( const BlankRecord& );
577};
578
585class BoolErrRecord : public Record, public CellInfo
586{
587public:
588
592 static const unsigned int id;
593
594 unsigned int rtti(){ return this->id; }
595
600
604 virtual ~BoolErrRecord();
605
609 Value value() const;
610
611 virtual void setData( unsigned size, const unsigned char* data );
612
613 virtual const char* name(){ return "BOOLERR"; }
614
615 virtual void dump( std::ostream& out ) const;
616
617private:
618 // no copy or assign
620 BoolErrRecord& operator=( const BoolErrRecord& );
621
622 class Private;
623 Private* d;
624};
625
633{
634public:
635
636 static const unsigned int id;
637
638 unsigned int rtti(){
639 return this->id;
640 }
645
650
654 double bottomMargin() const;
655
659 void setBottomMargin( double m );
660
661 virtual void setData( unsigned size, const unsigned char* data );
662
663 virtual const char* name(){ return "BOTTOMMARGIN"; }
664
665 virtual void dump( std::ostream& out ) const;
666
667private:
668 // no copy or assign
670 BottomMarginRecord& operator=( const BottomMarginRecord& );
671
672 class Private;
673 Private* d;
674};
675
688
689// TODO support for strong visible
690
692{
693public:
694
695 static const unsigned int id;
696
697 unsigned int rtti(){
698 return this->id;
699 }
700
705
709 virtual ~BoundSheetRecord();
710
714 enum { Worksheet=0, Chart=2, VBModule=6 };
715
720 void setType( unsigned type );
721
726 unsigned type() const;
727
733 const char* typeAsString() const;
734
738 void setVisible( bool visible );
739
743 bool visible() const;
744
748 void setSheetName( const UString& name );
749
753 UString sheetName() const;
754
758 void setBofPosition( unsigned pos );
759
763 unsigned bofPosition() const;
764
765 virtual void setData( unsigned size, const unsigned char* data );
766
767 virtual const char* name(){ return "BOUNDSHEET"; }
768
769 virtual void dump( std::ostream& out ) const;
770
771private:
772 // no copy or assign
774 BoundSheetRecord& operator=( const BoundSheetRecord& );
775
776 class Private;
777 Private* d;
778};
779
786class CalcModeRecord : public Record
787{
788public:
789
790 static const unsigned int id;
791
792 unsigned int rtti(){
793 return this->id;
794 }
795
800
805
811 bool autoCalc() const;
812
818 void setAutoCalc( bool r );
819
820 virtual void setData( unsigned size, const unsigned char* data );
821
822 virtual const char* name(){ return "CALCMODE"; }
823
824 virtual void dump( std::ostream& out ) const;
825
826private:
827 // no copy or assign
829 CalcModeRecord& operator=( const CalcModeRecord& );
830
831 class Private;
832 Private* d;
833};
834
841class ColInfoRecord : public Record, public ColumnSpanInfo
842{
843public:
844
845 static const unsigned int id;
846
847 unsigned int rtti(){
848 return this->id;
849 }
850
855
859 virtual ~ColInfoRecord();
860
866 unsigned xfIndex() const;
867
873 void setXfIndex( unsigned i );
874
882 unsigned width() const;
883
891 void setWidth( unsigned w );
892
898 bool hidden() const;
899
905 void setHidden( bool h );
906
912 bool collapsed() const;
913
919 void setCollapsed( bool c );
920
927 unsigned outlineLevel() const;
928
935 void setOutlineLevel( unsigned l );
936
937 virtual void setData( unsigned size, const unsigned char* data );
938
939 virtual const char* name(){ return "COLINFO"; }
940
941 virtual void dump( std::ostream& out ) const;
942
943private:
944 // no copy or assign
946 ColInfoRecord& operator=( const ColInfoRecord& );
947
948 class Private;
949 Private *d;
950};
951
962class DateModeRecord : public Record
963{
964public:
965
966 static const unsigned int id;
967
968 unsigned int rtti(){
969 return this->id;
970 }
971
976
981
988 bool base1904() const;
989
996 void setBase1904( bool r );
997
998 virtual void setData( unsigned size, const unsigned char* data );
999
1000 virtual const char* name(){ return "DATEMODE"; }
1001
1002 virtual void dump( std::ostream& out ) const;
1003
1004private:
1005 // no copy or assign
1007 DateModeRecord& operator=( const DateModeRecord& );
1008
1009 class Private;
1010 Private* d;
1011};
1012
1020{
1021public:
1022
1023 static const unsigned int id;
1024
1025 unsigned int rtti(){
1026 return this->id;
1027 }
1028
1033
1038
1044 unsigned firstRow() const;
1045
1051 void setFirstRow( unsigned r );
1052
1058 unsigned lastRow() const;
1059
1065 void setLastRow( unsigned r );
1066
1072 unsigned firstColumn() const;
1073
1079 void setFirstColumn( unsigned r );
1080
1086 unsigned lastColumn() const;
1087
1093 void setLastColumn( unsigned r );
1094
1095 virtual const char* name(){ return "DIMENSION"; }
1096
1097 virtual void setData( unsigned size, const unsigned char* data );
1098
1099 virtual void dump( std::ostream& out ) const;
1100
1101private:
1102 // no copy or assign
1104 DimensionRecord& operator=( const DimensionRecord& );
1105
1106 class Private;
1107 Private *d;
1108};
1109
1110class ExternNameRecord : public Record
1111{
1112public:
1113
1114 static const unsigned int id;
1115
1116 unsigned int rtti(){
1117 return this->id;
1118 }
1119
1120 ExternNameRecord();
1121
1122 ~ExternNameRecord();
1123
1124 // one-based sheet index
1125 // if 0 means AddIn function
1126 unsigned sheetIndex() const;
1127
1128 void setSheetIndex( unsigned sheetIndex );
1129
1130 UString externName() const;
1131
1132 void setExternName( const UString& name );
1133
1134 virtual void setData( unsigned size, const unsigned char* data );
1135
1136
1137
1138 virtual const char* name(){ return "EXTERNNAME"; }
1139
1140 virtual void dump( std::ostream& out ) const;
1141
1142private:
1143 // no copy or assign
1144 ExternNameRecord( const ExternNameRecord& );
1145 ExternNameRecord& operator=( const ExternNameRecord& );
1146
1147 class Private;
1148 Private *d;
1149};
1150
1151class ExternSheetRecord : public Record
1152{
1153public:
1154
1155 static const unsigned int id;
1156
1157 unsigned int rtti(){
1158 return this->id;
1159 }
1160
1161 ExternSheetRecord();
1162
1163 ~ExternSheetRecord();
1164
1165 unsigned count() const;
1166
1167 unsigned refIndex(unsigned i) const;
1168 unsigned firstSheet(unsigned i) const;
1169 unsigned lastSheet(unsigned i) const;
1170
1171 UString refName() const;
1172
1173 virtual void setData( unsigned size, const unsigned char* data );
1174
1175 virtual const char* name(){ return "EXTERNSHEET"; }
1176
1177 virtual void dump( std::ostream& out ) const;
1178
1179private:
1180 // no copy or assign
1181 ExternSheetRecord( const ExternNameRecord& );
1182 ExternSheetRecord& operator=( const ExternNameRecord& );
1183
1184 class Private;
1185 Private *d;
1186};
1187
1188
1198class EOFRecord : public Record
1199{
1200public:
1201
1202 static const unsigned int id;
1203
1204 unsigned int rtti(){
1205 return this->id;
1206 }
1207
1211 EOFRecord();
1212
1216 virtual ~EOFRecord();
1217
1218 virtual void setData( unsigned size, const unsigned char* data );
1219
1220 virtual const char* name(){ return "EOF"; }
1221
1222 virtual void dump( std::ostream& out ) const;
1223
1224private:
1225 // no copy or assign
1226 EOFRecord( const EOFRecord& );
1227 EOFRecord& operator=( const EOFRecord& );
1228};
1229
1230class FilepassRecord : public Record
1231{
1232public:
1233
1234 static const unsigned int id;
1235
1236 unsigned int rtti(){
1237 return this->id;
1238 }
1239
1243 FilepassRecord();
1244
1248 virtual ~FilepassRecord();
1249
1250 virtual void setData( unsigned size, const unsigned char* data );
1251
1252 virtual const char* name(){ return "FILEPASS"; }
1253
1254 virtual void dump( std::ostream& out ) const;
1255
1256private:
1257 // no copy or assign
1258 FilepassRecord( const FilepassRecord& );
1259 FilepassRecord& operator=( const FilepassRecord& );
1260};
1261
1276class FontRecord : public Record
1277{
1278public:
1279
1280 static const unsigned int id;
1281
1282 unsigned int rtti(){
1283 return this->id;
1284 }
1285
1289 FontRecord();
1290
1294 FontRecord( const FontRecord& fr );
1295
1299 FontRecord& operator=( const FontRecord& fr );
1300
1304 virtual ~FontRecord();
1305
1306 enum {
1307 Normal = 0,
1308 Superscript = 1,
1309 Subscript = 2 };
1310
1311 enum {
1312 None = 0,
1313 Single = 1,
1314 Double = 2,
1315 SingleAccounting = 0x21,
1316 DoubleAccounting = 0x22 };
1317
1318 unsigned height() const;
1319 void setHeight( unsigned h );
1320
1326 UString fontName() const;
1327
1333 void setFontName( const UString& fn );
1334
1335 // FIXME what is this font family ? index ?
1336 unsigned fontFamily() const;
1337 void setFontFamily( unsigned f );
1338
1339 // FIXME and character set index ?
1340 unsigned characterSet() const;
1341 void setCharacterSet( unsigned s );
1342
1348 unsigned colorIndex() const;
1349
1355 void setColorIndex( unsigned c );
1356
1363 unsigned boldness() const;
1364
1371 void setBoldness( unsigned b );
1372
1378 bool italic() const;
1379
1385 void setItalic( bool i );
1386
1392 bool strikeout() const;
1393
1399 void setStrikeout( bool s );
1400
1407 unsigned escapement() const;
1408
1415 void setEscapement( unsigned s );
1416
1424 unsigned underline() const;
1425
1433 void setUnderline( unsigned u );
1434
1435 virtual void setData( unsigned size, const unsigned char* data );
1436
1437 virtual const char* name(){ return "FONT"; }
1438
1439 virtual void dump( std::ostream& out ) const;
1440
1441private:
1442 class Private;
1443 Private *d;
1444};
1445
1452class FooterRecord : public Record
1453{
1454public:
1455
1456 static const unsigned int id;
1457
1458 unsigned int rtti(){
1459 return this->id;
1460 }
1461
1465 FooterRecord();
1466
1470 ~FooterRecord();
1471
1475 UString footer() const;
1476
1480 void setFooter( const UString& f );
1481
1482 virtual void setData( unsigned size, const unsigned char* data );
1483
1484 virtual const char* name(){ return "FOOTER"; }
1485
1486 virtual void dump( std::ostream& out ) const;
1487
1488private:
1489 // no copy or assign
1490 FooterRecord( const FooterRecord& );
1491 FooterRecord& operator=( const FooterRecord& );
1492
1493 class Private;
1494 Private* d;
1495};
1496
1508class FormatRecord : public Record
1509{
1510public:
1511
1512 static const unsigned int id;
1513
1514 unsigned int rtti(){
1515 return this->id;
1516 }
1517
1521 FormatRecord();
1522
1526 ~FormatRecord();
1527
1531 FormatRecord( const FormatRecord& fr );
1532
1536 FormatRecord& operator=( const FormatRecord& fr );
1537
1544 unsigned index() const;
1545
1552 void setIndex( unsigned i );
1553
1560 UString formatString() const;
1561
1567 void setFormatString( const UString& fs );
1568
1569 virtual const char* name(){ return "FORMAT"; }
1570
1571 virtual void setData( unsigned size, const unsigned char* data );
1572
1573 virtual void dump( std::ostream& out ) const;
1574
1575private:
1576 class Private;
1577 Private *d;
1578};
1579
1586class FormulaRecord : public Record, public CellInfo
1587{
1588public:
1589
1590 static const unsigned int id;
1591 static const unsigned int idOld; // for Pocket Excel support
1592
1593 unsigned int rtti(){
1594 return this->id;
1595 }
1596
1600 FormulaRecord();
1601
1606
1610 Value result() const;
1611
1615 void setResult( const Value& v );
1616
1617 FormulaTokens tokens() const;
1618
1619 virtual void setData( unsigned size, const unsigned char* data );
1620
1621 virtual const char* name(){ return "FORMULA"; }
1622
1623 virtual void dump( std::ostream& out ) const;
1624
1625private:
1626 // no copy or assign
1627 FormulaRecord( const FormulaRecord& );
1628 FormulaRecord& operator=( const FormulaRecord& );
1629
1630 class Private;
1631 Private* d;
1632};
1633
1639
1640class HeaderRecord : public Record
1641{
1642public:
1643
1644 static const unsigned int id;
1645
1646 unsigned int rtti(){
1647 return this->id;
1648 }
1649
1653 HeaderRecord();
1654
1658 ~HeaderRecord();
1659
1663 UString header() const;
1664
1668 void setHeader( const UString& h );
1669
1670 virtual void setData( unsigned size, const unsigned char* data );
1671
1672 virtual const char* name(){ return "HEADER"; }
1673
1674 virtual void dump( std::ostream& out ) const;
1675
1676private:
1677 // no copy or assign
1678 HeaderRecord( const HeaderRecord& );
1679 HeaderRecord& operator=( const HeaderRecord& );
1680
1681 class Private;
1682 Private* d;
1683};
1684
1685
1695class LabelRecord : public Record, public CellInfo
1696{
1697public:
1698
1699 static const unsigned int id;
1700
1701 unsigned int rtti(){
1702 return this->id;
1703 }
1704
1708 LabelRecord();
1709
1713 virtual ~LabelRecord();
1714
1718 UString label() const;
1719
1723 void setLabel( const UString& l );
1724
1725 virtual void setData( unsigned size, const unsigned char* data );
1726
1727 virtual const char* name(){ return "LABEL"; }
1728
1729 virtual void dump( std::ostream& out ) const;
1730
1731private:
1732 // no copy or assign
1733 LabelRecord( const LabelRecord& );
1734 LabelRecord& operator=( const LabelRecord& );
1735
1736 class Private;
1737 Private *d;
1738};
1739
1749class LabelSSTRecord : public Record, public CellInfo
1750{
1751public:
1752
1753 static const unsigned int id;
1754
1755 unsigned int rtti(){
1756 return this->id;
1757 }
1758
1763
1767 virtual ~LabelSSTRecord();
1768
1773 unsigned sstIndex() const;
1774
1775 virtual void setData( unsigned size, const unsigned char* data );
1776
1777 virtual const char* name(){ return "LABELSST"; }
1778
1779 virtual void dump( std::ostream& out ) const;
1780
1781private:
1782 // no copy or assign
1784 LabelSSTRecord& operator=( const LabelSSTRecord& );
1785
1786 class Private;
1787 Private *d;
1788};
1789
1795{
1796public:
1797
1798 static const unsigned int id;
1799
1800 unsigned int rtti(){
1801 return this->id;
1802 }
1803
1808
1813
1817 double leftMargin() const;
1818
1822 void setLeftMargin( double m );
1823
1824 virtual void setData( unsigned size, const unsigned char* data );
1825
1826 virtual const char* name(){ return "LEFTMARGIN"; }
1827
1828 virtual void dump( std::ostream& out ) const;
1829
1830private:
1831 // no copy or assign
1833 LeftMarginRecord& operator=( const LeftMarginRecord& );
1834
1835 class Private;
1836 Private* d;
1837};
1838
1839
1846
1848{
1849public:
1850
1851 static const unsigned int id;
1852
1853 unsigned int rtti(){
1854 return this->id;
1855 }
1856
1861
1865 virtual ~MergedCellsRecord();
1866
1870 unsigned count() const;
1871
1875 unsigned firstRow( unsigned i ) const;
1876
1880 unsigned lastRow( unsigned i ) const;
1881
1885 unsigned firstColumn( unsigned i ) const;
1886
1890 unsigned lastColumn( unsigned i ) const;
1891
1892 virtual void setData( unsigned size, const unsigned char* data );
1893
1894 virtual const char* name(){ return "MERGEDCELLS"; }
1895
1896 virtual void dump( std::ostream& out ) const;
1897
1898private:
1899 // no copy or assign
1901 MergedCellsRecord& operator=( const MergedCellsRecord& );
1902
1903 class Private;
1904 Private *d;
1905};
1906
1913
1914class MulBlankRecord : public Record, public CellInfo, public ColumnSpanInfo
1915{
1916public:
1917
1918 static const unsigned int id;
1919
1920 unsigned int rtti(){
1921 return this->id;
1922 }
1923
1928
1932 virtual ~MulBlankRecord();
1933
1934 virtual void setData( unsigned size, const unsigned char* data );
1935
1939 unsigned xfIndex( unsigned i ) const;
1940
1941 virtual const char* name(){ return "MULBLANK"; }
1942
1943 virtual void dump( std::ostream& out ) const;
1944
1945private:
1946 // no copy or assign
1948 MulBlankRecord& operator=( const MulBlankRecord& );
1949
1950 class Private;
1951 Private *d;
1952
1953 // from CellInfo, we don't need it
1954 // mark as private so nobody can call them
1955 virtual unsigned column() const { return CellInfo::column(); }
1956 virtual unsigned xfIndex() const { return CellInfo::xfIndex(); }
1957};
1958
1965
1966class MulRKRecord : public Record, public CellInfo, public ColumnSpanInfo
1967{
1968public:
1969
1970 static const unsigned int id;
1971
1972 unsigned int rtti(){
1973 return this->id;
1974 }
1975
1979 MulRKRecord();
1980
1984 virtual ~MulRKRecord();
1985
1986 virtual void setData( unsigned size, const unsigned char* data );
1987
1991 unsigned xfIndex( unsigned i ) const;
1992
1998 bool isInteger( unsigned i ) const;
1999
2006 int asInteger( unsigned i ) const;
2007
2014 double asFloat( unsigned i ) const;
2015
2016 unsigned encodedRK( unsigned i ) const;
2017
2018 virtual const char* name(){ return "MULRK"; }
2019
2020 virtual void dump( std::ostream& out ) const;
2021
2022private:
2023 // no copy or assign
2024 MulRKRecord( const MulRKRecord& );
2025 MulRKRecord& operator=( const MulRKRecord& );
2026
2027 class Private;
2028 Private *d;
2029
2030 // from CellInfo, we don't need it
2031 // mark as private so nobody can call them
2032 virtual unsigned column() const { return CellInfo::column(); }
2033 virtual unsigned xfIndex() const { return CellInfo::xfIndex(); }
2034};
2035
2036
2037class NameRecord : public Record
2038{
2039public:
2040
2041 static const unsigned int id;
2042
2043 unsigned int rtti(){
2044 return this->id;
2045 }
2046
2047 NameRecord();
2048
2049 ~NameRecord();
2050
2051 UString definedName() const;
2052
2053 void setDefinedName( const UString& name );
2054
2055 virtual void setData( unsigned size, const unsigned char* data );
2056
2057 virtual const char* name(){ return "NAME"; }
2058
2059 virtual void dump( std::ostream& out ) const;
2060
2061private:
2062 // no copy or assign
2063 NameRecord( const NameRecord& );
2064 NameRecord& operator=( const NameRecord& );
2065
2066 class Private;
2067 Private *d;
2068};
2069
2070
2075class NumberRecord : public Record, public CellInfo
2076{
2077public:
2078
2079 static const unsigned int id;
2080
2081 unsigned int rtti(){
2082 return this->id;
2083 }
2084
2088 NumberRecord();
2089
2093 virtual ~NumberRecord();
2094
2095 virtual void setData( unsigned size, const unsigned char* data );
2096
2102 double number() const;
2103
2109 void setNumber( double f );
2110
2111 virtual const char* name(){ return "NUMBER"; }
2112
2113 virtual void dump( std::ostream& out ) const;
2114
2115private:
2116 // no copy or assign
2117 NumberRecord( const NumberRecord& );
2118 NumberRecord& operator=( const NumberRecord& );
2119
2120 class Private;
2121 Private *d;
2122};
2123
2128class PaletteRecord : public Record
2129{
2130public:
2131
2132 static const unsigned int id;
2133
2134 unsigned int rtti(){
2135 return this->id;
2136 }
2137
2141 PaletteRecord();
2142
2147
2151 Color color( unsigned i ) const;
2152
2156 unsigned count() const;
2157
2158 virtual void setData( unsigned size, const unsigned char* data );
2159
2160 virtual const char* name(){ return "PALETTE"; }
2161
2162 virtual void dump( std::ostream& out ) const;
2163
2164private:
2165 // no copy or assign
2166 PaletteRecord( const PaletteRecord& );
2167 PaletteRecord& operator=( const PaletteRecord& );
2168
2169 class Private;
2170 Private* d;
2171};
2172
2173
2174
2180{
2181public:
2182
2183 static const unsigned int id;
2184
2185 unsigned int rtti(){
2186 return this->id;
2187 }
2188
2193
2198
2202 double rightMargin() const;
2203
2207 void setRightMargin( double m );
2208
2209 virtual void setData( unsigned size, const unsigned char* data );
2210
2211 virtual const char* name(){ return "RIGHTMARGIN"; }
2212
2213 virtual void dump( std::ostream& out ) const;
2214
2215private:
2216 // no copy or assign
2218 RightMarginRecord& operator=( const RightMarginRecord& );
2219
2220 class Private;
2221 Private* d;
2222};
2223
2224
2225
2231class RKRecord : public Record, public CellInfo
2232{
2233public:
2234
2235 static const unsigned int id;
2236
2237 unsigned int rtti(){
2238 return this->id;
2239 }
2240
2244 RKRecord();
2245
2249 virtual ~RKRecord();
2250
2251 virtual void setData( unsigned size, const unsigned char* data );
2252
2258 bool isInteger() const;
2259
2265 bool isFloat() const;
2266
2273 int asInteger() const;
2274
2281 double asFloat() const;
2282
2288 void setInteger( int i );
2289
2295 void setFloat( double f );
2296
2297 unsigned encodedRK() const;
2298
2299 virtual const char* name(){ return "RK"; }
2300
2301 virtual void dump( std::ostream& out ) const;
2302
2303private:
2304 // no copy or assign
2305 RKRecord( const RKRecord& );
2306 RKRecord& operator=( const RKRecord& );
2307
2308 class Private;
2309 Private *d;
2310};
2311
2316class RowRecord : public Record, public ColumnSpanInfo
2317{
2318public:
2319
2320 static const unsigned int id;
2321
2322 unsigned int rtti(){
2323 return this->id;
2324 }
2325
2329 RowRecord();
2330
2334 virtual ~RowRecord();
2335
2341 unsigned row() const;
2342
2348 void setRow( unsigned r );
2349
2355 unsigned xfIndex() const;
2356
2362 void setXfIndex( unsigned i );
2363
2369 unsigned height() const;
2370
2376 void setHeight( unsigned h );
2377
2383 bool hidden() const;
2384
2390 void setHidden( bool h );
2391
2392 virtual void setData( unsigned size, const unsigned char* data );
2393
2394 virtual const char* name(){ return "ROW"; }
2395
2396 virtual void dump( std::ostream& out ) const;
2397
2398private:
2399 // no copy or assign
2400 RowRecord( const RowRecord& );
2401 RowRecord& operator=( const RowRecord& );
2402
2403 class Private;
2404 Private *d;
2405};
2406
2407
2418class RStringRecord : public Record, public CellInfo
2419{
2420public:
2421
2422 static const unsigned int id;
2423
2424 unsigned int rtti(){
2425 return this->id;
2426 }
2427
2431 RStringRecord();
2432
2436 virtual ~RStringRecord();
2437
2443 UString label() const;
2444
2450 void setLabel( const UString& l );
2451
2452 virtual void setData( unsigned size, const unsigned char* data );
2453
2454 virtual const char* name(){ return "RSTRING"; }
2455
2456 virtual void dump( std::ostream& out ) const;
2457
2458private:
2459 // no copy or assign
2460 RStringRecord( const RStringRecord& );
2461 RStringRecord& operator=( const RStringRecord& );
2462
2463 class Private;
2464 Private *d;
2465};
2466
2467
2475class SSTRecord : public Record
2476{
2477public:
2478
2479 static const unsigned int id;
2480
2481 unsigned int rtti(){
2482 return this->id;
2483 }
2484
2488 SSTRecord();
2489
2493 virtual ~SSTRecord();
2494
2495 virtual void setData( unsigned size, const unsigned char* data );
2496
2500 unsigned count() const;
2501
2507 UString stringAt( unsigned index ) const;
2508
2509 virtual const char* name(){ return "SST"; }
2510
2511 virtual void dump( std::ostream& out ) const;
2512
2513private:
2514 // no copy or assign
2515 SSTRecord( const SSTRecord& );
2516 SSTRecord& operator=( const SSTRecord& );
2517
2518 class Private;
2519 Private *d;
2520};
2521
2522
2531class StringRecord : public Record
2532{
2533public:
2534
2535 static const unsigned int id;
2536
2537 unsigned int rtti(){ return this->id; }
2538
2542 StringRecord();
2543
2547 virtual ~StringRecord();
2548
2549 virtual void setData( unsigned size, const unsigned char* data );
2550
2554 UString ustring() const;
2555
2559 Value value() const;
2560
2561 virtual const char* name(){ return "STRING"; }
2562
2563 virtual void dump( std::ostream& out ) const;
2564
2565private:
2566 // no copy or assign
2567 StringRecord( const SSTRecord& );
2568 StringRecord& operator=( const SSTRecord& );
2569
2570 class Private;
2571 Private *d;
2572};
2573
2578class SupbookRecord : public Record
2579{
2580public:
2581
2582 static const unsigned int id;
2583
2584 typedef enum
2585 {
2586 UnknownRef,
2587 ExternalRef,
2588 InternalRef,
2589 AddInRef,
2590 ObjectLink
2591 } ReferenceType;
2592
2593 unsigned int rtti(){
2594 return this->id;
2595 }
2596
2600 SupbookRecord();
2601
2606
2610 ReferenceType referenceType() const;
2611
2615 void setReferenceType(ReferenceType type);
2616
2617 virtual void setData( unsigned size, const unsigned char* data );
2618
2619 virtual const char* name(){ return "SUPBOOK"; }
2620
2621 virtual void dump( std::ostream& out ) const;
2622
2623private:
2624 // no copy or assign
2625 SupbookRecord( const SupbookRecord& );
2626 SupbookRecord& operator=( const SupbookRecord& );
2627
2628 class Private;
2629 Private* d;
2630};
2631
2637{
2638public:
2639
2640 static const unsigned int id;
2641
2642 unsigned int rtti(){
2643 return this->id;
2644 }
2645
2650
2655
2659 double topMargin() const;
2660
2664 void setTopMargin( double m );
2665
2666 virtual void setData( unsigned size, const unsigned char* data );
2667
2668 virtual const char* name(){ return "TOPMARGIN"; }
2669
2670 virtual void dump( std::ostream& out ) const;
2671
2672private:
2673 // no copy or assign
2675 TopMarginRecord& operator=( const TopMarginRecord& );
2676
2677 class Private;
2678 Private* d;
2679};
2680
2687class XFRecord : public Record
2688{
2689public:
2690
2691 static const unsigned int id;
2692
2693 unsigned int rtti(){
2694 return this->id;
2695 }
2696
2700 XFRecord();
2701
2705 XFRecord( const XFRecord& xf );
2706
2710 XFRecord& operator=( const XFRecord& xf );
2711
2715 ~XFRecord();
2716
2723 unsigned fontIndex() const;
2724
2731 void setFontIndex( unsigned fi );
2732
2739 unsigned formatIndex() const;
2740
2747 void setFormatIndex( unsigned fi );
2748
2754 bool locked() const;
2755
2761 void setLocked( bool l );
2762
2769 bool formulaHidden() const;
2770
2777 void setFormulaHidden( bool f );
2778
2786 unsigned parentStyle() const;
2787
2795 void setParentStyle( unsigned ps );
2796
2797 enum {
2798 General = 0,
2799 Left,
2800 Centered,
2801 Right,
2802 Filled,
2803 Justified,
2804 CenteredSelection,
2805 Distributed };
2806
2810 unsigned horizontalAlignment() const;
2811
2815 void setHorizontalAlignment( unsigned ha );
2816
2821 const char* horizontalAlignmentAsString() const;
2822
2823 enum {
2824 Top = 0,
2825 VCentered = 1,
2826 Bottom = 2,
2827 VJustified = 3,
2828 VDistributed = 4 };
2829
2835 unsigned verticalAlignment() const;
2836
2842 void setVerticalAlignment( unsigned va );
2843
2848 const char* verticalAlignmentAsString() const;
2849
2855 bool textWrap() const;
2856
2862 void setTextWrap( bool wrap );
2863
2871 unsigned rotationAngle() const;
2872
2880 void setRotationAngle( unsigned angle );
2881
2888 bool stackedLetters() const;
2889
2895 void setStackedLetters( bool stacked );
2896
2902 unsigned indentLevel() const;
2903
2909 void setIndentLevel( unsigned i );
2910
2916 bool shrinkContent() const;
2917
2923 void setShrinkContent( bool s );
2924
2925 enum
2926 {
2927 NoLine = 0,
2928 Thin = 1,
2929 Medium = 2,
2930 Dashed = 3,
2931 Dotted = 4,
2932 Thick = 5,
2933 Double = 6,
2934 Hair = 7,
2935 MediumDashed = 8,
2936 ThinDashDotted = 9,
2937 MediumDashDotted = 10,
2938 ThinDashDotDotted = 11,
2939 MediumDashDotDotted = 12,
2940 SlantedMediumDashDotted = 13
2941 };
2942
2948 unsigned leftBorderStyle() const;
2949
2955 void setLeftBorderStyle( unsigned style );
2956
2963 unsigned leftBorderColor() const;
2964
2971 void setLeftBorderColor( unsigned color );
2972
2978 unsigned rightBorderStyle() const;
2979
2985 void setRightBorderStyle( unsigned style );
2986
2993 unsigned rightBorderColor() const;
2994
3001 void setRightBorderColor( unsigned color );
3002
3008 unsigned topBorderStyle() const;
3009
3015 void setTopBorderStyle( unsigned style );
3016
3023 unsigned topBorderColor() const;
3024
3031 void setTopBorderColor( unsigned color );
3032
3038 unsigned bottomBorderStyle() const;
3039
3045 void setBottomBorderStyle( unsigned style );
3046
3053 unsigned bottomBorderColor() const;
3054
3061 void setBottomBorderColor( unsigned color );
3062
3068 bool diagonalTopLeft() const;
3069
3075 void setDiagonalTopLeft( bool d );
3076
3082 bool diagonalBottomLeft() const;
3083
3089 void setDiagonalBottomLeft( bool d );
3090
3096 unsigned diagonalStyle() const;
3097
3103 void setDiagonalStyle( unsigned style );
3104
3111 unsigned diagonalColor() const;
3112
3119 void setDiagonalColor( unsigned color );
3120
3126 unsigned fillPattern() const;
3127
3133 void setFillPattern( unsigned pattern );
3134
3141 unsigned patternForeColor() const;
3142
3149 void setPatternForeColor( unsigned color );
3150
3157 unsigned patternBackColor() const;
3158
3165 void setPatternBackColor( unsigned color );
3166
3167 virtual const char* name(){ return "XF"; }
3168
3169 virtual void setData( unsigned size, const unsigned char* data );
3170
3171 virtual void dump( std::ostream& out ) const;
3172
3173private:
3174 class Private;
3175 Private* d;
3176};
3177
3178typedef std::vector<UString> UStringStack;
3179
3180
3181class ExcelReader
3182{
3183public:
3184 ExcelReader();
3185 virtual ~ExcelReader();
3186 bool load( Workbook* workbook, const char* filename );
3187
3188protected:
3189 virtual void handleRecord( Record* record );
3190
3191private:
3192 void handleBoundSheet( BoundSheetRecord* record );
3193 void handleBOF( BOFRecord* record );
3194 void handleBoolErr( BoolErrRecord* record );
3195 void handleBottomMargin( BottomMarginRecord* record );
3196 void handleBlank( BlankRecord* record );
3197 void handleCalcMode( CalcModeRecord* record );
3198 void handleColInfo( ColInfoRecord* record );
3199 void handleDateMode( DateModeRecord* record );
3200 void handleDimension( DimensionRecord* record );
3201 void handleExternName( ExternNameRecord* record );
3202 void handleExternSheet( ExternSheetRecord* record );
3203 void handleFilepass( FilepassRecord* record );
3204 void handleFormat( FormatRecord* record );
3205 void handleFormula( FormulaRecord* record );
3206 void handleFont( FontRecord* record );
3207 void handleFooter( FooterRecord* record );
3208 void handleHeader( HeaderRecord* record );
3209 void handleLabel( LabelRecord* record );
3210 void handleLabelSST( LabelSSTRecord* record );
3211 void handleLeftMargin( LeftMarginRecord* record );
3212 void handleMergedCells( MergedCellsRecord* record );
3213 void handleMulBlank( MulBlankRecord* record );
3214 void handleMulRK( MulRKRecord* record );
3215 void handleName( NameRecord* record );
3216 void handleNumber( NumberRecord* record );
3217 void handlePalette( PaletteRecord* record );
3218 void handleRightMargin( RightMarginRecord* record );
3219 void handleRString( RStringRecord* record );
3220 void handleRK( RKRecord* record );
3221 void handleRow( RowRecord* record );
3222 void handleSST( SSTRecord* record );
3223 void handleString( StringRecord* record );
3224 void handleSupbook( SupbookRecord* record );
3225 void handleTopMargin( TopMarginRecord* record );
3226 void handleXF( XFRecord* record );
3227
3228 Color convertColor( unsigned colorIndex );
3229 FormatFont convertFont( unsigned fontIndex );
3230 Format convertFormat( unsigned xfIndex );
3231 UString decodeFormula( unsigned row, unsigned col,
3232 const FormulaTokens& tokens, bool openDocumentFormat=false );
3233
3234 void mergeTokens( UStringStack* stack, int count, char mergeChar );
3235 void mergeTokens( UStringStack* stack, int count, const char* mergeString );
3236
3237 // no copy or assign
3238 ExcelReader( const ExcelReader& );
3239 ExcelReader& operator=( const ExcelReader& );
3240
3241 class Private;
3242 Private* d;
3243};
3244
3245
3246} // namespace Swinder
3247
3248
3249
3250#endif // SWINDER_EXCEL_H
This class describe a cell, row or column format.
Beginning of file/set of records.
Definition excel.h:481
static const unsigned int id
Static ID of the BOF record.
Definition excel.h:487
const char * typeAsString() const
Returns BOF type as string, something like "Worksheet".
Definition excel.cpp:1780
virtual const char * name()
Returns the name of the record.
Definition excel.h:533
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1796
virtual ~BOFRecord()
Destroys the record.
Definition excel.cpp:1717
unsigned type() const
Returns type of the BOF record, like Workbook, Chart, and so on.
Definition excel.cpp:1764
BOFRecord()
Creates a new BOF record.
Definition excel.cpp:1704
const char * versionAsString() const
Returns the version as string, something like "Excel97".
Definition excel.cpp:1752
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1722
unsigned version() const
Returns the version, like Excel95, Excel97, and so on.
Definition excel.cpp:1740
Backup upon save.
Definition excel.h:419
BackupRecord()
Creates a new Backup record.
Definition excel.cpp:1624
~BackupRecord()
Destroy the record.
Definition excel.cpp:1631
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1646
bool backup() const
Returns true if a backup is made when saving the file.
Definition excel.cpp:1636
void setBackup(bool r)
If r is true, a backup will be made when saving the file.
Definition excel.cpp:1641
virtual const char * name()
Returns the name of the record.
Definition excel.h:453
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1654
Blank cell.
Definition excel.h:553
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1678
virtual const char * name()
Returns the name of the record.
Definition excel.h:569
BlankRecord()
Creates a new Blank record.
Definition excel.cpp:1664
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1669
Boolean value or error code.
Definition excel.h:586
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1858
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1830
BoolErrRecord()
Creates a new BoolErr record.
Definition excel.cpp:1818
virtual const char * name()
Returns the name of the record.
Definition excel.h:613
static const unsigned int id
Static ID of the BoolErr record.
Definition excel.h:592
Value value() const
Returns value of the cell, could be either boolean or error.
Definition excel.cpp:1853
virtual ~BoolErrRecord()
Destroys the BoolErr record.
Definition excel.cpp:1825
~BottomMarginRecord()
Destroy the record.
Definition excel.cpp:1884
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1905
double bottomMargin() const
Gets the bottom margin (in inches).
Definition excel.cpp:1889
virtual const char * name()
Returns the name of the record.
Definition excel.h:663
void setBottomMargin(double m)
Sets the new bottom margin (in inches).
Definition excel.cpp:1894
BottomMarginRecord()
Creates a new BottomMargin record.
Definition excel.cpp:1877
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1899
Sheet information.
Definition excel.h:692
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2007
unsigned type() const
Returns the type of the BoundSheet.
Definition excel.cpp:1946
void setBofPosition(unsigned pos)
Sets the position of the BOF record associated with this BoundSheet.
Definition excel.cpp:1992
void setSheetName(const UString &name)
Sets the name of the sheet.
Definition excel.cpp:1982
bool visible() const
Returns true if the sheet is visible.
Definition excel.cpp:1977
virtual const char * name()
Returns the name of the record.
Definition excel.h:767
virtual ~BoundSheetRecord()
Destroys the BoundSheet record.
Definition excel.cpp:2002
UString sheetName() const
Returns the name of the sheet.
Definition excel.cpp:1987
BoundSheetRecord()
Creates a new BoundSheet record.
Definition excel.cpp:1926
const char * typeAsString() const
Returns the type of the BoundSheet as string.
Definition excel.cpp:1959
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2027
void setVisible(bool visible)
Sets the visibility of the sheet.
Definition excel.cpp:1972
void setType(unsigned type)
Sets the type of the BoundSheet.
Definition excel.cpp:1935
unsigned bofPosition() const
Returns the position of the BOF record associated with this BoundSheet.
Definition excel.cpp:1997
Automatic recalculation mode.
Definition excel.h:787
~CalcModeRecord()
Destroy the record.
Definition excel.cpp:2054
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2069
virtual const char * name()
Returns the name of the record.
Definition excel.h:822
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2077
void setAutoCalc(bool r)
If r is true, formulas calculation will be performed automatically.
Definition excel.cpp:2064
bool autoCalc() const
Returns true if formulas calculation is performed automatically.
Definition excel.cpp:2059
CalcModeRecord()
Creates a new CalcMode record.
Definition excel.cpp:2047
virtual void setXfIndex(unsigned i)
Sets the XF index for formatting of the cell.
Definition excel.cpp:1412
virtual void setColumn(unsigned c)
Sets the column associated with the cell information.
Definition excel.cpp:1402
virtual unsigned xfIndex() const
Returns the XF index for formatting of the cell.
Definition excel.cpp:1407
virtual void setRow(unsigned r)
Sets the row associated with the cell information.
Definition excel.cpp:1392
virtual unsigned row() const
Returns the row associated with the cell information.
Definition excel.cpp:1387
virtual unsigned column() const
Returns the column associated with the cell information.
Definition excel.cpp:1397
CellInfo()
Creates a new cell information.
Definition excel.cpp:1374
virtual ~CellInfo()
Destroys the cell information.
Definition excel.cpp:1382
Columns width and format.
Definition excel.h:842
unsigned outlineLevel() const
Returns the outline level of the columns.
Definition excel.cpp:2154
unsigned xfIndex() const
Returns the XF index for the formatting of the column(s).
Definition excel.cpp:2124
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2179
virtual ~ColInfoRecord()
Destroys the record.
Definition excel.cpp:2108
void setOutlineLevel(unsigned l)
Sets the outline level of the columns.
Definition excel.cpp:2159
ColInfoRecord()
Creates a new ColInfo record.
Definition excel.cpp:2097
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2164
void setXfIndex(unsigned i)
Sets the XF index for the formatting of the column(s).
Definition excel.cpp:2129
void setHidden(bool h)
Sets whether columns should be hidden or visible.
Definition excel.cpp:2139
bool collapsed() const
Returns true if the columns should be collapsed.
Definition excel.cpp:2144
bool hidden() const
Returns true if the columns should be hidden, i.e not visible.
Definition excel.cpp:2134
void setWidth(unsigned w)
Sets the width of the column(s), specified in 1/256 of a character width.
Definition excel.cpp:2119
unsigned width() const
Returns the width of the column(s), specified in 1/256 of a character width.
Definition excel.cpp:2114
void setCollapsed(bool c)
Sets whether columns should be collapsed or not.
Definition excel.cpp:2149
virtual const char * name()
Returns the name of the record.
Definition excel.h:939
Provides color based on RGB values.
virtual unsigned lastColumn() const
Returns the last column associated with the span information.
Definition excel.cpp:1450
virtual void setLastColumn(unsigned c)
Sets the last column associated with the span information.
Definition excel.cpp:1455
virtual unsigned firstColumn() const
Returns the first column associated with the span information.
Definition excel.cpp:1440
virtual ~ColumnSpanInfo()
Destroys the column span information.
Definition excel.cpp:1435
ColumnSpanInfo()
Creates a new column span information.
Definition excel.cpp:1428
virtual void setFirstColumn(unsigned c)
Sets the first column associated with the span information.
Definition excel.cpp:1445
Date reference.
Definition excel.h:963
~DateModeRecord()
Destroy the record.
Definition excel.cpp:2208
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2223
virtual const char * name()
Returns the name of the record.
Definition excel.h:1000
DateModeRecord()
Creates a new DateMode record.
Definition excel.cpp:2201
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2231
bool base1904() const
Returns true if the reference date is 1st of January, 1904 or false if the reference date is 31st of ...
Definition excel.cpp:2213
void setBase1904(bool r)
If r is true, sets the reference date to 1st of January, 1904.
Definition excel.cpp:2218
Range of used area.
Definition excel.h:1020
void setFirstColumn(unsigned r)
Sets index to the first used column.
Definition excel.cpp:2291
void setFirstRow(unsigned r)
Sets index to the first used row.
Definition excel.cpp:2271
DimensionRecord()
Creates a new Dimension record.
Definition excel.cpp:2251
unsigned firstColumn() const
Returns index to the first used column.
Definition excel.cpp:2286
unsigned lastColumn() const
Returns index to the last used column.
Definition excel.cpp:2296
void setLastColumn(unsigned r)
Sets index to the last used column.
Definition excel.cpp:2301
unsigned lastRow() const
Returns index to the last used row.
Definition excel.cpp:2276
unsigned firstRow() const
Returns index to the first used row.
Definition excel.cpp:2266
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2316
virtual const char * name()
Returns the name of the record.
Definition excel.h:1095
void setLastRow(unsigned r)
Sets index to the last used row.
Definition excel.cpp:2281
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2306
~DimensionRecord()
Destroys the record.
Definition excel.cpp:2261
End of record set.
Definition excel.h:1199
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2338
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2343
virtual ~EOFRecord()
Destroy the record.
Definition excel.cpp:2334
EOFRecord()
Creates a new EOF record.
Definition excel.cpp:2329
virtual const char * name()
Returns the name of the record.
Definition excel.h:1220
bool italic() const
Returns true if italic has been set.
Definition excel.cpp:2667
void setColorIndex(unsigned c)
Sets the index of the color of the font.
Definition excel.cpp:2652
void setEscapement(unsigned s)
Sets the superscript or subscript.
Definition excel.cpp:2692
FontRecord & operator=(const FontRecord &fr)
Assigns from another Font record.
Definition excel.cpp:2592
virtual ~FontRecord()
Destroy the record.
Definition excel.cpp:2581
void setItalic(bool i)
If i is true, italic is set on; otherwise italic is set off.
Definition excel.cpp:2672
UString fontName() const
Returns the name of font, e.g "Arial".
Definition excel.cpp:2617
bool strikeout() const
Returns true if strikeout has been set.
Definition excel.cpp:2677
void setFontName(const UString &fn)
Sets the name of the font.
Definition excel.cpp:2622
void setBoldness(unsigned b)
Sets the boldness of the font.
Definition excel.cpp:2662
void setStrikeout(bool s)
If s is true, strikeout is set on; otherwise strikeout is set off.
Definition excel.cpp:2682
void setUnderline(unsigned u)
Sets the underline style of the font.
Definition excel.cpp:2702
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2734
FontRecord()
Creates a new Font record.
Definition excel.cpp:2566
virtual const char * name()
Returns the name of the record.
Definition excel.h:1437
unsigned underline() const
Returns the underline style of the font.
Definition excel.cpp:2697
unsigned escapement() const
Returns Font::Superscript if superscript is set, or Font::Subscript if subscript is set,...
Definition excel.cpp:2687
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2708
unsigned colorIndex() const
Returns index of the color of the font.
Definition excel.cpp:2647
unsigned boldness() const
Returns the boldness of the font.
Definition excel.cpp:2657
Sheet footer.
Definition excel.h:1453
void setFooter(const UString &f)
Sets the footer.
Definition excel.cpp:2779
virtual const char * name()
Returns the name of the record.
Definition excel.h:1484
~FooterRecord()
Destroy the record.
Definition excel.cpp:2769
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2794
FooterRecord()
Creates a new Footer record.
Definition excel.cpp:2763
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2784
UString footer() const
Gets the footer.
Definition excel.cpp:2774
void setFormatString(const UString &fs)
Sets the formatting string of the format.
Definition excel.cpp:2852
UString formatString() const
Returns the formatting string of the format, e.g "0.00" for 2 decimal places number formatting.
Definition excel.cpp:2847
FormatRecord & operator=(const FormatRecord &fr)
Assigns from another Format record.
Definition excel.cpp:2830
virtual const char * name()
Returns the name of the record.
Definition excel.h:1569
void setIndex(unsigned i)
Sets the index of the format.
Definition excel.cpp:2842
~FormatRecord()
Destroys the Format record.
Definition excel.cpp:2818
unsigned index() const
Returns the index of the format.
Definition excel.cpp:2837
FormatRecord()
Creates a new Format record.
Definition excel.cpp:2811
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2869
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2857
Value result() const
Gets the result of the formula.
Definition excel.cpp:2900
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:2987
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:2915
~FormulaRecord()
Destroy the record.
Definition excel.cpp:2895
virtual const char * name()
Returns the name of the record.
Definition excel.h:1621
void setResult(const Value &v)
Sets the result of the formula.
Definition excel.cpp:2905
FormulaRecord()
Creates a new formula record.
Definition excel.cpp:2889
Sheet header.
Definition excel.h:1641
~HeaderRecord()
Destroy the record.
Definition excel.cpp:3073
HeaderRecord()
Creates a new Header record.
Definition excel.cpp:3067
void setHeader(const UString &h)
Sets the header.
Definition excel.cpp:3083
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3088
UString header() const
Gets the header.
Definition excel.cpp:3078
virtual const char * name()
Returns the name of the record.
Definition excel.h:1672
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3098
Class LabelRecord represents a cell that contains a string.
Definition excel.h:1696
void setLabel(const UString &l)
Sets the label string.
Definition excel.cpp:3029
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3048
LabelRecord()
Creates a new Label record.
Definition excel.cpp:3012
virtual const char * name()
Returns the name of the record.
Definition excel.h:1727
UString label() const
Returns the label string.
Definition excel.cpp:3024
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3034
virtual ~LabelRecord()
Destroys the record.
Definition excel.cpp:3019
Class LabelSSTRecord represents a cell that contains a string.
Definition excel.h:1750
virtual const char * name()
Returns the name of the record.
Definition excel.h:1777
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3131
unsigned sstIndex() const
Returns the SST index.
Definition excel.cpp:3126
virtual ~LabelSSTRecord()
Destroys the record.
Definition excel.cpp:3121
LabelSSTRecord()
Creates a new LabelSST record.
Definition excel.cpp:3114
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3142
Class LeftMarginRecord holds information about left margin.
Definition excel.h:1795
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3183
~LeftMarginRecord()
Destroy the record.
Definition excel.cpp:3168
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3189
double leftMargin() const
Gets the left margin (in inches).
Definition excel.cpp:3173
void setLeftMargin(double m)
Sets the new left margin (in inches).
Definition excel.cpp:3178
virtual const char * name()
Returns the name of the record.
Definition excel.h:1826
LeftMarginRecord()
Creates a new LeftMargin record.
Definition excel.cpp:3161
Class MergedCellsRecord represents MergedCells record, which contains a list of all merged cells in t...
Definition excel.h:1848
unsigned firstColumn(unsigned i) const
Returns the index to first column in the i-th position in the list.
Definition excel.cpp:3241
virtual ~MergedCellsRecord()
Destroys the record.
Definition excel.cpp:3217
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3255
unsigned count() const
Returns the total number of merged cells in the list.
Definition excel.cpp:3222
unsigned firstRow(unsigned i) const
Returns the index to first row in the i-th position in the list.
Definition excel.cpp:3227
unsigned lastColumn(unsigned i) const
Returns the index to last column in the i-th position in the list.
Definition excel.cpp:3248
virtual const char * name()
Returns the name of the record.
Definition excel.h:1894
unsigned lastRow(unsigned i) const
Returns the index to last row in the i-th position in the list.
Definition excel.cpp:3234
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3277
MergedCellsRecord()
Creates a new MergedCells record.
Definition excel.cpp:3211
Class MulBlankRecord represents a cell range containing blank cells.
Definition excel.h:1915
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3311
virtual const char * name()
Returns the name of the record.
Definition excel.h:1941
MulBlankRecord()
Creates a new MulBlank record.
Definition excel.cpp:3300
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3333
virtual ~MulBlankRecord()
Destroys the record.
Definition excel.cpp:3306
Class MulRKRecord represents a cell range containing RK value cells.
Definition excel.h:1967
MulRKRecord()
Creates a new MulRK record.
Definition excel.cpp:3355
virtual ~MulRKRecord()
Destroys the record.
Definition excel.cpp:3361
double asFloat(unsigned i) const
Returns the floating-point value specified by the record.
Definition excel.cpp:3384
bool isInteger(unsigned i) const
Returns true if the record holds an integer value.
Definition excel.cpp:3372
int asInteger(unsigned i) const
Returns the integer value specified by the record.
Definition excel.cpp:3378
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3425
virtual const char * name()
Returns the name of the record.
Definition excel.h:2018
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3396
Class NumberRecord represents a cell that contains a floating point value.
Definition excel.h:2076
virtual const char * name()
Returns the name of the record.
Definition excel.h:2111
double number() const
Returns the floating-point value specified by the record.
Definition excel.cpp:3526
void setNumber(double f)
Sets the floating-point value specified by the record.
Definition excel.cpp:3531
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3537
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3547
NumberRecord()
Creates a new Number record.
Definition excel.cpp:3514
virtual ~NumberRecord()
Destroys the record.
Definition excel.cpp:3521
Class PaletteRecord lists colors.
Definition excel.h:2129
virtual const char * name()
Returns the name of the record.
Definition excel.h:2160
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3603
unsigned count() const
Returns the number of colors in the palette.
Definition excel.cpp:3582
PaletteRecord()
Creates a new Palette record.
Definition excel.cpp:3566
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3587
~PaletteRecord()
Destroy the record.
Definition excel.cpp:3572
Color color(unsigned i) const
Gets the n-th color.
Definition excel.cpp:3577
Class RKRecord represents a cell that contains an RK value, i.e encoded integer or floating-point val...
Definition excel.h:2232
bool isInteger() const
Returns true if the record holds an integer value.
Definition excel.cpp:3689
bool isFloat() const
Returns true if the record holds a floating-point value.
Definition excel.cpp:3694
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3736
RKRecord()
Creates a new RK record.
Definition excel.cpp:3674
virtual ~RKRecord()
Destroys the record.
Definition excel.cpp:3684
void setFloat(double f)
Sets the floating-point value to be specified by the record.
Definition excel.cpp:3722
void setInteger(int i)
Sets the integer value to be specified by the record.
Definition excel.cpp:3715
virtual const char * name()
Returns the name of the record.
Definition excel.h:2299
int asInteger() const
Returns the integer value specified by the record.
Definition excel.cpp:3699
double asFloat() const
Returns the floating-point value specified by the record.
Definition excel.cpp:3707
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3751
Class RStringRecord represents a cell that contains rich-text string.
Definition excel.h:2419
UString label() const
Returns the label string.
Definition excel.cpp:3877
void setLabel(const UString &l)
Sets the label string.
Definition excel.cpp:3882
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3903
virtual const char * name()
Returns the name of the record.
Definition excel.h:2454
RStringRecord()
Creates a new Label record.
Definition excel.cpp:3865
virtual ~RStringRecord()
Destroys the record.
Definition excel.cpp:3872
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3888
Class Record represents a base class for all other type record, hence do not use this class in real l...
Definition excel.h:205
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:1609
virtual const char * name()
Returns the name of the record.
Definition excel.h:256
static const unsigned int id
Static ID of the record.
Definition excel.h:212
unsigned position() const
Gets the position of this record in the OLE stream.
Definition excel.cpp:1600
static Record * create(unsigned type)
Record factory, create a new record of specified type.
Definition excel.cpp:1474
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:1605
void setPosition(unsigned pos)
Sets the position of the record in the OLE stream.
Definition excel.cpp:1595
virtual ~Record()
Destroys the record.
Definition excel.cpp:1470
Record()
Creates a new generic record.
Definition excel.cpp:1464
Class RightMarginRecord holds information about right margin.
Definition excel.h:2180
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3655
double rightMargin() const
Gets the right margin (in inches).
Definition excel.cpp:3639
virtual const char * name()
Returns the name of the record.
Definition excel.h:2211
void setRightMargin(double m)
Sets the new right margin (in inches).
Definition excel.cpp:3644
RightMarginRecord()
Creates a new RightMargin record.
Definition excel.cpp:3627
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3649
~RightMarginRecord()
Destroy the record.
Definition excel.cpp:3634
Class RowRecord represents Row record, which provides information (such as row height and formatting)...
Definition excel.h:2317
unsigned row() const
Returns the index of the row.
Definition excel.cpp:3790
virtual ~RowRecord()
Destroys the record.
Definition excel.cpp:3785
void setRow(unsigned r)
Sets the index of the row.
Definition excel.cpp:3795
unsigned height() const
Returns the height of the row, specified in twips (1/20 pt).
Definition excel.cpp:3800
void setXfIndex(unsigned i)
Sets the XF index for the formatting of the cells.
Definition excel.cpp:3815
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3844
bool hidden() const
Returns true if the row should be hidden, i.e not visible.
Definition excel.cpp:3820
void setHeight(unsigned h)
Sets the height of the row, specified in twips (1/20 pt).
Definition excel.cpp:3805
RowRecord()
Creates a new Row record.
Definition excel.cpp:3775
void setHidden(bool h)
Sets whether row should be hidden or visible.
Definition excel.cpp:3825
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3830
unsigned xfIndex() const
Returns the XF index for the formatting of the cells.
Definition excel.cpp:3810
virtual const char * name()
Returns the name of the record.
Definition excel.h:2394
Class SSTRecord represents SST record, which holds the shared string table of the workbook.
Definition excel.h:2476
SSTRecord()
Creates a new SST record.
Definition excel.cpp:3924
virtual ~SSTRecord()
Destroys the record.
Definition excel.cpp:3932
virtual const char * name()
Returns the name of the record.
Definition excel.h:2509
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:3995
unsigned count() const
Returns the number of available string in this string table.
Definition excel.cpp:3983
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:3947
UString stringAt(unsigned index) const
Returns the string at specified index.
Definition excel.cpp:3989
Class String represents a string record, which holds the value of calculation if a formula returns a ...
Definition excel.h:2532
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:4046
UString ustring() const
Returns the string (in Unicode).
Definition excel.cpp:4036
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:4026
StringRecord()
Creates a new string record.
Definition excel.cpp:4015
virtual ~StringRecord()
Destroys the record.
Definition excel.cpp:4021
virtual const char * name()
Returns the name of the record.
Definition excel.h:2561
Value value() const
Returns the string as a value.
Definition excel.cpp:4041
Class SupbookRecord stores references to external workbook.
Definition excel.h:2579
ReferenceType referenceType() const
Returns the type of the reference.
Definition excel.cpp:4073
SupbookRecord()
Creates a new Supbook record.
Definition excel.cpp:4062
void setReferenceType(ReferenceType type)
Sets the type of the reference.
Definition excel.cpp:4078
~SupbookRecord()
Destroy the record.
Definition excel.cpp:4068
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:4117
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:4083
virtual const char * name()
Returns the name of the record.
Definition excel.h:2619
Class TopMarginRecord holds information about top margin.
Definition excel.h:2637
void setTopMargin(double m)
Sets the new top margin (in inches).
Definition excel.cpp:4150
double topMargin() const
Gets the top margin (in inches).
Definition excel.cpp:4145
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:4161
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:4155
TopMarginRecord()
Creates a new TopMargin record.
Definition excel.cpp:4133
virtual const char * name()
Returns the name of the record.
Definition excel.h:2668
~TopMarginRecord()
Destroy the record.
Definition excel.cpp:4140
Provides a wrapper for cell value.
Definition value.h:43
unsigned indentLevel() const
Returns indent level.
Definition excel.cpp:4409
void setPatternForeColor(unsigned color)
Sets the fill foreground color.
Definition excel.cpp:4564
bool formulaHidden() const
Returns true if the formula of the cells using this format should be hidden from user.
Definition excel.cpp:4308
void setRotationAngle(unsigned angle)
Sets the rotation angle of the text.
Definition excel.cpp:4394
virtual void dump(std::ostream &out) const
Dumps record information to output stream.
Definition excel.cpp:4657
unsigned topBorderColor() const
Returns the color for top border.
Definition excel.cpp:4479
unsigned horizontalAlignment() const
Gets the horizontal alignment, e.g Left.
Definition excel.cpp:4328
unsigned leftBorderStyle() const
Returns the line style for left border.
Definition excel.cpp:4429
void setTopBorderColor(unsigned color)
Sets the color for top border.
Definition excel.cpp:4484
XFRecord & operator=(const XFRecord &xf)
Assigns from another XF record.
Definition excel.cpp:4246
void setLeftBorderColor(unsigned color)
Sets the color for left border.
Definition excel.cpp:4444
const char * horizontalAlignmentAsString() const
Returns human-readable string representation of the horizontal alignment.
Definition excel.cpp:4338
void setFormatIndex(unsigned fi)
Sets the index of the number format for use in this XFormat.
Definition excel.cpp:4293
void setPatternBackColor(unsigned color)
Sets the fill background color.
Definition excel.cpp:4574
unsigned parentStyle() const
Returns the index of the parent stlye of this format.
Definition excel.cpp:4318
unsigned fontIndex() const
Gets the index of the font for use in this XFormat.
Definition excel.cpp:4278
unsigned rightBorderStyle() const
Returns the line style for right border.
Definition excel.cpp:4449
void setShrinkContent(bool s)
Sets whether content should be shrunk to fit into cell.
Definition excel.cpp:4424
bool textWrap() const
Returns true if text is wrapped at right border.
Definition excel.cpp:4379
void setLocked(bool l)
Sets whether the cells using this format should be locked or not.
Definition excel.cpp:4303
void setTextWrap(bool wrap)
Sets whether text should be wrapped at right border.
Definition excel.cpp:4384
void setFormulaHidden(bool f)
Sets whether the formula of the cells using this format should be hidden or should be visible.
Definition excel.cpp:4313
unsigned patternBackColor() const
Returns the fill background color.
Definition excel.cpp:4569
void setVerticalAlignment(unsigned va)
Sets the vertical alignment, e.g Top.
Definition excel.cpp:4359
unsigned rightBorderColor() const
Returns the color for right border.
Definition excel.cpp:4459
void setStackedLetters(bool stacked)
Sets whether the letters for text should be stacked top-to-bottom.
Definition excel.cpp:4404
void setDiagonalTopLeft(bool d)
Sets whether there should be a diagonal line from top left to right bottom.
Definition excel.cpp:4514
unsigned patternForeColor() const
Returns the fill foreground color.
Definition excel.cpp:4559
unsigned verticalAlignment() const
Gets the vertical alignment, e.g Bottom.
Definition excel.cpp:4354
bool stackedLetters() const
Returns true if the letters for text are not rotated, but instead stacked top-to-bottom.
Definition excel.cpp:4399
~XFRecord()
Destroy the record.
Definition excel.cpp:4235
virtual const char * name()
Returns the name of the record.
Definition excel.h:3167
void setParentStyle(unsigned ps)
Sets the index of the parent stlye of this format.
Definition excel.cpp:4323
unsigned bottomBorderStyle() const
Returns the line style for bottom border.
Definition excel.cpp:4489
bool diagonalBottomLeft() const
Returns true if there is a diagonal line from bottom left to right top.
Definition excel.cpp:4519
void setRightBorderStyle(unsigned style)
Sets the line style for right border.
Definition excel.cpp:4454
unsigned diagonalColor() const
Returns the color for diagonal line.
Definition excel.cpp:4539
unsigned diagonalStyle() const
Returns the diagonal line style.
Definition excel.cpp:4529
const char * verticalAlignmentAsString() const
Returns human-readable string representation of the vertical alignment.
Definition excel.cpp:4364
void setLeftBorderStyle(unsigned style)
Sets the line style for left border.
Definition excel.cpp:4434
void setBottomBorderStyle(unsigned style)
Sets the line style for bottom border.
Definition excel.cpp:4494
unsigned bottomBorderColor() const
Returns the color for bottom border.
Definition excel.cpp:4499
void setDiagonalColor(unsigned color)
Sets the color for diagonal line.
Definition excel.cpp:4544
unsigned fillPattern() const
Returns fill pattern.
Definition excel.cpp:4549
void setFontIndex(unsigned fi)
Sets the index of the font for use in this XFormat.
Definition excel.cpp:4283
void setIndentLevel(unsigned i)
Sets indent level.
Definition excel.cpp:4414
unsigned leftBorderColor() const
Returns the color for left border.
Definition excel.cpp:4439
unsigned formatIndex() const
Gets the index of the number format for use in this XFormat.
Definition excel.cpp:4288
void setDiagonalStyle(unsigned style)
Sets the line style for diagonal line.
Definition excel.cpp:4534
void setRightBorderColor(unsigned color)
Sets the color for right border.
Definition excel.cpp:4464
unsigned topBorderStyle() const
Returns the line style for top border.
Definition excel.cpp:4469
XFRecord()
Creates a new XF record.
Definition excel.cpp:4203
unsigned rotationAngle() const
Returns the rotation angle of the text.
Definition excel.cpp:4389
virtual void setData(unsigned size, const unsigned char *data)
Sets the data for this record.
Definition excel.cpp:4579
bool shrinkContent() const
Returns true if content should be shrunk to fit into cell.
Definition excel.cpp:4419
void setFillPattern(unsigned pattern)
Sets fill pattern.
Definition excel.cpp:4554
void setBottomBorderColor(unsigned color)
Sets the color for bottom border.
Definition excel.cpp:4504
void setHorizontalAlignment(unsigned ha)
Sets the horizontal alignment, e.g Left.
Definition excel.cpp:4333
void setTopBorderStyle(unsigned style)
Sets the line style for top border.
Definition excel.cpp:4474
void setDiagonalBottomLeft(bool d)
Sets whether there should be a diagonal line from bottom left to right top.
Definition excel.cpp:4524
bool locked() const
Returns true if the cells using this format should be locked.
Definition excel.cpp:4298
bool diagonalTopLeft() const
Returns true if there is a diagonal line from top left to right bottom.
Definition excel.cpp:4509