Update ooo320-m1
[ooovba.git] / sc / source / ui / inc / tabopdlg.hxx
blobd23c8cce67e3159eda5b765bd94d8247b552108d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tabopdlg.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_TABOPDLG_HXX
32 #define SC_TABOPDLG_HXX
34 #include <vcl/fixed.hxx>
35 #include <vcl/group.hxx>
36 #include "global.hxx"
37 #include "address.hxx"
38 #include "anyrefdg.hxx"
41 //------------------------------------------------------------------------
43 enum ScTabOpErr
45 TABOPERR_NOFORMULA = 1,
46 TABOPERR_NOCOLROW,
47 TABOPERR_WRONGFORMULA,
48 TABOPERR_WRONGROW,
49 TABOPERR_NOCOLFORMULA,
50 TABOPERR_WRONGCOL,
51 TABOPERR_NOROWFORMULA
54 //========================================================================
56 class ScTabOpDlg : public ScAnyRefDlg
58 public:
59 ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
60 ScDocument* pDocument,
61 const ScRefAddress& rCursorPos );
62 ~ScTabOpDlg();
64 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
65 virtual BOOL IsRefInputMode() const { return TRUE; }
66 virtual void SetActive();
68 virtual BOOL Close();
70 private:
71 FixedLine aFlVariables;
72 FixedText aFtFormulaRange;
73 formula::RefEdit aEdFormulaRange;
74 formula::RefButton aRBFormulaRange;
76 FixedText aFtRowCell;
77 formula::RefEdit aEdRowCell;
78 formula::RefButton aRBRowCell;
80 FixedText aFtColCell;
81 formula::RefEdit aEdColCell;
82 formula::RefButton aRBColCell;
84 OKButton aBtnOk;
85 CancelButton aBtnCancel;
86 HelpButton aBtnHelp;
88 ScRefAddress theFormulaCell;
89 ScRefAddress theFormulaEnd;
90 ScRefAddress theRowCell;
91 ScRefAddress theColCell;
93 ScDocument* pDoc;
94 const SCTAB nCurTab;
95 formula::RefEdit* pEdActive;
96 BOOL bDlgLostFocus;
97 const String errMsgNoFormula;
98 const String errMsgNoColRow;
99 const String errMsgWrongFormula;
100 const String errMsgWrongRowCol;
101 const String errMsgNoColFormula;
102 const String errMsgNoRowFormula;
104 #ifdef _TABOPDLG_CXX
105 void Init();
106 void RaiseError( ScTabOpErr eError );
108 DECL_LINK( BtnHdl, PushButton* );
109 DECL_LINK( GetFocusHdl, Control* );
110 DECL_LINK( LoseFocusHdl, Control* );
111 #endif // _TABOPDLG_CXX
114 #endif // SC_TABOPDLG_HXX