Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
21 : #define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
22 :
23 : #include <vcl/fixed.hxx>
24 : #include <vcl/group.hxx>
25 : #include "global.hxx"
26 : #include "address.hxx"
27 : #include "anyrefdg.hxx"
28 :
29 : enum ScTabOpErr
30 : {
31 : TABOPERR_NOFORMULA = 1,
32 : TABOPERR_NOCOLROW,
33 : TABOPERR_WRONGFORMULA,
34 : TABOPERR_WRONGROW,
35 : TABOPERR_NOCOLFORMULA,
36 : TABOPERR_WRONGCOL,
37 : TABOPERR_NOROWFORMULA
38 : };
39 :
40 : class ScTabOpDlg : public ScAnyRefDlg
41 : {
42 : public:
43 : ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
44 : ScDocument* pDocument,
45 : const ScRefAddress& rCursorPos );
46 : virtual ~ScTabOpDlg();
47 : virtual void dispose() SAL_OVERRIDE;
48 :
49 : virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
50 0 : virtual bool IsRefInputMode() const SAL_OVERRIDE { return true; }
51 : virtual void SetActive() SAL_OVERRIDE;
52 :
53 : virtual bool Close() SAL_OVERRIDE;
54 :
55 : private:
56 : VclPtr<FixedText> m_pFtFormulaRange;
57 : VclPtr<formula::RefEdit> m_pEdFormulaRange;
58 : VclPtr<formula::RefButton> m_pRBFormulaRange;
59 :
60 : VclPtr<FixedText> m_pFtRowCell;
61 : VclPtr<formula::RefEdit> m_pEdRowCell;
62 : VclPtr<formula::RefButton> m_pRBRowCell;
63 :
64 : VclPtr<FixedText> m_pFtColCell;
65 : VclPtr<formula::RefEdit> m_pEdColCell;
66 : VclPtr<formula::RefButton> m_pRBColCell;
67 :
68 : VclPtr<OKButton> m_pBtnOk;
69 : VclPtr<CancelButton> m_pBtnCancel;
70 :
71 : ScRefAddress theFormulaCell;
72 : ScRefAddress theFormulaEnd;
73 : ScRefAddress theRowCell;
74 : ScRefAddress theColCell;
75 :
76 : ScDocument* pDoc;
77 : const SCTAB nCurTab;
78 : VclPtr<formula::RefEdit> pEdActive;
79 : bool bDlgLostFocus;
80 : const OUString errMsgNoFormula;
81 : const OUString errMsgNoColRow;
82 : const OUString errMsgWrongFormula;
83 : const OUString errMsgWrongRowCol;
84 : const OUString errMsgNoColFormula;
85 : const OUString errMsgNoRowFormula;
86 :
87 : void Init();
88 : void RaiseError( ScTabOpErr eError );
89 :
90 : DECL_LINK( BtnHdl, PushButton* );
91 : DECL_LINK( GetFocusHdl, Control* );
92 : DECL_LINK( LoseFocusHdl, void* );
93 : };
94 :
95 : #endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|