1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "importcontext.hxx"
26 namespace sax_fastparser
{ class FastAttributeList
; }
28 class ScXMLDDELinksContext
: public ScXMLImportContext
31 ScXMLDDELinksContext( ScXMLImport
& rImport
);
33 virtual ~ScXMLDDELinksContext() override
;
35 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
36 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
47 typedef std::vector
<ScDDELinkCell
> ScDDELinkCells
;
49 class ScXMLDDELinkContext
: public ScXMLImportContext
51 ScDDELinkCells aDDELinkTable
;
52 ScDDELinkCells aDDELinkRow
;
53 OUString sApplication
;
62 ScXMLDDELinkContext( ScXMLImport
& rImport
);
64 virtual ~ScXMLDDELinkContext() override
;
66 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
67 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
69 void SetApplication(const OUString
& sValue
) { sApplication
= sValue
; }
70 void SetTopic(const OUString
& sValue
) { sTopic
= sValue
; }
71 void SetItem(const OUString
& sValue
) { sItem
= sValue
; }
72 void SetMode(const sal_uInt8 nValue
) { nMode
= nValue
; }
74 void AddColumns(const sal_Int32 nValue
) { nColumns
+= nValue
; }
75 void AddRows(const sal_Int32 nValue
) { nRows
+= nValue
; }
76 void AddCellToRow(const ScDDELinkCell
& aCell
);
77 void AddRowsToTable(const sal_Int32 nRows
);
79 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
82 class ScXMLDDESourceContext
: public ScXMLImportContext
84 ScXMLDDELinkContext
* pDDELink
;
87 ScXMLDDESourceContext( ScXMLImport
& rImport
,
88 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
89 ScXMLDDELinkContext
* pDDELink
);
91 virtual ~ScXMLDDESourceContext() override
;
93 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
96 class ScXMLDDETableContext
: public ScXMLImportContext
98 ScXMLDDELinkContext
* const pDDELink
;
101 ScXMLDDETableContext( ScXMLImport
& rImport
,
102 ScXMLDDELinkContext
* pDDELink
);
104 virtual ~ScXMLDDETableContext() override
;
106 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
107 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
110 class ScXMLDDEColumnContext
: public ScXMLImportContext
113 ScXMLDDEColumnContext( ScXMLImport
& rImport
,
114 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
115 ScXMLDDELinkContext
* pDDELink
);
117 virtual ~ScXMLDDEColumnContext() override
;
120 class ScXMLDDERowContext
: public ScXMLImportContext
122 ScXMLDDELinkContext
* pDDELink
;
126 ScXMLDDERowContext( ScXMLImport
& rImport
,
127 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
128 ScXMLDDELinkContext
* pDDELink
);
130 virtual ~ScXMLDDERowContext() override
;
132 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
133 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
135 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
138 class ScXMLDDECellContext
: public ScXMLImportContext
147 ScXMLDDELinkContext
* pDDELink
;
150 ScXMLDDECellContext( ScXMLImport
& rImport
,
151 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
152 ScXMLDDELinkContext
* pDDELink
);
154 virtual ~ScXMLDDECellContext() override
;
156 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */