summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-06-25 14:40:45 +0100
committerAndras Timar <andras.timar@collabora.com>2013-11-05 11:18:42 +0100
commit18cce91a908d65d4dd8516c8663f02255cc6f66e (patch)
tree68f1b7fb2886d6dff32a162910868a52000aa8d9 /svx
parent681ac1948d2a7b99edc1432b11a5e33be25b3aa6 (diff)
fix text position for custom shapes with zoom != 100% fdo#59862
custom shapes that had text suffered from strange display at zoom levels != 100%, this was because there was a bug in the code to correct the textposition Change-Id: I8d1817cc6be91b3e6379200eb21eb2966d3c2aa9 (cherry picked from commit 443c13e92c6f900a41e6e383684623ead3e088f5) Reviewed-on: https://gerrit.libreoffice.org/4515 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 654ed86cbaca..7aa29cb5a47b 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -46,9 +46,11 @@ namespace sdr
basegfx::B2DRange ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect() const
{
- const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+ Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+ aObjectBound += GetCustomShapeObj().GetGridOffset();
Rectangle aTextBound(aObjectBound);
GetCustomShapeObj().GetTextBounds(aTextBound);
+ aTextBound += GetCustomShapeObj().GetGridOffset();
basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom());
const basegfx::B2DRange aObjectRange(aObjectBound.Left(), aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom());