diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2014-08-11 17:35:50 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2014-09-17 10:19:55 +0200 |
commit | 93c4e3c9349a1ea07b822a2824559ad28f4a9a5e (patch) | |
tree | b92faf4285f5bb1677fe1f89d19f691889d56cfd /include | |
parent | 43b896d20abf500a882fc67f16cd0902918e5794 (diff) |
Add recent colors
Change-Id: Id6b2239149bf7d0b3c9242efb7a72091e32c3384
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/Palette.hxx | 1 | ||||
-rw-r--r-- | include/svx/PaletteManager.hxx | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx index 11a34623ca51..6eab3f46bed2 100644 --- a/include/svx/Palette.hxx +++ b/include/svx/Palette.hxx @@ -29,7 +29,6 @@ typedef std::pair<Color, OUString> NamedColor; typedef std::vector< NamedColor > ColorList; - class Palette { public: diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index e4144f96ca9c..cb70d2c4917d 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -23,6 +23,7 @@ #include <svx/Palette.hxx> #include <rtl/ustring.hxx> #include <svx/tbxcolorupdate.hxx> +#include <deque> #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> @@ -36,27 +37,35 @@ class PaletteManager { - sal_uInt16 mnNumOfPalettes; - sal_uInt16 mnCurrentPalette; + const sal_uInt16 mnMaxRecentColors; - long mnColorCount; + sal_uInt16 mnNumOfPalettes; + sal_uInt16 mnCurrentPalette; + + long mnColorCount; svx::ToolboxButtonColorUpdater* mpBtnUpdater; - Color mLastColor; + Color mLastColor; + std::deque<Color> maRecentColors; boost::ptr_vector<Palette> maPalettes; public: PaletteManager(); ~PaletteManager(); void LoadPalettes(); void ReloadColorSet(SvxColorValueSet& rColorSet); + void ReloadRecentColorSet(SvxColorValueSet& rColorSet); std::vector<OUString> GetPaletteList(); void SetPalette( sal_Int32 nPos ); sal_Int32 GetPalette(); long GetColorCount(); + long GetRecentColorCount(); OUString GetPaletteName(); + const Color& GetLastColor(); void SetLastColor(const Color& rLastColor); + void AddRecentColor(const Color& rRecentColor); + void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater); void PopupColorPicker(const OUString aCommand); static void DispatchColorCommand(const OUString aCommand, const Color aColor); |