sc/source/ui/view/editsh.cxx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
New commits: commit ffd9e90058d2e8a54a307ca6f58f60d380eaa4f2 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Nov 6 16:46:11 2019 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Wed Nov 6 18:04:07 2019 +0100 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.k...@collabora.com> 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 ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits