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 #pragma once
11 
12 #include "xerecord.hxx"
13 #include "xeroot.hxx"
14 
15 #include <colorscale.hxx>
16 
17 #include <memory>
18 
20 {
23 };
24 
26 {
27  // -1 means don't write priority
28  sal_Int32 nPriority;
29  OString aGUID;
31 };
32 
36 class XclExpExt : public XclExpRecordBase, public XclExpRoot
37 {
38 public:
39  explicit XclExpExt( const XclExpRoot& rRoot );
40  virtual XclExpExtType GetType() = 0;
41 
42 protected:
43  OString maURI;
44 };
45 
46 class XclExpExtCfvo : public XclExpRecordBase, protected XclExpRoot
47 {
48 public:
49  XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rPos, bool bFirst );
50  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
51 
52 private:
54  OString maValue;
55  bool mbFirst;
56 };
57 
59 {
60 public:
61  XclExpExtNegativeColor( const Color& rColor );
63 
64 private:
66 };
67 
69 {
70 public:
72  void SaveXml( XclExpXmlStream& rStrm );
73 
74 private:
76 };
77 
78 class XclExpExtIcon : public XclExpRecordBase, protected XclExpRoot
79 {
80 public:
81  explicit XclExpExtIcon( const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry);
82  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
83 
84 private:
85  const char* pIconSetName;
86  sal_Int32 nIndex;
87 };
88 
89 class XclExpExtCF : public XclExpRecordBase, protected XclExpRoot
90 {
91 public:
92  explicit XclExpExtCF( const XclExpRoot& rRoot, const ScCondFormatEntry& rFormat );
93  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
94 
95 private:
96  OUString aFormula;
98 };
99 
101 {
102 public:
103  explicit XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos );
104  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
105 
106 private:
109  double mnMinLength;
110  double mnMaxLength;
111 
112  std::unique_ptr<XclExpExtCfvo> mpLowerLimit;
113  std::unique_ptr<XclExpExtCfvo> mpUpperLimit;
114  std::unique_ptr<XclExpExtNegativeColor> mpNegativeColor;
115  std::unique_ptr<XclExpExtAxisColor> mpAxisColor;
116 
117 };
118 
120 {
121 public:
122  explicit XclExpExtIconSet(const XclExpRoot& rRoot, const ScIconSetFormat& rFormat, const ScAddress& rPos);
123  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
124 
125 private:
128  bool mbCustom;
129  bool mbReverse;
131  const char* mpIconSetName;
132 };
133 
134 
135 class XclExpExtCfRule : public XclExpRecordBase, protected XclExpRoot
136 {
137 public:
138  XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority );
139  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
140 
141 private:
143  OString maId;
144  const char* pType;
145  sal_Int32 mnPriority;
146  const char* mOperator;
147 };
148 
150 
152 {
153 public:
154  explicit XclExpExtConditionalFormatting( const XclExpRoot& rRoot, std::vector<XclExpExtCondFormatData>& rData, const ScRangeList& rRange);
155  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
156 
157 private:
160 };
161 
163 
165 {
166 public:
167  XclExpExtCondFormat( const XclExpRoot& rRoot );
168  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
169 
170  virtual XclExpExtType GetType() override { return XclExpExtDataBarType; }
171 
172  void AddRecord( XclExpExtConditionalFormatting* pFormat );
173 
174 private:
176 };
177 
179 {
180 public:
182  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
183 
184  virtual XclExpExtType GetType() override { return XclExpExtDataFooType; }
185 
186 private:
187  OString maSyntax;
188 };
189 
190 class XclExtLst : public XclExpRecordBase, public XclExpRoot
191 {
192 public:
193  explicit XclExtLst( const XclExpRoot& rRoot);
194  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
195 
196  void AddRecord( XclExpExt* pEntry );
197  void AddRecord( const XclExpExtRef& aEntry ) { AddRecord(aEntry.get()); }
198 
199  XclExpExt* GetItem( XclExpExtType eType );
200 
201 private:
203 };
204 
206 
207 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * mpIconSetName
Definition: xeextlst.hxx:131
virtual XclExpExtType GetType() override
Definition: xeextlst.hxx:184
std::unique_ptr< XclExpExtNegativeColor > mpNegativeColor
Definition: xeextlst.hxx:114
const char * mOperator
Definition: xeextlst.hxx:146
OString maURI
Definition: xeextlst.hxx:43
XclExpRecordList< XclExpExtIcon > maCustom
Definition: xeextlst.hxx:127
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:129
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:378
XclExpExtCondFormat(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:596
XclExpExtConditionalFormatting(const XclExpRoot &rRoot, std::vector< XclExpExtCondFormatData > &rData, const ScRangeList &rRange)
Definition: xeextlst.cxx:491
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:540
XclExpRecordList< XclExpExtCfvo > maCfvos
Definition: xeextlst.hxx:126
XclExpRecordList< XclExpExt > maExtEntries
Definition: xeextlst.hxx:202
void AddRecord(XclExpExtConditionalFormatting *pFormat)
Definition: xeextlst.cxx:617
XclExpExtIcon(const XclExpRoot &rRoot, const std::pair< ScIconSetType, sal_Int32 > &rCustomEntry)
Definition: xeextlst.cxx:59
OString maValue
Definition: xeextlst.hxx:54
XclExpRecordRef mxEntry
Definition: xeextlst.hxx:142
XclExpExtNegativeColor(const Color &rColor)
Definition: xeextlst.cxx:37
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:53
rtl::Reference< XclExpExt > XclExpExtRef
Definition: xeextlst.hxx:149
XclExpRecordList< XclExpExtCfRule > maCfRules
Definition: xeextlst.hxx:158
const ContentProperties & rData
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, const OString &rId, sal_Int32 nPriority)
Definition: xeextlst.cxx:437
basegfx::BColor maColor
double mnMaxLength
Definition: xeextlst.hxx:110
XclExpExtAxisColor(const Color &maColor)
Definition: xeextlst.cxx:48
const char * pIconSetName
Definition: xeextlst.hxx:85
Base class for ext entries.
Definition: xeextlst.hxx:36
virtual XclExpExtType GetType() override
Definition: xeextlst.hxx:170
XclExpExt(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:27
Access to global data from other classes.
Definition: xeroot.hxx:112
ScCondFormatEntry mrFormat
Definition: xeextlst.hxx:97
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
Definition: xeextlst.cxx:555
void AddRecord(XclExpExt *pEntry)
Definition: xeextlst.cxx:635
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:473
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:602
XclExpExtCfvo(const XclExpRoot &rRoot, const ScColorScaleEntry &rEntry, const ScAddress &rPos, bool bFirst)
Definition: xeextlst.cxx:81
Base class for all Excel records.
Definition: xerecord.hxx:37
databar::ScAxisPosition meAxisPosition
Definition: xeextlst.hxx:107
XclExtLst(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:32
OUString aFormula
Definition: xeextlst.hxx:96
double mnMinLength
Definition: xeextlst.hxx:109
ScColorScaleEntryType
Definition: colorscale.hxx:31
XclExpExtCF(const XclExpRoot &rRoot, const ScCondFormatEntry &rFormat)
Definition: xeextlst.cxx:147
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:66
rtl::Reference< XclExtLst > XclExtLstRef
Definition: xeextlst.hxx:205
std::unique_ptr< XclExpExtCfvo > mpLowerLimit
Definition: xeextlst.hxx:112
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:622
XclExpRecordList< XclExpExtConditionalFormatting > maCF
Definition: xeextlst.hxx:175
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:584
sal_Int32 mnPriority
Definition: xeextlst.hxx:145
ScColorScaleEntryType meType
Definition: xeextlst.hxx:53
void AddRecord(const XclExpExtRef &aEntry)
Definition: xeextlst.hxx:197
sal_Int32 nIndex
Definition: xeextlst.hxx:86
XclExpExtIconSet(const XclExpRoot &rRoot, const ScIconSetFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:395
rtl::Reference< XclExpExtConditionalFormatting > XclExpExtConditionalFormattingRef
Definition: xeextlst.hxx:162
OString maSyntax
Definition: xeextlst.hxx:187
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:195
const ScFormatEntry * pEntry
Definition: xeextlst.hxx:30
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:42
const char * pType
Definition: xeextlst.hxx:144
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:267
virtual XclExpExtType GetType()=0
std::unique_ptr< XclExpExtCfvo > mpUpperLimit
Definition: xeextlst.hxx:113
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:417
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
Definition: xeextlst.hxx:115
void SvStream & rStrm
XclExpExt * GetItem(XclExpExtType eType)
Definition: xeextlst.cxx:640
XclExpExtType
Definition: xeextlst.hxx:19