summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-06 16:46:11 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-06 18:04:07 +0100
commitffd9e90058d2e8a54a307ca6f58f60d380eaa4f2 (patch)
tree5124890b0b215ea1405c666037c03f841b073a92
parentbd520b177637d4b7d9d93733103cff17a3c91b0a (diff)
jsdialogs: .uno:Color with string argument in Calc
Change-Id: I93ac635fc16a74cfc7a956be6d6529b4d692101b Reviewed-on: https://gerrit.libreoffice.org/82152 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sc/source/ui/view/editsh.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 6e0b40269d09..8c1638c2ff62 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -53,6 +53,7 @@
#include <vcl/transfer.hxx>
#include <vcl/unohelp2.hxx>
#include <svl/stritem.hxx>
+#include <editeng/colritem.hxx>
#include <editsh.hxx>
#include <global.hxx>
@@ -955,7 +956,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 );
}
}