LibreOffice Module sc (master)  1
xmlcondformat.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_XML_XMLCONDFORMAT_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLCONDFORMAT_HXX
12 
13 #include <array>
14 #include <memory>
15 #include <tools/link.hxx>
16 #include "importcontext.hxx"
17 #include <tokenarray.hxx>
18 
19 namespace sax_fastparser { class FastAttributeList; }
20 
21 class ScColorScaleFormat;
22 class ScColorScaleEntry;
23 struct ScDataBarFormatData;
25 struct ScIconSetFormatData;
26 
28 {
29 private:
30  struct CacheEntry
31  {
34  std::unique_ptr<const ScTokenArray> mpTokens;
35  sal_Int64 mnAge = SAL_MAX_INT64;
36  };
37 
39  {
42  };
43 
44  DECL_LINK(FormatDeletedHdl, ScConditionalFormat*, void);
45 
46 public:
48 
49  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
50  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
51 
52  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
53 
54  std::array<CacheEntry, 4> maCache;
55 
56  std::vector<CondFormatData> mvCondFormatData;
57 };
58 
60 {
61 public:
65 
66  virtual ~ScXMLConditionalFormatContext() override;
67 
68  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
69  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
70 
71  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
72 private:
73 
74  std::unique_ptr<ScConditionalFormat> mxFormat;
75 
77 };
78 
80 {
81 public:
83  ScConditionalFormat* pFormat);
84 
85  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
86  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
87 private:
88 
90 };
91 
93 {
94 public:
97  ScConditionalFormat* pFormat);
98 
99  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
100  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
101 private:
102 
105 
106  sal_Int32 mnIndex;
107 };
108 
110 {
113 public:
114 
117  ScConditionalFormat* pFormat);
118 
119  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
120  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
121 };
122 
124 {
125 public:
128  ScColorScaleFormat* pFormat);
129 };
130 
132 {
133 public:
137 };
138 
140 {
141 public:
142  ScXMLCondContext( ScXMLImport& rImport,
144  ScConditionalFormat* pFormat);
145 };
146 
148 {
149 public:
150  ScXMLDateContext( ScXMLImport& rImport,
152  ScConditionalFormat* pFormat);
153 };
154 
155 #endif
156 
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScXMLConditionalFormatsContext(ScXMLImport &rImport)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
std::unique_ptr< ContentProperties > pData
DECL_LINK(FormatDeletedHdl, ScConditionalFormat *, void)
ScXMLFormattingEntryContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScColorScaleEntry *&pData)
ScXMLCondContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScConditionalFormat *pFormat)
ScXMLConditionalFormatsContext & mrParent
ScXMLIconSetFormatContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScConditionalFormat *pFormat)
ScColorScaleFormat * pColorScaleFormat
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLColorScaleFormatContext(ScXMLImport &rImport, ScConditionalFormat *pFormat)
This class exists only to provide GetScImport() to its derived classes.
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScDataBarFormatData * mpFormatData
std::unique_ptr< const ScTokenArray > mpTokens
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLColorScaleFormatEntryContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScColorScaleFormat *pFormat)
ScConditionalFormat * mpParent
ScConditionalFormat * mpParent
std::array< CacheEntry, 4 > maCache
ScXMLConditionalFormatContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLConditionalFormatsContext &rParent)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScIconSetFormatData * mpFormatData
ScXMLDateContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScConditionalFormat *pFormat)
std::vector< CondFormatData > mvCondFormatData
#define SAL_MAX_INT64
ScXMLDataBarFormatContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScConditionalFormat *pFormat)
std::unique_ptr< ScConditionalFormat > mxFormat
sal_Int16 SCTAB
Definition: types.hxx:23
virtual ~ScXMLConditionalFormatContext() override