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 _XMLOFF_TEXTMASTERPAGECONTEXT_HXX_
24 #define _XMLOFF_TEXTMASTERPAGECONTEXT_HXX_
25 
26 #include "sal/config.h"
27 #include "xmloff/dllapi.h"
28 #include "sal/types.h"
29 
30 #ifndef _XMLOFF_XMLSTYLE_HXX_
31 #include <xmloff/xmlstyle.hxx>
32 #endif
33 
34 namespace com { namespace sun { namespace star {
35 	namespace style { class XStyle; }
36 } } }
37 
38 class XMLOFF_DLLPUBLIC XMLTextMasterPageContext : public SvXMLStyleContext
39 {
40 	const ::rtl::OUString sIsPhysical;
41 	const ::rtl::OUString sPageStyleLayout;
42 	const ::rtl::OUString sFollowStyle;
43 	::rtl::OUString		  sFollow;
44 	::rtl::OUString		  sPageMasterName;
45 
46 	::com::sun::star::uno::Reference < ::com::sun::star::style::XStyle > xStyle;
47 
48 	sal_Bool bInsertHeader;
49 	sal_Bool bInsertFooter;
50 	sal_Bool bInsertHeaderLeft;
51 	sal_Bool bInsertFooterLeft;
52 	sal_Bool bHeaderInserted;
53 	sal_Bool bFooterInserted;
54 	sal_Bool bHeaderLeftInserted;
55 	sal_Bool bFooterLeftInserted;
56 
57 	SAL_DLLPRIVATE ::com::sun::star::uno::Reference <
58 		::com::sun::star::style::XStyle > Create();
59 protected:
60 	::com::sun::star::uno::Reference <
GetStyle()61 		::com::sun::star::style::XStyle > GetStyle() { return xStyle; }
62 public:
63 
64 	TYPEINFO();
65 
66 	XMLTextMasterPageContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
67 			const ::rtl::OUString& rLName,
68 			const ::com::sun::star::uno::Reference<
69 				::com::sun::star::xml::sax::XAttributeList > & xAttrList,
70 			sal_Bool bOverwrite );
71 	virtual ~XMLTextMasterPageContext();
72 
73 	virtual SvXMLImportContext *CreateChildContext(
74 			sal_uInt16 nPrefix,
75 			const ::rtl::OUString& rLocalName,
76 			const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
77 
78 	virtual SvXMLImportContext *CreateHeaderFooterContext(
79 			sal_uInt16 nPrefix,
80 			const ::rtl::OUString& rLocalName,
81 			const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
82 			const sal_Bool bFooter,
83 			const sal_Bool bLeft );
84 
85 	virtual void Finish( sal_Bool bOverwrite );
86 };
87 
88 #endif
89