summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authormert <mert.tumer@collabora.com>2021-03-04 12:17:27 +0300
committerMert Tumer <mert.tumer@collabora.com>2021-03-12 04:36:28 +0100
commit2246b6a2887b90efc712c4479b19609cf9307a3d (patch)
tree004a118a3b6e5caaa98cb934d2670ab370dcea84 /svx/source/svdraw
parent4a4a38d31a287f78d4c7226fe85aafb6e6c6c0ac (diff)
Fix wrong position on move when page has margin
Change-Id: I9ac2d9914b86210ca2148b44488c2c70cc5870d4 Signed-off-by: mert <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111949 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111929 Tested-by: Jenkins
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdedtv1.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index f2128824b6fa..5b17b8852462 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1512,7 +1512,7 @@ static Point ImpGetPoint(const tools::Rectangle& rRect, RectPoint eRP)
return Point(); // Should not happen!
}
-void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
+void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin)
{
const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
@@ -1520,6 +1520,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
if(GetSdrPageView())
{
+ if (addPageMargin)
+ {
+ SdrPage * pPage = GetSdrPageView()->GetPage();
+ Point upperLeft(pPage->GetLeftBorder(), pPage->GetUpperBorder());
+ aRect.Move(upperLeft.getX(), upperLeft.getY());
+ }
GetSdrPageView()->LogicToPagePos(aRect);
}