summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2015-03-30 21:37:47 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-03-31 12:41:55 +0000
commit6a1cca9b467f1f7205aac5734fdb20b7f7d410f0 (patch)
treec656fa712c64b1533ef4760bef6fbe69a37512b8 /oox
parent9c2576b8f7798f7376d60b9c4e715b3742f466f3 (diff)
bnc#902652 OOXML: fix import of insets when shape and/or shape text is rotated
5ac575ee3e109 did not get it right, the vert attribute (i.e. the rotation of text) is relevant, not the rotation of the shape. In that case both text and shape rotation were 270 degrees. I checked that the bugdoc of bnc#773048 looked good after this. Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4 Reviewed-on: https://gerrit.libreoffice.org/15076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit af686aa8694903bde5952656cd69993c8c8393d7) Reviewed-on: https://gerrit.libreoffice.org/15082 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/textbodyproperties.hxx2
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/drawingml/textbodyproperties.cxx8
3 files changed, 6 insertions, 6 deletions
diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx
index e6ed0fc19011..c7a98cb79174 100644
--- a/oox/inc/drawingml/textbodyproperties.hxx
+++ b/oox/inc/drawingml/textbodyproperties.hxx
@@ -45,7 +45,7 @@ struct TextBodyProperties
explicit TextBodyProperties();
- void pushRotationAdjustments( sal_Int32 nRotation );
+ void pushRotationAdjustments();
void pushVertSimulation();
};
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index db36b56aae86..81249e59236f 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -649,7 +649,7 @@ Reference< XShape > Shape::createAndInsert(
// add properties from textbody to shape properties
if( mpTextBody.get() )
{
- mpTextBody->getTextProperties().pushRotationAdjustments( mnRotation );
+ mpTextBody->getTextProperties().pushRotationAdjustments();
aShapeProps.assignUsed( mpTextBody->getTextProperties().maPropertyMap );
// Push char properties as well - specifically useful when this is a placeholder
if( mpMasterTextListStyle && mpMasterTextListStyle->getListStyle()[0]->getTextCharacterProperties().moHeight.has() )
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 9f146c67a32d..f61330add65c 100644
--- a/oox/source/drawingml/textbodyproperties.cxx
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -58,17 +58,17 @@ void TextBodyProperties::pushVertSimulation()
}
/* Push adjusted values, taking into consideration Shape Rotation */
-void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation )
+void TextBodyProperties::pushRotationAdjustments()
{
sal_Int32 nOff = 0;
sal_Int32 aProps[] = { PROP_TextLeftDistance, PROP_TextUpperDistance, PROP_TextRightDistance, PROP_TextLowerDistance };
sal_Int32 n = ( sal_Int32 )( sizeof( aProps ) / sizeof( sal_Int32 ) );
- switch( nRotation ) // TODO: What happens for part rotations ?
+ switch( moRotation.get(0) )
{
- case (90*1*60000): nOff = 1; break;
+ case (90*1*60000): nOff = 3; break;
case (90*2*60000): nOff = 2; break;
- case (90*3*60000): nOff = 3; break;
+ case (90*3*60000): nOff = 1; break;
default: break;
}