Update ooo320-m1
[ooovba.git] / xmloff / source / text / XMLTextListBlockContext.hxx
blobd412e551a1bdebf6c9591fcace46b5c16440cdfa
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: XMLTextListBlockContext.hxx,v $
10 * $Revision: 1.9.2.1 $
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 _XMLTEXTLISTBLOCKCONTEXT_HXX
32 #define _XMLTEXTLISTBLOCKCONTEXT_HXX
34 #include <com/sun/star/container/XIndexReplace.hpp>
35 #include <xmloff/xmlictxt.hxx>
37 class XMLTextImportHelper;
39 class XMLTextListBlockContext : public SvXMLImportContext
41 XMLTextImportHelper& mrTxtImport;
43 ::com::sun::star::uno::Reference<
44 ::com::sun::star::container::XIndexReplace > mxNumRules;
46 // text:style-name property of <list> element
47 ::rtl::OUString msListStyleName;
48 ::rtl::OUString sXmlId;
50 SvXMLImportContextRef mxParentListBlock;
52 sal_Int16 mnLevel;
53 sal_Bool mbRestartNumbering;
54 sal_Bool mbSetDefaults;
56 // --> OD 2008-04-22 #refactorlists#
57 // text:id property of <list> element, only valid for root <list> element
58 ::rtl::OUString msListId;
59 // text:continue-list property of <list> element, only valid for root <list> element
60 ::rtl::OUString msContinueListId;
61 // <--
63 public:
65 TYPEINFO();
67 // --> OD 2008-05-07 #refactorlists#
68 // add optional parameter <bRestartNumberingAtSubList>
69 XMLTextListBlockContext(
70 SvXMLImport& rImport,
71 XMLTextImportHelper& rTxtImp,
72 sal_uInt16 nPrfx,
73 const ::rtl::OUString& rLName,
74 const ::com::sun::star::uno::Reference<
75 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
76 const sal_Bool bRestartNumberingAtSubList = sal_False );
77 // <--
78 virtual ~XMLTextListBlockContext();
80 virtual void EndElement();
82 SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
83 const ::rtl::OUString& rLocalName,
84 const ::com::sun::star::uno::Reference<
85 ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
87 const ::rtl::OUString& GetListStyleName() const { return msListStyleName; }
88 sal_Int16 GetLevel() const { return mnLevel; }
89 sal_Bool IsRestartNumbering() const { return mbRestartNumbering; }
90 void ResetRestartNumbering() { mbRestartNumbering = sal_False; }
92 const ::com::sun::star::uno::Reference <
93 ::com::sun::star::container::XIndexReplace >& GetNumRules() const
94 { return mxNumRules; }
96 // --> OD 2008-04-22 #refactorlists#
97 const ::rtl::OUString& GetListId() const;
98 const ::rtl::OUString& GetContinueListId() const;
99 // <--
104 #endif