[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svx/source

Julien Nabet serval2412 at yahoo.fr
Tue Jun 24 08:42:05 PDT 2014


 svx/source/gallery2/gallery1.cxx |   38 ++++++++++----------------------------
 1 file changed, 10 insertions(+), 28 deletions(-)

New commits:
commit 2a8a97dbc56b9db3ef59c324ada05981d00a14b2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jun 21 19:53:37 2014 +0200

    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
    Reviewed-on: https://gerrit.libreoffice.org/9846
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 12f2a0a..004570b 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() );


More information about the Libreoffice-commits mailing list