Kaydet (Commit) 3b0915d0 authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#107845 string resource ids effectively ended up in the gallery format

which is a problem since...

commit 34f7e618
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 2d3a9c51
Date:   Mon Jul 2 21:02:19 2012 +0200

    hrc cleanup: Remove unused defines

    Change-Id: I3fa45e4550295b94a6ab0acf9bcd0b25db73e689

Change-Id: Idae2c00f43e2062544f3de22e586bb163864bc03
üst 81c36caa
......@@ -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
......
......@@ -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;
......
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