xref: /aoo41x/main/xmloff/source/chart/contexts.hxx (revision ecfe53c5)
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 _SCH_XML_CONTEXTS_HXX_
24 #define _SCH_XML_CONTEXTS_HXX_
25 
26 #include "SchXMLImport.hxx"
27 #include "SchXMLTableContext.hxx"
28 #include <xmloff/xmlictxt.hxx>
29 #include <xmloff/xmltkmap.hxx>
30 
31 #include <xmloff/xmlmetai.hxx>
32 
33 namespace com { namespace sun { namespace star { namespace xml { namespace sax {
34 		class XAttributeList;
35 }}}}}
36 
37 /* ========================================
38 
39    These contexts are only nedded by
40    SchXMLImport not by the SchXMLImportHelper
41    that is also used by other applications
42 
43    ======================================== */
44 
45 class SchXMLDocContext : public virtual SvXMLImportContext
46 {
47 protected:
48 	SchXMLImportHelper& mrImportHelper;
49 
50 public:
51 	SchXMLDocContext(
52 		SchXMLImportHelper& rImpHelper,
53 		SvXMLImport& rImport,
54 		sal_uInt16 nPrefix,
55 		const rtl::OUString& rLName );
56 	virtual ~SchXMLDocContext();
57 
58 	TYPEINFO();
59 
60 	virtual SvXMLImportContext* CreateChildContext(
61 		sal_uInt16 nPrefix,
62 		const ::rtl::OUString& rLocalName,
63 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
64 };
65 
66 // ========================================
67 
68 // context for flat file xml format
69 class SchXMLFlatDocContext_Impl
70     : public SchXMLDocContext, public SvXMLMetaDocumentContext
71 {
72 public:
73     SchXMLFlatDocContext_Impl(
74 		SchXMLImportHelper& i_rImpHelper,
75         SchXMLImport& i_rImport,
76         sal_uInt16 i_nPrefix, const ::rtl::OUString & i_rLName,
77         const com::sun::star::uno::Reference<com::sun::star::document::XDocumentProperties>& i_xDocProps,
78         const com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler>& i_xDocBuilder);
79 
80     virtual ~SchXMLFlatDocContext_Impl();
81 
82     virtual SvXMLImportContext *CreateChildContext(
83         sal_uInt16 i_nPrefix, const ::rtl::OUString& i_rLocalName,
84         const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& i_xAttrList);
85 };
86 
87 // ========================================
88 
89 class SchXMLBodyContext : public SvXMLImportContext
90 {
91 private:
92 	SchXMLImportHelper& mrImportHelper;
93 
94 public:
95 	SchXMLBodyContext(
96 		SchXMLImportHelper& rImpHelper,
97 		SvXMLImport& rImport,
98 		sal_uInt16 nPrefix,
99 		const rtl::OUString& rLName );
100 	virtual ~SchXMLBodyContext();
101 
102 	virtual void EndElement();
103 	virtual SvXMLImportContext* CreateChildContext(
104 		sal_uInt16 nPrefix,
105 		const ::rtl::OUString& rLocalName,
106 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
107 };
108 
109 // ========================================
110 
111 #endif	// _SCH_XML_CONTEXTS_HXX_
112