svx/source/tbxctrls/tbcontrl.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 8a258e8f9bbf766e0527bc19ff351c1d89bcfa67
Author: Caolán McNamara <[email protected]>
Date:   Tue Jul 25 12:23:05 2017 +0100

    Resolves: rhbz#1372630 update recently used color with direct button click
    
    Change-Id: I7373916e7cfd3365afc6c9a1dc728cfeee95be81

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()
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to