diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-06-21 19:53:37 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-23 07:38:22 +0000 |
commit | 52613b9b632721ebb5167a4d9529c242a0b907da (patch) | |
tree | 12cda1a5fb0eb999435e4540c5da2f4b78b544d1 | |
parent | 18b70a64b4a87706161f0b950da006b63c683619 (diff) |
Resolves: fdo#80327 Sound list box when non-English UI
Fallback strings are in English wheresas ImplGetThemeEntry expects localized strings
Let's put localized strings in fallback to make ImplGetThemeEntry happy
Cherry-picked from e4ca1f900a5585d35af04159bdd854f10b495355
Change-Id: I27dd992bac4f5aaf6e0e6237fe59dac990f11c92
Reviewed-on: https://gerrit.libreoffice.org/9845
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 09b1ded2c294..d77122edea29 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -434,66 +434,48 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const // try fallback, if no entry was found if( !pFound ) { - OString aFallback; + OUString aFallback; switch( nThemeId ) { case( GALLERY_THEME_3D ): - aFallback = "3D"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_3D); break; case( GALLERY_THEME_BULLETS ): - aFallback = "Bullets"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_BULLETS); break; case( GALLERY_THEME_HOMEPAGE ): - aFallback = "Homepage"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_HOMEPAGE); break; case( GALLERY_THEME_POWERPOINT ): - aFallback = "private://gallery/hidden/imgppt"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_POWERPOINT); break; case( GALLERY_THEME_FONTWORK ): - aFallback = "private://gallery/hidden/fontwork"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_FONTWORK); break; case( GALLERY_THEME_FONTWORK_VERTICAL ): - aFallback = "private://gallery/hidden/fontworkvertical"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_FONTWORK_VERTICAL); break; case( GALLERY_THEME_SOUNDS ): - aFallback = "Sounds"; + aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_SOUNDS); break; case( RID_GALLERYSTR_THEME_ARROWS ): - aFallback = "Arrows"; - break; case( RID_GALLERYSTR_THEME_COMPUTERS ): - aFallback = "Computers"; - break; case( RID_GALLERYSTR_THEME_DIAGRAMS ): - aFallback = "Diagrams"; - break; case( RID_GALLERYSTR_THEME_EDUCATION ): - aFallback = "Education"; - break; case( RID_GALLERYSTR_THEME_ENVIRONMENT ): - aFallback = "Environment"; - break; case( RID_GALLERYSTR_THEME_FINANCE ): - aFallback = "Finance"; - break; case( RID_GALLERYSTR_THEME_PEOPLE ): - aFallback = "People"; - break; case( RID_GALLERYSTR_THEME_SYMBOLS ): - aFallback = "Symbols"; - break; case( RID_GALLERYSTR_THEME_TRANSPORT ): - aFallback = "Transport"; - break; case( RID_GALLERYSTR_THEME_TXTSHAPES ): - aFallback = "Textshapes"; + aFallback = GAL_RESSTR(static_cast<sal_uInt32>(nThemeId)); break; default: break; } - pFound = const_cast<Gallery*>(this)->ImplGetThemeEntry(OStringToOUString(aFallback, RTL_TEXTENCODING_ASCII_US)); + pFound = const_cast<Gallery*>(this)->ImplGetThemeEntry(aFallback); } return( pFound ? pFound->GetThemeName() : OUString() ); |