LibreOffice Module sc (master)  1
xeextlst.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XEEXTLST_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_INC_XEEXTLST_HXX
12 
13 #include "xerecord.hxx"
14 #include "xeroot.hxx"
15 
16 #include <colorscale.hxx>
17 
18 #include <memory>
19 
21 {
24 };
25 
27 {
28  // -1 means don't write priority
29  sal_Int32 nPriority;
30  OString aGUID;
32 };
33 
37 class XclExpExt : public XclExpRecordBase, public XclExpRoot
38 {
39 public:
40  explicit XclExpExt( const XclExpRoot& rRoot );
41  virtual XclExpExtType GetType() = 0;
42 
43 protected:
44  OString maURI;
45 };
46 
47 class XclExpExtCfvo : public XclExpRecordBase, protected XclExpRoot
48 {
49 public:
50  XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rPos, bool bFirst );
51  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
52 
53 private:
55  OString maValue;
56  bool mbFirst;
57 };
58 
60 {
61 public:
62  XclExpExtNegativeColor( const Color& rColor );
64 
65 private:
67 };
68 
70 {
71 public:
73  void SaveXml( XclExpXmlStream& rStrm );
74 
75 private:
77 };
78 
79 class XclExpExtIcon : public XclExpRecordBase, protected XclExpRoot
80 {
81 public:
82  explicit XclExpExtIcon( const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry);
83  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
84 
85 private:
86  const char* pIconSetName;
87  sal_Int32 nIndex;
88 };
89 
90 class XclExpExtCF : public XclExpRecordBase, protected XclExpRoot
91 {
92 public:
93  explicit XclExpExtCF( const XclExpRoot& rRoot, const ScCondFormatEntry& rFormat );
94  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
95 
96 private:
97  OUString aFormula;
99 };
100 
102 {
103 public:
104  explicit XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos );
105  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
106 
107 private:
110  double mnMinLength;
111  double mnMaxLength;
112 
113  std::unique_ptr<XclExpExtCfvo> mpLowerLimit;
114  std::unique_ptr<XclExpExtCfvo> mpUpperLimit;
115  std::unique_ptr<XclExpExtNegativeColor> mpNegativeColor;
116  std::unique_ptr<XclExpExtAxisColor> mpAxisColor;
117 
118 };
119 
121 {
122 public:
123  explicit XclExpExtIconSet(const XclExpRoot& rRoot, const ScIconSetFormat& rFormat, const ScAddress& rPos);
124  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
125 
126 private:
129  bool mbCustom;
130  bool mbReverse;
132  const char* mpIconSetName;
133 };
134 
135 
136 class XclExpExtCfRule : public XclExpRecordBase, protected XclExpRoot
137 {
138 public:
139  XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority );
140  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
141 
142 private:
144  OString maId;
145  const char* pType;
146  sal_Int32 mnPriority;
147  const char* mOperator;
148 };
149 
151 
153 {
154 public:
155  explicit XclExpExtConditionalFormatting( const XclExpRoot& rRoot, std::vector<XclExpExtCondFormatData>& rData, const ScRangeList& rRange);
156  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
157 
158 private:
161 };
162 
164 
166 {
167 public:
168  XclExpExtCondFormat( const XclExpRoot& rRoot );
169  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
170 
171  virtual XclExpExtType GetType() override { return XclExpExtDataBarType; }
172 
173  void AddRecord( XclExpExtConditionalFormatting* pFormat );
174 
175 private:
177 };
178 
180 {
181 public:
183  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
184 
185  virtual XclExpExtType GetType() override { return XclExpExtDataFooType; }
186 
187 private:
188  OString maSyntax;
189 };
190 
191 class XclExtLst : public XclExpRecordBase, public XclExpRoot
192 {
193 public:
194  explicit XclExtLst( const XclExpRoot& rRoot);
195  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
196 
197  void AddRecord( XclExpExt* pEntry );
198  void AddRecord( const XclExpExtRef& aEntry ) { AddRecord(aEntry.get()); }
199 
200  XclExpExt* GetItem( XclExpExtType eType );
201 
202 private:
204 };
205 
207 
208 #endif
209 
210 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * mpIconSetName
Definition: xeextlst.hxx:132
virtual XclExpExtType GetType() override
Definition: xeextlst.hxx:185
std::unique_ptr< XclExpExtNegativeColor > mpNegativeColor
Definition: xeextlst.hxx:115
const char * mOperator
Definition: xeextlst.hxx:147
OString maURI
Definition: xeextlst.hxx:44
XclExpRecordList< XclExpExtIcon > maCustom
Definition: xeextlst.hxx:128
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:128
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:298
XclExpExtCondFormat(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:516
XclExpExtConditionalFormatting(const XclExpRoot &rRoot, std::vector< XclExpExtCondFormatData > &rData, const ScRangeList &rRange)
Definition: xeextlst.cxx:411
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:460
XclExpRecordList< XclExpExtCfvo > maCfvos
Definition: xeextlst.hxx:127
XclExpRecordList< XclExpExt > maExtEntries
Definition: xeextlst.hxx:203
void AddRecord(XclExpExtConditionalFormatting *pFormat)
Definition: xeextlst.cxx:537
XclExpExtIcon(const XclExpRoot &rRoot, const std::pair< ScIconSetType, sal_Int32 > &rCustomEntry)
Definition: xeextlst.cxx:58
OString maValue
Definition: xeextlst.hxx:55
XclExpRecordRef mxEntry
Definition: xeextlst.hxx:143
XclExpExtNegativeColor(const Color &rColor)
Definition: xeextlst.cxx:36
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:52
rtl::Reference< XclExpExt > XclExpExtRef
Definition: xeextlst.hxx:150
XclExpRecordList< XclExpExtCfRule > maCfRules
Definition: xeextlst.hxx:159
const ContentProperties & rData
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, const OString &rId, sal_Int32 nPriority)
Definition: xeextlst.cxx:357
basegfx::BColor maColor
double mnMaxLength
Definition: xeextlst.hxx:111
XclExpExtAxisColor(const Color &maColor)
Definition: xeextlst.cxx:47
const char * pIconSetName
Definition: xeextlst.hxx:86
Base class for ext entries.
Definition: xeextlst.hxx:37
virtual XclExpExtType GetType() override
Definition: xeextlst.hxx:171
XclExpExt(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:26
Access to global data from other classes.
Definition: xeroot.hxx:113
ScCondFormatEntry mrFormat
Definition: xeextlst.hxx:98
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
Definition: xeextlst.cxx:475
void AddRecord(XclExpExt *pEntry)
Definition: xeextlst.cxx:555
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:393
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:522
XclExpExtCfvo(const XclExpRoot &rRoot, const ScColorScaleEntry &rEntry, const ScAddress &rPos, bool bFirst)
Definition: xeextlst.cxx:80
Base class for all Excel records.
Definition: xerecord.hxx:39
databar::ScAxisPosition meAxisPosition
Definition: xeextlst.hxx:108
XclExtLst(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:31
OUString aFormula
Definition: xeextlst.hxx:97
double mnMinLength
Definition: xeextlst.hxx:110
ScColorScaleEntryType
Definition: colorscale.hxx:31
XclExpExtCF(const XclExpRoot &rRoot, const ScCondFormatEntry &rFormat)
Definition: xeextlst.cxx:146
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:65
rtl::Reference< XclExtLst > XclExtLstRef
Definition: xeextlst.hxx:206
std::unique_ptr< XclExpExtCfvo > mpLowerLimit
Definition: xeextlst.hxx:113
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:542
XclExpRecordList< XclExpExtConditionalFormatting > maCF
Definition: xeextlst.hxx:176
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:504
sal_Int32 mnPriority
Definition: xeextlst.hxx:146
ScColorScaleEntryType meType
Definition: xeextlst.hxx:54
void AddRecord(const XclExpExtRef &aEntry)
Definition: xeextlst.hxx:198
sal_Int32 nIndex
Definition: xeextlst.hxx:87
XclExpExtIconSet(const XclExpRoot &rRoot, const ScIconSetFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:315
rtl::Reference< XclExpExtConditionalFormatting > XclExpExtConditionalFormattingRef
Definition: xeextlst.hxx:163
OString maSyntax
Definition: xeextlst.hxx:188
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:152
const ScFormatEntry * pEntry
Definition: xeextlst.hxx:31
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:41
const char * pType
Definition: xeextlst.hxx:145
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:206
virtual XclExpExtType GetType()=0
std::unique_ptr< XclExpExtCfvo > mpUpperLimit
Definition: xeextlst.hxx:114
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:337
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
Definition: xeextlst.hxx:116
void SvStream & rStrm
XclExpExt * GetItem(XclExpExtType eType)
Definition: xeextlst.cxx:560
XclExpExtType
Definition: xeextlst.hxx:20