Kaydet (Commit) 5c31515d authored tarafından Tomofumi Yagi's avatar Tomofumi Yagi Kaydeden (comit) Kohei Yoshida

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 35aa48d8
  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/9103Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
Tested-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 5e57796c
...@@ -1138,6 +1138,17 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, ...@@ -1138,6 +1138,17 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd)); SetOutputSizePixel(Size(aNewSize.Width() + nAdd, aNewSize.Height() + nAdd));
aColorSet.Clear(); aColorSet.Clear();
aColorSet.addEntriesForXColorList(*pColorList); 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 ) ); aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) );
...@@ -1210,6 +1221,7 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl) ...@@ -1210,6 +1221,7 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl)
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
maCommand, maCommand,
aArgs ); aArgs );
aColorSet.SelectItem( nItemId );
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment