[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 13 17:46:27 UTC 2020
sc/source/ui/view/formatsh.cxx | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
New commits:
commit 23e8e4521366aaf5831a3c1feaffdc41658ce7e7
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Mon Jan 13 13:17:09 2020 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Jan 13 18:45:57 2020 +0100
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 at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 2d49fe1bb9c4..f6808252314a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -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 = Color( 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:
More information about the Libreoffice-commits
mailing list