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