summaryrefslogtreecommitdiff
path: root/oox/source/vml/vmlformatting.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/vml/vmlformatting.cxx')
-rw-r--r--oox/source/vml/vmlformatting.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index c2e2d139c0d6..6b9d1a9c654d 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -34,6 +34,7 @@
#include "oox/helper/graphichelper.hxx"
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <svx/svdtrans.hxx>
namespace oox {
namespace vml {
@@ -109,6 +110,30 @@ double ConversionHelper::decodePercent( const OUString& rValue, double fDefValue
return fDefValue;
}
+sal_Int32 ConversionHelper::decodeRotation( const OUString& rValue )
+{
+ if( rValue.isEmpty() )
+ return 0;
+
+ double fValue = 0.0;
+ double fRotation = 0.0;
+ sal_Int32 nEndPos = 0;
+ if( !lclExtractDouble(fValue, nEndPos, rValue) )
+ return 0;
+
+ if( nEndPos == rValue.getLength() )
+ fRotation = fValue;
+ else if( (nEndPos + 2 == rValue.getLength()) && (rValue[nEndPos] == 'f') && (rValue[nEndPos+1] == 'd') )
+ fRotation = fValue / 65536.0;
+ else
+ {
+ OSL_FAIL("ConversionHelper::decodeRotation - unknown measure unit");
+ return 0;
+ }
+
+ return NormAngle360(fRotation * -100);
+}
+
sal_Int64 ConversionHelper::decodeMeasureToEmu( const GraphicHelper& rGraphicHelper,
const OUString& rValue, sal_Int32 nRefValue, bool bPixelX, bool bDefaultAsPixel )
{