From 087537dc45bbab3db41fe6d92974cdfde59904cb Mon Sep 17 00:00:00 2001 From: Grzegorz Araminowicz Date: Tue, 30 May 2017 11:45:47 +0200 Subject: tdf#76446 GSoC: incorrect rotation of VML shapes * support poorly documented 'fd' suffix in rotation attribute * allow non-integer rotation Change-Id: I3d72f2a708e6585597db09366c00c50038abc9c1 Reviewed-on: https://gerrit.libreoffice.org/38207 Tested-by: Jenkins Reviewed-by: Jan Holesovsky --- include/oox/vml/vmlformatting.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/oox/vml') diff --git a/include/oox/vml/vmlformatting.hxx b/include/oox/vml/vmlformatting.hxx index efb0e6606887..b07d8b01899a 100644 --- a/include/oox/vml/vmlformatting.hxx +++ b/include/oox/vml/vmlformatting.hxx @@ -75,6 +75,18 @@ namespace ConversionHelper const OUString& rValue, double fDefValue ); + /** Converts the passed VML rotation value to degrees. + See DffPropertyReader::Fix16ToAngle(): in VML, positive rotation + angles are clockwise, we have them as counter-clockwise. + Additionally, VML type is 0..360, our is 0..36000. + + @param rValue The VML rotation value. This is a floating-point value + with optional 'fd' suffix. If the suffix is missing, the floating + point value will be returned unmodified. If the 'fd' suffix is + present, the value will be divided by 65536. + */ + OOX_DLLPUBLIC sal_Int32 decodeRotation( const OUString& rValue ); + /** Converts the passed VML measure string to EMU (English Metric Units). @param rGraphicHelper The graphic helper needed to perform pixel -- cgit