xref: /aoo42x/main/sw/inc/fmtcolfunc.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _FMTCOLFUNC_HXX
24 #define _FMTCOLFUNC_HXX
25 
26 class SwFmt;
27 class SwNumRuleItem;
28 
29 // namespace <TxtFmtCollFunc> for functions and procedures working on
30 // paragraph styles (instances of <SwTxtFmtColl>
31 namespace TxtFmtCollFunc
32 {
33     /** Checks, if assignment of paragraph style to list level of outline style
34         has to be deleted, and deletes the assignment, if needed.
35 
36         OD 2006-11-22 #i71574#
37         The assignment of a paragraph style to a list level of the outline style
38         has to be deleted, if the numbering rule, which is set at the paragraph
39         style isn't the outline style.
40 
41         @author OD
42     */
43     void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
44                                     SwFmt* pFmt,
45                                     const SwNumRuleItem* pNewNumRuleItem = 0L );
46 
47     /** determines the list style, which directly set at the given paragraph style
48 
49         OD 2008-03-04 #refactorlists#
50 
51         @author OD
52 
53         @param rTxtFmtColl
54         input parameter - paragraph style for which the list style should be retrieved
55 
56         @return pointer to <SwNumRule> instance, if the given paragraph style
57         has directly set a list style, 0 otherwise
58     */
59     SwNumRule* GetNumRule( SwTxtFmtColl& rTxtFmtColl );
60 
61     /** adds the given paragraph style at the directly set list style
62 
63         OD 2008-03-04 #refactorlists#
64         Note: If the given paragraph style has no directly set list style, nothing happens
65 
66         @param rTxtFmtColl
67         input parameter - paragraph style which is added to its directly set list style
68 
69         @author OD
70     */
71     void AddToNumRule( SwTxtFmtColl& rTxtFmtColl );
72 
73     /** removes te given paragraph style from the directly set list style
74 
75         OD 2008-03-04 #refactorlists#
76         Note: If the given paragraph style has no directly set list style, nothing happens
77 
78         @param rTxtFmtColl
79         input parameter - paragraph style which is removed from its directly set list style
80 
81         @author OD
82     */
83     void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl );
84 }
85 #endif
86