[Libreoffice-commits] core.git: 2 commits - sc/source sc/uiconfig
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jan 10 11:27:31 UTC 2021
sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 15 +++--
sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 15 +++--
sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx | 15 +++--
sc/source/ui/inc/SamplingDialog.hxx | 3 -
sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 3 -
sc/source/ui/inc/StatisticsTwoVariableDialog.hxx | 3 -
sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui | 28 +++++++++-
7 files changed, 66 insertions(+), 16 deletions(-)
New commits:
commit e60708def22f75d677c6531a7c59630226a04a80
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Dec 15 13:56:35 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Sun Jan 10 12:26:53 2021 +0100
online: make buttons work in statistics dialogs
Change-Id: Ie4810b87ea5ce4fc7b3e98afdd37bcd903e2907c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107755
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108978
Tested-by: Jenkins
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 1dc4a3a00fd1..8a5e66753cf6 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -46,6 +46,7 @@ ScSamplingDialog::ScSamplingDialog(SfxBindings* pSfxBindings, SfxChildWindow* pC
, mxKeepOrder(m_xBuilder->weld_check_button("keep-order"))
, mxPeriodicMethodRadio(m_xBuilder->weld_radio_button("periodic-method-radio"))
, mxButtonOk(m_xBuilder->weld_button("ok"))
+ , mxButtonCancel(m_xBuilder->weld_button("cancel"))
{
mxInputRangeEdit->SetReferences(this, mxInputRangeLabel.get());
mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
@@ -63,7 +64,8 @@ ScSamplingDialog::~ScSamplingDialog()
void ScSamplingDialog::Init()
{
- mxButtonOk->connect_clicked( LINK( this, ScSamplingDialog, OkClicked ) );
+ mxButtonCancel->connect_clicked( LINK( this, ScSamplingDialog, ButtonClicked ) );
+ mxButtonOk->connect_clicked( LINK( this, ScSamplingDialog, ButtonClicked ) );
mxButtonOk->set_sensitive(false);
Link<formula::RefEdit&,void> aEditLink = LINK( this, ScSamplingDialog, GetEditFocusHandler );
@@ -417,10 +419,15 @@ IMPL_LINK(ScSamplingDialog, GetButtonFocusHandler, formula::RefButton&, rCtrl, v
}
-IMPL_LINK_NOARG(ScSamplingDialog, OkClicked, weld::Button&, void)
+IMPL_LINK(ScSamplingDialog, ButtonClicked, weld::Button&, rButton, void)
{
- PerformSampling();
- response(RET_OK);
+ if (&rButton == mxButtonOk.get())
+ {
+ PerformSampling();
+ response(RET_OK);
+ }
+ else
+ response(RET_CANCEL);
}
IMPL_LINK_NOARG(ScSamplingDialog, LoseEditFocusHandler, formula::RefEdit&, void)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index d2d53b23244f..d275d79c6524 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -65,6 +65,7 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
, mOutputAddress(ScAddress::INITIALIZE_INVALID)
, mGroupedBy(BY_COLUMN)
, mxButtonOk(m_xBuilder->weld_button("ok"))
+ , mxButtonCancel(m_xBuilder->weld_button("cancel"))
, mpActiveEdit(nullptr)
, mCurrentAddress(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo())
, mDialogLostFocus(false)
@@ -85,7 +86,8 @@ ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
void ScStatisticsInputOutputDialog::Init()
{
- mxButtonOk->connect_clicked( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
+ mxButtonCancel->connect_clicked( LINK( this, ScStatisticsInputOutputDialog, ButtonClicked ) );
+ mxButtonOk->connect_clicked( LINK( this, ScStatisticsInputOutputDialog, ButtonClicked ) );
mxButtonOk->set_sensitive(false);
Link<formula::RefEdit&,void> aEditLink = LINK( this, ScStatisticsInputOutputDialog, GetEditFocusHandler );
@@ -167,10 +169,15 @@ void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange
ValidateDialogInput();
}
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, OkClicked, weld::Button&, void )
+IMPL_LINK( ScStatisticsInputOutputDialog, ButtonClicked, weld::Button&, rButton, void )
{
- CalculateInputAndWriteToOutput();
- response(RET_OK);
+ if (&rButton == mxButtonOk.get())
+ {
+ CalculateInputAndWriteToOutput();
+ response(RET_OK);
+ }
+ else
+ response(RET_CANCEL);
}
IMPL_LINK(ScStatisticsInputOutputDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 22f802fc7863..df93a0533b1d 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -39,6 +39,7 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
, mOutputAddress(ScAddress::INITIALIZE_INVALID)
, mGroupedBy(BY_COLUMN)
, mxButtonOk(m_xBuilder->weld_button("ok"))
+ , mxButtonCancel(m_xBuilder->weld_button("cancel"))
, mxGroupByColumnsRadio(m_xBuilder->weld_radio_button("groupedby-columns-radio"))
, mxGroupByRowsRadio(m_xBuilder->weld_radio_button("groupedby-rows-radio"))
, mpActiveEdit(nullptr)
@@ -64,7 +65,8 @@ ScStatisticsTwoVariableDialog::~ScStatisticsTwoVariableDialog()
void ScStatisticsTwoVariableDialog::Init()
{
- mxButtonOk->connect_clicked( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) );
+ mxButtonCancel->connect_clicked( LINK( this, ScStatisticsTwoVariableDialog, ButtonClicked ) );
+ mxButtonOk->connect_clicked( LINK( this, ScStatisticsTwoVariableDialog, ButtonClicked ) );
mxButtonOk->set_sensitive(false);
Link<formula::RefEdit&,void> aEditLink = LINK( this, ScStatisticsTwoVariableDialog, GetEditFocusHandler );
@@ -179,10 +181,15 @@ void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange
ValidateDialogInput();
}
-IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, OkClicked, weld::Button&, void )
+IMPL_LINK( ScStatisticsTwoVariableDialog, ButtonClicked, weld::Button&, rButton, void )
{
- CalculateInputAndWriteToOutput();
- response(RET_OK);
+ if (&rButton == mxButtonOk.get())
+ {
+ CalculateInputAndWriteToOutput();
+ response(RET_OK);
+ }
+ else
+ response(RET_CANCEL);
}
IMPL_LINK(ScStatisticsTwoVariableDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void)
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index ec2e63a67be1..a735336d7994 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -64,6 +64,7 @@ private:
std::unique_ptr<weld::RadioButton> mxPeriodicMethodRadio;
std::unique_ptr<weld::Button> mxButtonOk;
+ std::unique_ptr<weld::Button> mxButtonCancel;
void Init();
void GetRangeFromSelection();
@@ -75,7 +76,7 @@ private:
ScRange PerformRandomSamplingKeepOrder(ScDocShell* pDocShell);
ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
- DECL_LINK( OkClicked, weld::Button&, void );
+ DECL_LINK( ButtonClicked, weld::Button&, void );
DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index a1685127d550..b3a03415eadd 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -69,6 +69,7 @@ protected:
private:
// Widgets
std::unique_ptr<weld::Button> mxButtonOk;
+ std::unique_ptr<weld::Button> mxButtonCancel;
formula::RefEdit* mpActiveEdit;
ScAddress mCurrentAddress;
@@ -78,7 +79,7 @@ private:
void GetRangeFromSelection();
DECL_LINK( GroupByChanged, weld::ToggleButton&, void );
- DECL_LINK( OkClicked, weld::Button&, void );
+ DECL_LINK( ButtonClicked, weld::Button&, void );
DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index 4b34284a1621..173a0a9c14ce 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -68,6 +68,7 @@ protected:
private:
// Widgets
std::unique_ptr<weld::Button> mxButtonOk;
+ std::unique_ptr<weld::Button> mxButtonCancel;
std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio;
std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio;
@@ -80,7 +81,7 @@ private:
void GetRangeFromSelection();
DECL_LINK( GroupByChanged, weld::ToggleButton&, void );
- DECL_LINK( OkClicked, weld::Button&, void );
+ DECL_LINK( ButtonClicked, weld::Button&, void );
DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
commit 878b9827e9cc3ea5c0178dd95aed6b124b255f66
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Dec 10 10:47:35 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Sun Jan 10 12:26:41 2021 +0100
pivot table: add separator between list views
Change-Id: If4cb3735014bfde6124fb1173fb03aa950c3b77a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107519
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108968
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
index 746144aa7fd8..81c411fbe065 100644
--- a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
+++ b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
@@ -477,6 +477,32 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="boxline">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkSeparator" id="separator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
@@ -554,7 +580,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
More information about the Libreoffice-commits
mailing list