LibreOffice Module sc (master)  1
simpref.hxx
Go to the documentation of this file.
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_SIMPREF_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SIMPREF_HXX
22 
23 #include "anyrefdg.hxx"
24 
25 class ScDocument;
26 
28 {
29 private:
34 
36  bool bCloseFlag;
41 
42  std::unique_ptr<weld::Label> m_xFtAssign;
43  std::unique_ptr<formula::RefEdit> m_xEdAssign;
44  std::unique_ptr<formula::RefButton> m_xRbAssign;
45  std::unique_ptr<weld::Button> m_xBtnOk;
46  std::unique_ptr<weld::Button> m_xBtnCancel;
47 
48  void Init();
49 
50  DECL_LINK( CancelBtnHdl, weld::Button&, void );
51  DECL_LINK( OkBtnHdl, weld::Button&, void );
52 
53 protected:
54 
55  virtual void RefInputDone( bool bForced = false ) override;
56 
57 public:
59  virtual ~ScSimpleRefDlg() override;
60 
61  virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
62 
63  virtual bool IsRefInputMode() const override;
64  virtual void SetActive() override;
65  virtual void Close() override;
66 
67  void StartRefInput();
68 
69  void SetRefString(const OUString &rStr);
70  virtual void FillInfo(SfxChildWinInfo&) const override;
71 
72  void SetCloseHdl( const Link<const OUString*,void>& rLink );
73  void SetUnoLinks( const Link<const OUString&,void>& rDone, const Link<const OUString&,void>& rAbort,
74  const Link<const OUString&,void>& rChange );
75 
76  void SetFlags( bool bSetCloseOnButtonUp, bool bSetSingleCell, bool bSetMultiSelection );
77 };
78 
79 #endif // INCLUDED_SC_SOURCE_UI_INC_SIMPREF_HXX
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: simpref.hxx:43
virtual void RefInputDone(bool bForced=false) override
Definition: simpref.cxx:157
void SetRefString(const OUString &rStr)
Definition: simpref.cxx:55
ScSimpleRefDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent)
Definition: simpref.cxx:24
void SetCloseHdl(const Link< const OUString *, void > &rLink)
Definition: simpref.cxx:124
virtual ~ScSimpleRefDlg() override
Definition: simpref.cxx:44
void StartRefInput()
Definition: simpref.cxx:145
bool bAutoReOpen
Definition: simpref.hxx:37
DECL_LINK(CancelBtnHdl, weld::Button &, void)
void SetFlags(bool bSetCloseOnButtonUp, bool bSetSingleCell, bool bSetMultiSelection)
Definition: simpref.cxx:138
std::unique_ptr< weld::Label > m_xFtAssign
Definition: simpref.hxx:42
virtual void SetActive() override
Definition: simpref.cxx:108
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: simpref.hxx:46
bool bMultiSelection
Definition: simpref.hxx:40
bool bCloseFlag
Definition: simpref.hxx:36
void Init()
Definition: simpref.cxx:60
bool bSingleCell
Definition: simpref.hxx:39
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: simpref.hxx:44
virtual bool IsRefInputMode() const override
Definition: simpref.cxx:119
void SetUnoLinks(const Link< const OUString &, void > &rDone, const Link< const OUString &, void > &rAbort, const Link< const OUString &, void > &rChange)
Definition: simpref.cxx:129
Link< const OUString &, void > aDoneHdl
Definition: simpref.hxx:31
Link< const OUString &, void > aChangeHdl
Definition: simpref.hxx:33
Link< const OUString &, void > aAbortedHdl
Definition: simpref.hxx:32
std::unique_ptr< weld::Button > m_xBtnOk
Definition: simpref.hxx:45
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: simpref.cxx:69
virtual void FillInfo(SfxChildWinInfo &) const override
Definition: simpref.cxx:49
Link< const OUString *, void > aCloseHdl
Definition: simpref.hxx:30
ScRange theCurArea
Definition: simpref.hxx:35
virtual void Close() override
Definition: simpref.cxx:103
bool bCloseOnButtonUp
Definition: simpref.hxx:38