officecfg/registry/data/org/openoffice/VCL.xcu | 5 ----- officecfg/registry/schema/org/openoffice/VCL.xcs | 5 +++++ vcl/source/app/settings.cxx | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-)
New commits: commit d63a7912b682d1bfa8789cac83422c9ec025dc20 Author: Gabor Kelemen <[email protected]> AuthorDate: Sat May 10 15:43:32 2025 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Wed Jun 18 14:25:42 2025 +0200 [API CHANGE] Replace VCL Settings with more static ones (DisablePrinting) in order to simplify code. The flexibility provided by the ConfigurableSettings template is not really necessary for the simple settings VCL has Change-Id: Ia42b01b9914b20473880027eab5dc4ee59dea11d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185173 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 6db713d69ca9..f4165f268c50 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -19,11 +19,6 @@ <!DOCTYPE oor:component-data SYSTEM "../../../component-update.dtd"> <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:install="http://openoffice.org/2004/installation" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="VCL" oor:package="org.openoffice"> <node oor:name="Settings"> - <node oor:name="DesktopManagement" oor:op="replace"> - <prop oor:name="DisablePrinting" oor:type="xs:string" oor:op="replace"> - <value>false</value> - </prop> - </node> <node oor:name="Menu" oor:op="replace"> <prop oor:name="SuppressAccelerators" oor:type="xs:string" oor:op="replace"> <value>false</value> diff --git a/officecfg/registry/schema/org/openoffice/VCL.xcs b/officecfg/registry/schema/org/openoffice/VCL.xcs index ac9652bc5d5e..66d0432803cc 100644 --- a/officecfg/registry/schema/org/openoffice/VCL.xcs +++ b/officecfg/registry/schema/org/openoffice/VCL.xcs @@ -113,6 +113,11 @@ <value>3</value> </prop> </group> + <group oor:name="DesktopManagement"> + <prop oor:name="DisablePrinting" oor:type="xs:boolean" oor:nillable="false"> + <value>false</value> + </prop> + </group> </group> </component> </oor:component-schema> diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 7d8c63e07839..d5fa673d6385 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -20,6 +20,7 @@ #include <config_folders.h> #include <officecfg/Office/Common.hxx> +#include <officecfg/VCL.hxx> #ifdef _WIN32 #include <win/svsys.h> @@ -42,7 +43,6 @@ #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/i18nhelp.hxx> -#include <configsettings.hxx> #include <vcl/outdev.hxx> #include <unotools/fontcfg.hxx> @@ -2271,11 +2271,7 @@ bool MiscSettings::GetDisablePrinting() const { if( mxData->mnDisablePrinting == TRISTATE_INDET ) { - OUString aEnable = - vcl::SettingsConfigItem::get()-> - getValue( u"DesktopManagement"_ustr, - u"DisablePrinting"_ustr ); - mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE; + mxData->mnDisablePrinting = officecfg::VCL::VCLSettings::DesktopManagement::DisablePrinting::get() ? TRISTATE_TRUE : TRISTATE_FALSE; } return mxData->mnDisablePrinting != TRISTATE_FALSE;
