tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / simpref.hxx
blob0286aa6cf06bdb501941ad9b6646fef99ade680e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include "anyrefdg.hxx"
24 class ScDocument;
26 class ScSimpleRefDlg: public ScAnyRefDlgController
28 private:
29 Link<const OUString*,void> aCloseHdl;
30 Link<const OUString&,void> aDoneHdl;
31 Link<const OUString&,void> aAbortedHdl;
32 Link<const OUString&,void> aChangeHdl;
34 ScRange theCurArea;
35 bool bCloseFlag;
36 bool bAutoReOpen;
37 bool bCloseOnButtonUp;
38 bool bSingleCell;
39 bool bMultiSelection;
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;
47 void Init();
49 DECL_LINK( CancelBtnHdl, weld::Button&, void );
50 DECL_LINK( OkBtnHdl, weld::Button&, void );
52 protected:
54 virtual void RefInputDone( bool bForced = false ) override;
56 public:
57 ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent);
58 virtual ~ScSimpleRefDlg() override;
60 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
62 virtual bool IsRefInputMode() const override;
63 virtual void SetActive() override;
64 virtual void Close() override;
66 void StartRefInput();
68 void SetRefString(const OUString &rStr);
69 virtual void FillInfo(SfxChildWinInfo&) const override;
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 );
75 void SetFlags( bool bSetCloseOnButtonUp, bool bSetSingleCell, bool bSetMultiSelection );
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */