[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 6 16:22:28 UTC 2019
sc/source/ui/view/editsh.cxx | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
New commits:
commit 0393cde7bb4a0ebc921aecd6f3a9d3c5839bcb17
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Nov 6 16:46:11 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Nov 6 17:21:28 2019 +0100
jsdialogs: .uno:Color with string argument in Calc
Change-Id: I93ac635fc16a74cfc7a956be6d6529b4d692101b
Reviewed-on: https://gerrit.libreoffice.org/82153
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index f3c7fa8164af..2eb92e18ce4e 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -56,6 +56,7 @@
#include <sot/formats.hxx>
#include <vcl/transfer.hxx>
#include <svl/stritem.hxx>
+#include <editeng/colritem.hxx>
#include <editsh.hxx>
#include <global.hxx>
@@ -911,7 +912,24 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
{
if (pArgs)
{
- aSet.Put( pArgs->Get( pArgs->GetPool()->GetWhich( nSlot ) ) );
+ Color aColor;
+ OUString sColor;
+ const SfxPoolItem* pColorStringItem = nullptr;
+
+ if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_ATTR_COLOR_STR, false, &pColorStringItem ) )
+ {
+ sColor = static_cast<const SfxStringItem*>( pColorStringItem )->GetValue();
+ if ( sColor == "transparent" )
+ aColor = COL_TRANSPARENT;
+ else
+ aColor = Color( sColor.toInt32( 16 ) );
+
+ aSet.Put( SvxColorItem( aColor, EE_CHAR_COLOR ) );
+ }
+ else
+ {
+ aSet.Put( pArgs->Get( pArgs->GetPool()->GetWhich( nSlot ) ) );
+ }
rBindings.Invalidate( nSlot );
}
}
More information about the Libreoffice-commits
mailing list