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 .
22 #include "importcontext.hxx"
25 namespace sax_fastparser
{ class FastAttributeList
; }
27 class ScXMLDDELinksContext
: public ScXMLImportContext
30 ScXMLDDELinksContext( ScXMLImport
& rImport
);
32 virtual ~ScXMLDDELinksContext() override
;
34 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
35 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
46 typedef std::vector
<ScDDELinkCell
> ScDDELinkCells
;
48 class ScXMLDDELinkContext
: public ScXMLImportContext
50 ScDDELinkCells aDDELinkTable
;
51 ScDDELinkCells aDDELinkRow
;
52 OUString sApplication
;
61 ScXMLDDELinkContext( ScXMLImport
& rImport
);
63 virtual ~ScXMLDDELinkContext() override
;
65 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
66 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
68 void SetApplication(const OUString
& sValue
) { sApplication
= sValue
; }
69 void SetTopic(const OUString
& sValue
) { sTopic
= sValue
; }
70 void SetItem(const OUString
& sValue
) { sItem
= sValue
; }
71 void SetMode(const sal_uInt8 nValue
) { nMode
= nValue
; }
73 void AddColumns(const sal_Int32 nValue
) { nColumns
+= nValue
; }
74 void AddRows(const sal_Int32 nValue
) { nRows
+= nValue
; }
75 void AddCellToRow(const ScDDELinkCell
& aCell
);
76 void AddRowsToTable(const sal_Int32 nRows
);
78 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
81 class ScXMLDDESourceContext
: public ScXMLImportContext
83 ScXMLDDELinkContext
* pDDELink
;
86 ScXMLDDESourceContext( ScXMLImport
& rImport
,
87 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
88 ScXMLDDELinkContext
* pDDELink
);
90 virtual ~ScXMLDDESourceContext() override
;
92 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
95 class ScXMLDDETableContext
: public ScXMLImportContext
97 ScXMLDDELinkContext
* pDDELink
;
100 ScXMLDDETableContext( ScXMLImport
& rImport
,
101 ScXMLDDELinkContext
* pDDELink
);
103 virtual ~ScXMLDDETableContext() override
;
105 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
106 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
109 class ScXMLDDEColumnContext
: public ScXMLImportContext
112 ScXMLDDEColumnContext( ScXMLImport
& rImport
,
113 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
114 ScXMLDDELinkContext
* pDDELink
);
116 virtual ~ScXMLDDEColumnContext() override
;
119 class ScXMLDDERowContext
: public ScXMLImportContext
121 ScXMLDDELinkContext
* pDDELink
;
125 ScXMLDDERowContext( ScXMLImport
& rImport
,
126 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
127 ScXMLDDELinkContext
* pDDELink
);
129 virtual ~ScXMLDDERowContext() override
;
131 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
132 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
134 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
137 class ScXMLDDECellContext
: public ScXMLImportContext
146 ScXMLDDELinkContext
* pDDELink
;
149 ScXMLDDECellContext( ScXMLImport
& rImport
,
150 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
151 ScXMLDDELinkContext
* pDDELink
);
153 virtual ~ScXMLDDECellContext() override
;
155 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */