LibreOffice Module sc (master) 1
StatisticsInputOutputDialog.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 */
10
11#pragma once
12
13#include <address.hxx>
14#include "anyrefdg.hxx"
15#include "viewdata.hxx"
16
18{
19public:
20 enum GroupedBy {
22 BY_ROW
23 };
24
27 weld::Window* pParent, ScViewData& rViewData,
28 const OUString& rUIXMLDescription,
29 const OUString& rID);
30
31 virtual ~ScStatisticsInputOutputDialog() override;
32
33 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
34 virtual void SetActive() override;
35
36protected:
38
39 virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
41 virtual bool InputRangesValid();
43
44 // Widgets
45 std::unique_ptr<weld::Label> mxInputRangeLabel;
46 std::unique_ptr<formula::RefEdit> mxInputRangeEdit;
47 std::unique_ptr<formula::RefButton> mxInputRangeButton;
48
49 std::unique_ptr<weld::Label> mxOutputRangeLabel;
50 std::unique_ptr<formula::RefEdit> mxOutputRangeEdit;
51 std::unique_ptr<formula::RefButton> mxOutputRangeButton;
52
53 std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio;
54 std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio;
55
56 // Data
59
64
65 static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd);
66 static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd);
67
68private:
69 // Widgets
70 std::unique_ptr<weld::Button> mxButtonOk;
71 std::unique_ptr<weld::Button> mxButtonCancel;
72
76
77 void Init();
79
80 DECL_LINK( GroupByChanged, weld::Toggleable&, void );
81 DECL_LINK( ButtonClicked, weld::Button&, void );
82 DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
83 DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
84 DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
85 DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void );
86 DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void );
87};
88
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< formula::RefButton > mxOutputRangeButton
DECL_LINK(ButtonClicked, weld::Button &, void)
DECL_LINK(GetButtonFocusHandler, formula::RefButton &, void)
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
std::unique_ptr< formula::RefButton > mxInputRangeButton
std::unique_ptr< weld::Button > mxButtonCancel
DECL_LINK(LoseEditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< weld::Label > mxInputRangeLabel
static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const &aStart, ScAddress const &aEnd)
std::unique_ptr< weld::RadioButton > mxGroupByColumnsRadio
virtual TranslateId GetUndoNameId()=0
virtual ScRange ApplyOutput(ScDocShell *pDocShell)=0
std::unique_ptr< formula::RefEdit > mxInputRangeEdit
ScStatisticsInputOutputDialog(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const OUString &rUIXMLDescription, const OUString &rID)
DECL_LINK(GroupByChanged, weld::Toggleable &, void)
std::unique_ptr< weld::Button > mxButtonOk
static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const &aStart, ScAddress const &aEnd)
DECL_LINK(GetEditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< weld::Label > mxOutputRangeLabel
std::unique_ptr< weld::RadioButton > mxGroupByRowsRadio
std::unique_ptr< formula::RefEdit > mxOutputRangeEdit
DECL_LINK(RefInputModifyHandler, formula::RefEdit &, void)
DECL_LINK(LoseButtonFocusHandler, formula::RefButton &, void)
sal_Int16 SCTAB
Definition: types.hxx:22