summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/PaletteManager.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-08-19 23:43:39 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-08-20 00:14:51 +0200
commitcf7db8226240ca7f425cf649e164767988c80001 (patch)
tree69b6b2c983ea7f417d58c862636c9d510ff8d9b1 /svx/source/tbxctrls/PaletteManager.cxx
parent6038ba92be0a4c821ffa29ed0512905e4b3cd8f8 (diff)
handle new color picker correctly in chart sidebar
This implements the basics for that and implements it in the AreaPanel. Change-Id: I6d9e5012bbcc2c953d478a09a839f35f2ef64c5b
Diffstat (limited to 'svx/source/tbxctrls/PaletteManager.cxx')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index 658348fcf3eb..8f0ff658bf30 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -36,7 +36,8 @@ PaletteManager::PaletteManager() :
mnCurrentPalette(0),
mnColorCount(0),
mpBtnUpdater(NULL),
- mLastColor(COL_AUTO)
+ mLastColor(COL_AUTO),
+ maColorSelectFunction(PaletteManager::DispatchColorCommand)
{
LoadPalettes();
mnNumOfPalettes += m_Palettes.size();
@@ -217,6 +218,11 @@ void PaletteManager::SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater)
mpBtnUpdater = pBtnUpdater;
}
+void PaletteManager::SetColorSelectFunction(std::function<void(const OUString&, const Color&)> aColorSelectFunction)
+{
+ maColorSelectFunction = aColorSelectFunction;
+}
+
void PaletteManager::PopupColorPicker(const OUString& aCommand)
{
// The calling object goes away during aColorDlg.Execute(), so we must copy this
@@ -230,7 +236,7 @@ void PaletteManager::PopupColorPicker(const OUString& aCommand)
mpBtnUpdater->Update( aColorDlg.GetColor() );
mLastColor = aColorDlg.GetColor();
AddRecentColor( mLastColor );
- DispatchColorCommand(aCommandCopy, mLastColor);
+ maColorSelectFunction(aCommandCopy, mLastColor);
}
}