1 // xlsxformat_p.h
2 #ifndef XLSXFORMAT_P_H
3 #define XLSXFORMAT_P_H
4 
5 #include <QtGlobal>
6 #include <QSharedData>
7 #include <QMap>
8 #include <QSet>
9 
10 #include "xlsxformat.h"
11 
12 QT_BEGIN_NAMESPACE_XLSX
13 
14 class FormatPrivate : public QSharedData
15 {
16 public:
17     enum FormatType
18     {
19         FT_Invalid = 0,
20         FT_NumFmt = 0x01,
21         FT_Font = 0x02,
22         FT_Alignment = 0x04,
23         FT_Border = 0x08,
24         FT_Fill = 0x10,
25         FT_Protection = 0x20
26     };
27 
28     enum Property {
29         P_STARTID,
30 
31         //numFmt
32         P_NumFmt_Id,
33         P_NumFmt_FormatCode,
34 
35         //font
36         P_Font_STARTID,
37         P_Font_Size = P_Font_STARTID,
38         P_Font_Italic,
39         P_Font_StrikeOut,
40         P_Font_Color,
41         P_Font_Bold,
42         P_Font_Script,
43         P_Font_Underline,
44         P_Font_Outline,
45         P_Font_Shadow,
46         P_Font_Name,
47         P_Font_Family,
48         P_Font_Charset,
49         P_Font_Scheme,
50         P_Font_Condense,
51         P_Font_Extend,
52         P_Font_ENDID,
53 
54         //border
55         P_Border_STARTID,
56         P_Border_LeftStyle = P_Border_STARTID,
57         P_Border_RightStyle,
58         P_Border_TopStyle,
59         P_Border_BottomStyle,
60         P_Border_DiagonalStyle,
61         P_Border_LeftColor,
62         P_Border_RightColor,
63         P_Border_TopColor,
64         P_Border_BottomColor,
65         P_Border_DiagonalColor,
66         P_Border_DiagonalType,
67         P_Border_ENDID,
68 
69         //fill
70         P_Fill_STARTID,
71         P_Fill_Pattern = P_Fill_STARTID,
72         P_Fill_BgColor,
73         P_Fill_FgColor,
74         P_Fill_ENDID,
75 
76         //alignment
77         P_Alignment_STARTID,
78         P_Alignment_AlignH = P_Alignment_STARTID,
79         P_Alignment_AlignV,
80         P_Alignment_Wrap,
81         P_Alignment_Rotation,
82         P_Alignment_Indent,
83         P_Alignment_ShinkToFit,
84         P_Alignment_ENDID,
85 
86         //protection
87         P_Protection_Locked,
88         P_Protection_Hidden,
89 
90         P_ENDID
91     };
92 
93     FormatPrivate();
94     FormatPrivate(const FormatPrivate &other);
95     ~FormatPrivate();
96 
97     bool dirty; //The key re-generation is need.
98     QByteArray formatKey;
99 
100     bool font_dirty;
101     bool font_index_valid;
102     QByteArray font_key;
103     int font_index;
104 
105     bool fill_dirty;
106     bool fill_index_valid;
107     QByteArray fill_key;
108     int fill_index;
109 
110     bool border_dirty;
111     bool border_index_valid;
112     QByteArray border_key;
113     int border_index;
114 
115     int xf_index;
116     bool xf_indexValid;
117 
118     bool is_dxf_fomat;
119     int dxf_index;
120     bool dxf_indexValid;
121 
122     int theme;
123 
124     QMap<int, QVariant> properties;
125 };
126 
127 
128 QT_END_NAMESPACE_XLSX
129 
130 #endif
131