fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / inc / xeextlst.hxx
blobfcb9a1d8a7ba5f38ad15bf7f530689a98a71b35b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XEEXTLST_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_INC_XEEXTLST_HXX
13 #include "xerecord.hxx"
14 #include "xeroot.hxx"
16 #include "colorscale.hxx"
17 #include "formulaopt.hxx"
19 #include <memory>
21 enum XclExpExtType
23 XclExpExtDataBarType,
24 XclExpExtDataFooType
27 struct XclExpExtCondFormatData
29 // -1 means don't write priority
30 sal_Int32 nPriority;
31 OString aGUID;
32 const ScFormatEntry* pEntry;
35 /**
36 * Base class for ext entries. Extend this class to provide the needed functionality
38 class XclExpExt : public XclExpRecordBase, public XclExpRoot
40 public:
41 explicit XclExpExt( const XclExpRoot& rRoot );
42 virtual XclExpExtType GetType() = 0;
44 protected:
45 OString maURI;
48 class XclExpExtCfvo : public XclExpRecordBase, protected XclExpRoot
50 public:
51 XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rPos, bool bFirst );
52 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
54 private:
55 ScColorScaleEntryType meType;
56 OString maValue;
57 bool mbFirst;
60 class XclExpExtNegativeColor
62 public:
63 XclExpExtNegativeColor( const Color& rColor );
64 void SaveXml( XclExpXmlStream& rStrm);
66 private:
67 Color maColor;
70 class XclExpExtAxisColor
72 public:
73 XclExpExtAxisColor( const Color& maColor );
74 void SaveXml( XclExpXmlStream& rStrm );
76 private:
77 Color maAxisColor;
80 class XclExpExtIcon : public XclExpRecordBase, protected XclExpRoot
82 public:
83 explicit XclExpExtIcon( const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry);
84 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
86 private:
87 const char* pIconSetName;
88 sal_Int32 nIndex;
91 class XclExpExtDataBar : public XclExpRecordBase, protected XclExpRoot
93 public:
94 explicit XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos );
95 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
97 private:
98 databar::ScAxisPosition meAxisPosition;
99 bool mbGradient;
100 double mnMinLength;
101 double mnMaxLength;
103 std::unique_ptr<XclExpExtCfvo> mpLowerLimit;
104 std::unique_ptr<XclExpExtCfvo> mpUpperLimit;
105 std::unique_ptr<XclExpExtNegativeColor> mpNegativeColor;
106 std::unique_ptr<XclExpExtAxisColor> mpAxisColor;
110 class XclExpExtIconSet : public XclExpRecordBase, protected XclExpRoot
112 public:
113 explicit XclExpExtIconSet(const XclExpRoot& rRoot, const ScIconSetFormat& rFormat, const ScAddress& rPos);
114 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
116 private:
117 XclExpRecordList<XclExpExtCfvo> maCfvos;
118 XclExpRecordList<XclExpExtIcon> maCustom;
119 bool mbCustom;
120 bool mbReverse;
121 bool mbShowValue;
122 const char* mpIconSetName;
125 typedef std::shared_ptr<XclExpExtDataBar> XclExpExtDataBarRef;
127 class XclExpExtCfRule : public XclExpRecordBase, protected XclExpRoot
129 public:
130 XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority );
131 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
133 private:
134 XclExpRecordRef mxEntry;
135 OString maId;
136 const char* pType;
137 sal_Int32 mnPriority;
140 typedef std::shared_ptr<XclExpExt> XclExpExtRef;
141 typedef std::shared_ptr<XclExpExtCfRule> XclExpExtCfRuleRef;
143 class XclExpExtConditionalFormatting : public XclExpRecordBase, protected XclExpRoot
145 public:
146 explicit XclExpExtConditionalFormatting( const XclExpRoot& rRoot, std::vector<XclExpExtCondFormatData>& rData, const ScRangeList& rRange);
147 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
149 private:
150 XclExpRecordList<XclExpExtCfRule> maCfRules;
151 ScRangeList maRange;
154 typedef std::shared_ptr<XclExpExtConditionalFormatting> XclExpExtConditionalFormattingRef;
156 class XclExpExtCondFormat : public XclExpExt
158 public:
159 XclExpExtCondFormat( const XclExpRoot& rRoot );
160 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
162 virtual XclExpExtType GetType() SAL_OVERRIDE { return XclExpExtDataBarType; }
164 void AddRecord( XclExpExtConditionalFormattingRef aFormat );
166 private:
167 XclExpRecordList< XclExpExtConditionalFormatting > maCF;
170 class XclExpExtCalcPr : public XclExpExt
172 public:
173 XclExpExtCalcPr( const XclExpRoot& rRoot, formula::FormulaGrammar::AddressConvention eConv );
174 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
176 virtual XclExpExtType GetType() SAL_OVERRIDE { return XclExpExtDataFooType; }
178 private:
179 formula::FormulaGrammar::AddressConvention meConv;
180 OString maSyntax;
183 class XclExtLst : public XclExpRecordBase, public XclExpRoot
185 public:
186 explicit XclExtLst( const XclExpRoot& rRoot);
187 virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
189 void AddRecord( XclExpExtRef aEntry );
191 XclExpExtRef GetItem( XclExpExtType eType );
193 private:
194 XclExpRecordList< XclExpExt > maExtEntries;
197 typedef std::shared_ptr< XclExtLst > XclExtLstRef;
199 #endif
201 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */