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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_xmloff.hxx"
26 #include "XMLFootnoteBodyImportContext.hxx"
27 
28 #ifndef _RTL_USTRING
29 #include <rtl/ustring.hxx>
30 #endif
31 #include <tools/debug.hxx>
32 #include <xmloff/xmlimp.hxx>
33 #include <xmloff/txtimp.hxx>
34 #include <xmloff/nmspmap.hxx>
35 #include "xmloff/xmlnmspe.hxx"
36 #include <com/sun/star/xml/sax/XAttributeList.hpp>
37 
38 using ::rtl::OUString;
39 using ::com::sun::star::uno::Reference;
40 using ::com::sun::star::beans::XPropertySet;
41 using ::com::sun::star::xml::sax::XAttributeList;
42 
43 
44 TYPEINIT1( XMLFootnoteBodyImportContext, SvXMLImportContext );
45 
XMLFootnoteBodyImportContext(SvXMLImport & rImport,sal_uInt16 nPrfx,const OUString & rLocalName)46 XMLFootnoteBodyImportContext::XMLFootnoteBodyImportContext(
47 	SvXMLImport& rImport,
48 	sal_uInt16 nPrfx,
49 	const OUString& rLocalName ) :
50 		SvXMLImportContext(rImport, nPrfx, rLocalName)
51 {
52 }
53 
CreateChildContext(sal_uInt16 nPrefix,const OUString & rLocalName,const Reference<XAttributeList> & xAttrList)54 SvXMLImportContext* XMLFootnoteBodyImportContext::CreateChildContext(
55 	sal_uInt16 nPrefix,
56 	const OUString& rLocalName,
57 	const Reference<XAttributeList> & xAttrList )
58 {
59 	// return text context
60 	SvXMLImportContext *pContext =
61 		GetImport().GetTextImport()->CreateTextChildContext(GetImport(),
62 													   nPrefix,
63 													   rLocalName,
64 													   xAttrList,
65 													   XML_TEXT_TYPE_FOOTNOTE);
66 	if( !pContext )
67 		pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
68 
69 	return pContext;
70 }
71