diff options
author | merttumer <mert.tumer@collabora.com> | 2021-05-24 10:52:13 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2021-05-25 06:19:44 +0200 |
commit | 0a5606dc180c7a643ff4820f7e05413398352b2d (patch) | |
tree | 7fb29c1e7f7107f8e57e7dbe9cb7e0e73fd2a40c /svx/source/svdraw | |
parent | 86fad1dfee9f6678cdca46c607c6a05306ac622e (diff) |
Extended MoveShapeHandle command for Anchors as well
Change-Id: I0e2811802f17831097a86103571b505a7557717a
Signed-off-by: merttumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116040
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 875d0dfc3993..61f7d472ecd6 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1002,6 +1002,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView { boost::property_tree::ptree responseJSON; boost::property_tree::ptree others; + boost::property_tree::ptree anchor; boost::property_tree::ptree rectangle; boost::property_tree::ptree poly; boost::property_tree::ptree custom; @@ -1036,6 +1037,14 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView { selectedNode = &custom; } + else if (kind == static_cast<sal_Int32>(SdrHdlKind::Anchor) || kind == static_cast<sal_Int32>(SdrHdlKind::Anchor_TR)) + { + if (getSdrModelFromSdrView().IsWriter()) + selectedNode = &anchor; + else + // put it to others as we dont render them except in writer + selectedNode = &others; + } else { selectedNode = &others; @@ -1054,6 +1063,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView nodes.add_child("rectangle", rectangle); nodes.add_child("poly", poly); nodes.add_child("custom", custom); + nodes.add_child("anchor", anchor); nodes.add_child("others", others); responseJSON.add_child("kinds", nodes); std::stringstream aStream; @@ -1415,11 +1425,6 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } - // moved it here to access all the handles for callback. - if (bTiledRendering && pViewShell) - { - SetMarkHandlesForLOKit(aRect, pOtherShell); - } // rotation point/axis of reflection if(!bLimitedRotation) { @@ -1432,6 +1437,12 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) // add custom handles (used by other apps, e.g. AnchorPos) AddCustomHdl(); + // moved it here to access all the handles for callback. + if (bTiledRendering && pViewShell) + { + SetMarkHandlesForLOKit(aRect, pOtherShell); + } + // try to restore focus handle index from remembered values if(bSaveOldFocus) { |