officecfg/registry/schema/org/openoffice/VCL.xcs | 3 +++ vcl/source/window/printdlg.cxx | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-)
New commits: commit ad195d5517554dff87b26a960e1fe959e3564a02 Author: Gabor Kelemen <[email protected]> AuthorDate: Sun May 11 11:20:21 2025 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Mon Jun 23 10:28:34 2025 +0200 [API CHANGE] Replace VCL Settings (PrintDialog/WindowState) in order to simplify code. The flexibility provided by the ConfigurableSettings template is not really necessary for the simple settings VCL has Change-Id: I263b3ddd6eb4ac826e88210c3f453dcbf60eeb99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185180 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/officecfg/registry/schema/org/openoffice/VCL.xcs b/officecfg/registry/schema/org/openoffice/VCL.xcs index cb2d76944a13..58fd515e46b6 100644 --- a/officecfg/registry/schema/org/openoffice/VCL.xcs +++ b/officecfg/registry/schema/org/openoffice/VCL.xcs @@ -133,6 +133,9 @@ <prop oor:name="LastPrinter" oor:type="xs:string" oor:nillable="false"> <value/> </prop> + <prop oor:name="WindowState" oor:type="xs:string" oor:nillable="false"> + <value/> + </prop> </group> <group oor:name="WM"> <prop oor:name="ShouldSwitchWorkspace" oor:type="xs:boolean" oor:nillable="false"> diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 78fbada59c1f..797aff61fa5d 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -756,9 +756,8 @@ void PrintDialog::storeToSettings() officecfg::VCL::VCLSettings::PrintDialog::LastPage::set( mxTabCtrl->get_tab_label_text(mxTabCtrl->get_current_page_ident()), batch); - pItem->setValue( u"PrintDialog"_ustr, - u"WindowState"_ustr, - m_xDialog->get_window_state(vcl::WindowDataMask::All) ); + officecfg::VCL::VCLSettings::PrintDialog::WindowState::set( + m_xDialog->get_window_state(vcl::WindowDataMask::All), batch ); pItem->setValue( u"PrintDialog"_ustr, u"CopyCount"_ustr, @@ -798,8 +797,7 @@ void PrintDialog::readFromSettings() } // persistent window state - aValue = pItem->getValue( u"PrintDialog"_ustr, - u"WindowState"_ustr ); + aValue = officecfg::VCL::VCLSettings::PrintDialog::WindowState::get(); if (!aValue.isEmpty()) m_xDialog->set_window_state(aValue);
