[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 <gabor.kelemen.extern@allotropia.de>
This commit is contained in:
Gabor Kelemen
2025-06-23 10:28:34 +02:00
parent e027fe4548
commit ad195d5517
2 changed files with 6 additions and 5 deletions
@@ -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">
+3 -5
View File
@@ -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);