summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/gallery.hxx13
-rw-r--r--svx/source/gallery2/gallery1.cxx25
2 files changed, 31 insertions, 7 deletions
diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx
index 27429fb47bb5..d5a534615734 100644
--- a/include/svx/gallery.hxx
+++ b/include/svx/gallery.hxx
@@ -27,12 +27,13 @@
// Defines for preinstalled themes
// Has to be in sync with svx/inc/galtheme.hrc
#define GALLERY_THEME_3D 1
-#define GALLERY_THEME_BULLETS 3
-#define GALLERY_THEME_HOMEPAGE 10
-#define GALLERY_THEME_POWERPOINT 16
-#define GALLERY_THEME_SOUNDS 18
-#define GALLERY_THEME_USERSOUNDS 21
-
+#define GALLERY_THEME_BULLETS 3
+#define GALLERY_THEME_HOMEPAGE 10
+#define GALLERY_THEME_HTMLBUTTONS 15
+#define GALLERY_THEME_POWERPOINT 16
+#define GALLERY_THEME_SOUNDS 18
+#define GALLERY_THEME_USERSOUNDS 21
+#define GALLERY_THEME_DUMMY5 36
#define GALLERY_THEME_FONTWORK 37
#define GALLERY_THEME_FONTWORK_VERTICAL 38
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;