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 bool bOutlineStyleAsNormalListStyle,
70 const XMLTextListAutoStylePool& rListAutoPool,
71 bool bExportTextNumberElement,
72 bool bListIdIsDefault );
73 inline void Reset();
74
75 const OUString& GetNumRulesName() const
76 {
77 return msNumRulesName;
78 }
79 sal_Int16 GetListLevelStartValue() const
80 {
82 }
83
84 const OUString& GetListId() const
85 {
86 return msListId;
87 }
88
89 bool IsListIdDefault() const { return mbListIdIsDefault; }
90
91 sal_Int16 GetLevel() const
92 {
93 return mnListLevel;
94 }
95
96 bool HasStartValue() const
97 {
98 return mnListStartValue != -1;
99 }
100 sal_uInt32 GetStartValue() const
101 {
102 return mnListStartValue;
103 }
104
105 bool IsNumbered() const
106 {
107 return mbIsNumbered;
108 }
109 bool IsRestart() const
110 {
111 return mbIsRestart;
112 }
113
114 bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
115
117 {
119 }
120 const OUString& ListLabelString() const
121 {
122 return msListLabelString;
123 }
124};
125
127 const XMLTextNumRuleInfo& rInfo )
128{
130 mxNumRules = rInfo.mxNumRules;
131 msListId = rInfo.msListId;
133 mnListLevel = rInfo.mnListLevel;
135 mbIsRestart = rInfo.mbIsRestart;
136 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
140
141 return *this;
142}
143
145{
146 mxNumRules = nullptr;
147 msNumRulesName.clear();
148 msListId.clear();
149 mnListStartValue = -1;
150 mnListLevel = 0;
151 // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
155 msListLabelString.clear();
156}
157
158/* 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
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)
void Set(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool &rListAutoPool, bool bExportTextNumberElement, bool bListIdIsDefault)
bool BelongsToSameList(const XMLTextNumRuleInfo &rCmp) const
sal_uInt32 GetStartValue() const
bool IsContinueingPreviousSubTree() const
def text(shape, orig_st)