xref: /AOO41X/main/sw/source/ui/inc/tautofmt.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
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 SW_TAUTOFMT_HXX
24 #define SW_TAUTOFMT_HXX
25 #include <sfx2/basedlgs.hxx>
26 
27 #ifndef _FIXED_HXX //autogen
28 #include <vcl/fixed.hxx>
29 #endif
30 
31 #ifndef _LSTBOX_HXX //autogen
32 #include <vcl/lstbox.hxx>
33 #endif
34 
35 #ifndef _BUTTON_HXX //autogen
36 #include <vcl/button.hxx>
37 #endif
38 
39 #ifndef _MOREBTN_HXX //autogen
40 #include <vcl/morebtn.hxx>
41 #endif
42 
43 #ifndef _VIRDEV_HXX //autogen
44 #include <vcl/virdev.hxx>
45 #endif
46 
47 class SwTableAutoFmt;
48 class AutoFmtPreview;
49 class SwTableAutoFmtTbl;
50 class SwWrtShell;
51 
52 //------------------------------------------------------------------------
53 
54 enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
55 
56 //========================================================================
57 
58 class SwAutoFormatDlg : public SfxModalDialog
59 {
60     FixedLine       aFlFormat;
61     ListBox         aLbFormat;
62     FixedLine       aFlFormats;
63     CheckBox        aBtnNumFormat;
64     CheckBox        aBtnBorder;
65     CheckBox        aBtnFont;
66     CheckBox        aBtnPattern;
67     CheckBox        aBtnAlignment;
68     OKButton        aBtnOk;
69     CancelButton    aBtnCancel;
70     HelpButton      aBtnHelp;
71     PushButton      aBtnAdd;
72     PushButton      aBtnRemove;
73     PushButton      aBtnRename;
74     MoreButton      aBtnMore;
75     String          aStrTitle;
76     String          aStrLabel;
77     String          aStrClose;
78     String          aStrDelTitle;
79     String          aStrDelMsg;
80     String          aStrRenameTitle;
81     String          aStrInvalidFmt;
82     AutoFmtPreview* pWndPreview;
83 
84     //------------------------
85     SwWrtShell*             pShell;
86     SwTableAutoFmtTbl*      pTableTbl;
87     sal_uInt8                   nIndex;
88     sal_uInt8                   nDfltStylePos;
89     sal_Bool                    bCoreDataChanged : 1;
90     sal_Bool                    bSetAutoFmt : 1;
91 
92 
93     void Init( const SwTableAutoFmt* pSelFmt );
94     void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn );
95     //------------------------
96     DECL_LINK( CheckHdl, Button * );
97     DECL_LINK( OkHdl, Button * );
98     DECL_LINK( AddHdl, void * );
99     DECL_LINK( RemoveHdl, void * );
100     DECL_LINK( RenameHdl, void * );
101     DECL_LINK( SelFmtHdl, void * );
102 
103 public:
104     SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
105                         sal_Bool bSetAutoFmt = sal_True,
106                         const SwTableAutoFmt* pSelFmt = 0 );
107     virtual ~SwAutoFormatDlg();
108 
109     void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const;
110 };
111 
112 
113 #endif // SW_AUTOFMT_HXX
114 
115