nss: upgrade to release 3.73
[LibreOffice.git] / xmloff / source / text / XMLTextNumRuleInfo.hxx
blob498b53ed2d7d37f91e4d2b7e9bb3ecc1c39fffa4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/container/XIndexReplace.hpp>
25 #include <sal/types.h>
27 namespace com::sun::star {
28 namespace text { class XTextContent; }
31 class XMLTextListAutoStylePool;
33 /** information about list and list style for a certain paragraph
35 OD 2008-04-24 #refactorlists#
36 Complete refactoring of the class and enhancement of the class for lists.
37 These changes are considered by method <XMLTextParagraphExport::exportListChange(..)>
39 class XMLTextNumRuleInfo
41 // numbering rules instance and its name
42 css::uno::Reference < css::container::XIndexReplace > mxNumRules;
43 OUString msNumRulesName;
45 // paragraph's list attributes
46 OUString msListId;
47 sal_Int16 mnListStartValue;
48 sal_Int16 mnListLevel;
49 bool mbIsNumbered;
50 bool mbIsRestart;
52 // numbering rules' attributes
53 sal_Int16 mnListLevelStartValue;
55 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
56 bool mbOutlineStyleAsNormalListStyle;
58 bool mbContinueingPreviousSubTree;
59 OUString msListLabelString;
61 public:
63 XMLTextNumRuleInfo();
65 inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo );
67 void Set( const css::uno::Reference < css::text::XTextContent > & rTextContent,
68 const bool bOutlineStyleAsNormalListStyle,
69 const XMLTextListAutoStylePool& rListAutoPool,
70 const bool bExportTextNumberElement );
71 inline void Reset();
73 const OUString& GetNumRulesName() const
75 return msNumRulesName;
77 sal_Int16 GetListLevelStartValue() const
79 return mnListLevelStartValue;
82 const OUString& GetListId() const
84 return msListId;
87 sal_Int16 GetLevel() const
89 return mnListLevel;
92 bool HasStartValue() const
94 return mnListStartValue != -1;
96 sal_uInt32 GetStartValue() const
98 return mnListStartValue;
101 bool IsNumbered() const
103 return mbIsNumbered;
105 bool IsRestart() const
107 return mbIsRestart;
110 bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
112 bool IsContinueingPreviousSubTree() const
114 return mbContinueingPreviousSubTree;
116 const OUString& ListLabelString() const
118 return msListLabelString;
122 inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=(
123 const XMLTextNumRuleInfo& rInfo )
125 msNumRulesName = rInfo.msNumRulesName;
126 mxNumRules = rInfo.mxNumRules;
127 msListId = rInfo.msListId;
128 mnListStartValue = rInfo.mnListStartValue;
129 mnListLevel = rInfo.mnListLevel;
130 mbIsNumbered = rInfo.mbIsNumbered;
131 mbIsRestart = rInfo.mbIsRestart;
132 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
133 mbOutlineStyleAsNormalListStyle = rInfo.mbOutlineStyleAsNormalListStyle;
134 mbContinueingPreviousSubTree = rInfo.mbContinueingPreviousSubTree;
135 msListLabelString = rInfo.msListLabelString;
137 return *this;
140 inline void XMLTextNumRuleInfo::Reset()
142 mxNumRules = nullptr;
143 msNumRulesName.clear();
144 msListId.clear();
145 mnListStartValue = -1;
146 mnListLevel = 0;
147 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
148 mbIsNumbered = mbIsRestart =
149 mbOutlineStyleAsNormalListStyle = false;
150 mbContinueingPreviousSubTree = false;
151 msListLabelString.clear();
153 #endif // INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */