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/.
12 #include <address.hxx>
13 #include "anyrefdg.hxx"
14 #include "viewdata.hxx"
16 #include <SparklineGroup.hxx>
17 #include <SparklineAttributes.hxx>
23 /** Dialog to change input data range for a sparkline */
24 class SparklineDataRangeDialog
: public ScAnyRefDlgController
27 ScViewData
& mrViewData
;
28 ScDocument
& mrDocument
;
30 std::shared_ptr
<sc::Sparkline
> mpSparkline
;
34 formula::RefEdit
* mpActiveEdit
;
35 bool mbDialogLostFocus
;
37 std::unique_ptr
<weld::Button
> mxButtonOk
;
38 std::unique_ptr
<weld::Button
> mxButtonCancel
;
40 std::unique_ptr
<weld::Label
> mxDataRangeLabel
;
41 std::unique_ptr
<formula::RefEdit
> mxDataRangeEdit
;
42 std::unique_ptr
<formula::RefButton
> mxDataRangeButton
;
44 DECL_LINK(ButtonClicked
, weld::Button
&, void);
45 DECL_LINK(EditFocusHandler
, formula::RefEdit
&, void);
46 DECL_LINK(ButtonFocusHandler
, formula::RefButton
&, void);
47 DECL_LINK(LoseEditFocusHandler
, formula::RefEdit
&, void);
48 DECL_LINK(LoseButtonFocusHandler
, formula::RefButton
&, void);
49 DECL_LINK(RefInputModifyHandler
, formula::RefEdit
&, void);
54 bool checkValidInputOutput();
57 SparklineDataRangeDialog(SfxBindings
* pBindings
, SfxChildWindow
* pChildWindow
,
58 weld::Window
* pWindow
, ScViewData
& rViewData
);
59 virtual ~SparklineDataRangeDialog() override
;
61 void SetReference(const ScRange
& rRef
, ScDocument
& rDocument
) override
;
62 void SetActive() override
;
63 void Close() override
;
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */