update dev300-m58
[ooovba.git] / xmloff / inc / XMLFootnoteConfigurationImportContext.hxx
blob2b1f82fa9ffaffa218c3298dd6a42379495ece0c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLFootnoteConfigurationImportContext.hxx,v $
10 * $Revision: 1.9 $
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 ************************************************************************/
31 #ifndef _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
32 #define _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
34 #include <xmloff/xmlstyle.hxx>
36 namespace com { namespace sun { namespace star {
37 namespace uno { template<class X> class Reference; }
38 namespace xml { namespace sax { class XAttributeList; } }
39 namespace beans { class XPropertySet; }
40 } } }
41 namespace rtl { class OUString; }
42 class SvXMLImport;
44 /// import footnote and endnote configuration elements
45 class XMLFootnoteConfigurationImportContext : public SvXMLStyleContext
47 const ::rtl::OUString sPropertyAnchorCharStyleName;
48 const ::rtl::OUString sPropertyCharStyleName;
49 const ::rtl::OUString sPropertyNumberingType;
50 const ::rtl::OUString sPropertyPageStyleName;
51 const ::rtl::OUString sPropertyParagraphStyleName;
52 const ::rtl::OUString sPropertyPrefix;
53 const ::rtl::OUString sPropertyStartAt;
54 const ::rtl::OUString sPropertySuffix;
55 const ::rtl::OUString sPropertyPositionEndOfDoc;
56 const ::rtl::OUString sPropertyFootnoteCounting;
57 const ::rtl::OUString sPropertyEndNotice;
58 const ::rtl::OUString sPropertyBeginNotice;
60 ::rtl::OUString sCitationStyle;
61 ::rtl::OUString sAnchorStyle;
62 ::rtl::OUString sDefaultStyle;
63 ::rtl::OUString sPageStyle;
64 ::rtl::OUString sPrefix;
65 ::rtl::OUString sSuffix;
66 ::rtl::OUString sNumFormat;
67 ::rtl::OUString sNumSync;
68 ::rtl::OUString sBeginNotice;
69 ::rtl::OUString sEndNotice;
71 SvXMLTokenMap* pAttrTokenMap;
73 sal_Int16 nOffset;
74 sal_Int16 nNumbering;
75 sal_Bool bPosition;
76 sal_Bool bIsEndnote;
78 public:
80 TYPEINFO();
82 XMLFootnoteConfigurationImportContext(
83 SvXMLImport& rImport,
84 sal_uInt16 nPrfx,
85 const ::rtl::OUString& rLName,
86 const ::com::sun::star::uno::Reference<
87 ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
89 virtual ~XMLFootnoteConfigurationImportContext();
91 /// parse attributes
92 virtual void StartElement(
93 const ::com::sun::star::uno::Reference<
94 ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
96 /// for footnotes, also parse begin and end notices
97 virtual SvXMLImportContext *CreateChildContext(
98 USHORT nPrefix,
99 const ::rtl::OUString& rLocalName,
100 const ::com::sun::star::uno::Reference<
101 ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
103 /// get token map for attributes
104 const SvXMLTokenMap& GetFtnConfigAttrTokenMap();
106 /// set configuration at document; calls ProcessSettings
107 // --> OD 2005-01-31 #i40579# - move code from <CreateAndInsertLate(..)>
108 // to <Finish(..)>, because at this time all styles it references have been set.
109 virtual void Finish( sal_Bool bOverwrite);
110 // <--
112 /// set configuration at document
113 void ProcessSettings(
114 const ::com::sun::star::uno::Reference<
115 ::com::sun::star::beans::XPropertySet> & rConfig);
117 /// for helper class: set begin notice
118 void SetBeginNotice( ::rtl::OUString sText);
120 /// for helper class: set end notice
121 void SetEndNotice( ::rtl::OUString sText);
124 #endif