xref: /aoo42x/main/sw/inc/fmtcolfunc.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _FMTCOLFUNC_HXX
28 #define _FMTCOLFUNC_HXX
29 
30 class SwFmt;
31 class SwNumRuleItem;
32 
33 // namespace <TxtFmtCollFunc> for functions and procedures working on
34 // paragraph styles (instances of <SwTxtFmtColl>
35 namespace TxtFmtCollFunc
36 {
37     /** Checks, if assignment of paragraph style to list level of outline style
38         has to be deleted, and deletes the assignment, if needed.
39 
40         OD 2006-11-22 #i71574#
41         The assignment of a paragraph style to a list level of the outline style
42         has to be deleted, if the numbering rule, which is set at the paragraph
43         style isn't the outline style.
44 
45         @author OD
46     */
47     void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
48                                     SwFmt* pFmt,
49                                     const SwNumRuleItem* pNewNumRuleItem = 0L );
50 
51     /** determines the list style, which directly set at the given paragraph style
52 
53         OD 2008-03-04 #refactorlists#
54 
55         @author OD
56 
57         @param rTxtFmtColl
58         input parameter - paragraph style for which the list style should be retrieved
59 
60         @return pointer to <SwNumRule> instance, if the given paragraph style
61         has directly set a list style, 0 otherwise
62     */
63     SwNumRule* GetNumRule( SwTxtFmtColl& rTxtFmtColl );
64 
65     /** adds the given paragraph style at the directly set list style
66 
67         OD 2008-03-04 #refactorlists#
68         Note: If the given paragraph style has no directly set list style, nothing happens
69 
70         @param rTxtFmtColl
71         input parameter - paragraph style which is added to its directly set list style
72 
73         @author OD
74     */
75     void AddToNumRule( SwTxtFmtColl& rTxtFmtColl );
76 
77     /** removes te given paragraph style from the directly set list style
78 
79         OD 2008-03-04 #refactorlists#
80         Note: If the given paragraph style has no directly set list style, nothing happens
81 
82         @param rTxtFmtColl
83         input parameter - paragraph style which is removed from its directly set list style
84 
85         @author OD
86     */
87     void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl );
88 }
89 #endif
90