summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>2014-12-20 15:41:15 +1100
committerAndras Timar <andras.timar@collabora.com>2015-03-31 10:03:58 +0000
commit89032c4b7344139b7e3608d09e8c63b3eafd534b (patch)
treedde3ca45cc1dfbf0802d85dbe86b342731b05e7f /oox/source/drawingml/shape.cxx
parent2c398d1b669551352d8916e792447ec6e495e9c1 (diff)
fdo#87488 Wrong text rotation inside a preset shape from docx
Preset shape text rotation values are read in a few places and stored in moRotation. With these changes, moRotation is always read unchanged, but multiplied by -1 when it's used. Change-Id: I633d665c21daa69e15fa828a43300f10d2bf2054 Reviewed-on: https://gerrit.libreoffice.org/13561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 921cea89da8adbe714ea8f71169dd6afc42354c4) Signed-off-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/15084
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r--oox/source/drawingml/shape.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index ef0feb770dbb..7fea778aa50d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -999,7 +999,10 @@ Reference< XShape > Shape::createAndInsert(
if( getTextBody() )
{
sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( getTextBody()->getTextProperties().moRotation.get( 0 ) );
- mpCustomShapePropertiesPtr->setTextRotateAngle( nTextRotateAngle / 60000 );
+ /* OOX measures text rotation clockwise in 1/60000th degrees,
+ relative to the containing shape. setTextRotateAngle wants
+ degrees anticlockwise. */
+ mpCustomShapePropertiesPtr->setTextRotateAngle( -1 * nTextRotateAngle / 60000 );
}
SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'");