Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_TABOPDLG_HXX
30 : : #define SC_TABOPDLG_HXX
31 : :
32 : : #include <vcl/fixed.hxx>
33 : : #include <vcl/group.hxx>
34 : : #include "global.hxx"
35 : : #include "address.hxx"
36 : : #include "anyrefdg.hxx"
37 : :
38 : :
39 : : //------------------------------------------------------------------------
40 : :
41 : : enum ScTabOpErr
42 : : {
43 : : TABOPERR_NOFORMULA = 1,
44 : : TABOPERR_NOCOLROW,
45 : : TABOPERR_WRONGFORMULA,
46 : : TABOPERR_WRONGROW,
47 : : TABOPERR_NOCOLFORMULA,
48 : : TABOPERR_WRONGCOL,
49 : : TABOPERR_NOROWFORMULA
50 : : };
51 : :
52 : : //========================================================================
53 : :
54 : : class ScTabOpDlg : public ScAnyRefDlg
55 : : {
56 : : public:
57 : : ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
58 : : ScDocument* pDocument,
59 : : const ScRefAddress& rCursorPos );
60 : : ~ScTabOpDlg();
61 : :
62 : : virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
63 : 0 : virtual sal_Bool IsRefInputMode() const { return sal_True; }
64 : : virtual void SetActive();
65 : :
66 : : virtual sal_Bool Close();
67 : :
68 : : private:
69 : : FixedLine aFlVariables;
70 : : FixedText aFtFormulaRange;
71 : : formula::RefEdit aEdFormulaRange;
72 : : formula::RefButton aRBFormulaRange;
73 : :
74 : : FixedText aFtRowCell;
75 : : formula::RefEdit aEdRowCell;
76 : : formula::RefButton aRBRowCell;
77 : :
78 : : FixedText aFtColCell;
79 : : formula::RefEdit aEdColCell;
80 : : formula::RefButton aRBColCell;
81 : :
82 : : OKButton aBtnOk;
83 : : CancelButton aBtnCancel;
84 : : HelpButton aBtnHelp;
85 : :
86 : : ScRefAddress theFormulaCell;
87 : : ScRefAddress theFormulaEnd;
88 : : ScRefAddress theRowCell;
89 : : ScRefAddress theColCell;
90 : :
91 : : ScDocument* pDoc;
92 : : const SCTAB nCurTab;
93 : : formula::RefEdit* pEdActive;
94 : : sal_Bool bDlgLostFocus;
95 : : const String errMsgNoFormula;
96 : : const String errMsgNoColRow;
97 : : const String errMsgWrongFormula;
98 : : const String errMsgWrongRowCol;
99 : : const String errMsgNoColFormula;
100 : : const String errMsgNoRowFormula;
101 : :
102 : : #ifdef _TABOPDLG_CXX
103 : : void Init();
104 : : void RaiseError( ScTabOpErr eError );
105 : :
106 : : DECL_LINK( BtnHdl, PushButton* );
107 : : DECL_LINK( GetFocusHdl, Control* );
108 : : DECL_LINK( LoseFocusHdl, void* );
109 : : #endif // _TABOPDLG_CXX
110 : : };
111 : :
112 : : #endif // SC_TABOPDLG_HXX
113 : :
114 : :
115 : :
116 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|