diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/vml/vmlformatting.hxx | 5 | ||||
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/oox/inc/oox/vml/vmlformatting.hxx b/oox/inc/oox/vml/vmlformatting.hxx index 25f7a555d94b..428e2bd1d5e4 100644 --- a/oox/inc/oox/vml/vmlformatting.hxx +++ b/oox/inc/oox/vml/vmlformatting.hxx @@ -66,9 +66,10 @@ public: floating-point value. @param rValue The VML percentage value. This is a floating-point value - with optional following '%' sign. If the '%' sign is missing, the + with optional following '%' or 'f' sign. If the sign is missing, the floating point value will be returned unmodified. If the '%' sign - is present, the value will be divided by 100. + is present, the value will be divided by 100. If the 'f' sign is present, + the value will be divided by 65536. */ static double decodePercent( const ::rtl::OUString& rValue, diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 4bc582d777be..6d202767fb2b 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -107,6 +107,9 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r if( (nEndPos + 1 == rValue.getLength()) && (rValue[ nEndPos ] == '%') ) return fValue / 100.0; + if( (nEndPos + 1 == rValue.getLength()) && (rValue[ nEndPos ] == 'f') ) + return fValue / 65536.0; + OSL_FAIL( "ConversionHelper::decodePercent - unknown measure unit" ); return fDefValue; } |