fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / xml / XMLDDELinksContext.hxx
blob184a4ced4ad9c391a5a845aaaf416e39feeba1e3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLDDELINKSCONTEXT_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLDDELINKSCONTEXT_HXX
23 #include <xmloff/xmlictxt.hxx>
24 #include "xmlimprt.hxx"
25 #include <list>
27 class ScXMLDDELinksContext : public SvXMLImportContext
29 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
30 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
31 public:
32 ScXMLDDELinksContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
33 const OUString& rLName,
34 const ::com::sun::star::uno::Reference<
35 ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
37 virtual ~ScXMLDDELinksContext();
39 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
40 const OUString& rLocalName,
41 const ::com::sun::star::uno::Reference<
42 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
44 virtual void EndElement() SAL_OVERRIDE;
47 struct ScDDELinkCell
49 OUString sValue;
50 double fValue;
51 bool bString;
52 bool bEmpty;
55 typedef std::list<ScDDELinkCell> ScDDELinkCells;
57 class ScXMLDDELinkContext : public SvXMLImportContext
59 ScDDELinkCells aDDELinkTable;
60 ScDDELinkCells aDDELinkRow;
61 OUString sApplication;
62 OUString sTopic;
63 OUString sItem;
64 sal_Int32 nPosition;
65 sal_Int32 nColumns;
66 sal_Int32 nRows;
67 sal_uInt8 nMode;
69 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
70 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
71 public:
72 ScXMLDDELinkContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
73 const OUString& rLName,
74 const ::com::sun::star::uno::Reference<
75 ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
77 virtual ~ScXMLDDELinkContext();
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;
84 void SetApplication(const OUString& sValue) { sApplication = sValue; }
85 void SetTopic(const OUString& sValue) { sTopic = sValue; }
86 void SetItem(const OUString& sValue) { sItem = sValue; }
87 void SetMode(const sal_uInt8 nValue) { nMode = nValue; }
88 void CreateDDELink();
89 void AddColumns(const sal_Int32 nValue) { nColumns += nValue; }
90 void AddRows(const sal_Int32 nValue) { nRows += nValue; }
91 void AddCellToRow(const ScDDELinkCell& aCell);
92 void AddRowsToTable(const sal_Int32 nRows);
94 virtual void EndElement() SAL_OVERRIDE;
97 class ScXMLDDESourceContext : public SvXMLImportContext
99 ScXMLDDELinkContext* pDDELink;
101 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
102 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
103 public:
104 ScXMLDDESourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
105 const OUString& rLName,
106 const ::com::sun::star::uno::Reference<
107 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
108 ScXMLDDELinkContext* pDDELink);
110 virtual ~ScXMLDDESourceContext();
112 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
113 const OUString& rLocalName,
114 const ::com::sun::star::uno::Reference<
115 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
117 virtual void EndElement() SAL_OVERRIDE;
120 class ScXMLDDETableContext : public SvXMLImportContext
122 ScXMLDDELinkContext* pDDELink;
124 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
125 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
126 public:
127 ScXMLDDETableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
128 const OUString& rLName,
129 const ::com::sun::star::uno::Reference<
130 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
131 ScXMLDDELinkContext* pDDELink);
133 virtual ~ScXMLDDETableContext();
135 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
136 const OUString& rLocalName,
137 const ::com::sun::star::uno::Reference<
138 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
140 virtual void EndElement() SAL_OVERRIDE;
143 class ScXMLDDEColumnContext : public SvXMLImportContext
145 ScXMLDDELinkContext* pDDELink;
147 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
148 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
149 public:
150 ScXMLDDEColumnContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
151 const OUString& rLName,
152 const ::com::sun::star::uno::Reference<
153 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
154 ScXMLDDELinkContext* pDDELink);
156 virtual ~ScXMLDDEColumnContext();
158 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
159 const OUString& rLocalName,
160 const ::com::sun::star::uno::Reference<
161 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
163 virtual void EndElement() SAL_OVERRIDE;
166 class ScXMLDDERowContext : public SvXMLImportContext
168 ScXMLDDELinkContext* pDDELink;
169 sal_Int32 nRows;
171 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
172 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
173 public:
174 ScXMLDDERowContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
175 const OUString& rLName,
176 const ::com::sun::star::uno::Reference<
177 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
178 ScXMLDDELinkContext* pDDELink);
180 virtual ~ScXMLDDERowContext();
182 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
183 const OUString& rLocalName,
184 const ::com::sun::star::uno::Reference<
185 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
187 virtual void EndElement() SAL_OVERRIDE;
190 class ScXMLDDECellContext : public SvXMLImportContext
192 OUString sValue;
193 double fValue;
194 sal_Int32 nCells;
195 bool bString;
196 bool bString2;
197 bool bEmpty;
199 ScXMLDDELinkContext* pDDELink;
201 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
202 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
203 public:
204 ScXMLDDECellContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
205 const OUString& rLName,
206 const ::com::sun::star::uno::Reference<
207 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
208 ScXMLDDELinkContext* pDDELink);
210 virtual ~ScXMLDDECellContext();
212 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
213 const OUString& rLocalName,
214 const ::com::sun::star::uno::Reference<
215 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
217 virtual void EndElement() SAL_OVERRIDE;
220 #endif
222 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */