summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2020-12-15 20:20:55 +0100
committerRegina Henschel <rb.henschel@t-online.de>2020-12-16 13:59:14 +0100
commitd4ca360f6632f03e9fb7e9af37aac40d23f1249a (patch)
tree5462a631173e6ac6e29b36910de8f3d472e9184b /svx/source/svdraw
parentbcb8d2d3a08991b4e57189b81f8702aaa8af8a89 (diff)
tdf#138945 update fObjectRotation for NbcResize
SdrObjCustomShape::NbcResize uses the inherited SdrTextObj::NbcResize. But a SdrTextObj does not know fObjectRotation. Explicit update to new rotation angle after resize is needed. The error became visible, if you changed width or height of a rotated or sheared custom shape in the Position&Size dialog. Then the shape handles were not on the shape outline. Change-Id: Idbe47a3b1ef2b34e9645d62830cb330f2e49bd3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107792 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdoashp.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 35812345b27b..30552b63fa4d 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1525,6 +1525,30 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co
{
}
}
+
+ // updating fObjectRotation
+ tools::Long nTextObjRotation = aGeo.nRotationAngle;
+ double fAngle = nTextObjRotation;
+ fAngle /= 100.0;
+ if (IsMirroredX())
+ {
+ if (IsMirroredY())
+ fObjectRotation = fAngle - 180.0;
+ else
+ fObjectRotation = -fAngle;
+ }
+ else
+ {
+ if (IsMirroredY())
+ fObjectRotation = 180.0 - fAngle;
+ else
+ fObjectRotation = fAngle;
+ }
+ while (fObjectRotation < 0)
+ fObjectRotation += 360.0;
+ while (fObjectRotation >= 360.0)
+ fObjectRotation -= 360.0;
+
InvalidateRenderGeometry();
}