merge the formfield patch from ooo-build
[ooovba.git] / sc / source / filter / xml / XMLTableHeaderFooterContext.hxx
blob5e73819b2165cb561b9542c7262d1704787c4f65
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLTableHeaderFooterContext.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_XMLTABLEHEADERFOOTERCONTEXT_HXX_
31 #define SC_XMLTABLEHEADERFOOTERCONTEXT_HXX_
34 #include <xmloff/xmlictxt.hxx>
35 #include <xmloff/xmlimp.hxx>
36 #include <com/sun/star/sheet/XHeaderFooterContent.hpp>
38 namespace com { namespace sun { namespace star {
39 namespace text { class XTextCursor; }
40 namespace beans { class XPropertySet; }
41 } } }
43 class XMLTableHeaderFooterContext: public SvXMLImportContext
45 ::com::sun::star::uno::Reference <
46 ::com::sun::star::text::XTextCursor > xTextCursor;
47 ::com::sun::star::uno::Reference <
48 ::com::sun::star::text::XTextCursor > xOldTextCursor;
49 ::com::sun::star::uno::Reference <
50 ::com::sun::star::beans::XPropertySet > xPropSet;
51 ::com::sun::star::uno::Reference <
52 ::com::sun::star::sheet::XHeaderFooterContent > xHeaderFooterContent;
54 const ::rtl::OUString sOn;
55 const ::rtl::OUString sShareContent;
56 const ::rtl::OUString sContent;
57 const ::rtl::OUString sContentLeft;
58 const ::rtl::OUString sEmpty;
59 rtl::OUString sCont;
61 sal_Bool bDisplay;
62 sal_Bool bInsertContent;
63 sal_Bool bLeft;
64 sal_Bool bContainsLeft;
65 sal_Bool bContainsRight;
66 sal_Bool bContainsCenter;
68 public:
69 TYPEINFO();
71 XMLTableHeaderFooterContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
72 const ::rtl::OUString& rLName,
73 const ::com::sun::star::uno::Reference<
74 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
75 const ::com::sun::star::uno::Reference <
76 ::com::sun::star::beans::XPropertySet > & rPageStylePropSet,
77 sal_Bool bFooter, sal_Bool bLft );
79 virtual ~XMLTableHeaderFooterContext();
81 virtual SvXMLImportContext *CreateChildContext(
82 sal_uInt16 nPrefix,
83 const ::rtl::OUString& rLocalName,
84 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
86 virtual void EndElement();
89 class XMLHeaderFooterRegionContext: public SvXMLImportContext
91 private:
92 ::com::sun::star::uno::Reference <
93 ::com::sun::star::text::XTextCursor >& xTextCursor;
94 ::com::sun::star::uno::Reference <
95 ::com::sun::star::text::XTextCursor > xOldTextCursor;
97 public:
98 TYPEINFO();
100 XMLHeaderFooterRegionContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
101 const ::rtl::OUString& rLName,
102 const ::com::sun::star::uno::Reference<
103 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
104 com::sun::star::uno::Reference< com::sun::star::text::XTextCursor >& xCursor );
106 virtual ~XMLHeaderFooterRegionContext();
108 virtual SvXMLImportContext *CreateChildContext(
109 sal_uInt16 nPrefix,
110 const ::rtl::OUString& rLocalName,
111 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
113 virtual void EndElement();
117 #endif