sc/source/ui/dbgui/PivotLayoutDialog.cxx | 12 ++++++++++++ sc/source/ui/inc/PivotLayoutDialog.hxx | 1 + sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit 33bfce3603b608e1765a322d1958c7de2da6a660 Author: shark <[email protected]> AuthorDate: Mon Feb 9 14:43:42 2026 +0000 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Sat Feb 14 06:13:10 2026 +0100 tdf#165270 disable expand/collapse option when drill option is disabled in sc Change-Id: Ie19d6ef35bdfb24d014d7a42f9a9bb033b7b7906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199003 Tested-by: Heiko Tietze <[email protected]> Reviewed-by: Heiko Tietze <[email protected]> Tested-by: Jenkins (cherry picked from commit b32e27ceb40b1006347e83c167c9f30e86f1bcca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199349 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 9f76f67d528c..b2d682b082da 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -116,6 +116,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( mxSourceRadioNamedRange->connect_toggled(aLink2); mxSourceRadioSelection->connect_toggled(aLink2); + mxCheckDrillToDetail->connect_toggled(LINK(this, ScPivotLayoutDialog, UpdateCheckExpandCollapse)); + mxSourceEdit->SetReferences(this, mxSourceFrame.get()); mxSourceButton->SetReferences(this, mxSourceEdit.get()); @@ -183,6 +185,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( mxCheckTotalColumns->set_active(maPivotParameters.bMakeTotalCol); mxCheckTotalRows->set_active(maPivotParameters.bMakeTotalRow); + UpdateCheckExpandCollapse(*mxCheckDrillToDetail); + SetupSource(); SetupDestination(); } @@ -719,4 +723,12 @@ void ScPivotLayoutDialog::ToggleDestination() mxDestinationEdit->GetWidget()->set_sensitive(bSelection); } +IMPL_LINK_NOARG(ScPivotLayoutDialog, UpdateCheckExpandCollapse, weld::Toggleable&, void) +{ + bool bChecked = mxCheckDrillToDetail->get_active(); + if (!bChecked) + mxCheckExpandCollapse->set_active(false); + mxCheckExpandCollapse->set_sensitive(bChecked); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 38542d30ee35..e8c70fc80a47 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -96,6 +96,7 @@ private: DECL_LINK(ToggleDestination, weld::Toggleable&, void); DECL_LINK(SourceListSelected, weld::ComboBox&, void); DECL_LINK(SourceEditModified, formula::RefEdit&, void); + DECL_LINK(UpdateCheckExpandCollapse, weld::Toggleable&, void); void ToggleSource(); void ToggleDestination(); virtual void Close() override; diff --git a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui index b959f42471a9..cec91b816e99 100644 --- a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui +++ b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui @@ -741,6 +741,7 @@ <property name="receives-default">False</property> <property name="use-underline">True</property> <property name="draw-indicator">True</property> + <property name="margin-start">20</property> <child internal-child="accessible"> <object class="AtkObject" id="check-show-expand-collapse-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="pivottablelayoutdialog|extended_tip|check-show-expand-collapse">Select this check box to show expand/collapse buttons for field members</property> @@ -748,7 +749,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">3</property> </packing> </child>
