Kaydet (Commit) 53b9a9bc authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#84536 RTF import: don't try to rotate TextFrames

Regression from 818d80eb (RTF import:
support shapes inside tables, 2013-06-28).

Change-Id: I05eb2f4f2e3467e35f96b280e3a79f69906a56de
üst 25b110cd
{\rtf1
{\shp
{\*\shpinst\shpleft0\shptop0\shpright10557\shpbottom2639\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz2\shplid2054
{\sp
{\sn shapeType}
{\sv 202}
}
{\sp
{\sn rotation}
{\sv -2949120}
}
{\shptxt hello\par}
}
}
\par
}
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
#include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp>
...@@ -198,7 +199,9 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape, ...@@ -198,7 +199,9 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
// See DffPropertyReader::Fix16ToAngle(): in RTF, positive rotation angles are clockwise, we have them as counter-clockwise. // See DffPropertyReader::Fix16ToAngle(): in RTF, positive rotation angles are clockwise, we have them as counter-clockwise.
// Additionally, RTF type is 0..360*2^16, our is 0..360*100. // Additionally, RTF type is 0..360*2^16, our is 0..360*100.
sal_Int32 nRotation = aValue.toInt32()*100/65536; sal_Int32 nRotation = aValue.toInt32()*100/65536;
xPropertySet->setPropertyValue("RotateAngle", uno::makeAny(sal_Int32(NormAngle360(nRotation * -1)))); uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY);
if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
xPropertySet->setPropertyValue("RotateAngle", uno::makeAny(sal_Int32(NormAngle360(nRotation * -1))));
} }
if (nHoriOrient != 0 && xPropertySet.is()) if (nHoriOrient != 0 && xPropertySet.is())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment