LibreOffice Module xmloff (master)  1
XMLTextNumRuleInfo.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
22 
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/container/XIndexReplace.hpp>
25 #include <sal/types.h>
26 
27 namespace com::sun::star {
28  namespace text { class XTextContent; }
29 }
30 
32 
40 {
41  // numbering rules instance and its name
42  css::uno::Reference < css::container::XIndexReplace > mxNumRules;
43  OUString msNumRulesName;
44 
45  // paragraph's list attributes
46  OUString msListId;
47  sal_Int16 mnListStartValue;
48  sal_Int16 mnListLevel;
51 
52  // numbering rules' attributes
54 
55  // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
57 
60 
61 public:
62 
64 
65  inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo );
66 
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();
72 
73  const OUString& GetNumRulesName() const
74  {
75  return msNumRulesName;
76  }
77  sal_Int16 GetListLevelStartValue() const
78  {
79  return mnListLevelStartValue;
80  }
81 
82  const OUString& GetListId() const
83  {
84  return msListId;
85  }
86 
87  sal_Int16 GetLevel() const
88  {
89  return mnListLevel;
90  }
91 
92  bool HasStartValue() const
93  {
94  return mnListStartValue != -1;
95  }
96  sal_uInt32 GetStartValue() const
97  {
98  return mnListStartValue;
99  }
100 
101  bool IsNumbered() const
102  {
103  return mbIsNumbered;
104  }
105  bool IsRestart() const
106  {
107  return mbIsRestart;
108  }
109 
110  bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
111 
113  {
115  }
116  const OUString& ListLabelString() const
117  {
118  return msListLabelString;
119  }
120 };
121 
123  const XMLTextNumRuleInfo& rInfo )
124 {
126  mxNumRules = rInfo.mxNumRules;
127  msListId = rInfo.msListId;
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#)
136 
137  return *this;
138 }
139 
141 {
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#)
151  msListLabelString.clear();
152 }
153 #endif // INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
154 
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool BelongsToSameList(const XMLTextNumRuleInfo &rCmp) const
sal_uInt32 GetStartValue() const
bool IsContinueingPreviousSubTree() const
css::uno::Reference< css::container::XIndexReplace > mxNumRules
const OUString & GetListId() const
information about list and list style for a certain paragraph
exports com.sun.star. text
sal_Int16 GetLevel() const
const OUString & GetNumRulesName() const
XMLTextNumRuleInfo & operator=(const XMLTextNumRuleInfo &rInfo)
const OUString & ListLabelString() const
void Set(const css::uno::Reference< css::text::XTextContent > &rTextContent, const bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool &rListAutoPool, const bool bExportTextNumberElement)
bool HasStartValue() const
sal_Int16 GetListLevelStartValue() const