[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

Tomofumi Yagi yagit at mknada.sakura.ne.jp
Fri Apr 25 07:05:24 PDT 2014


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

New commits:
commit eb492e0bcf5c05d3ee5b95f4cc7e598845b26db2
Author: Tomofumi Yagi <yagit at mknada.sakura.ne.jp>
Date:   Sat Apr 19 16:52:44 2014 +0900

    fdo#73891 Fix "UI color panel does not show the actual color in Writer"
    
    1.The Font/Background/Highlight Color panels identify the actual color
     by a small frame.
     (Regression from the commit 35aa48d80b4b800d408d26bd72fbdfd711abbb6f
      See also fdo#32376 - Set default color to the current one in toolbar
      popups)
    
    2.Fix this in the Floating Font/Background/Highlight Color Toolbar,too.
    
    Change-Id: I5c2db8ab8923ab146cbf921dcb90894765f8420c
    Reviewed-on: https://gerrit.libreoffice.org/9103
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>
    (cherry picked from commit 5c31515d2e54a42ceac1b21409cb730cdbb825ed)
    
    Signed-off-by: Kohei Yoshida <kohei.yoshida at collabora.com>

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 62f2ee2..1d96781 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1128,6 +1128,17 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
         SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
         aColorSet.Clear();
         aColorSet.addEntriesForXColorList(*pColorList);
+
+        short i = 0;
+        long nCount = pColorList->Count();
+        XColorEntry* pEntry = NULL;
+
+        for ( i = 0; i < nCount; i++ )
+        {
+            pEntry = pColorList->GetColor(i);
+            if( pEntry->GetColor() == mLastColor )
+                aColorSet.SelectItem( i+1 );
+        }
     }
 
     aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) );
@@ -1200,6 +1211,7 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl)
         SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
                                      maCommand,
                                      aArgs );
+        aColorSet.SelectItem( nItemId );
     }
 
     return 0;


More information about the Libreoffice-commits mailing list