summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/splash/splash.cxx20
-rw-r--r--include/vcl/svapp.hxx2
-rw-r--r--vcl/source/app/brand.cxx4
-rw-r--r--vcl/workben/vcldemo.cxx2
4 files changed, 9 insertions, 19 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(
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 93dd4873009b..5400157ffa57 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -926,7 +926,7 @@ public:
@returns true if the PNG could be loaded, otherwise returns false.
*/
- static bool LoadBrandBitmap (const char* pName, BitmapEx &rBitmap);
+ static bool LoadBrandBitmap (std::u16string_view pName, BitmapEx &rBitmap);
///@}
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();