Update ooo320-m1
[ooovba.git] / sc / source / filter / xml / xmlexternaltabi.hxx
blob6ece1ad678ea009171cb8d5cf1e89cc38a51a7bf
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlexternaltabi.hxx,v $
10 * $Revision: 1.1.2.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_XMLEXTERNALTABI_HXX
32 #define SC_XMLEXTERNALTABI_HXX
34 #include <xmloff/xmlictxt.hxx>
36 class ScXMLImport;
37 struct ScXMLExternalTabData;
39 class ScXMLExternalRefTabSourceContext : public SvXMLImportContext
41 public:
42 ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, USHORT nPrefix,
43 const ::rtl::OUString& rLName,
44 const ::com::sun::star::uno::Reference<
45 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
46 ScXMLExternalTabData& rRefInfo );
48 virtual ~ScXMLExternalRefTabSourceContext();
50 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
51 const ::rtl::OUString& rLocalName,
52 const ::com::sun::star::uno::Reference<
53 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
55 virtual void EndElement();
56 private:
57 ScXMLImport& mrScImport;
58 ScXMLExternalTabData& mrExternalRefInfo;
60 ::rtl::OUString maRelativeUrl;
61 ::rtl::OUString maTableName;
62 ::rtl::OUString maFilterName;
63 ::rtl::OUString maFilterOptions;
66 // ============================================================================
68 class ScXMLExternalRefRowsContext : public SvXMLImportContext
70 public:
71 ScXMLExternalRefRowsContext( ScXMLImport& rImport, USHORT nPrefix,
72 const ::rtl::OUString& rLName,
73 const ::com::sun::star::uno::Reference<
74 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
75 ScXMLExternalTabData& rRefInfo );
77 virtual ~ScXMLExternalRefRowsContext();
79 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
80 const ::rtl::OUString& rLocalName,
81 const ::com::sun::star::uno::Reference<
82 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
84 virtual void EndElement();
85 private:
86 ScXMLImport& mrScImport;
87 ScXMLExternalTabData& mrExternalRefInfo;
90 // ============================================================================
92 class ScXMLExternalRefRowContext : public SvXMLImportContext
94 public:
95 ScXMLExternalRefRowContext( ScXMLImport& rImport, USHORT nPrefix,
96 const ::rtl::OUString& rLName,
97 const ::com::sun::star::uno::Reference<
98 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
99 ScXMLExternalTabData& rRefInfo );
101 virtual ~ScXMLExternalRefRowContext();
103 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
104 const ::rtl::OUString& rLocalName,
105 const ::com::sun::star::uno::Reference<
106 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
108 virtual void EndElement();
109 private:
110 ScXMLImport& mrScImport;
111 ScXMLExternalTabData& mrExternalRefInfo;
112 sal_Int32 mnRepeatRowCount;
115 // ============================================================================
117 class ScXMLExternalRefCellContext : public SvXMLImportContext
119 public:
120 ScXMLExternalRefCellContext( ScXMLImport& rImport, USHORT nPrefix,
121 const ::rtl::OUString& rLName,
122 const ::com::sun::star::uno::Reference<
123 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
124 ScXMLExternalTabData& rRefInfo );
126 virtual ~ScXMLExternalRefCellContext();
128 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
129 const ::rtl::OUString& rLocalName,
130 const ::com::sun::star::uno::Reference<
131 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
133 virtual void EndElement();
135 private:
136 ScXMLImport& mrScImport;
137 ScXMLExternalTabData& mrExternalRefInfo;
138 ::rtl::OUString maCellString;
139 double mfCellValue;
140 sal_Int32 mnRepeatCount;
141 sal_Int32 mnNumberFormat;
142 sal_Int16 mnCellType;
143 bool mbIsNumeric;
144 bool mbIsEmpty;
147 // ============================================================================
149 class ScXMLExternalRefCellTextContext : public SvXMLImportContext
151 public:
152 ScXMLExternalRefCellTextContext( ScXMLImport& rImport, USHORT nPrefix,
153 const ::rtl::OUString& rLName,
154 const ::com::sun::star::uno::Reference<
155 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
156 ::rtl::OUString& rCellString );
158 virtual ~ScXMLExternalRefCellTextContext();
160 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
161 const ::rtl::OUString& rLocalName,
162 const ::com::sun::star::uno::Reference<
163 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
165 virtual void Characters(const ::rtl::OUString& rChar);
167 virtual void EndElement();
169 private:
170 ScXMLImport& mrScImport;
171 ::rtl::OUString& mrCellString;
174 #endif