LibreOffice Module sc (master)
1
sc
source
ui
inc
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
17
class
ScStatisticsInputOutputDialog
:
public
ScAnyRefDlgController
18
{
19
public
:
20
enum
GroupedBy
{
21
BY_COLUMN
,
22
BY_ROW
23
};
24
25
ScStatisticsInputOutputDialog
(
26
SfxBindings
* pB,
SfxChildWindow
* pCW,
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
36
protected
:
37
void
CalculateInputAndWriteToOutput
();
38
39
virtual
ScRange
ApplyOutput
(
ScDocShell
* pDocShell) = 0;
40
virtual
TranslateId
GetUndoNameId
() = 0;
41
virtual
bool
InputRangesValid
();
42
void
ValidateDialogInput
();
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
57
ScViewData
&
mViewData
;
58
ScDocument
&
mDocument
;
59
60
ScRange
mInputRange
;
61
ScAddress::Details
mAddressDetails
;
62
ScAddress
mOutputAddress
;
63
GroupedBy
mGroupedBy
;
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
68
private
:
69
// Widgets
70
std::unique_ptr<weld::Button>
mxButtonOk
;
71
std::unique_ptr<weld::Button>
mxButtonCancel
;
72
73
formula::RefEdit
*
mpActiveEdit
;
74
ScAddress
mCurrentAddress
;
75
bool
mDialogLostFocus
;
76
77
void
Init
();
78
void
GetRangeFromSelection
();
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: */
address.hxx
anyrefdg.hxx
ScAddress
Definition:
address.hxx:207
ScDocShell
Definition:
docsh.hxx:81
ScDocument
Definition:
document.hxx:323
ScRangeList
Definition:
rangelst.hxx:32
ScRange
Definition:
address.hxx:495
ScStatisticsInputOutputDialog
Definition:
StatisticsInputOutputDialog.hxx:18
ScStatisticsInputOutputDialog::mxOutputRangeButton
std::unique_ptr< formula::RefButton > mxOutputRangeButton
Definition:
StatisticsInputOutputDialog.hxx:51
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(ButtonClicked, weld::Button &, void)
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(GetButtonFocusHandler, formula::RefButton &, void)
ScStatisticsInputOutputDialog::SetReference
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition:
StatisticsInputOutputDialog.cxx:142
ScStatisticsInputOutputDialog::mViewData
ScViewData & mViewData
Definition:
StatisticsInputOutputDialog.hxx:57
ScStatisticsInputOutputDialog::mxInputRangeButton
std::unique_ptr< formula::RefButton > mxInputRangeButton
Definition:
StatisticsInputOutputDialog.hxx:47
ScStatisticsInputOutputDialog::mxButtonCancel
std::unique_ptr< weld::Button > mxButtonCancel
Definition:
StatisticsInputOutputDialog.hxx:71
ScStatisticsInputOutputDialog::SetActive
virtual void SetActive() override
Definition:
StatisticsInputOutputDialog.cxx:127
ScStatisticsInputOutputDialog::Init
void Init()
Definition:
StatisticsInputOutputDialog.cxx:87
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(LoseEditFocusHandler, formula::RefEdit &, void)
ScStatisticsInputOutputDialog::mDialogLostFocus
bool mDialogLostFocus
Definition:
StatisticsInputOutputDialog.hxx:75
ScStatisticsInputOutputDialog::mxInputRangeLabel
std::unique_ptr< weld::Label > mxInputRangeLabel
Definition:
StatisticsInputOutputDialog.hxx:45
ScStatisticsInputOutputDialog::mpActiveEdit
formula::RefEdit * mpActiveEdit
Definition:
StatisticsInputOutputDialog.hxx:73
ScStatisticsInputOutputDialog::MakeColumnRangeList
static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const &aStart, ScAddress const &aEnd)
Definition:
StatisticsInputOutputDialog.cxx:21
ScStatisticsInputOutputDialog::mxGroupByColumnsRadio
std::unique_ptr< weld::RadioButton > mxGroupByColumnsRadio
Definition:
StatisticsInputOutputDialog.hxx:53
ScStatisticsInputOutputDialog::GetUndoNameId
virtual TranslateId GetUndoNameId()=0
ScStatisticsInputOutputDialog::ApplyOutput
virtual ScRange ApplyOutput(ScDocShell *pDocShell)=0
ScStatisticsInputOutputDialog::mxInputRangeEdit
std::unique_ptr< formula::RefEdit > mxInputRangeEdit
Definition:
StatisticsInputOutputDialog.hxx:46
ScStatisticsInputOutputDialog::GetRangeFromSelection
void GetRangeFromSelection()
Definition:
StatisticsInputOutputDialog.cxx:120
ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog
ScStatisticsInputOutputDialog(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const OUString &rUIXMLDescription, const OUString &rID)
Definition:
StatisticsInputOutputDialog.cxx:49
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(GroupByChanged, weld::Toggleable &, void)
ScStatisticsInputOutputDialog::mGroupedBy
GroupedBy mGroupedBy
Definition:
StatisticsInputOutputDialog.hxx:63
ScStatisticsInputOutputDialog::mxButtonOk
std::unique_ptr< weld::Button > mxButtonOk
Definition:
StatisticsInputOutputDialog.hxx:70
ScStatisticsInputOutputDialog::mInputRange
ScRange mInputRange
Definition:
StatisticsInputOutputDialog.hxx:60
ScStatisticsInputOutputDialog::InputRangesValid
virtual bool InputRangesValid()
Definition:
StatisticsInputOutputDialog.cxx:294
ScStatisticsInputOutputDialog::CalculateInputAndWriteToOutput
void CalculateInputAndWriteToOutput()
Definition:
StatisticsInputOutputDialog.cxx:281
ScStatisticsInputOutputDialog::GroupedBy
GroupedBy
Definition:
StatisticsInputOutputDialog.hxx:20
ScStatisticsInputOutputDialog::BY_COLUMN
@ BY_COLUMN
Definition:
StatisticsInputOutputDialog.hxx:21
ScStatisticsInputOutputDialog::BY_ROW
@ BY_ROW
Definition:
StatisticsInputOutputDialog.hxx:22
ScStatisticsInputOutputDialog::mAddressDetails
ScAddress::Details mAddressDetails
Definition:
StatisticsInputOutputDialog.hxx:61
ScStatisticsInputOutputDialog::mOutputAddress
ScAddress mOutputAddress
Definition:
StatisticsInputOutputDialog.hxx:62
ScStatisticsInputOutputDialog::ValidateDialogInput
void ValidateDialogInput()
Definition:
StatisticsInputOutputDialog.cxx:299
ScStatisticsInputOutputDialog::mCurrentAddress
ScAddress mCurrentAddress
Definition:
StatisticsInputOutputDialog.hxx:74
ScStatisticsInputOutputDialog::mDocument
ScDocument & mDocument
Definition:
StatisticsInputOutputDialog.hxx:58
ScStatisticsInputOutputDialog::MakeRowRangeList
static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const &aStart, ScAddress const &aEnd)
Definition:
StatisticsInputOutputDialog.cxx:35
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(GetEditFocusHandler, formula::RefEdit &, void)
ScStatisticsInputOutputDialog::mxOutputRangeLabel
std::unique_ptr< weld::Label > mxOutputRangeLabel
Definition:
StatisticsInputOutputDialog.hxx:49
ScStatisticsInputOutputDialog::mxGroupByRowsRadio
std::unique_ptr< weld::RadioButton > mxGroupByRowsRadio
Definition:
StatisticsInputOutputDialog.hxx:54
ScStatisticsInputOutputDialog::mxOutputRangeEdit
std::unique_ptr< formula::RefEdit > mxOutputRangeEdit
Definition:
StatisticsInputOutputDialog.hxx:50
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(RefInputModifyHandler, formula::RefEdit &, void)
ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog
virtual ~ScStatisticsInputOutputDialog() override
Definition:
StatisticsInputOutputDialog.cxx:83
ScStatisticsInputOutputDialog::DECL_LINK
DECL_LINK(LoseButtonFocusHandler, formula::RefButton &, void)
ScViewData
Definition:
viewdata.hxx:271
SfxBindings
SfxChildWindow
formula::RefButton
formula::RefEdit
weld::Button
weld::Toggleable
weld::Window
ScAddress::Details
Definition:
address.hxx:224
ScAnyRefDlgController
Definition:
anyrefdg.hxx:158
TranslateId
SCTAB
sal_Int16 SCTAB
Definition:
types.hxx:22
viewdata.hxx
Generated on Sun Jul 30 2023 04:29:22 for LibreOffice Module sc (master) by
1.9.3