summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormert <mert.tumer@collabora.com>2021-02-19 11:15:02 +0300
committerMert Tumer <mert.tumer@collabora.com>2021-02-24 08:39:05 +0100
commit8c7a1b06e445f6e61b5127b6ba8a80fb3cfba454 (patch)
treef89c5b129b437cace8ce34d92434bad215a82bf6
parent82e6ded597e5f448cac213b1c8b72a5ff2660392 (diff)
Implemented MoveShapeHandle uno command for sc
Change-Id: I5f81348cd778d7fbcb3b4e721fbf0412c4f5753d Signed-off-by: mert <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111195 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--sc/sdi/drawsh.sdi1
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx16
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 6b28aea9dfbe..da0def0bafc9 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -224,6 +224,7 @@ interface TableDraw
SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_DRAW_HLINK_DELETE [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_MOVE_SHAPE_HANDLE [ ExecMethod = ExecDrawAttr; ]
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 36d18b69ba43..57afdd6da65a 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -203,6 +203,22 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
pView->SetAttributes(aEmptyAttr, true);
}
break;
+ case SID_MOVE_SHAPE_HANDLE:
+ {
+ const SfxItemSet *pArgs = rReq.GetArgs ();
+ if (pArgs && pArgs->Count () == 3)
+ {
+ const SfxUInt32Item* handleNumItem = rReq.GetArg<SfxUInt32Item>(FN_PARAM_1);
+ const SfxUInt32Item* newPosXTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
+ const SfxUInt32Item* newPosYTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_3);
+
+ const sal_uLong handleNum = handleNumItem->GetValue();
+ const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
+ const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
+ pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+ }
+ }
+ break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINEEND_STYLE: