Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_xmloff / xmlnumi.hxx
blobae7cdebe401d22a6eed9a1e87cce340bee67f615
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: xmlnumi.hxx,v $
10 * $Revision: 1.6 $
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_XMLNUMI_HXX
32 #define _XMLOFF_XMLNUMI_HXX
34 #ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
35 #include <com/sun/star/container/XIndexReplace.hpp>
36 #endif
38 #include <bf_xmloff/xmlstyle.hxx>
40 #ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_
41 #include <com/sun/star/style/NumberingType.hpp>
42 #endif
44 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
45 namespace binfilter {
46 class SvI18NMap;
47 class SvxXMLListStyle_Impl;
49 class SvxXMLListStyleContext : public SvXMLStyleContext
51 const ::rtl::OUString sIsPhysical;
52 const ::rtl::OUString sNumberingRules;
53 const ::rtl::OUString sName;
54 const ::rtl::OUString sIsContinuousNumbering;
55 const ::rtl::OUString sIsNumbering;
57 ::com::sun::star::uno::Reference <
58 ::com::sun::star::container::XIndexReplace > xNumRules;
60 SvxXMLListStyle_Impl *pLevelStyles;
62 sal_Int16 nLevels;
63 sal_Bool bConsecutive : 1;
64 sal_Bool bOutline : 1;
66 protected:
68 virtual void SetAttribute( sal_uInt16 nPrefixKey,
69 const ::rtl::OUString& rLocalName,
70 const ::rtl::OUString& rValue );
72 public:
74 TYPEINFO();
76 SvxXMLListStyleContext(
77 SvXMLImport& rImport, sal_uInt16 nPrfx,
78 const ::rtl::OUString& rLName,
79 const ::com::sun::star::uno::Reference<
80 ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
81 sal_Bool bOutl=sal_False );
83 virtual ~SvxXMLListStyleContext();
85 virtual SvXMLImportContext *CreateChildContext(
86 sal_uInt16 nPrefix,
87 const ::rtl::OUString& rLocalName,
88 const ::com::sun::star::uno::Reference<
89 ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
91 void FillUnoNumRule(
92 const ::com::sun::star::uno::Reference<
93 ::com::sun::star::container::XIndexReplace > & rNumRule,
94 const SvI18NMap *pI18NMap ) const;
96 const ::com::sun::star::uno::Reference <
97 ::com::sun::star::container::XIndexReplace >& GetNumRules() const
98 { return xNumRules; }
99 sal_Bool IsOutline() const { return bOutline; }
100 sal_Bool IsConsecutive() const { return bConsecutive; }
101 sal_Int16 GetLevels() const { return nLevels; }
103 static ::com::sun::star::uno::Reference <
104 ::com::sun::star::container::XIndexReplace >
105 CreateNumRule(
106 const ::com::sun::star::uno::Reference <
107 ::com::sun::star::frame::XModel > & rModel );
109 static void SetDefaultStyle(
110 const ::com::sun::star::uno::Reference <
111 ::com::sun::star::container::XIndexReplace > & rNumRule,
112 sal_Int16 nLevel,
113 sal_Bool bOrdered );
115 virtual void CreateAndInsertLate( sal_Bool bOverwrite );
117 void CreateAndInsertAuto() const;
120 }//end of namespace binfilter
121 #endif // _XMLOFF_XMLNUMI_HXX