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_XMLEXTERNALTABI_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLEXTERNALTABI_HXX
23 #include <xmloff/xmlictxt.hxx>
24 #include <rtl/ustrbuf.hxx>
27 struct ScXMLExternalTabData
;
29 class ScXMLExternalRefTabSourceContext
: public SvXMLImportContext
32 ScXMLExternalRefTabSourceContext( ScXMLImport
& rImport
, sal_uInt16 nPrefix
,
33 const OUString
& rLName
,
34 const ::com::sun::star::uno::Reference
<
35 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
36 ScXMLExternalTabData
& rRefInfo
);
38 virtual ~ScXMLExternalRefTabSourceContext();
40 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
41 const OUString
& rLocalName
,
42 const ::com::sun::star::uno::Reference
<
43 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
45 virtual void EndElement() SAL_OVERRIDE
;
47 ScXMLImport
& mrScImport
;
48 ScXMLExternalTabData
& mrExternalRefInfo
;
50 OUString maRelativeUrl
;
52 OUString maFilterName
;
53 OUString maFilterOptions
;
56 class ScXMLExternalRefRowsContext
: public SvXMLImportContext
59 ScXMLExternalRefRowsContext( ScXMLImport
& rImport
, sal_uInt16 nPrefix
,
60 const OUString
& rLName
,
61 const ::com::sun::star::uno::Reference
<
62 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
63 ScXMLExternalTabData
& rRefInfo
);
65 virtual ~ScXMLExternalRefRowsContext();
67 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
68 const OUString
& rLocalName
,
69 const ::com::sun::star::uno::Reference
<
70 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
72 virtual void EndElement() SAL_OVERRIDE
;
74 ScXMLImport
& mrScImport
;
75 ScXMLExternalTabData
& mrExternalRefInfo
;
78 class ScXMLExternalRefRowContext
: public SvXMLImportContext
81 ScXMLExternalRefRowContext( ScXMLImport
& rImport
, sal_uInt16 nPrefix
,
82 const OUString
& rLName
,
83 const ::com::sun::star::uno::Reference
<
84 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
85 ScXMLExternalTabData
& rRefInfo
);
87 virtual ~ScXMLExternalRefRowContext();
89 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
90 const OUString
& rLocalName
,
91 const ::com::sun::star::uno::Reference
<
92 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
94 virtual void EndElement() SAL_OVERRIDE
;
96 ScXMLImport
& mrScImport
;
97 ScXMLExternalTabData
& mrExternalRefInfo
;
98 sal_Int32 mnRepeatRowCount
;
101 class ScXMLExternalRefCellContext
: public SvXMLImportContext
104 ScXMLExternalRefCellContext( ScXMLImport
& rImport
, sal_uInt16 nPrefix
,
105 const OUString
& rLName
,
106 const ::com::sun::star::uno::Reference
<
107 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
108 ScXMLExternalTabData
& rRefInfo
);
110 virtual ~ScXMLExternalRefCellContext();
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
;
119 void SetCellString(const OUString
& rStr
);
122 ScXMLImport
& mrScImport
;
123 ScXMLExternalTabData
& mrExternalRefInfo
;
124 OUString maCellString
;
126 sal_Int32 mnRepeatCount
;
127 sal_Int32 mnNumberFormat
;
128 sal_Int16 mnCellType
;
133 class ScXMLExternalRefCellTextContext
: public SvXMLImportContext
136 ScXMLExternalRefCellTextContext( ScXMLImport
& rImport
, sal_uInt16 nPrefix
,
137 const OUString
& rLName
,
138 const ::com::sun::star::uno::Reference
<
139 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
140 ScXMLExternalRefCellContext
& rParent
);
142 virtual ~ScXMLExternalRefCellTextContext();
144 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
145 const OUString
& rLocalName
,
146 const ::com::sun::star::uno::Reference
<
147 ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
149 virtual void Characters(const OUString
& rChar
) SAL_OVERRIDE
;
151 virtual void EndElement() SAL_OVERRIDE
;
154 ScXMLExternalRefCellContext
& mrParent
;
156 OUStringBuffer maCellStrBuf
;
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */