summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2024-07-12 09:03:38 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2024-07-16 09:53:46 +0200
commit5e45351c52584fb116d2cc54da969734e5effab9 (patch)
tree451f9d88a500c651c21e5942602870b9574fddf7 /svx
parent913e26de02067d49cdbe2746f9e3c3c9bed63236 (diff)
Resolves tdf#105000 - Make shipped palette names translatable
Change-Id: Ifd062cf25c6e930da56571e01c21bd9d2ddf6ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170394 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index d1dafc182bb9..15799432eedf 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -137,12 +137,31 @@ void PaletteManager::LoadPalettes()
if( aFName.endsWithIgnoreAsciiCase(".gpl") )
pPalette.reset(new PaletteGPL(aFileStat.getFileURL(), aFNameWithoutExt));
else if( aFName.endsWithIgnoreAsciiCase(".soc") )
+ {
+ if (aFNameWithoutExt == "standard")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_STANDARD);
+ else if (aFNameWithoutExt == "tonal")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_TONAL);
+ else if (aFNameWithoutExt == "html")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_HTML);
+ else if (aFNameWithoutExt == "chart-palettes")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_CHARTPALETTES);
+ else if (aFNameWithoutExt == "compatibility")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_COMPATIBILITY);
+ else if (aFNameWithoutExt == "material")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_MATERIAL);
+ else if (aFNameWithoutExt == "libreoffice")
+ aFNameWithoutExt = "LibreOffice";
+ else if (aFNameWithoutExt == "freecolour-hlc")
+ aFNameWithoutExt = SvxResId(RID_SVXSTR_COLOR_PALETTE_FREECOLOURHLC);
pPalette.reset(new PaletteSOC(aFileStat.getFileURL(), aFNameWithoutExt));
+ }
else if ( aFName.endsWithIgnoreAsciiCase(".ase") )
pPalette.reset(new PaletteASE(aFileStat.getFileURL(), aFNameWithoutExt));
if( pPalette && pPalette->IsValid() )
m_Palettes.push_back( std::move(pPalette) );
+
aNames.insert(aFNameWithoutExt);
}
}