xref: /aoo41x/main/sc/source/ui/inc/tabopdlg.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_TABOPDLG_HXX
25cdf0e10cSrcweir #define SC_TABOPDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <vcl/fixed.hxx>
28cdf0e10cSrcweir #include <vcl/group.hxx>
29cdf0e10cSrcweir #include "global.hxx"
30cdf0e10cSrcweir #include "address.hxx"
31cdf0e10cSrcweir #include "anyrefdg.hxx"
32cdf0e10cSrcweir 
33cdf0e10cSrcweir 
34cdf0e10cSrcweir //------------------------------------------------------------------------
35cdf0e10cSrcweir 
36cdf0e10cSrcweir enum ScTabOpErr
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	TABOPERR_NOFORMULA = 1,
39cdf0e10cSrcweir 	TABOPERR_NOCOLROW,
40cdf0e10cSrcweir 	TABOPERR_WRONGFORMULA,
41cdf0e10cSrcweir 	TABOPERR_WRONGROW,
42cdf0e10cSrcweir 	TABOPERR_NOCOLFORMULA,
43cdf0e10cSrcweir 	TABOPERR_WRONGCOL,
44cdf0e10cSrcweir 	TABOPERR_NOROWFORMULA
45cdf0e10cSrcweir };
46cdf0e10cSrcweir 
47cdf0e10cSrcweir //========================================================================
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class ScTabOpDlg : public ScAnyRefDlg
50cdf0e10cSrcweir {
51cdf0e10cSrcweir public:
52cdf0e10cSrcweir 					ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
53cdf0e10cSrcweir 								ScDocument*		pDocument,
54cdf0e10cSrcweir 								const ScRefAddress&	rCursorPos );
55cdf0e10cSrcweir 					~ScTabOpDlg();
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 	virtual void	SetReference( const ScRange& rRef, ScDocument* pDoc );
IsRefInputMode() const58cdf0e10cSrcweir 	virtual sal_Bool	IsRefInputMode() const { return sal_True; }
59cdf0e10cSrcweir 	virtual void	SetActive();
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	virtual sal_Bool	Close();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir private:
64cdf0e10cSrcweir     FixedLine       aFlVariables;
65cdf0e10cSrcweir 	FixedText		aFtFormulaRange;
66cdf0e10cSrcweir 	formula::RefEdit		aEdFormulaRange;
67cdf0e10cSrcweir 	formula::RefButton		aRBFormulaRange;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	FixedText		aFtRowCell;
70cdf0e10cSrcweir 	formula::RefEdit		aEdRowCell;
71cdf0e10cSrcweir 	formula::RefButton		aRBRowCell;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 	FixedText		aFtColCell;
74cdf0e10cSrcweir 	formula::RefEdit		aEdColCell;
75cdf0e10cSrcweir 	formula::RefButton		aRBColCell;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	OKButton		aBtnOk;
78cdf0e10cSrcweir 	CancelButton	aBtnCancel;
79cdf0e10cSrcweir 	HelpButton		aBtnHelp;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	ScRefAddress	theFormulaCell;
82cdf0e10cSrcweir 	ScRefAddress	theFormulaEnd;
83cdf0e10cSrcweir 	ScRefAddress	theRowCell;
84cdf0e10cSrcweir 	ScRefAddress	theColCell;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 	ScDocument*		pDoc;
87cdf0e10cSrcweir 	const SCTAB	    nCurTab;
88cdf0e10cSrcweir 	formula::RefEdit*		pEdActive;
89cdf0e10cSrcweir 	sal_Bool			bDlgLostFocus;
90cdf0e10cSrcweir 	const String	errMsgNoFormula;
91cdf0e10cSrcweir 	const String	errMsgNoColRow;
92cdf0e10cSrcweir 	const String	errMsgWrongFormula;
93cdf0e10cSrcweir 	const String	errMsgWrongRowCol;
94cdf0e10cSrcweir 	const String	errMsgNoColFormula;
95cdf0e10cSrcweir 	const String	errMsgNoRowFormula;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir #ifdef _TABOPDLG_CXX
98cdf0e10cSrcweir 	void	Init();
99cdf0e10cSrcweir 	void	RaiseError( ScTabOpErr eError );
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	DECL_LINK( BtnHdl, PushButton* );
102cdf0e10cSrcweir     DECL_LINK( GetFocusHdl, Control* );
103cdf0e10cSrcweir     DECL_LINK( LoseFocusHdl, Control* );
104cdf0e10cSrcweir #endif	// _TABOPDLG_CXX
105cdf0e10cSrcweir };
106cdf0e10cSrcweir 
107cdf0e10cSrcweir #endif // SC_TABOPDLG_HXX
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 
111