xref: /trunk/main/sc/source/ui/inc/condfrmt.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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 
28 
29 #ifndef SC_CONDFRMT_HXX_
30 #define SC_CONDFRMT_HXX_
31 
32 #include "anyrefdg.hxx"
33 #include <vcl/fixed.hxx>
34 #include <vcl/lstbox.hxx>
35 
36 
37 class ScDocument;
38 class ScConditionalFormat;
39 
40 
41 //============================================================================
42 //  class ScConditionalFormat
43 //
44 // Dialog zum Festlegen von bedingten Formaten
45 
46 class ScConditionalFormatDlg : public ScAnyRefDlg
47 {
48 public:
49                     ScConditionalFormatDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
50                                             ScDocument* pCurDoc,
51                                             const ScConditionalFormat* pCurrentFormat );
52                     ~ScConditionalFormatDlg();
53 
54     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc );
55     virtual void    AddRefEntry();
56     virtual sal_Bool    IsRefInputMode() const;
57     virtual void    SetActive();
58     virtual sal_Bool    Close();
59 
60 private:
61     CheckBox            aCbxCond1;
62     ListBox             aLbCond11;
63     ListBox             aLbCond12;
64     formula::RefEdit            aEdtCond11;
65     formula::RefButton          aRbCond11;
66     FixedText           aFtCond1And;
67     formula::RefEdit            aEdtCond12;
68     formula::RefButton          aRbCond12;
69     FixedText           aFtCond1Template;
70     ListBox             aLbCond1Template;
71     PushButton          aBtnNew1;
72     CheckBox            aCbxCond2;
73     ListBox             aLbCond21;
74     ListBox             aLbCond22;
75     formula::RefEdit            aEdtCond21;
76     formula::RefButton          aRbCond21;
77     FixedText           aFtCond2And;
78     formula::RefEdit            aEdtCond22;
79     formula::RefButton          aRbCond22;
80     FixedText           aFtCond2Template;
81     ListBox             aLbCond2Template;
82     PushButton          aBtnNew2;
83     CheckBox            aCbxCond3;
84     ListBox             aLbCond31;
85     ListBox             aLbCond32;
86     formula::RefEdit            aEdtCond31;
87     formula::RefButton          aRbCond31;
88     FixedText           aFtCond3And;
89     formula::RefEdit            aEdtCond32;
90     formula::RefButton          aRbCond32;
91     FixedText           aFtCond3Template;
92     ListBox             aLbCond3Template;
93     PushButton          aBtnNew3;
94 
95     OKButton            aBtnOk;
96     CancelButton        aBtnCancel;
97     HelpButton          aBtnHelp;
98 
99     Point               aCond1Pos1;
100     Point               aCond1Pos2;
101     Point               aRBtn1Pos1;
102     Point               aRBtn1Pos2;
103     Size                aCond1Size1;
104     Size                aCond1Size2;
105     Size                aCond1Size3;
106 
107     Point               aCond2Pos1;
108     Point               aCond2Pos2;
109     Point               aRBtn2Pos1;
110     Point               aRBtn2Pos2;
111     Size                aCond2Size1;
112     Size                aCond2Size2;
113     Size                aCond2Size3;
114 
115     Point               aCond3Pos1;
116     Point               aCond3Pos2;
117     Point               aRBtn3Pos1;
118     Point               aRBtn3Pos2;
119     Size                aCond3Size1;
120     Size                aCond3Size2;
121     Size                aCond3Size3;
122     FixedLine           aFlSep2;
123     FixedLine           aFlSep1;
124     formula::RefEdit*           pEdActive;
125     sal_Bool                bDlgLostFocus;
126     ScDocument*         pDoc;
127 
128 #ifdef _CONDFRMT_CXX
129     void    GetConditionalFormat( ScConditionalFormat& rCndFmt );
130 
131     DECL_LINK( ClickCond1Hdl, void * );
132     DECL_LINK( ChangeCond11Hdl, void * );
133     DECL_LINK( ChangeCond12Hdl, void * );
134 
135     DECL_LINK( ClickCond2Hdl, void * );
136     DECL_LINK( ChangeCond21Hdl, void * );
137     DECL_LINK( ChangeCond22Hdl, void * );
138 
139     DECL_LINK( ClickCond3Hdl, void * );
140     DECL_LINK( ChangeCond31Hdl, void * );
141     DECL_LINK( ChangeCond32Hdl, void * );
142 
143     DECL_LINK( GetFocusHdl, Control* );
144     DECL_LINK( LoseFocusHdl, Control* );
145     DECL_LINK( BtnHdl, PushButton* );
146     DECL_LINK( NewBtnHdl, PushButton* );
147 #endif // _CONDFRMT_CXX
148 };
149 
150 #endif // SC_CONDFRMT_HXX_
151 
152 
153