svx/source/tbxctrls/PaletteManager.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit aa522981e6a0953e157fa13ec5193147653d317b Author: Tor Lillqvist <t...@collabora.com> Date: Wed Nov 23 00:21:37 2016 +0200 Clear the color set before setting it up Change-Id: I4c4e30be172e8fcb2b6d966f06540b9b1b62b9ad diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index d08a2f3..7342b25 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -1096,6 +1096,7 @@ public: virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override { + rColorSet.Clear(); for (size_t i = 0; i < SAL_N_ELEMENTS(aLibreColors); i++) { rColorSet.InsertItem(i, aLibreColors[i].mColor, OUString::createFromAscii(aLibreColors[i].mName)); commit 75fb3f79c3ba5e94740cea947527477bba50b358 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Nov 23 00:20:37 2016 +0200 Avoid OUString construction at library load time Change-Id: Ie56cea732ade971aa276411e7552d4eefe47621a diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 27ef209..d08a2f3 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -35,7 +35,11 @@ #include "palettes.hxx" -static NamedColor aLibreColors[] = +static const struct +{ + Color mColor; + const char* mName; +} aLibreColors[] = { { Color(0x1b, 0x1b, 0x1b), "HLC 000 10 00" }, { Color(0x30, 0x30, 0x30), "HLC 000 20 00" }, @@ -1094,7 +1098,7 @@ public: { for (size_t i = 0; i < SAL_N_ELEMENTS(aLibreColors); i++) { - rColorSet.InsertItem(i, aLibreColors[i].first, aLibreColors[i].second); + rColorSet.InsertItem(i, aLibreColors[i].mColor, OUString::createFromAscii(aLibreColors[i].mName)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits