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 #pragma once
21 
22 #include "anyrefdg.hxx"
23 
24 class ScDocument;
25 
27 {
28 private:
33 
35  bool bCloseFlag;
40 
41  std::unique_ptr<weld::Label> m_xFtAssign;
42  std::unique_ptr<formula::RefEdit> m_xEdAssign;
43  std::unique_ptr<formula::RefButton> m_xRbAssign;
44  std::unique_ptr<weld::Button> m_xBtnOk;
45  std::unique_ptr<weld::Button> m_xBtnCancel;
46 
47  void Init();
48 
49  DECL_LINK( CancelBtnHdl, weld::Button&, void );
50  DECL_LINK( OkBtnHdl, weld::Button&, void );
51 
52 protected:
53 
54  virtual void RefInputDone( bool bForced = false ) override;
55 
56 public:
58  virtual ~ScSimpleRefDlg() override;
59 
60  virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
61 
62  virtual bool IsRefInputMode() const override;
63  virtual void SetActive() override;
64  virtual void Close() override;
65 
66  void StartRefInput();
67 
68  void SetRefString(const OUString &rStr);
69  virtual void FillInfo(SfxChildWinInfo&) const override;
70 
71  void SetCloseHdl( const Link<const OUString*,void>& rLink );
72  void SetUnoLinks( const Link<const OUString&,void>& rDone, const Link<const OUString&,void>& rAbort,
73  const Link<const OUString&,void>& rChange );
74 
75  void SetFlags( bool bSetCloseOnButtonUp, bool bSetSingleCell, bool bSetMultiSelection );
76 };
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: simpref.hxx:42
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:36
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:41
virtual void SetActive() override
Definition: simpref.cxx:108
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: simpref.hxx:45
bool bMultiSelection
Definition: simpref.hxx:39
bool bCloseFlag
Definition: simpref.hxx:35
void Init()
Definition: simpref.cxx:60
bool bSingleCell
Definition: simpref.hxx:38
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: simpref.hxx:43
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:30
Link< const OUString &, void > aChangeHdl
Definition: simpref.hxx:32
Link< const OUString &, void > aAbortedHdl
Definition: simpref.hxx:31
std::unique_ptr< weld::Button > m_xBtnOk
Definition: simpref.hxx:44
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:29
ScRange theCurArea
Definition: simpref.hxx:34
virtual void Close() override
Definition: simpref.cxx:103
bool bCloseOnButtonUp
Definition: simpref.hxx:37