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