summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomofumi Yagi <yagit@mknada.sakura.ne.jp>2014-04-19 16:52:44 +0900
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-04-25 10:01:04 -0400
commitcf74704979090792bf083957619c8dd608e4f5c0 (patch)
tree7384fa5f6d0f5e1c07a9ef0842e26283b83a342c /svx
parenta686162553f68f19663694b8407a47d2ec9be700 (diff)
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. Reviewed-on: https://gerrit.libreoffice.org/9103 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 5c31515d2e54a42ceac1b21409cb730cdbb825ed) Change-Id: I5c2db8ab8923ab146cbf921dcb90894765f8420c Signed-off-by: Kohei Yoshida <kohei.yoshida@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b8f3a85067da..91b6a66f3add 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1134,6 +1134,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 ) );
@@ -1206,6 +1217,7 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl)
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
maCommand,
aArgs );
+ aColorSet.SelectItem( nItemId );
}
return 0;