[Libreoffice-commits] core.git: sc/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 16:33:53 UTC 2019
sc/source/ui/drawfunc/drawsh.cxx | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 85d947d52d27b4ade68a735e23bd393bced26046
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 8 13:29:13 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 8 17:32:47 2019 +0100
jsdialogs: apply .uno:FillColor in Calc
Change-Id: I7cbd447c8a66f9240d6a093c9ab24a7c2dbb2024
Reviewed-on: https://gerrit.libreoffice.org/82293
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/82306
Tested-by: Jenkins
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 <svx/xlnwtit.hxx>
#include <svx/chrtitem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xflclit.hxx>
SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
namespace
{
- void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& 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<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
- lcl_convertStringArguments( pNewArgs );
+ lcl_convertStringArguments( rReq.GetSlot(), pNewArgs );
pView->SetAttrToMarked( *pNewArgs, false );
}
else
More information about the Libreoffice-commits
mailing list