summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-13 08:44:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-15 21:15:49 +0200
commitb4844c310bd9897fef59e8a4da0513100ea86096 (patch)
tree379a43d012894ff06d29d79c7d4d8009b7853501 /vcl
parent8797ba5e5d63151837ba443e1aea9d0997b6b7ab (diff)
Repurpose loplugin:stringstatic for O[U]String vars that can be constexpr
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/helper/svtaccessiblefactory.cxx6
-rw-r--r--vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx3
3 files changed, 4 insertions, 7 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 19b8cd52b7e7..269077ddb0ff 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1609,7 +1609,7 @@ const OUString& Application::GetDesktopEnvironment()
{
if (IsHeadlessModeEnabled())
{
- static const OUString aNone("none");
+ static constexpr OUString aNone(u"none"_ustr);
return aNone;
}
else
diff --git a/vcl/source/helper/svtaccessiblefactory.cxx b/vcl/source/helper/svtaccessiblefactory.cxx
index 278c9552b61d..fa9e151fcc23 100644
--- a/vcl/source/helper/svtaccessiblefactory.cxx
+++ b/vcl/source/helper/svtaccessiblefactory.cxx
@@ -243,13 +243,11 @@ namespace vcl
if (!s_pFactory)
{
#ifndef DISABLE_DYNLOADING
- const OUString sModuleName( SVLIBRARY( "acc" ));
- s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
+ s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, u"" SVLIBRARY( "acc" ) ""_ustr.pData, 0 );
if ( s_hAccessibleImplementationModule != nullptr )
{
- const OUString sFactoryCreationFunc( "getSvtAccessibilityComponentFactory" );
s_pAccessibleFactoryFunc = reinterpret_cast<GetSvtAccessibilityComponentFactory>(
- osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData ));
+ osl_getFunctionSymbol( s_hAccessibleImplementationModule, u"getSvtAccessibilityComponentFactory"_ustr.pData ));
}
OSL_ENSURE( s_pAccessibleFactoryFunc, "ac_registerClient: could not load the library, or not retrieve the needed symbol!" );
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index f9b0da12ce9c..ebfa0fbd7e16 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -63,9 +63,8 @@ OUString applicationDirPath()
OUString findPickerExecutable()
{
const auto path = applicationDirPath();
- const OUString app("lo_kde5filepicker");
OUString ret;
- osl_searchFileURL(app.pData, path.pData, &ret.pData);
+ osl_searchFileURL(u"lo_kde5filepicker"_ustr.pData, path.pData, &ret.pData);
if (ret.isEmpty())
throw std::system_error(std::make_error_code(std::errc::no_such_file_or_directory),
"could not find lo_kde5filepicker executable");