summaryrefslogtreecommitdiff
path: root/svx
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-09 09:37:31 +0100
commit206c5b374eb56ef1674bb0dbd0d199d2761ea469 (patch)
tree37aea741b1d2cf541022b829d104d2a3c097bfe2 /svx
parent13577b6c3d64c6cae673152c4d10489d8380bb7f (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>
Diffstat (limited to 'svx')
-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 cf29f4a268df..830ef238c590 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1534,7 +1534,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();
@@ -1542,6 +1542,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);
}