1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
23 #include <address.hxx>
24 #include "anyrefdg.hxx"
28 TABOPERR_NOFORMULA
= 1,
30 TABOPERR_WRONGFORMULA
,
32 TABOPERR_NOCOLFORMULA
,
37 class ScTabOpDlg
: public ScAnyRefDlgController
40 ScTabOpDlg(SfxBindings
* pB
, SfxChildWindow
* pCW
, weld::Window
* pParent
,
41 ScDocument
* pDocument
,
42 const ScRefAddress
& rCursorPos
);
43 virtual ~ScTabOpDlg() override
;
45 virtual void SetReference( const ScRange
& rRef
, ScDocument
& rDoc
) override
;
46 virtual bool IsRefInputMode() const override
{ return true; }
47 virtual void SetActive() override
;
49 virtual void Close() override
;
52 ScRefAddress theFormulaCell
;
53 ScRefAddress theFormulaEnd
;
54 ScRefAddress theRowCell
;
55 ScRefAddress theColCell
;
60 const OUString errMsgNoFormula
;
61 const OUString errMsgNoColRow
;
62 const OUString errMsgWrongFormula
;
63 const OUString errMsgWrongRowCol
;
64 const OUString errMsgNoColFormula
;
65 const OUString errMsgNoRowFormula
;
67 formula::RefEdit
* m_pEdActive
;
68 std::unique_ptr
<weld::Label
> m_xFtFormulaRange
;
69 std::unique_ptr
<formula::RefEdit
> m_xEdFormulaRange
;
70 std::unique_ptr
<formula::RefButton
> m_xRBFormulaRange
;
72 std::unique_ptr
<weld::Label
> m_xFtRowCell
;
73 std::unique_ptr
<formula::RefEdit
> m_xEdRowCell
;
74 std::unique_ptr
<formula::RefButton
> m_xRBRowCell
;
76 std::unique_ptr
<weld::Label
> m_xFtColCell
;
77 std::unique_ptr
<formula::RefEdit
> m_xEdColCell
;
78 std::unique_ptr
<formula::RefButton
> m_xRBColCell
;
80 std::unique_ptr
<weld::Button
> m_xBtnOk
;
81 std::unique_ptr
<weld::Button
> m_xBtnCancel
;
84 void RaiseError( ScTabOpErr eError
);
86 DECL_LINK( BtnHdl
, weld::Button
&, void );
87 DECL_LINK( GetEditFocusHdl
, formula::RefEdit
&, void );
88 DECL_LINK( LoseEditFocusHdl
, formula::RefEdit
&, void );
89 DECL_LINK( GetButtonFocusHdl
, formula::RefButton
&, void );
90 DECL_LINK( LoseButtonFocusHdl
, formula::RefButton
&, void );
94 #endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */