summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-10-11 09:17:38 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-10-11 12:45:09 +0200
commit6c65c62c26a8aa4d04466545f8f04ec86b797012 (patch)
tree4ce12d5ea22ba52165b3b492d30f9cfd7913205f /desktop
parentf761e0aee58fe152b69daaa0e4b9697ad4f0e038 (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 'desktop')
-rw-r--r--desktop/source/splash/splash.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index c3b106cb3b44..1f5461ecaf21 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -472,25 +472,15 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap)
}
// create file name from screen resolution information
- OStringBuffer aStrBuf( 128 );
- aStrBuf.append( "intro_" );
+ OUString aResBuf = "_" + OUString::number(nWidth) + "x" + OUString::number(nHeight);
if ( !_sAppName.isEmpty() )
- {
- aStrBuf.append( OUStringToOString(_sAppName, RTL_TEXTENCODING_UTF8) );
- aStrBuf.append( "_" );
- }
- OString aResBuf = OString::number( nWidth ) + "x" + OString::number( nHeight );
-
- aStrBuf.append( aResBuf.getStr() );
- if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear().getStr(), rBitmap))
- return;
+ if (Application::LoadBrandBitmap(OUStringConcatenation("intro_" + _sAppName + aResBuf), rBitmap))
+ return;
- aStrBuf.append( "intro_" );
- aStrBuf.append( aResBuf.getStr() );
- if (Application::LoadBrandBitmap (aStrBuf.getStr(), rBitmap))
+ if (Application::LoadBrandBitmap(OUStringConcatenation("intro" + aResBuf), rBitmap))
return;
- (void)Application::LoadBrandBitmap ("intro", rBitmap);
+ (void)Application::LoadBrandBitmap (u"intro", rBitmap);
}
void SplashScreen::determineProgressRatioValues(