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 SC_XMLCONDFORMAT_HXX
11 : #define SC_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 (const ScXMLImport&)GetImport(); }
27 177 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
28 : public:
29 : ScXMLConditionalFormatsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
30 : const OUString& rLName );
31 :
32 26 : 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 (const ScXMLImport&)GetImport(); }
45 496 : ScXMLImport& GetScImport() { return (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 112 : 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 (const ScXMLImport&)GetImport(); }
70 108 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
71 :
72 : public:
73 : ScXMLColorScaleFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
74 : const OUString& rLName, ScConditionalFormat* pFormat);
75 :
76 36 : virtual ~ScXMLColorScaleFormatContext() {}
77 :
78 :
79 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
80 : const OUString& rLocalName,
81 : const ::com::sun::star::uno::Reference<
82 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
83 : private:
84 :
85 : ScColorScaleFormat* pColorScaleFormat;
86 : };
87 :
88 : class ScXMLDataBarFormatContext : public SvXMLImportContext
89 : {
90 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
91 41 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
92 : public:
93 : ScXMLDataBarFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
94 : const OUString& rLName,
95 : const ::com::sun::star::uno::Reference<
96 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
97 : ScConditionalFormat* pFormat);
98 :
99 10 : virtual ~ScXMLDataBarFormatContext() {}
100 :
101 :
102 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
103 : const OUString& rLocalName,
104 : const ::com::sun::star::uno::Reference<
105 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
106 : private:
107 :
108 : ScDataBarFormat* mpDataBarFormat;
109 : ScDataBarFormatData* mpFormatData;
110 :
111 : };
112 :
113 : class ScXMLIconSetFormatContext : public SvXMLImportContext
114 : {
115 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
116 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
117 :
118 : ScIconSetFormatData* mpFormatData;
119 : public:
120 :
121 : ScXMLIconSetFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
122 : const OUString& rLName,
123 : const ::com::sun::star::uno::Reference<
124 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
125 : ScConditionalFormat* pFormat);
126 :
127 0 : virtual ~ScXMLIconSetFormatContext() {}
128 :
129 :
130 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
131 : const OUString& rLocalName,
132 : const ::com::sun::star::uno::Reference<
133 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
134 : };
135 :
136 : class ScXMLColorScaleFormatEntryContext : public SvXMLImportContext
137 : {
138 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
139 225 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
140 : public:
141 : ScXMLColorScaleFormatEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
142 : const OUString& rLName,
143 : const ::com::sun::star::uno::Reference<
144 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
145 : ScColorScaleFormat* pFormat);
146 :
147 90 : virtual ~ScXMLColorScaleFormatEntryContext() {}
148 : private:
149 :
150 : ScColorScaleEntry* mpFormatEntry;
151 : };
152 :
153 : class ScXMLFormattingEntryContext : public SvXMLImportContext
154 : {
155 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
156 40 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
157 : public:
158 : ScXMLFormattingEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
159 : const OUString& rLName,
160 : const ::com::sun::star::uno::Reference<
161 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
162 : ScColorScaleEntry*& pData);
163 :
164 20 : virtual ~ScXMLFormattingEntryContext() {}
165 : };
166 :
167 : class ScXMLCondContext : public SvXMLImportContext
168 : {
169 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
170 285 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
171 : public:
172 : ScXMLCondContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
173 : const OUString& rLName,
174 : const ::com::sun::star::uno::Reference<
175 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
176 : ScConditionalFormat* pFormat);
177 :
178 114 : virtual ~ScXMLCondContext() {}
179 : };
180 :
181 : class ScXMLDateContext : public SvXMLImportContext
182 : {
183 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
184 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
185 : public:
186 : ScXMLDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
187 : const OUString& rLName,
188 : const ::com::sun::star::uno::Reference<
189 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
190 : ScConditionalFormat* pFormat);
191 :
192 0 : virtual ~ScXMLDateContext() {}
193 : };
194 :
195 : #endif
196 :
197 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|