summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-28 11:19:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-28 21:20:30 +0200
commit6ddd8fcf5c92936de2a3f9d824b06a9f7dc5a86a (patch)
treec036278dc46c4e0af70a793616865c7528b28a56 /svx
parent9e0be8a76e13ed3d71e792c1a30e5628b7e1056e (diff)
Resolves: tdf#112680 start color picker with currently selected color
Change-Id: I939a0b88646b4654337505e985cceff883f09343 Reviewed-on: https://gerrit.libreoffice.org/42899 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index c42f8563de54..bb5fd87bdf73 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -303,13 +303,13 @@ void PaletteManager::SetColorSelectFunction(const std::function<void(const OUStr
maColorSelectFunction = aColorSelectFunction;
}
-void PaletteManager::PopupColorPicker(const OUString& aCommand)
+void PaletteManager::PopupColorPicker(const OUString& aCommand, const Color& rInitialColor)
{
// The calling object goes away during aColorDlg.Execute(), so we must copy this
OUString aCommandCopy = aCommand;
SvColorDialog aColorDlg( nullptr );
- aColorDlg.SetColor ( mLastColor );
- aColorDlg.SetMode( svtools::ColorPickerMode_MODIFY );
+ aColorDlg.SetColor(rInitialColor);
+ aColorDlg.SetMode(svtools::ColorPickerMode_MODIFY);
if( aColorDlg.Execute() == RET_OK )
{
if (mpBtnUpdater)
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 605568a88a28..08333b13c2cf 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1502,7 +1502,7 @@ IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void)
if ( IsInPopupMode() )
EndPopupMode();
- mrPaletteManager.PopupColorPicker(maCommand);
+ mrPaletteManager.PopupColorPicker(maCommand, GetSelectEntryColor().first);
}
void SvxColorWindow::StartSelection()