xref: /trunk/main/sw/source/ui/inc/drpcps.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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 _DRPCPS_HXX
28 #define _DRPCPS_HXX
29 
30 #include <sfx2/basedlgs.hxx>
31 #include <sfx2/tabdlg.hxx>
32 
33 #ifndef _BUTTON_HXX //autogen
34 #include <vcl/button.hxx>
35 #endif
36 
37 #ifndef _FIXED_HXX //autogen
38 #include <vcl/fixed.hxx>
39 #endif
40 
41 #ifndef _FIELD_HXX //autogen
42 #include <vcl/field.hxx>
43 #endif
44 
45 #ifndef _EDIT_HXX //autogen
46 #include <vcl/edit.hxx>
47 #endif
48 
49 #ifndef _LSTBOX_HXX //autogen
50 #include <vcl/lstbox.hxx>
51 #endif
52 
53 class SwWrtShell;
54 
55 // class SwDropCapsDlg ******************************************************
56 
57 class SwDropCapsDlg : public SfxSingleTabDialog
58 {
59 
60 public:
61 
62      SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet );
63     ~SwDropCapsDlg();
64 
65 };
66 
67 class SwDropCapsPict;
68 
69 // class SwDropCapsPage *****************************************************
70 
71 class SwDropCapsPage : public SfxTabPage
72 {
73 friend class SwDropCapsPict;
74 
75     FixedLine       aSettingsFL;
76     CheckBox        aDropCapsBox;
77     CheckBox        aWholeWordCB;
78     FixedText       aSwitchText;
79     NumericField    aDropCapsField;
80     FixedText       aLinesText;
81     NumericField    aLinesField;
82     FixedText       aDistanceText;
83     MetricField     aDistanceField;
84 
85     FixedLine       aContentFL;
86     FixedText       aTextText;
87     Edit            aTextEdit;
88     FixedText       aTemplateText;
89     ListBox         aTemplateBox;
90 
91     SwDropCapsPict  *pPict;
92 
93     sal_Bool            bModified;
94     sal_Bool            bFormat;
95     sal_Bool            bHtmlMode;
96 
97     SwWrtShell &rSh;
98 
99      SwDropCapsPage(Window *pParent, const SfxItemSet &rSet);
100     ~SwDropCapsPage();
101 
102     virtual int     DeactivatePage(SfxItemSet *pSet);
103     void    FillSet( SfxItemSet &rSet );
104 
105     DECL_LINK( ClickHdl, Button * );
106     DECL_LINK( ModifyHdl, Edit * );
107     DECL_LINK( SelectHdl, ListBox * );
108     DECL_LINK( WholeWordHdl, CheckBox * );
109 
110     using SfxTabPage::ActivatePage;
111     using SfxTabPage::DeactivatePage;
112 
113 public:
114 
115     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
116     static sal_uInt16* GetRanges();
117 
118     virtual sal_Bool FillItemSet(      SfxItemSet &rSet);
119     virtual void Reset      (const SfxItemSet &rSet);
120 
121     void    SetFormat(sal_Bool bSet){bFormat = bSet;}
122 };
123 
124 #endif
125 
126