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#pragma once
21
22#include <com/sun/star/uno/Reference.hxx>
23#include <com/sun/star/container/XIndexReplace.hpp>
24#include <sal/types.h>
25
26namespace com::sun::star {
27 namespace text { class XTextContent; }
28}
29
31
39{
40 // numbering rules instance and its name
41 css::uno::Reference < css::container::XIndexReplace > mxNumRules;
43
44 // paragraph's list attributes
45 OUString msListId;
49 sal_Int16 mnListLevel;
52
53 // numbering rules' attributes
55
56 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
58
61
62public:
63
65
66 inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo );
67
68 void Set( const css::uno::Reference < css::text::XTextContent > & rTextContent,
69 const bool bOutlineStyleAsNormalListStyle,
70 const XMLTextListAutoStylePool& rListAutoPool,
71 const bool bExportTextNumberElement );
72 inline void Reset();
73
74 const OUString& GetNumRulesName() const
75 {
76 return msNumRulesName;
77 }
78 sal_Int16 GetListLevelStartValue() const
79 {
81 }
82
83 const OUString& GetListId() const
84 {
85 return msListId;
86 }
87
88 bool IsListIdDefault() const { return mbListIdIsDefault; }
89
90 sal_Int16 GetLevel() const
91 {
92 return mnListLevel;
93 }
94
95 bool HasStartValue() const
96 {
97 return mnListStartValue != -1;
98 }
99 sal_uInt32 GetStartValue() const
100 {
101 return mnListStartValue;
102 }
103
104 bool IsNumbered() const
105 {
106 return mbIsNumbered;
107 }
108 bool IsRestart() const
109 {
110 return mbIsRestart;
111 }
112
113 bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
114
116 {
118 }
119 const OUString& ListLabelString() const
120 {
121 return msListLabelString;
122 }
123};
124
126 const XMLTextNumRuleInfo& rInfo )
127{
129 mxNumRules = rInfo.mxNumRules;
130 msListId = rInfo.msListId;
132 mnListLevel = rInfo.mnListLevel;
134 mbIsRestart = rInfo.mbIsRestart;
135 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
139
140 return *this;
141}
142
144{
145 mxNumRules = nullptr;
146 msNumRulesName.clear();
147 msListId.clear();
148 mnListStartValue = -1;
149 mnListLevel = 0;
150 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
154 msListLabelString.clear();
155}
156
157/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
information about list and list style for a certain paragraph
bool mbListIdIsDefault
msListId won't be referenced by later lists.
const OUString & GetNumRulesName() const
void Set(const css::uno::Reference< css::text::XTextContent > &rTextContent, const bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool &rListAutoPool, const bool bExportTextNumberElement)
const OUString & ListLabelString() const
css::uno::Reference< css::container::XIndexReplace > mxNumRules
const OUString & GetListId() const
sal_Int16 GetListLevelStartValue() const
sal_Int16 GetLevel() const
bool IsListIdDefault() const
XMLTextNumRuleInfo & operator=(const XMLTextNumRuleInfo &rInfo)
bool BelongsToSameList(const XMLTextNumRuleInfo &rCmp) const
sal_uInt32 GetStartValue() const
bool IsContinueingPreviousSubTree() const
def text(shape, orig_st)