[Libreoffice-commits] core.git: sc/sdi sc/source

mert (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 2 07:29:02 UTC 2021


 sc/sdi/drawsh.sdi                |    2 +-
 sc/source/ui/drawfunc/drawsh.cxx |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 62c2e238fba7d926f4a05f52c185f9e727dd903f
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Fri Feb 19 11:15:02 2021 +0300
Commit:     Mert Tumer <mert.tumer at collabora.com>
CommitDate: Tue Mar 2 08:28:12 2021 +0100

    Implemented MoveShapeHandle uno command for sc
    
    Change-Id: I5f81348cd778d7fbcb3b4e721fbf0412c4f5753d
    Signed-off-by: mert <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111195
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111514
    Tested-by: Jenkins

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 21e25f35623c..b1d5ecec44a8 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -230,7 +230,7 @@ interface TableDraw
     SID_ATTR_GLOW_TRANSPARENCY      [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
 
     SID_ATTR_SOFTEDGE_RADIUS        [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
-
+    SID_MOVE_SHAPE_HANDLE           [ ExecMethod = ExecDrawAttr; ]
 }
 
 
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 60d3b2114e29..90bf9f8e51cd 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -58,6 +58,7 @@
 #include <svx/xlnclit.hxx>
 #include <svx/xflclit.hxx>
 #include <svx/xflgrit.hxx>
+#include <tools/UnitConversion.hxx>
 
 SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
 
@@ -201,6 +202,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:


More information about the Libreoffice-commits mailing list