sc/sdi/drawsh.sdi | 1 + sc/source/ui/drawfunc/drawsh.cxx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)
New commits: commit 8c7a1b06e445f6e61b5127b6ba8a80fb3cfba454 Author: mert <[email protected]> AuthorDate: Fri Feb 19 11:15:02 2021 +0300 Commit: Mert Tumer <[email protected]> CommitDate: Wed Feb 24 08:39:05 2021 +0100 Implemented MoveShapeHandle uno command for sc Change-Id: I5f81348cd778d7fbcb3b4e721fbf0412c4f5753d Signed-off-by: mert <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111195 Tested-by: Jenkins CollaboraOffice <[email protected]> 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: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
