summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-31 09:25:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-31 09:35:34 +0100
commit6f11653287ad41df935bf25ffd6ffe8e7acb3bb1 (patch)
tree5b5beb327402a60079bf44fcc93f2f6337d63223 /include/svx
parent2e31a37b87397e6d77cbffc127a0998f54e7f35c (diff)
Resolves: tdf#98097 no tooltip for colors in "Recent" colors area
cause the tip is the color name and that's not stored, so store the name when we have one, generate a #rrggbb if there isn't one and on loading the names, "repair" the names if the names didnt't exist because this option didn't exist when the colors were last saved Change-Id: I33d373081e8a5a46ac585bc55fe449dba0519f99
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/PaletteManager.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index ceeea5d5a5e8..c527b85f0f88 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -48,7 +48,8 @@ class SVX_DLLPUBLIC PaletteManager
XColorListRef pColorList;
Color mLastColor;
- std::deque<Color> maRecentColors;
+ typedef std::pair<Color, OUString> color_and_name;
+ std::deque<color_and_name> maRecentColors;
std::vector<std::unique_ptr<Palette>> m_Palettes;
std::function<void(const OUString&, const Color&)> maColorSelectFunction;
@@ -73,7 +74,7 @@ public:
const Color& GetLastColor();
void SetLastColor(const Color& rLastColor);
- void AddRecentColor(const Color& rRecentColor);
+ void AddRecentColor(const Color& rRecentColor, const OUString& rColorName);
void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater);
void PopupColorPicker(const OUString& aCommand);