diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-25 12:23:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-25 13:07:49 +0100 |
commit | 8a258e8f9bbf766e0527bc19ff351c1d89bcfa67 (patch) | |
tree | 7a8c27fb68a529f99f361a91b4edaf288d2227d7 /svx | |
parent | cc903aee9769df035ec42e66341b6f69a4771562 (diff) |
Resolves: rhbz#1372630 update recently used color with direct button click
Change-Id: I7373916e7cfd3365afc6c9a1dc728cfeee95be81
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 1da2f75527f2..f154bf291566 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2906,11 +2906,15 @@ void SvxColorToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/) } EnsurePaletteManager(); + Color aColor = m_xPaletteManager->GetLastColor(); auto aArgs( comphelper::InitPropertySequence( { { m_aCommandURL.copy(5), css::uno::makeAny( m_xPaletteManager->GetLastColor().GetColor() ) } } ) ); Dispatch( aCommand, aArgs ); + + OUString sColorName = ("#" + aColor.AsRGBHexString().toAsciiUpperCase()); + m_xPaletteManager->AddRecentColor(aColor, sColorName); } sal_Bool SvxColorToolBoxControl::opensSubToolbar() |