Fix FontColor does not change selected cells on calc
Change-Id: Iae2f72bff4fd6986fc8cc07ba09996b1af4eb140
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86670
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 23e8e45213
)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88398
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
parent
ecfc94359d
commit
62e077c3e5
1 changed files with 24 additions and 2 deletions
|
@ -1784,10 +1784,32 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
|
|||
break;
|
||||
case SID_ATTR_CHAR_COLOR:
|
||||
case SID_SCATTR_PROTECTION :
|
||||
pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
|
||||
{
|
||||
const SfxPoolItem* pColorStringItem = nullptr;
|
||||
if ( SfxItemState::SET == pNewAttrs->GetItemState( SID_ATTR_COLOR_STR, false, &pColorStringItem ) )
|
||||
{
|
||||
Color aColor;
|
||||
OUString sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
|
||||
if ( sColor == "transparent" )
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color( sColor.toInt32( 16 ) );
|
||||
|
||||
SvxColorItem aColorItem(pTabViewShell->GetSelectionPattern()->
|
||||
GetItem( ATTR_FONT_COLOR ) );
|
||||
aColorItem.SetValue(aColor);
|
||||
pTabViewShell->ApplyAttr(aColorItem, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
|
||||
}
|
||||
|
||||
rBindings.Invalidate( nSlot );
|
||||
rBindings.Update( nSlot );
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SID_ATTR_CHAR_FONT:
|
||||
case SID_ATTR_CHAR_FONTHEIGHT:
|
||||
|
|
Loading…
Reference in a new issue