diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 9e20ab1ced56..718e6cce54d5 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -56,12 +56,13 @@ #include #include #include +#include SFX_IMPL_INTERFACE(ScDrawShell, SfxShell) namespace { - void lcl_convertStringArguments(std::unique_ptr& pArgs) + void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr& pArgs) { Color aColor; OUString sColor; @@ -86,8 +87,22 @@ namespace else aColor = Color(sColor.toInt32(16)); - XLineColorItem aLineColorItem(OUString(), aColor); - pArgs->Put(aLineColorItem); + switch (nSlot) + { + case SID_ATTR_LINE_COLOR: + { + XLineColorItem aLineColorItem(OUString(), aColor); + pArgs->Put(aLineColorItem); + break; + } + + case SID_ATTR_FILL_COLOR: + { + XFillColorItem aFillColorItem(OUString(), aColor); + pArgs->Put(aFillColorItem); + break; + } + } } } } @@ -238,7 +253,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) if( pView->AreObjectsMarked() ) { std::unique_ptr pNewArgs = rReq.GetArgs()->Clone(); - lcl_convertStringArguments( pNewArgs ); + lcl_convertStringArguments( rReq.GetSlot(), pNewArgs ); pView->SetAttrToMarked( *pNewArgs, false ); } else