[Libreoffice-commits] core.git: 2 commits - sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 11 07:58:23 UTC 2019
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 6
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 2
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 2
sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx | 2
sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx | 6
sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 2
sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx | 2
sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 324 ----------
sc/source/ui/inc/AnalysisOfVarianceDialog.hxx | 2
sc/source/ui/inc/ChiSquareTestDialog.hxx | 2
sc/source/ui/inc/DescriptiveStatisticsDialog.hxx | 2
sc/source/ui/inc/ExponentialSmoothingDialog.hxx | 2
sc/source/ui/inc/FourierAnalysisDialog.hxx | 2
sc/source/ui/inc/MatrixComparisonGenerator.hxx | 2
sc/source/ui/inc/MovingAverageDialog.hxx | 2
sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 73 --
16 files changed, 43 insertions(+), 390 deletions(-)
New commits:
commit 92b25179973fce7cafa3364dc19693a5a22f4952
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 10 12:41:36 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 11 09:58:14 2019 +0200
rename ScStatisticsInputOutputDialogController back...
to...
ScStatisticsInputOutputDialog
Change-Id: I641798943c0b469572ebd971eb39250c41c5db20
Reviewed-on: https://gerrit.libreoffice.org/70547
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 0dc391a17e2f..0c4aaa7b3d70 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -67,10 +67,10 @@ OUString lclCreateMultiParameterFormula(
return aResult.makeStringAndClear();
}
-void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, ScStatisticsInputOutputDialogController::GroupedBy aGroupedBy)
+void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, ScStatisticsInputOutputDialog::GroupedBy aGroupedBy)
{
std::unique_ptr<DataRangeIterator> pIterator;
- if (aGroupedBy == ScStatisticsInputOutputDialogController::BY_COLUMN)
+ if (aGroupedBy == ScStatisticsInputOutputDialog::BY_COLUMN)
pIterator.reset(new DataRangeByColumnIterator(rInputRange));
else
pIterator.reset(new DataRangeByRowIterator(rInputRange));
@@ -87,7 +87,7 @@ void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, S
ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData )
- : ScStatisticsInputOutputDialogController(
+ : ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"modules/scalc/ui/analysisofvariancedialog.ui",
"AnalysisOfVarianceDialog")
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index 96349ed6f955..0d5a4faabf98 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -17,7 +17,7 @@
ScChiSquareTestDialog::ScChiSquareTestDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData ) :
- ScStatisticsInputOutputDialogController(
+ ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"modules/scalc/ui/chisquaretestdialog.ui", "ChiSquareTestDialog")
{
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index aabb3ae06c88..99798b0c73d5 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -49,7 +49,7 @@ static const StatisticCalculation lclCalcDefinitions[] =
ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData ) :
- ScStatisticsInputOutputDialogController(
+ ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"modules/scalc/ui/descriptivestatisticsdialog.ui",
"DescriptiveStatisticsDialog")
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index 3a94e7c5de72..3057f85d587b 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -19,7 +19,7 @@
ScExponentialSmoothingDialog::ScExponentialSmoothingDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData )
- : ScStatisticsInputOutputDialogController(
+ : ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"modules/scalc/ui/exponentialsmoothingdialog.ui",
"ExponentialSmoothingDialog")
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index d41cb9b61674..b32ae3a9ce42 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -28,9 +28,9 @@
ScFourierAnalysisDialog::ScFourierAnalysisDialog(SfxBindings* pSfxBindings,
SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData)
- : ScStatisticsInputOutputDialogController(pSfxBindings, pChildWindow, pParent, pViewData,
- "modules/scalc/ui/fourieranalysisdialog.ui",
- "FourierAnalysisDialog")
+ : ScStatisticsInputOutputDialog(pSfxBindings, pChildWindow, pParent, pViewData,
+ "modules/scalc/ui/fourieranalysisdialog.ui",
+ "FourierAnalysisDialog")
, maLabelAddr(ScAddress::INITIALIZE_INVALID)
, maActualInputRange(ScAddress::INITIALIZE_INVALID)
, mnLen(0)
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 4ae4ef0e392d..6a371033b4a3 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -44,7 +44,7 @@ ScMatrixComparisonGenerator::ScMatrixComparisonGenerator(
weld::Window* pParent, ScViewData* pViewData,
const OUString& rUiXmlDescription,
const OString& rID)
- : ScStatisticsInputOutputDialogController(pSfxBindings, pChildWindow, pParent, pViewData, rUiXmlDescription, rID)
+ : ScStatisticsInputOutputDialog(pSfxBindings, pChildWindow, pParent, pViewData, rUiXmlDescription, rID)
{}
ScMatrixComparisonGenerator::~ScMatrixComparisonGenerator()
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index ef05075d2560..ad7a1d9d53b6 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -19,7 +19,7 @@
ScMovingAverageDialog::ScMovingAverageDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData )
- : ScStatisticsInputOutputDialogController(
+ : ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"modules/scalc/ui/movingaveragedialog.ui",
"MovingAverageDialog")
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 63b62a32ec8e..8ebaea6e488a 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -18,7 +18,7 @@
#include <StatisticsInputOutputDialog.hxx>
-ScRangeList ScStatisticsInputOutputDialogController::MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
+ScRangeList ScStatisticsInputOutputDialog::MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
{
ScRangeList aRangeList;
for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
@@ -32,7 +32,7 @@ ScRangeList ScStatisticsInputOutputDialogController::MakeColumnRangeList(SCTAB a
return aRangeList;
}
-ScRangeList ScStatisticsInputOutputDialogController::MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
+ScRangeList ScStatisticsInputOutputDialog::MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
{
ScRangeList aRangeList;
for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++)
@@ -46,7 +46,7 @@ ScRangeList ScStatisticsInputOutputDialogController::MakeRowRangeList(SCTAB aTab
return aRangeList;
}
-ScStatisticsInputOutputDialogController::ScStatisticsInputOutputDialogController(
+ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData* pViewData, const OUString& rUIXMLDescription, const OString& rID)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent, rUIXMLDescription, rID)
@@ -79,50 +79,50 @@ ScStatisticsInputOutputDialogController::ScStatisticsInputOutputDialogController
GetRangeFromSelection();
}
-ScStatisticsInputOutputDialogController::~ScStatisticsInputOutputDialogController()
+ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
{
}
-void ScStatisticsInputOutputDialogController::Init()
+void ScStatisticsInputOutputDialog::Init()
{
- mxButtonOk->connect_clicked( LINK( this, ScStatisticsInputOutputDialogController, OkClicked ) );
+ mxButtonOk->connect_clicked( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
mxButtonOk->set_sensitive(false);
- Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScStatisticsInputOutputDialogController, GetEditFocusHandler );
+ Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScStatisticsInputOutputDialog, GetEditFocusHandler );
mxInputRangeEdit->SetGetFocusHdl( aEditLink );
mxOutputRangeEdit->SetGetFocusHdl( aEditLink );
- Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScStatisticsInputOutputDialogController, GetButtonFocusHandler );
+ Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScStatisticsInputOutputDialog, GetButtonFocusHandler );
mxInputRangeButton->SetGetFocusHdl( aButtonLink );
mxOutputRangeButton->SetGetFocusHdl( aButtonLink );
- aEditLink = LINK( this, ScStatisticsInputOutputDialogController, LoseEditFocusHandler );
+ aEditLink = LINK( this, ScStatisticsInputOutputDialog, LoseEditFocusHandler );
mxInputRangeEdit->SetLoseFocusHdl( aEditLink );
mxOutputRangeEdit->SetLoseFocusHdl( aEditLink );
- aButtonLink = LINK( this, ScStatisticsInputOutputDialogController, LoseButtonFocusHandler );
+ aButtonLink = LINK( this, ScStatisticsInputOutputDialog, LoseButtonFocusHandler );
mxInputRangeButton->SetLoseFocusHdl( aButtonLink );
mxOutputRangeButton->SetLoseFocusHdl( aButtonLink );
- Link<formula::WeldRefEdit&,void> aLink2 = LINK( this, ScStatisticsInputOutputDialogController, RefInputModifyHandler);
+ Link<formula::WeldRefEdit&,void> aLink2 = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler);
mxInputRangeEdit->SetModifyHdl( aLink2);
mxOutputRangeEdit->SetModifyHdl( aLink2);
mxOutputRangeEdit->GrabFocus();
- mxGroupByColumnsRadio->connect_toggled( LINK( this, ScStatisticsInputOutputDialogController, GroupByChanged ) );
- mxGroupByRowsRadio->connect_toggled( LINK( this, ScStatisticsInputOutputDialogController, GroupByChanged ) );
+ mxGroupByColumnsRadio->connect_toggled( LINK( this, ScStatisticsInputOutputDialog, GroupByChanged ) );
+ mxGroupByRowsRadio->connect_toggled( LINK( this, ScStatisticsInputOutputDialog, GroupByChanged ) );
mxGroupByColumnsRadio->set_active(true);
mxGroupByRowsRadio->set_active(false);
}
-void ScStatisticsInputOutputDialogController::GetRangeFromSelection()
+void ScStatisticsInputOutputDialog::GetRangeFromSelection()
{
mViewData->GetSimpleArea(mInputRange);
OUString aCurrentString(mInputRange.Format(ScRefFlags::RANGE_ABS_3D, mDocument, mAddressDetails));
mxInputRangeEdit->SetText(aCurrentString);
}
-void ScStatisticsInputOutputDialogController::SetActive()
+void ScStatisticsInputOutputDialog::SetActive()
{
if ( mDialogLostFocus )
{
@@ -137,7 +137,7 @@ void ScStatisticsInputOutputDialogController::SetActive()
RefInputDone();
}
-void ScStatisticsInputOutputDialogController::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
+void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
{
if ( mpActiveEdit )
{
@@ -167,13 +167,13 @@ void ScStatisticsInputOutputDialogController::SetReference( const ScRange& rRefe
ValidateDialogInput();
}
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialogController, OkClicked, weld::Button&, void )
+IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, OkClicked, weld::Button&, void )
{
CalculateInputAndWriteToOutput();
response(RET_OK);
}
-IMPL_LINK(ScStatisticsInputOutputDialogController, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void)
+IMPL_LINK(ScStatisticsInputOutputDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void)
{
mpActiveEdit = nullptr;
@@ -186,7 +186,7 @@ IMPL_LINK(ScStatisticsInputOutputDialogController, GetEditFocusHandler, formula:
mpActiveEdit->SelectAll();
}
-IMPL_LINK(ScStatisticsInputOutputDialogController, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void)
+IMPL_LINK(ScStatisticsInputOutputDialog, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void)
{
mpActiveEdit = nullptr;
@@ -199,17 +199,17 @@ IMPL_LINK(ScStatisticsInputOutputDialogController, GetButtonFocusHandler, formul
mpActiveEdit->SelectAll();
}
-IMPL_LINK_NOARG(ScStatisticsInputOutputDialogController, LoseEditFocusHandler, formula::WeldRefEdit&, void)
+IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void)
{
mDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
-IMPL_LINK_NOARG(ScStatisticsInputOutputDialogController, LoseButtonFocusHandler, formula::WeldRefButton&, void)
+IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void)
{
mDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialogController, GroupByChanged, weld::ToggleButton&, void )
+IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, GroupByChanged, weld::ToggleButton&, void )
{
if (mxGroupByColumnsRadio->get_active())
mGroupedBy = BY_COLUMN;
@@ -219,7 +219,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialogController, GroupByChanged, weld::
ValidateDialogInput();
}
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialogController, RefInputModifyHandler, formula::WeldRefEdit&, void )
+IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::WeldRefEdit&, void )
{
if ( mpActiveEdit )
{
@@ -271,7 +271,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialogController, RefInputModifyHandler,
ValidateDialogInput();
}
-void ScStatisticsInputOutputDialogController::CalculateInputAndWriteToOutput()
+void ScStatisticsInputOutputDialog::CalculateInputAndWriteToOutput()
{
OUString aUndo(ScResId(GetUndoNameId()));
ScDocShell* pDocShell = mViewData->GetDocShell();
@@ -284,12 +284,12 @@ void ScStatisticsInputOutputDialogController::CalculateInputAndWriteToOutput()
pDocShell->PostPaint( aOutputRange, PaintPartFlags::Grid );
}
-bool ScStatisticsInputOutputDialogController::InputRangesValid()
+bool ScStatisticsInputOutputDialog::InputRangesValid()
{
return mInputRange.IsValid() && mOutputAddress.IsValid();
}
-void ScStatisticsInputOutputDialogController::ValidateDialogInput()
+void ScStatisticsInputOutputDialog::ValidateDialogInput()
{
// Enable OK button if all inputs are ok.
mxButtonOk->set_sensitive(InputRangesValid());
diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
index 317f7d2e11fc..a4c0bad4d162 100644
--- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
+++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
@@ -19,7 +19,7 @@
class FormulaTemplate;
class AddressWalkerWriter;
-class ScAnalysisOfVarianceDialog : public ScStatisticsInputOutputDialogController
+class ScAnalysisOfVarianceDialog : public ScStatisticsInputOutputDialog
{
private:
enum AnovaFactor
diff --git a/sc/source/ui/inc/ChiSquareTestDialog.hxx b/sc/source/ui/inc/ChiSquareTestDialog.hxx
index 78d1895b6332..28c642c159af 100644
--- a/sc/source/ui/inc/ChiSquareTestDialog.hxx
+++ b/sc/source/ui/inc/ChiSquareTestDialog.hxx
@@ -13,7 +13,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScChiSquareTestDialog : public ScStatisticsInputOutputDialogController
+class ScChiSquareTestDialog : public ScStatisticsInputOutputDialog
{
public:
ScChiSquareTestDialog(
diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
index 0ffe831163bc..afac816da3fd 100644
--- a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
+++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx
@@ -13,7 +13,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScDescriptiveStatisticsDialog : public ScStatisticsInputOutputDialogController
+class ScDescriptiveStatisticsDialog : public ScStatisticsInputOutputDialog
{
public:
ScDescriptiveStatisticsDialog(
diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
index f8fad4fa95cf..fee6bd20bfe1 100644
--- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
+++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
@@ -16,7 +16,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScExponentialSmoothingDialog : public ScStatisticsInputOutputDialogController
+class ScExponentialSmoothingDialog : public ScStatisticsInputOutputDialog
{
private:
std::unique_ptr<weld::SpinButton> mxSmoothingFactor;
diff --git a/sc/source/ui/inc/FourierAnalysisDialog.hxx b/sc/source/ui/inc/FourierAnalysisDialog.hxx
index 5b5667563c22..5cd98ae77490 100644
--- a/sc/source/ui/inc/FourierAnalysisDialog.hxx
+++ b/sc/source/ui/inc/FourierAnalysisDialog.hxx
@@ -13,7 +13,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScFourierAnalysisDialog : public ScStatisticsInputOutputDialogController
+class ScFourierAnalysisDialog : public ScStatisticsInputOutputDialog
{
ScAddress maLabelAddr;
ScRange maActualInputRange;
diff --git a/sc/source/ui/inc/MatrixComparisonGenerator.hxx b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
index 955eb776a1e8..d6af6a0f4139 100644
--- a/sc/source/ui/inc/MatrixComparisonGenerator.hxx
+++ b/sc/source/ui/inc/MatrixComparisonGenerator.hxx
@@ -16,7 +16,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScMatrixComparisonGenerator : public ScStatisticsInputOutputDialogController
+class ScMatrixComparisonGenerator : public ScStatisticsInputOutputDialog
{
public:
ScMatrixComparisonGenerator(
diff --git a/sc/source/ui/inc/MovingAverageDialog.hxx b/sc/source/ui/inc/MovingAverageDialog.hxx
index bbcf0a2dfa05..8601a6c69e37 100644
--- a/sc/source/ui/inc/MovingAverageDialog.hxx
+++ b/sc/source/ui/inc/MovingAverageDialog.hxx
@@ -16,7 +16,7 @@
#include "StatisticsInputOutputDialog.hxx"
-class ScMovingAverageDialog : public ScStatisticsInputOutputDialogController
+class ScMovingAverageDialog : public ScStatisticsInputOutputDialog
{
private:
std::unique_ptr<weld::SpinButton> mxIntervalSpin;
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 2d8cfd544b22..cd689a85db15 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -17,7 +17,7 @@
#include <vcl/fixed.hxx>
-class ScStatisticsInputOutputDialogController : public ScAnyRefDlgController
+class ScStatisticsInputOutputDialog : public ScAnyRefDlgController
{
public:
enum GroupedBy {
@@ -25,13 +25,13 @@ public:
BY_ROW
};
- ScStatisticsInputOutputDialogController(
+ ScStatisticsInputOutputDialog(
SfxBindings* pB, SfxChildWindow* pCW,
weld::Window* pParent, ScViewData* pViewData,
const OUString& rUIXMLDescription,
const OString& rID);
- virtual ~ScStatisticsInputOutputDialogController() override;
+ virtual ~ScStatisticsInputOutputDialog() override;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
virtual void SetActive() override;
commit a7bb8cefe36621462e8d66f6601638332fef5968
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 10 12:37:12 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 11 09:57:58 2019 +0200
drop unused ScStatisticsInputOutputDialog
Change-Id: Ide92f9b422db2ef2ee21f02b5c7dcef974f70685
Reviewed-on: https://gerrit.libreoffice.org/70546
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index a55e34092edc..63b62a32ec8e 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -18,284 +18,6 @@
#include <StatisticsInputOutputDialog.hxx>
-ScRangeList ScStatisticsInputOutputDialog::MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
-{
- ScRangeList aRangeList;
- for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++)
- {
- ScRange aColumnRange (
- ScAddress(inCol, aStart.Row(), aTab),
- ScAddress(inCol, aEnd.Row(), aTab) );
-
- aRangeList.push_back(aColumnRange);
- }
- return aRangeList;
-}
-
-ScRangeList ScStatisticsInputOutputDialog::MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
-{
- ScRangeList aRangeList;
- for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++)
- {
- ScRange aRowRange (
- ScAddress(aStart.Col(), inRow, aTab),
- ScAddress(aEnd.Col(), inRow, aTab) );
-
- aRangeList.push_back(aRowRange);
- }
- return aRangeList;
-}
-
-ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
- SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
- vcl::Window* pParent, ScViewData* pViewData, const OUString& rID, const OUString& rUIXMLDescription ) :
- ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent, rID, rUIXMLDescription ),
- mViewData ( pViewData ),
- mDocument ( pViewData->GetDocument() ),
- mInputRange ( ScAddress::INITIALIZE_INVALID ),
- mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
- mOutputAddress ( ScAddress::INITIALIZE_INVALID ),
- mGroupedBy ( BY_COLUMN ),
- mpActiveEdit ( nullptr ),
- mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
- mDialogLostFocus( false )
-{
- get(mpInputRangeLabel, "input-range-label");
- get(mpInputRangeEdit, "input-range-edit");
- get(mpInputRangeButton, "input-range-button");
- mpInputRangeEdit->SetReferences(this, mpInputRangeLabel);
- mpInputRangeButton->SetReferences(this, mpInputRangeEdit);
-
- get(mpOutputRangeLabel, "output-range-label");
- get(mpOutputRangeEdit, "output-range-edit");
- get(mpOutputRangeButton, "output-range-button");
- mpOutputRangeEdit->SetReferences(this, mpOutputRangeLabel);
- mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
-
- get(mpButtonOk, "ok");
-
- get(mpGroupByColumnsRadio, "groupedby-columns-radio");
- get(mpGroupByRowsRadio, "groupedby-rows-radio");
-
- Init();
- GetRangeFromSelection();
-}
-
-ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
-{
- disposeOnce();
-}
-
-void ScStatisticsInputOutputDialog::dispose()
-{
- mpInputRangeLabel.clear();
- mpInputRangeEdit.clear();
- mpInputRangeButton.clear();
- mpOutputRangeLabel.clear();
- mpOutputRangeEdit.clear();
- mpOutputRangeButton.clear();
- mpGroupByColumnsRadio.clear();
- mpGroupByRowsRadio.clear();
- mpButtonOk.clear();
- mpActiveEdit.clear();
- ScAnyRefDlg::dispose();
-}
-
-void ScStatisticsInputOutputDialog::Init()
-{
- mpButtonOk->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
- mpButtonOk->Enable(false);
-
- Link<Control&,void> aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
- mpInputRangeEdit->SetGetFocusHdl( aLink );
- mpInputRangeButton->SetGetFocusHdl( aLink );
- mpOutputRangeEdit->SetGetFocusHdl( aLink );
- mpOutputRangeButton->SetGetFocusHdl( aLink );
-
- aLink = LINK( this, ScStatisticsInputOutputDialog, LoseFocusHandler );
- mpInputRangeEdit->SetLoseFocusHdl( aLink );
- mpInputRangeButton->SetLoseFocusHdl( aLink );
- mpOutputRangeEdit->SetLoseFocusHdl( aLink );
- mpOutputRangeButton->SetLoseFocusHdl( aLink );
-
- Link<Edit&,void> aLink2 = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler);
- mpInputRangeEdit->SetModifyHdl( aLink2);
- mpOutputRangeEdit->SetModifyHdl( aLink2);
-
- mpOutputRangeEdit->GrabFocus();
-
- mpGroupByColumnsRadio->SetToggleHdl( LINK( this, ScStatisticsInputOutputDialog, GroupByChanged ) );
- mpGroupByRowsRadio->SetToggleHdl( LINK( this, ScStatisticsInputOutputDialog, GroupByChanged ) );
-
- mpGroupByColumnsRadio->Check();
- mpGroupByRowsRadio->Check(false);
-}
-
-void ScStatisticsInputOutputDialog::GetRangeFromSelection()
-{
- mViewData->GetSimpleArea(mInputRange);
- OUString aCurrentString(mInputRange.Format(ScRefFlags::RANGE_ABS_3D, mDocument, mAddressDetails));
- mpInputRangeEdit->SetText(aCurrentString);
-}
-
-void ScStatisticsInputOutputDialog::SetActive()
-{
- if ( mDialogLostFocus )
- {
- mDialogLostFocus = false;
- if( mpActiveEdit )
- mpActiveEdit->GrabFocus();
- }
- else
- {
- GrabFocus();
- }
- RefInputDone();
-}
-
-void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
-{
- if ( mpActiveEdit )
- {
- if ( rReferenceRange.aStart != rReferenceRange.aEnd )
- RefInputStart( mpActiveEdit );
-
- OUString aReferenceString;
-
- if ( mpActiveEdit == mpInputRangeEdit )
- {
- mInputRange = rReferenceRange;
- aReferenceString = mInputRange.Format(ScRefFlags::RANGE_ABS_3D, pDocument, mAddressDetails);
- mpInputRangeEdit->SetRefString( aReferenceString );
- }
- else if ( mpActiveEdit == mpOutputRangeEdit )
- {
- mOutputAddress = rReferenceRange.aStart;
-
- ScRefFlags nFormat = ( mOutputAddress.Tab() == mCurrentAddress.Tab() ) ?
- ScRefFlags::ADDR_ABS :
- ScRefFlags::ADDR_ABS_3D;
- aReferenceString = mOutputAddress.Format(nFormat, pDocument, pDocument->GetAddressConvention());
- mpOutputRangeEdit->SetRefString( aReferenceString );
- }
- }
-
- ValidateDialogInput();
-}
-
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, OkClicked, Button*, void )
-{
- CalculateInputAndWriteToOutput();
- Close();
-}
-
-IMPL_LINK( ScStatisticsInputOutputDialog, GetFocusHandler, Control&, rCtrl, void )
-{
- mpActiveEdit = nullptr;
-
- if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
- mpActiveEdit = mpInputRangeEdit;
- else if( (&rCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpOutputRangeButton)) )
- mpActiveEdit = mpOutputRangeEdit;
-
- if( mpActiveEdit )
- mpActiveEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-}
-
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, LoseFocusHandler, Control&, void )
-{
- mDialogLostFocus = !IsActive();
-}
-
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, GroupByChanged, RadioButton&, void )
-{
- if (mpGroupByColumnsRadio->IsChecked())
- mGroupedBy = BY_COLUMN;
- else if (mpGroupByRowsRadio->IsChecked())
- mGroupedBy = BY_ROW;
-
- ValidateDialogInput();
-}
-
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, Edit&, void )
-{
- if ( mpActiveEdit )
- {
- if ( mpActiveEdit == mpInputRangeEdit )
- {
- ScRangeList aRangeList;
- bool bValid = ParseWithNames( aRangeList, mpInputRangeEdit->GetText(), mDocument);
- const ScRange* pRange = (bValid && aRangeList.size() == 1) ? &aRangeList[0] : nullptr;
- if (pRange)
- {
- mInputRange = *pRange;
- // Highlight the resulting range.
- mpInputRangeEdit->StartUpdateData();
- }
- else
- {
- mInputRange = ScRange( ScAddress::INITIALIZE_INVALID);
- }
- }
- else if ( mpActiveEdit == mpOutputRangeEdit )
- {
- ScRangeList aRangeList;
- bool bValid = ParseWithNames( aRangeList, mpOutputRangeEdit->GetText(), mDocument);
- const ScRange* pRange = (bValid && aRangeList.size() == 1) ? &aRangeList[0] : nullptr;
- if (pRange)
- {
- mOutputAddress = pRange->aStart;
-
- // Crop output range to top left address for Edit field.
- if (pRange->aStart != pRange->aEnd)
- {
- ScRefFlags nFormat = ( mOutputAddress.Tab() == mCurrentAddress.Tab() ) ?
- ScRefFlags::ADDR_ABS :
- ScRefFlags::ADDR_ABS_3D;
- OUString aReferenceString = mOutputAddress.Format(nFormat, mDocument, mDocument->GetAddressConvention());
- mpOutputRangeEdit->SetRefString( aReferenceString );
- }
-
- // Highlight the resulting range.
- mpOutputRangeEdit->StartUpdateData();
- }
- else
- {
- mOutputAddress = ScAddress( ScAddress::INITIALIZE_INVALID);
- }
- }
- }
-
- ValidateDialogInput();
-}
-
-void ScStatisticsInputOutputDialog::CalculateInputAndWriteToOutput()
-{
- OUString aUndo(ScResId(GetUndoNameId()));
- ScDocShell* pDocShell = mViewData->GetDocShell();
- SfxUndoManager* pUndoManager = pDocShell->GetUndoManager();
- pUndoManager->EnterListAction( aUndo, aUndo, 0, mViewData->GetViewShell()->GetViewShellId() );
-
- ScRange aOutputRange = ApplyOutput(pDocShell);
-
- pUndoManager->LeaveListAction();
- pDocShell->PostPaint( aOutputRange, PaintPartFlags::Grid );
-}
-
-bool ScStatisticsInputOutputDialog::InputRangesValid()
-{
- return mInputRange.IsValid() && mOutputAddress.IsValid();
-}
-
-void ScStatisticsInputOutputDialog::ValidateDialogInput()
-{
- // Enable OK button if all inputs are ok.
- if (InputRangesValid())
- mpButtonOk->Enable();
- else
- mpButtonOk->Disable();
-}
-
ScRangeList ScStatisticsInputOutputDialogController::MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd)
{
ScRangeList aRangeList;
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 6a18855851a4..2d8cfd544b22 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -17,75 +17,6 @@
#include <vcl/fixed.hxx>
-class ScStatisticsInputOutputDialog : public ScAnyRefDlg
-{
-public:
- enum GroupedBy {
- BY_COLUMN,
- BY_ROW
- };
-
- ScStatisticsInputOutputDialog(
- SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData,
- const OUString& rID, const OUString& rUIXMLDescription );
-
- virtual ~ScStatisticsInputOutputDialog() override;
- virtual void dispose() override;
-
- virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
- virtual void SetActive() override;
-
-protected:
- void CalculateInputAndWriteToOutput();
-
- virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
- virtual const char* GetUndoNameId() = 0;
- virtual bool InputRangesValid();
- void ValidateDialogInput();
-
- // Widgets
- VclPtr<FixedText> mpInputRangeLabel;
- VclPtr<formula::RefEdit> mpInputRangeEdit;
- VclPtr<formula::RefButton> mpInputRangeButton;
-
- VclPtr<FixedText> mpOutputRangeLabel;
- VclPtr<formula::RefEdit> mpOutputRangeEdit;
- VclPtr<formula::RefButton> mpOutputRangeButton;
-
- VclPtr<RadioButton> mpGroupByColumnsRadio;
- VclPtr<RadioButton> mpGroupByRowsRadio;
-
- // Data
- ScViewData* const mViewData;
- ScDocument* const mDocument;
-
- ScRange mInputRange;
- ScAddress::Details const mAddressDetails;
- ScAddress mOutputAddress;
- GroupedBy mGroupedBy;
-
- static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd);
- static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd);
-
-private:
- // Widgets
- VclPtr<OKButton> mpButtonOk;
-
- VclPtr<formula::RefEdit> mpActiveEdit;
- ScAddress const mCurrentAddress;
- bool mDialogLostFocus;
-
- void Init();
- void GetRangeFromSelection();
-
- DECL_LINK( GroupByChanged, RadioButton&, void );
- DECL_LINK( OkClicked, Button*, void );
- DECL_LINK( GetFocusHandler, Control&, void );
- DECL_LINK( LoseFocusHandler, Control&, void );
- DECL_LINK( RefInputModifyHandler, Edit&, void );
-};
-
class ScStatisticsInputOutputDialogController : public ScAnyRefDlgController
{
public:
More information about the Libreoffice-commits
mailing list