officecfg/registry/data/org/openoffice/VCL.xcu | 5 ----- officecfg/registry/schema/org/openoffice/VCL.xcs | 5 +++++ vcl/unx/generic/app/wmadaptor.cxx | 11 +++++------ 3 files changed, 10 insertions(+), 11 deletions(-)
New commits: commit 550cd135af427ba99f1680d2da0f42a2d91b9558 Author: Gabor Kelemen <[email protected]> AuthorDate: Sat May 10 16:05:37 2025 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Thu Jun 19 20:07:16 2025 +0200 [API CHANGE] Replace VCL Settings with more static ones (ShouldSwitchWorkspace) in order to simplify code. The flexibility provided by the ConfigurableSettings template is not really necessary for the simple settings VCL has Change-Id: I0711e3c0b4aecb4dadb0f284e495b489d735b609 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185175 Reviewed-by: Gabor Kelemen <[email protected]> Tested-by: Jenkins diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 8899bcc59ec9..634cc0efdb31 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -27,11 +27,6 @@ <value>Default</value> </prop> </node> - <node oor:name="WM" oor:op="replace"> - <prop oor:name="ShouldSwitchWorkspace" oor:op="replace" oor:type="xs:string"> - <value>false</value> - </prop> - </node> </node> <node oor:name="DefaultFonts"> <node oor:name="en" oor:op="replace"> diff --git a/officecfg/registry/schema/org/openoffice/VCL.xcs b/officecfg/registry/schema/org/openoffice/VCL.xcs index 81088b39ee88..aefd6c9cfc55 100644 --- a/officecfg/registry/schema/org/openoffice/VCL.xcs +++ b/officecfg/registry/schema/org/openoffice/VCL.xcs @@ -123,6 +123,11 @@ <value>false</value> </prop> </group> + <group oor:name="WM"> + <prop oor:name="ShouldSwitchWorkspace" oor:type="xs:boolean" oor:nillable="false"> + <value>false</value> + </prop> + </group> </group> </component> </oor:component-schema> diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 67dcb734ab77..dbe45b03bdde 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -30,8 +30,8 @@ #include <sal/macros.h> #include <sal/log.hxx> #include <comphelper/string.hxx> -#include <configsettings.hxx> #include <o3tl/string_view.hxx> +#include <officecfg/VCL.hxx> #include <unx/wmadaptor.hxx> #include <unx/saldisp.hxx> @@ -872,10 +872,9 @@ bool WMAdaptor::getWMshouldSwitchWorkspace() const WMAdaptor * pWMA = const_cast<WMAdaptor*>(this); pWMA->m_bWMshouldSwitchWorkspace = true; - vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get(); - OUString aSetting( pItem->getValue( u"WM"_ustr, - u"ShouldSwitchWorkspace"_ustr ) ); - if( aSetting.isEmpty() ) + bool aSetting = officecfg::VCL::VCLSettings::DesktopManagement::DisablePrinting::get(); + + if( aSetting ) { if( m_aWMName == "awesome" ) { @@ -883,7 +882,7 @@ bool WMAdaptor::getWMshouldSwitchWorkspace() const } } else - pWMA->m_bWMshouldSwitchWorkspace = aSetting.toBoolean(); + pWMA->m_bWMshouldSwitchWorkspace = aSetting; pWMA->m_bWMshouldSwitchWorkspaceInit = true; } return m_bWMshouldSwitchWorkspace;
