vcl/inc/printdlg.hxx | 2 -- vcl/source/window/printdlg.cxx | 16 +++------------- 2 files changed, 3 insertions(+), 15 deletions(-)
New commits: commit ed7536ce1aaa815528c0d72b2574df9e99b28e65 Author: Gabor Kelemen <gabor.kele...@collabora.com> AuthorDate: Wed Jul 2 10:35:15 2025 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Jul 18 16:56:13 2025 +0200 Simplify lockdown logic for Collate box in Print dialog Default logic was accidentally inverted in commit 1988a527d469ee59e6588128705dd4726514b7ed correct that here too: the old key was not set by default to "alwaysoff" value so the correct default value to assume here is "false" Change-Id: I6da52586be8ee3d2ba8e3132e4b9e50ae8d4ff83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188021 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 26534a612936..ca46b5978a5e 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -178,8 +178,6 @@ namespace vcl sal_Int32 mnCurPage; sal_Int32 mnCachedPages; - bool mbCollateAlwaysOff; - std::vector<std::unique_ptr<weld::Widget>> maExtraControls; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 6ac701a4b0cd..25267def4fdb 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -581,7 +581,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl , maNoPreviewStr( VclResId( SV_PRINT_NOPREVIEW ) ) , mnCurPage( 0 ) , mnCachedPages( 0 ) - , mbCollateAlwaysOff(false) , mbShowLayoutFrame( true ) , maUpdatePreviewIdle("Print Dialog Update Preview Idle") , maUpdatePreviewNoCacheIdle("Print Dialog Update Preview (no cache) Idle") @@ -788,17 +787,8 @@ void PrintDialog::readFromSettings() m_xDialog->set_window_state(aValue); // collate - if( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ) - { - mbCollateAlwaysOff = true; - mxCollateBox->set_active( false ); - mxCollateBox->set_sensitive( false ); - } - else - { - mbCollateAlwaysOff = false; - mxCollateBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::Collate::get() ); - } + mxCollateBox->set_sensitive( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ); + mxCollateBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::Collate::get() ); // collate single jobs mxSingleJobsBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::CollateSingleJobs::get() ); @@ -1074,7 +1064,7 @@ void PrintDialog::checkControlDependencies() { if (mxCopyCountField->get_value() > 1) { - mxCollateBox->set_sensitive( !mbCollateAlwaysOff ); + mxCollateBox->set_sensitive( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ); mxSingleJobsBox->set_sensitive( mxCollateBox->get_active() ); } else