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: XMLTextListItemContext.hxx,v $
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 _XMLTEXTLISTITEMCONTEXT_HXX
32 #define _XMLTEXTLISTITEMCONTEXT_HXX
34 #include <xmloff/xmlictxt.hxx>
36 class XMLTextImportHelper
;
38 class XMLTextListItemContext
: public SvXMLImportContext
40 XMLTextImportHelper
& rTxtImport
;
42 sal_Int16 nStartValue
;
44 // --> OD 2008-05-07 #refactorlists#
45 // quantity of <text:list> child elements
46 sal_Int16 mnSubListCount
;
47 // list style instance for text::style-override property
48 ::com::sun::star::uno::Reference
<
49 ::com::sun::star::container::XIndexReplace
> mxNumRulesOverride
;
56 XMLTextListItemContext(
58 XMLTextImportHelper
& rTxtImp
,
59 const sal_uInt16 nPrfx
,
60 const ::rtl::OUString
& rLName
,
61 const ::com::sun::star::uno::Reference
<
62 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
,
63 const sal_Bool bIsHeader
= sal_False
);
64 virtual ~XMLTextListItemContext();
66 virtual void EndElement();
68 SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
69 const ::rtl::OUString
& rLocalName
,
70 const ::com::sun::star::uno::Reference
<
71 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
73 sal_Bool
HasStartValue() const { return -1 != nStartValue
; }
74 sal_Int16
GetStartValue() const { return nStartValue
; }
76 // --> OD 2008-05-08 #refactorlists#
77 inline sal_Bool
HasNumRulesOverride() const
79 return mxNumRulesOverride
.is();
81 inline const ::com::sun::star::uno::Reference
<
82 ::com::sun::star::container::XIndexReplace
>& GetNumRulesOverride() const
84 return mxNumRulesOverride
;