xref: /aoo4110/main/sc/source/filter/xml/xmlnexpi.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef SC_XMLNEXPI_HXX
24 #define SC_XMLNEXPI_HXX
25 
26 #include <xmloff/xmlictxt.hxx>
27 #include <xmloff/xmlimp.hxx>
28 #include "address.hxx"
29 
30 class ScXMLImport;
31 
32 class ScXMLNamedExpressionsContext : public SvXMLImportContext
33 {
GetScImport() const34 	const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
GetScImport()35 	ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
36 	SCTAB nScopeOfNameRange;
37 public:
38 
39 	ScXMLNamedExpressionsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
40 						const ::rtl::OUString& rLName,
41 						const ::com::sun::star::uno::Reference<
42 										::com::sun::star::xml::sax::XAttributeList>& xAttrList);
43 
44 	virtual ~ScXMLNamedExpressionsContext();
45 
46 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
47 									 const ::rtl::OUString& rLocalName,
48 									 const ::com::sun::star::uno::Reference<
49 									  	::com::sun::star::xml::sax::XAttributeList>& xAttrList );
50 
51 	virtual void EndElement();
SetScope(SCTAB n)52 	void SetScope( SCTAB n ){ nScopeOfNameRange = n;}
GetScope()53 	SCTAB GetScope(){ return nScopeOfNameRange;}
54 
55 };
56 
57 class ScXMLNamedRangeContext : public SvXMLImportContext
58 {
GetScImport() const59 	const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
GetScImport()60 	ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
61 
62 public:
63 
64 	ScXMLNamedRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
65 						const ::rtl::OUString& rLName,
66 						const ::com::sun::star::uno::Reference<
67 										::com::sun::star::xml::sax::XAttributeList>& xAttrList,SCTAB nScopeOfNameRange);
68 
69 	virtual ~ScXMLNamedRangeContext();
70 
71 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
72 									 const ::rtl::OUString& rLocalName,
73 									 const ::com::sun::star::uno::Reference<
74 									  	::com::sun::star::xml::sax::XAttributeList>& xAttrList );
75 
76 	virtual void EndElement();
77 };
78 
79 class ScXMLNamedExpressionContext : public SvXMLImportContext
80 {
GetScImport() const81 	const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
GetScImport()82 	ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
83 
84 public:
85 
86 	ScXMLNamedExpressionContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
87 						const ::rtl::OUString& rLName,
88 						const ::com::sun::star::uno::Reference<
89 										::com::sun::star::xml::sax::XAttributeList>& xAttrList,SCTAB nScopeOfNameRange);
90 
91 	virtual ~ScXMLNamedExpressionContext();
92 
93 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
94 									 const ::rtl::OUString& rLocalName,
95 									 const ::com::sun::star::uno::Reference<
96 									  	::com::sun::star::xml::sax::XAttributeList>& xAttrList );
97 
98 	virtual void EndElement();
99 };
100 
101 #endif
102