andre@1: /**************************************************************************** andre@1: ** Copyright (c) 2013-2014 Debao Zhang andre@1: ** All right reserved. andre@1: ** andre@1: ** Permission is hereby granted, free of charge, to any person obtaining andre@1: ** a copy of this software and associated documentation files (the andre@1: ** "Software"), to deal in the Software without restriction, including andre@1: ** without limitation the rights to use, copy, modify, merge, publish, andre@1: ** distribute, sublicense, and/or sell copies of the Software, and to andre@1: ** permit persons to whom the Software is furnished to do so, subject to andre@1: ** the following conditions: andre@1: ** andre@1: ** The above copyright notice and this permission notice shall be andre@1: ** included in all copies or substantial portions of the Software. andre@1: ** andre@1: ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, andre@1: ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF andre@1: ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND andre@1: ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE andre@1: ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION andre@1: ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION andre@1: ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. andre@1: ** andre@1: ****************************************************************************/ andre@1: #ifndef XLSXFORMAT_P_H andre@1: #define XLSXFORMAT_P_H andre@1: andre@1: // andre@1: // W A R N I N G andre@1: // ------------- andre@1: // andre@1: // This file is not part of the Qt Xlsx API. It exists for the convenience andre@1: // of the Qt Xlsx. This header file may change from andre@1: // version to version without notice, or even be removed. andre@1: // andre@1: // We mean it. andre@1: // andre@1: andre@1: #include "xlsxformat.h" andre@1: #include andre@1: #include andre@1: #include andre@1: andre@1: namespace QXlsx { andre@1: andre@1: class FormatPrivate : public QSharedData andre@1: { andre@1: public: andre@1: enum FormatType andre@1: { andre@1: FT_Invalid = 0, andre@1: FT_NumFmt = 0x01, andre@1: FT_Font = 0x02, andre@1: FT_Alignment = 0x04, andre@1: FT_Border = 0x08, andre@1: FT_Fill = 0x10, andre@1: FT_Protection = 0x20 andre@1: }; andre@1: andre@1: enum Property { andre@1: P_STARTID, andre@1: andre@1: //numFmt andre@1: P_NumFmt_Id, andre@1: P_NumFmt_FormatCode, andre@1: andre@1: //font andre@1: P_Font_STARTID, andre@1: P_Font_Size = P_Font_STARTID, andre@1: P_Font_Italic, andre@1: P_Font_StrikeOut, andre@1: P_Font_Color, andre@1: P_Font_Bold, andre@1: P_Font_Script, andre@1: P_Font_Underline, andre@1: P_Font_Outline, andre@1: P_Font_Shadow, andre@1: P_Font_Name, andre@1: P_Font_Family, andre@1: P_Font_Charset, andre@1: P_Font_Scheme, andre@1: P_Font_Condense, andre@1: P_Font_Extend, andre@1: P_Font_ENDID, andre@1: andre@1: //border andre@1: P_Border_STARTID, andre@1: P_Border_LeftStyle = P_Border_STARTID, andre@1: P_Border_RightStyle, andre@1: P_Border_TopStyle, andre@1: P_Border_BottomStyle, andre@1: P_Border_DiagonalStyle, andre@1: P_Border_LeftColor, andre@1: P_Border_RightColor, andre@1: P_Border_TopColor, andre@1: P_Border_BottomColor, andre@1: P_Border_DiagonalColor, andre@1: P_Border_DiagonalType, andre@1: P_Border_ENDID, andre@1: andre@1: //fill andre@1: P_Fill_STARTID, andre@1: P_Fill_Pattern = P_Fill_STARTID, andre@1: P_Fill_BgColor, andre@1: P_Fill_FgColor, andre@1: P_Fill_ENDID, andre@1: andre@1: //alignment andre@1: P_Alignment_STARTID, andre@1: P_Alignment_AlignH = P_Alignment_STARTID, andre@1: P_Alignment_AlignV, andre@1: P_Alignment_Wrap, andre@1: P_Alignment_Rotation, andre@1: P_Alignment_Indent, andre@1: P_Alignment_ShinkToFit, andre@1: P_Alignment_ENDID, andre@1: andre@1: //protection andre@1: P_Protection_Locked, andre@1: P_Protection_Hidden, andre@1: andre@1: P_ENDID andre@1: }; andre@1: andre@1: FormatPrivate(); andre@1: FormatPrivate(const FormatPrivate &other); andre@1: ~FormatPrivate(); andre@1: andre@1: bool dirty; //The key re-generation is need. andre@1: QByteArray formatKey; andre@1: andre@1: bool font_dirty; andre@1: bool font_index_valid; andre@1: QByteArray font_key; andre@1: int font_index; andre@1: andre@1: bool fill_dirty; andre@1: bool fill_index_valid; andre@1: QByteArray fill_key; andre@1: int fill_index; andre@1: andre@1: bool border_dirty; andre@1: bool border_index_valid; andre@1: QByteArray border_key; andre@1: int border_index; andre@1: andre@1: int xf_index; andre@1: bool xf_indexValid; andre@1: andre@1: bool is_dxf_fomat; andre@1: int dxf_index; andre@1: bool dxf_indexValid; andre@1: andre@1: int theme; andre@1: andre@1: QMap properties; andre@1: }; andre@1: andre@1: } andre@1: andre@1: #endif // XLSXFORMAT_P_H