summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-15 13:18:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-15 13:20:34 +0100
commit3b0915d094d795486159ed6f003f5f783fc6651f (patch)
treefb07c9b78a9957001c1501c8051ce268af14c7f5 /svx
parent81c36caa943691417b12677826b9b108bad098d5 (diff)
tdf#107845 string resource ids effectively ended up in the gallery format
which is a problem since... commit 34f7e618ddd3399d9e7f3998e25545256255d02d Date: Sun Apr 30 17:01:32 2017 +0100 untranslated strings are just strings and recover GALLERY_THEME_HTMLBUTTONS and GALLERY_THEME_DUMMY5 from commit 2d3a9c51055a285a2ac8d45e3ef31d248362589b Date: Mon Jul 2 21:02:19 2012 +0200 hrc cleanup: Remove unused defines Change-Id: I3fa45e4550295b94a6ab0acf9bcd0b25db73e689 Change-Id: Idae2c00f43e2062544f3de22e586bb163864bc03
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/gallery1.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index ae03b34f6c1e..6f8992fafb46 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -101,7 +101,30 @@ GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL,
// This is awful - we shouldn't use these resources if we
// possibly can avoid them
if( aName.isEmpty() && nId && bThemeNameFromResource )
- aName = GAL_RESSTR( RID_GALLERYSTR_THEME_START + (sal_uInt16) nId );
+ {
+ //some of these are supposed to *not* be localized
+ //so catch them before looking up the resource
+ const std::pair<sal_uInt16, const char*> aUnlocalized[] =
+ {
+ { GALLERY_THEME_HOMEPAGE, RID_GALLERYSTR_THEME_HTMLBUTTONS },
+ { GALLERY_THEME_POWERPOINT, RID_GALLERYSTR_THEME_POWERPOINT },
+ { GALLERY_THEME_USERSOUNDS, RID_GALLERYSTR_THEME_USERSOUNDS },
+ { GALLERY_THEME_DUMMY5, RID_GALLERYSTR_THEME_DUMMY5 },
+ { GALLERY_THEME_FONTWORK, RID_GALLERYSTR_THEME_FONTWORK },
+ { GALLERY_THEME_FONTWORK_VERTICAL, RID_GALLERYSTR_THEME_FONTWORK_VERTICAL }
+ };
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aUnlocalized); ++i)
+ {
+ if (aUnlocalized[i].first == nId)
+ {
+ aName = OUString::createFromAscii(aUnlocalized[i].second);
+ break;
+ }
+ }
+ //look up the rest of the ids in string resources
+ if (aName.isEmpty())
+ aName = GAL_RESSTR(RID_GALLERYSTR_THEME_START + (sal_uInt16) nId);
+ }
if( aName.isEmpty() )
aName = rName;