xref: /trunk/main/sw/inc/SwXMLSectionList.hxx (revision 1d2dbeb0)
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 _SW_XMLSECTIONLIST_HXX
24 #define _SW_XMLSECTIONLIST_HXX
25 
26 #include <xmloff/xmlictxt.hxx>
27 #include <xmloff/xmlimp.hxx>
28 
29 class SvStrings;
30 
31 class SwXMLSectionList : public SvXMLImport
32 {
33 protected:
34 	// This method is called after the namespace map has been updated, but
35 	// before a context for the current element has been pushed.
36 	virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
37 				  const ::rtl::OUString& rLocalName,
38 				  const ::com::sun::star::uno::Reference<
39 					::com::sun::star::xml::sax::XAttributeList > & xAttrList );
40 public:
41 	SvStrings & rSectionList;
42 
43 	// #110680#
44 	SwXMLSectionList(
45 		const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
46 		SvStrings & rNewSectionList );
47 
48 	virtual ~SwXMLSectionList ( )
49 		throw();
50 };
51 
52 class SvXMLSectionListContext : public SvXMLImportContext
53 {
54 private:
55 	SwXMLSectionList & rLocalRef;
56 public:
57 	SvXMLSectionListContext ( SwXMLSectionList& rImport,
58 						   sal_uInt16 nPrefix,
59 						   const rtl::OUString& rLocalName,
60 						   const ::com::sun::star::uno::Reference<
61 						   ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
62 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
63 						   const rtl::OUString& rLocalName,
64 						   const ::com::sun::star::uno::Reference<
65 						   ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
66 	~SvXMLSectionListContext ( void );
67 };
68 
69 class SvXMLIgnoreSectionListContext : public SvXMLImportContext
70 {
71 private:
72 	SwXMLSectionList & rLocalRef;
73 public:
74 	SvXMLIgnoreSectionListContext ( SwXMLSectionList& rImport,
75 						   sal_uInt16 nPrefix,
76 						   const rtl::OUString& rLocalName,
77 						   const ::com::sun::star::uno::Reference<
78 						   ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
79 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
80 						   const rtl::OUString& rLocalName,
81 						   const ::com::sun::star::uno::Reference<
82 						   ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
83 	~SvXMLIgnoreSectionListContext ( void );
84 };
85 #endif
86