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 #pragma once
11 
12 #include <array>
13 #include <memory>
14 #include <tools/link.hxx>
15 #include "importcontext.hxx"
16 #include <tokenarray.hxx>
17 
18 namespace sax_fastparser { class FastAttributeList; }
19 
20 class ScColorScaleFormat;
21 class ScColorScaleEntry;
22 struct ScDataBarFormatData;
24 struct ScIconSetFormatData;
25 
27 {
28 private:
29  struct CacheEntry
30  {
33  std::unique_ptr<const ScTokenArray> mpTokens;
34  sal_Int64 mnAge = SAL_MAX_INT64;
35  };
36 
38  {
41  };
42 
43  DECL_LINK(FormatDeletedHdl, ScConditionalFormat*, void);
44 
45 public:
47 
48  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
49  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
50 
51  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
52 
53  std::array<CacheEntry, 4> maCache;
54 
55  std::vector<CondFormatData> mvCondFormatData;
56 };
57 
59 {
60 public:
64 
65  virtual ~ScXMLConditionalFormatContext() override;
66 
67  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
68  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
69 
70  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
71 private:
72 
73  std::unique_ptr<ScConditionalFormat> mxFormat;
74 
76 };
77 
79 {
80 public:
82  ScConditionalFormat* pFormat);
83 
84  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
85  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
86 private:
87 
89 };
90 
92 {
93 public:
96  ScConditionalFormat* pFormat);
97 
98  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
99  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
100 private:
101 
104 
105  sal_Int32 mnIndex;
106 };
107 
109 {
112 public:
113 
116  ScConditionalFormat* pFormat);
117 
118  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
119  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
120 };
121 
123 {
124 public:
127  ScColorScaleFormat* pFormat);
128 };
129 
131 {
132 public:
136 };
137 
139 {
140 public:
141  ScXMLCondContext( ScXMLImport& rImport,
143  ScConditionalFormat* pFormat);
144 };
145 
147 {
148 public:
149  ScXMLDateContext( ScXMLImport& rImport,
151  ScConditionalFormat* pFormat);
152 };
153 
154 /* 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:22
virtual ~ScXMLConditionalFormatContext() override