summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authormert <mert.tumer@collabora.com>2021-01-28 07:19:07 +0300
committerMert Tumer <mert.tumer@collabora.com>2021-02-24 08:32:53 +0100
commit3c4a9d6d31829bd826d96126554e60687a3e36c2 (patch)
tree219340baa8ade209729e801b0cd9164c3dae55a6 /sd
parenta277cfaf3c24c8ae79da85a5e2b578af2fb62d83 (diff)
Added .uno:MoveShapeHandle uno command
This is now only available for Draw/Presentation It will allow interactive dragging/resizing operations via the command. Later it will be implemented for other modules too. Change-Id: Iaed7d25cf4035591083e779c13a6f0227a3b564f Signed-off-by: mert <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110041 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/sdi/_drvwsh.sdi5
-rw-r--r--sd/source/ui/view/drviews2.cxx16
2 files changed, 20 insertions, 1 deletions
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index efcfe0f51492..440515544003 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2872,5 +2872,8 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
-
+ SID_MOVE_SHAPE_HANDLE
+ [
+ ExecMethod = FuTemporary ;
+ ]
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 85587bbde585..b530b0bd1658 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1498,7 +1498,23 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
}
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());
+ mpDrawView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+ Cancel();
+ }
+ break;
+ }
case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG: // BASIC
{