1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_SW_INC_FMTCOLFUNC_HXX
20 #define INCLUDED_SW_INC_FMTCOLFUNC_HXX
22 #include "numrule.hxx"
28 // namespace <TextFormatCollFunc> for functions and procedures working on
29 // paragraph styles (instances of <SwTextFormatColl>
30 namespace TextFormatCollFunc
32 /** Checks, if assignment of paragraph style to list level of outline style
33 has to be deleted, and deletes the assignment, if needed.
36 The assignment of a paragraph style to a list level of the outline style
37 has to be deleted, if the numbering rule, which is set at the paragraph
38 style isn't the outline style.
40 void CheckTextFormatCollForDeletionOfAssignmentToOutlineStyle(
42 const SwNumRuleItem
* pNewNumRuleItem
= nullptr );
44 /** determines the list style, which directly set at the given paragraph style
46 @param rTextFormatColl
47 input parameter - paragraph style for which the list style should be retrieved
49 @return pointer to <SwNumRule> instance, if the given paragraph style
50 has directly set a list style, 0 otherwise
52 SwNumRule
* GetNumRule( SwTextFormatColl
& rTextFormatColl
);
54 /** adds the given paragraph style at the directly set list style
56 Note: If the given paragraph style has no directly set list style, nothing happens
58 @param rTextFormatColl
59 input parameter - paragraph style which is added to its directly set list style
61 void AddToNumRule( SwTextFormatColl
& rTextFormatColl
);
63 /** removes the given paragraph style from the directly set list style
65 Note: If the given paragraph style has no directly set list style, nothing happens
67 @param rTextFormatColl
68 input parameter - paragraph style which is removed from its directly set list style
70 void RemoveFromNumRule( SwTextFormatColl
& rTextFormatColl
);
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */