diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 09:17:38 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 12:45:09 +0200 |
commit | 6c65c62c26a8aa4d04466545f8f04ec86b797012 (patch) | |
tree | 4ce12d5ea22ba52165b3b492d30f9cfd7913205f /vcl | |
parent | f761e0aee58fe152b69daaa0e4b9697ad4f0e038 (diff) |
Don't convert OUString to char* to get OUString in the end
Which by the way fixes the mismatch between converting _sAppName to
OString as UTF-8 in SplashScreen::SetScreenBitmap, and converting
pName to OUString as ASCII in Application::LoadBrandBitmap.
Change-Id: I2082f92693ca9633b64411dd668befaa30e978d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141202
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/brand.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx index 57db30d458e4..15615c35410b 100644 --- a/vcl/source/app/brand.cxx +++ b/vcl/source/app/brand.cxx @@ -52,13 +52,13 @@ namespace { } } -bool Application::LoadBrandBitmap (const char* pName, BitmapEx &rBitmap) +bool Application::LoadBrandBitmap (std::u16string_view pName, BitmapEx &rBitmap) { // TODO - if we want more flexibility we could add a branding path // in an rc file perhaps fallback to "about.bmp" OUString aBaseDir( "$BRAND_BASE_DIR"); rtl::Bootstrap::expandMacros( aBaseDir ); - OUString aBaseName( "/" + OUString::createFromAscii( pName ) ); + OUString aBaseName(OUStringChar('/') + pName); OUString aPng( ".png" ); rtl_Locale *pLoc = nullptr; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f37a99666143..e6ef740dd6aa 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -141,7 +141,7 @@ public: , mnBounceY(1) #endif { - if (!Application::LoadBrandBitmap("intro", maIntro)) + if (!Application::LoadBrandBitmap(u"intro", maIntro)) Application::Abort("Failed to load intro image"); maIntroBW = maIntro.GetBitmap(); |