Kaydet (Commit) e4ca1f90 authored tarafından Julien Nabet's avatar Julien Nabet

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

Change-Id: I27dd992bac4f5aaf6e0e6237fe59dac990f11c92
üst c260abe3
...@@ -434,66 +434,48 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const ...@@ -434,66 +434,48 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const
// try fallback, if no entry was found // try fallback, if no entry was found
if( !pFound ) if( !pFound )
{ {
OString aFallback; OUString aFallback;
switch( nThemeId ) switch( nThemeId )
{ {
case( GALLERY_THEME_3D ): case( GALLERY_THEME_3D ):
aFallback = "3D"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_3D);
break; break;
case( GALLERY_THEME_BULLETS ): case( GALLERY_THEME_BULLETS ):
aFallback = "Bullets"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_BULLETS);
break; break;
case( GALLERY_THEME_HOMEPAGE ): case( GALLERY_THEME_HOMEPAGE ):
aFallback = "Homepage"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_HOMEPAGE);
break; break;
case( GALLERY_THEME_POWERPOINT ): case( GALLERY_THEME_POWERPOINT ):
aFallback = "private://gallery/hidden/imgppt"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_POWERPOINT);
break; break;
case( GALLERY_THEME_FONTWORK ): case( GALLERY_THEME_FONTWORK ):
aFallback = "private://gallery/hidden/fontwork"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_FONTWORK);
break; break;
case( GALLERY_THEME_FONTWORK_VERTICAL ): case( GALLERY_THEME_FONTWORK_VERTICAL ):
aFallback = "private://gallery/hidden/fontworkvertical"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_FONTWORK_VERTICAL);
break; break;
case( GALLERY_THEME_SOUNDS ): case( GALLERY_THEME_SOUNDS ):
aFallback = "Sounds"; aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_SOUNDS);
break; break;
case( RID_GALLERYSTR_THEME_ARROWS ): case( RID_GALLERYSTR_THEME_ARROWS ):
aFallback = "Arrows";
break;
case( RID_GALLERYSTR_THEME_COMPUTERS ): case( RID_GALLERYSTR_THEME_COMPUTERS ):
aFallback = "Computers";
break;
case( RID_GALLERYSTR_THEME_DIAGRAMS ): case( RID_GALLERYSTR_THEME_DIAGRAMS ):
aFallback = "Diagrams";
break;
case( RID_GALLERYSTR_THEME_EDUCATION ): case( RID_GALLERYSTR_THEME_EDUCATION ):
aFallback = "Education";
break;
case( RID_GALLERYSTR_THEME_ENVIRONMENT ): case( RID_GALLERYSTR_THEME_ENVIRONMENT ):
aFallback = "Environment";
break;
case( RID_GALLERYSTR_THEME_FINANCE ): case( RID_GALLERYSTR_THEME_FINANCE ):
aFallback = "Finance";
break;
case( RID_GALLERYSTR_THEME_PEOPLE ): case( RID_GALLERYSTR_THEME_PEOPLE ):
aFallback = "People";
break;
case( RID_GALLERYSTR_THEME_SYMBOLS ): case( RID_GALLERYSTR_THEME_SYMBOLS ):
aFallback = "Symbols";
break;
case( RID_GALLERYSTR_THEME_TRANSPORT ): case( RID_GALLERYSTR_THEME_TRANSPORT ):
aFallback = "Transport";
break;
case( RID_GALLERYSTR_THEME_TXTSHAPES ): case( RID_GALLERYSTR_THEME_TXTSHAPES ):
aFallback = "Textshapes"; aFallback = GAL_RESSTR(static_cast<sal_uInt32>(nThemeId));
break; break;
default: default:
break; 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() ); return( pFound ? pFound->GetThemeName() : OUString() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment