[Libreoffice-commits] .: Branch 'libreoffice-3-6' - oox/inc oox/source
Lubos Lunak
llunak at kemper.freedesktop.org
Fri Jun 8 07:42:26 PDT 2012
oox/inc/oox/vml/vmlformatting.hxx | 5 +++--
oox/source/vml/vmlformatting.cxx | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 069bf1bd90142c6cde41e5fefdb99a275bf798a1
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 7 18:10:20 2012 +0200
handle f suffix (1/65536ths) when reading VML percentages
Not all percentage attributes actually use this, but better be
safe and no point in checking only the allowed ones use them.
Change-Id: I851f9b19ea85201d70d5e6b2e219bbcd88ae3dea
diff --git a/oox/inc/oox/vml/vmlformatting.hxx b/oox/inc/oox/vml/vmlformatting.hxx
index 25f7a55..428e2bd 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 4bc582d..6d20276 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;
}
More information about the Libreoffice-commits
mailing list