1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _XMLTEXTLISTBLOCKCONTEXT_HXX
30 #define _XMLTEXTLISTBLOCKCONTEXT_HXX
32 #include <com/sun/star/container/XIndexReplace.hpp>
33 #include <xmloff/xmlictxt.hxx>
35 class XMLTextImportHelper
;
37 class XMLTextListBlockContext
: public SvXMLImportContext
39 XMLTextImportHelper
& mrTxtImport
;
41 ::com::sun::star::uno::Reference
<
42 ::com::sun::star::container::XIndexReplace
> mxNumRules
;
44 // text:style-name property of <list> element
45 ::rtl::OUString msListStyleName
;
46 ::rtl::OUString sXmlId
;
48 SvXMLImportContextRef mxParentListBlock
;
51 sal_Bool mbRestartNumbering
;
52 sal_Bool mbSetDefaults
;
54 // text:id property of <list> element, only valid for root <list> element
55 ::rtl::OUString msListId
;
56 // text:continue-list property of <list> element, only valid for root <list> element
57 ::rtl::OUString msContinueListId
;
63 // add optional parameter <bRestartNumberingAtSubList>
64 XMLTextListBlockContext(
66 XMLTextImportHelper
& rTxtImp
,
68 const ::rtl::OUString
& rLName
,
69 const ::com::sun::star::uno::Reference
<
70 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
,
71 const sal_Bool bRestartNumberingAtSubList
= sal_False
);
72 virtual ~XMLTextListBlockContext();
74 virtual void EndElement();
76 SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
77 const ::rtl::OUString
& rLocalName
,
78 const ::com::sun::star::uno::Reference
<
79 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
81 const ::rtl::OUString
& GetListStyleName() const { return msListStyleName
; }
82 sal_Int16
GetLevel() const { return mnLevel
; }
83 sal_Bool
IsRestartNumbering() const { return mbRestartNumbering
; }
84 void ResetRestartNumbering() { mbRestartNumbering
= sal_False
; }
86 const ::com::sun::star::uno::Reference
<
87 ::com::sun::star::container::XIndexReplace
>& GetNumRules() const
88 { return mxNumRules
; }
90 const ::rtl::OUString
& GetListId() const;
91 const ::rtl::OUString
& GetContinueListId() const;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */