[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/svx sd/sdi sd/source svx/sdi

mert (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 24 07:33:29 UTC 2021


 include/svx/svxids.hrc         |    2 ++
 sd/sdi/_drvwsh.sdi             |    5 ++++-
 sd/source/ui/view/drviews2.cxx |   16 ++++++++++++++++
 svx/sdi/svx.sdi                |   17 +++++++++++++++++
 4 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit 3c4a9d6d31829bd826d96126554e60687a3e36c2
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Thu Jan 28 07:19:07 2021 +0300
Commit:     Mert Tumer <mert.tumer at collabora.com>
CommitDate: Wed Feb 24 08:32:53 2021 +0100

    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 at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110041
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 6b15d0087926..c13420125655 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1020,6 +1020,8 @@ class SvxSetItem;
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
 #define SID_SVX_FIRSTFREE                               ( SID_HIDE_SIDEBAR + 1 )
 
+#define SID_MOVE_SHAPE_HANDLE                             ( SID_SVX_START + 1203 )
+
 // Overflow check for slot IDs
 #if SID_SVX_FIRSTFREE > SID_SVX_END
 #error Resource-overflow in #line, #file
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
         {
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 04e6a3279bdb..e5107db90048 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -12277,3 +12277,20 @@ SfxVoidItem SpellCheckApplySuggestion SID_SPELLCHECK_APPLY_SUGGESTION
     ToolBoxConfig = FALSE,
     GroupId = SfxGroupId::Format;
 ]
+
+SfxVoidItem MoveShapeHandle SID_MOVE_SHAPE_HANDLE
+(SfxUInt32Item HandleNum FN_PARAM_1 SfxUInt32Item NewPosX FN_PARAM_2 SfxUInt32Item NewPosY FN_PARAM_3)
+[
+    AutoUpdate = FALSE,
+    FastCall = TRUE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = SfxGroupId::Format;
+]


More information about the Libreoffice-commits mailing list