Line data Source code
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 <xmloff/xmlictxt.hxx>
14 : #include "xmlimprt.hxx"
15 : #include "rangelst.hxx"
16 :
17 : class ScColorScaleFormat;
18 : class ScColorScaleEntry;
19 : class ScDataBarFormat;
20 : struct ScDataBarFormatData;
21 : class ScConditionalFormat;
22 : struct ScIconSetFormatData;
23 :
24 : class ScXMLConditionalFormatsContext : public SvXMLImportContext
25 : {
26 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
27 414 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
28 : public:
29 : ScXMLConditionalFormatsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
30 : const OUString& rLName );
31 :
32 60 : virtual ~ScXMLConditionalFormatsContext() {}
33 :
34 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
35 : const OUString& rLocalName,
36 : const ::com::sun::star::uno::Reference<
37 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
38 :
39 : virtual void EndElement() SAL_OVERRIDE;
40 : };
41 :
42 : class ScXMLConditionalFormatContext : public SvXMLImportContext
43 : {
44 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
45 1152 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
46 : public:
47 : ScXMLConditionalFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
48 : const OUString& rLName,
49 : const ::com::sun::star::uno::Reference<
50 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
51 :
52 264 : virtual ~ScXMLConditionalFormatContext() {}
53 :
54 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
55 : const OUString& rLocalName,
56 : const ::com::sun::star::uno::Reference<
57 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
58 :
59 : virtual void EndElement() SAL_OVERRIDE;
60 : private:
61 :
62 : ScConditionalFormat* mpFormat;
63 : ScRangeList maRange;
64 : };
65 :
66 : class ScXMLColorScaleFormatContext : public SvXMLImportContext
67 : {
68 : private:
69 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
70 216 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
71 :
72 : public:
73 : ScXMLColorScaleFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
74 : const OUString& rLName, ScConditionalFormat* pFormat);
75 :
76 72 : virtual ~ScXMLColorScaleFormatContext() {}
77 :
78 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
79 : const OUString& rLocalName,
80 : const ::com::sun::star::uno::Reference<
81 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
82 : private:
83 :
84 : ScColorScaleFormat* pColorScaleFormat;
85 : };
86 :
87 : class ScXMLDataBarFormatContext : public SvXMLImportContext
88 : {
89 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
90 246 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
91 : public:
92 : ScXMLDataBarFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
93 : const OUString& rLName,
94 : const ::com::sun::star::uno::Reference<
95 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
96 : ScConditionalFormat* pFormat);
97 :
98 60 : virtual ~ScXMLDataBarFormatContext() {}
99 :
100 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
101 : const OUString& rLocalName,
102 : const ::com::sun::star::uno::Reference<
103 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
104 : private:
105 :
106 : ScDataBarFormat* mpDataBarFormat;
107 : ScDataBarFormatData* mpFormatData;
108 :
109 : };
110 :
111 : class ScXMLIconSetFormatContext : public SvXMLImportContext
112 : {
113 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
114 0 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
115 :
116 : ScIconSetFormatData* mpFormatData;
117 : public:
118 :
119 : ScXMLIconSetFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
120 : const OUString& rLName,
121 : const ::com::sun::star::uno::Reference<
122 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
123 : ScConditionalFormat* pFormat);
124 :
125 0 : virtual ~ScXMLIconSetFormatContext() {}
126 :
127 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
128 : const OUString& rLocalName,
129 : const ::com::sun::star::uno::Reference<
130 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
131 : };
132 :
133 : class ScXMLColorScaleFormatEntryContext : public SvXMLImportContext
134 : {
135 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
136 450 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
137 : public:
138 : ScXMLColorScaleFormatEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
139 : const OUString& rLName,
140 : const ::com::sun::star::uno::Reference<
141 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
142 : ScColorScaleFormat* pFormat);
143 :
144 180 : virtual ~ScXMLColorScaleFormatEntryContext() {}
145 : private:
146 :
147 : ScColorScaleEntry* mpFormatEntry;
148 : };
149 :
150 : class ScXMLFormattingEntryContext : public SvXMLImportContext
151 : {
152 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
153 240 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
154 : public:
155 : ScXMLFormattingEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
156 : const OUString& rLName,
157 : const ::com::sun::star::uno::Reference<
158 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
159 : ScColorScaleEntry*& pData);
160 :
161 120 : virtual ~ScXMLFormattingEntryContext() {}
162 : };
163 :
164 : class ScXMLCondContext : public SvXMLImportContext
165 : {
166 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
167 570 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
168 : public:
169 : ScXMLCondContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
170 : const OUString& rLName,
171 : const ::com::sun::star::uno::Reference<
172 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
173 : ScConditionalFormat* pFormat);
174 :
175 228 : virtual ~ScXMLCondContext() {}
176 : };
177 :
178 : class ScXMLDateContext : public SvXMLImportContext
179 : {
180 : const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
181 0 : ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
182 : public:
183 : ScXMLDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
184 : const OUString& rLName,
185 : const ::com::sun::star::uno::Reference<
186 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
187 : ScConditionalFormat* pFormat);
188 :
189 0 : virtual ~ScXMLDateContext() {}
190 : };
191 :
192 : #endif
193 :
194 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|