xref: /trunk/main/sc/source/ui/inc/tabopdlg.hxx (revision 38d50f7b)
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 #ifndef SC_TABOPDLG_HXX
25 #define SC_TABOPDLG_HXX
26 
27 #include <vcl/fixed.hxx>
28 #include <vcl/group.hxx>
29 #include "global.hxx"
30 #include "address.hxx"
31 #include "anyrefdg.hxx"
32 
33 
34 //------------------------------------------------------------------------
35 
36 enum ScTabOpErr
37 {
38 	TABOPERR_NOFORMULA = 1,
39 	TABOPERR_NOCOLROW,
40 	TABOPERR_WRONGFORMULA,
41 	TABOPERR_WRONGROW,
42 	TABOPERR_NOCOLFORMULA,
43 	TABOPERR_WRONGCOL,
44 	TABOPERR_NOROWFORMULA
45 };
46 
47 //========================================================================
48 
49 class ScTabOpDlg : public ScAnyRefDlg
50 {
51 public:
52 					ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
53 								ScDocument*		pDocument,
54 								const ScRefAddress&	rCursorPos );
55 					~ScTabOpDlg();
56 
57 	virtual void	SetReference( const ScRange& rRef, ScDocument* pDoc );
IsRefInputMode() const58 	virtual sal_Bool	IsRefInputMode() const { return sal_True; }
59 	virtual void	SetActive();
60 
61 	virtual sal_Bool	Close();
62 
63 private:
64     FixedLine       aFlVariables;
65 	FixedText		aFtFormulaRange;
66 	formula::RefEdit		aEdFormulaRange;
67 	formula::RefButton		aRBFormulaRange;
68 
69 	FixedText		aFtRowCell;
70 	formula::RefEdit		aEdRowCell;
71 	formula::RefButton		aRBRowCell;
72 
73 	FixedText		aFtColCell;
74 	formula::RefEdit		aEdColCell;
75 	formula::RefButton		aRBColCell;
76 
77 	OKButton		aBtnOk;
78 	CancelButton	aBtnCancel;
79 	HelpButton		aBtnHelp;
80 
81 	ScRefAddress	theFormulaCell;
82 	ScRefAddress	theFormulaEnd;
83 	ScRefAddress	theRowCell;
84 	ScRefAddress	theColCell;
85 
86 	ScDocument*		pDoc;
87 	const SCTAB	    nCurTab;
88 	formula::RefEdit*		pEdActive;
89 	sal_Bool			bDlgLostFocus;
90 	const String	errMsgNoFormula;
91 	const String	errMsgNoColRow;
92 	const String	errMsgWrongFormula;
93 	const String	errMsgWrongRowCol;
94 	const String	errMsgNoColFormula;
95 	const String	errMsgNoRowFormula;
96 
97 #ifdef _TABOPDLG_CXX
98 	void	Init();
99 	void	RaiseError( ScTabOpErr eError );
100 
101 	DECL_LINK( BtnHdl, PushButton* );
102     DECL_LINK( GetFocusHdl, Control* );
103     DECL_LINK( LoseFocusHdl, Control* );
104 #endif	// _TABOPDLG_CXX
105 };
106 
107 #endif // SC_TABOPDLG_HXX
108 
109 
110 
111