[API CHANGE] Replace VCL Settings (PrintDialog/LastPage)

in order to simplify code.

The flexibility provided by the ConfigurableSettings template
is not really necessary for the simple settings VCL has

Change-Id: I8babe75085d54a1657f3071d07cfd995320715b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185179
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
This commit is contained in:
Gabor Kelemen
2025-06-22 12:27:22 +02:00
parent 075c0d6e39
commit 4e83aef2f7
2 changed files with 6 additions and 5 deletions
@@ -127,6 +127,9 @@
<prop oor:name="Collate" oor:type="xs:boolean" oor:nillable="false">
<value>true</value>
</prop>
<prop oor:name="LastPage" oor:type="xs:string" oor:nillable="false">
<value/>
</prop>
<prop oor:name="LastPrinter" oor:type="xs:string" oor:nillable="false">
<value/>
</prop>
+3 -5
View File
@@ -753,9 +753,8 @@ void PrintDialog::storeToSettings()
isPrintToFile() ? Printer::GetDefaultPrinterName()
: mxPrinters->get_active_text(), batch );
pItem->setValue( u"PrintDialog"_ustr,
u"LastPage"_ustr,
mxTabCtrl->get_tab_label_text(mxTabCtrl->get_current_page_ident()));
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,
@@ -786,8 +785,7 @@ void PrintDialog::readFromSettings()
SettingsConfigItem* pItem = SettingsConfigItem::get();
// read last selected tab page; if it exists, activate it
OUString aValue = pItem->getValue( u"PrintDialog"_ustr,
u"LastPage"_ustr );
OUString aValue = officecfg::VCL::VCLSettings::PrintDialog::LastPage::get();
sal_uInt16 nCount = mxTabCtrl->get_n_pages();
for (sal_uInt16 i = 0; i < nCount; ++i)
{