summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormerttumer <mert.tumer@collabora.com>2021-04-02 16:18:05 +0300
committerMert Tumer <mert.tumer@collabora.com>2021-04-09 08:15:07 +0200
commita33f16fd4127030a25b4ef0e4e965b8aa07afcb7 (patch)
tree7ac6ee964d7d82c53a827682eef390eaaa6dd7b7 /include
parent47f5876b94d6c2d12df4fd08a92ba21320ca4fba (diff)
lok: Pass object ord num in the uno command
When multiple objects' glue points collide the ordnum will be used to decide which glue point to connect to for the connectors. Without that the default logic chooses the lowest ordered object which is searched and found in the object list Change-Id: I64579d28bbe6cbd92bab745838fe2995585b6a3f Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113517 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/svddrag.hxx12
-rw-r--r--include/svx/svdoedge.hxx2
-rw-r--r--include/svx/svdview.hxx2
3 files changed, 14 insertions, 2 deletions
diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
index d1fde32edda0..c1956d56af9f 100644
--- a/include/svx/svddrag.hxx
+++ b/include/svx/svddrag.hxx
@@ -79,6 +79,16 @@ class SVX_DLLPUBLIC SdrDragStat final
sal_Int32 GetPrevPos() const { return mvPnts.size()-(mvPnts.size()>1 ? 2 : 1); }
+ // This is passed all the way through to ApplySpecialDrag of the Edge Object
+ // For LOK, we cannot really specify which glue point to select by default
+ // It selects the nearest glue points after DragEnd event.
+ // When multiple objects are on top of each other or somehow their glue points
+ // collide, the glue point is selected from the lowest order numbered object
+ // We can pass the ord number information inside the draginfo and choose the correct shape
+ struct {
+ sal_Int32 objectOrdNum = -1;
+ } mGlueOptions;
+
public:
SdrDragStat() { Reset(); }
~SdrDragStat();
@@ -158,6 +168,8 @@ public:
// Also considering 1stPointAsCenter
void TakeCreateRect(tools::Rectangle& rRect) const;
+
+ auto& GetGlueOptions() { return mGlueOptions; }
};
#endif // INCLUDED_SVX_SVDDRAG_HXX
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index e6399da73bda..56c2f21c66da 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -177,7 +177,7 @@ protected:
XPolygon ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const;
- static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr);
+ static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr, SdrDragStat* pDragStat = nullptr);
static SdrEscapeDirection ImpCalcEscAngle(SdrObject const * pObj, const Point& aPt2);
void ImpSetTailPoint(bool bTail1, const Point& rPt);
void ImpUndirtyEdgeTrack(); // potential recalculation of the connection track
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index e4a6168ef425..5fda8cd58c13 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -243,7 +243,7 @@ public:
const sal_Char* pDebugName) const;
// Interactive Move Action programmaticaly
- bool MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint);
+ bool MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint, const sal_Int32 aObjectOrdNum = -1);
};
// First of all the app creates a SdrModel.