1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLTEXTLISTITEMCONTEXT_HXX
25 #define _XMLTEXTLISTITEMCONTEXT_HXX
26 
27 #include <xmloff/xmlictxt.hxx>
28 
29 class XMLTextImportHelper;
30 
31 class XMLTextListItemContext : public SvXMLImportContext
32 {
33 	XMLTextImportHelper& rTxtImport;
34 
35 	sal_Int16					nStartValue;
36 
37     // --> OD 2008-05-07 #refactorlists#
38     // quantity of <text:list> child elements
39     sal_Int16 mnSubListCount;
40     // list style instance for text::style-override property
41     ::com::sun::star::uno::Reference<
42                 ::com::sun::star::container::XIndexReplace > mxNumRulesOverride;
43     // <--
44 
45 public:
46 
47 	TYPEINFO();
48 
49 	XMLTextListItemContext(
50 			SvXMLImport& rImport,
51             XMLTextImportHelper& rTxtImp,
52             const sal_uInt16 nPrfx,
53 			const ::rtl::OUString& rLName,
54 			const ::com::sun::star::uno::Reference<
55 			::com::sun::star::xml::sax::XAttributeList > & xAttrList,
56             const sal_Bool bIsHeader = sal_False );
57 	virtual ~XMLTextListItemContext();
58 
59 	virtual void EndElement();
60 
61 	SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
62 				 const ::rtl::OUString& rLocalName,
63 				 const ::com::sun::star::uno::Reference<
64 				 	::com::sun::star::xml::sax::XAttributeList > & xAttrList );
65 
HasStartValue() const66 	sal_Bool HasStartValue() const { return -1 != nStartValue; }
GetStartValue() const67 	sal_Int16 GetStartValue() const { return nStartValue; }
68 
69     // --> OD 2008-05-08 #refactorlists#
HasNumRulesOverride() const70     inline sal_Bool HasNumRulesOverride() const
71     {
72         return mxNumRulesOverride.is();
73     }
74     inline const ::com::sun::star::uno::Reference <
GetNumRulesOverride() const75         ::com::sun::star::container::XIndexReplace >& GetNumRulesOverride() const
76     {
77         return mxNumRulesOverride;
78     }
79 };
80 
81 
82 #endif
83