officecfg/registry/schema/org/openoffice/VCL.xcs |    3 +++
 vcl/source/window/printdlg.cxx                   |   10 +++-------
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit ae18d722616c6e3dc46b8c68002bf0c0df8f2913
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Sun May 11 12:49:18 2025 +0200
Commit:     Gabor Kelemen <[email protected]>
CommitDate: Wed Jun 25 18:43:31 2025 +0200

    [API CHANGE] Replace VCL Settings (PrintDialog/CollateSingleJobs)
    
    in order to simplify code.
    
    The flexibility provided by the ConfigurableSettings template
    is not really necessary for the simple settings VCL has
    
    Change-Id: I7a2c5275eb1df0bc08c48388089d8779a49c5b95
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185182
    Reviewed-by: Gabor Kelemen <[email protected]>
    Tested-by: Jenkins

diff --git a/officecfg/registry/schema/org/openoffice/VCL.xcs 
b/officecfg/registry/schema/org/openoffice/VCL.xcs
index 58fd515e46b6..fb99b140f347 100644
--- a/officecfg/registry/schema/org/openoffice/VCL.xcs
+++ b/officecfg/registry/schema/org/openoffice/VCL.xcs
@@ -127,6 +127,9 @@
                 <prop oor:name="Collate" oor:type="xs:boolean" 
oor:nillable="false">
                     <value>true</value>
                 </prop>
+                <prop oor:name="CollateSingleJobs" oor:type="xs:boolean" 
oor:nillable="false">
+                    <value>false</value>
+                </prop>
                 <prop oor:name="LastPage" oor:type="xs:string" 
oor:nillable="false">
                     <value/>
                 </prop>
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index b95e5715e8d2..893c67a7d1a2 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -761,10 +761,8 @@ void PrintDialog::storeToSettings()
 
     officecfg::VCL::VCLSettings::PrintDialog::Collate::set( 
mxCollateBox->get_active(), batch );
 
-    pItem->setValue( u"PrintDialog"_ustr,
-                     u"CollateSingleJobs"_ustr,
-                     mxSingleJobsBox->get_active() ? u"true"_ustr :
-                                                     u"false"_ustr );
+    officecfg::VCL::VCLSettings::PrintDialog::CollateSingleJobs::set(
+                     mxSingleJobsBox->get_active(), batch );
 
     pItem->setValue( u"PrintDialog"_ustr,
                      u"HasPreview"_ustr,
@@ -811,9 +809,7 @@ void PrintDialog::readFromSettings()
     }
 
     // collate single jobs
-    aValue = pItem->getValue( u"PrintDialog"_ustr,
-                              u"CollateSingleJobs"_ustr );
-    mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true"));
+    mxSingleJobsBox->set_active( 
officecfg::VCL::VCLSettings::PrintDialog::CollateSingleJobs::get() );
 
     // preview box
     aValue = pItem->getValue( u"PrintDialog"_ustr,

Reply via email to