summaryrefslogtreecommitdiff
path: root/include/oox/export
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2014-06-08 16:35:32 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-10 17:22:40 +0000
commit2211a67cc5e577f8abdcc96c9c63865be5fb988d (patch)
treec015c5ef53b56044e5ce28f37c5a353ab5883c2c /include/oox/export
parent93152e2633c3da2b1993c69857baf11edada705e (diff)
Rewrite import and export of custom dashes in ooxml filter (fix)
The import mechanism of custom-dash (a:custDash) was wrong, and imported wrong values, which causes that if you would import-export-import-export - you would get inflated values, which might cause a corruption. The attributes for custom-dash nodes (a:ds) are of type 'PositivePercentage'. Office will read percentages formatted with a trailing percent sign or formatted as 1000th of a percent without a trailing percent sign, but only write percentages as 1000th's of a percent without a trailing percent sign. During import - LO did not check if it was in '%' format or in '1000th of a percent' format. So that was fixed. Also - when exporting - it always exports now in '1000th of a percent' format. Change-Id: I6bd74df26951974f85173227c832386c70034afb Reviewed-on: https://gerrit.libreoffice.org/9681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include/oox/export')
-rw-r--r--include/oox/export/utils.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index 06ddfe3391e5..b6bafddd78cb 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -49,9 +49,9 @@ static inline sal_Int64 TwipsToEMU( sal_Int32 nTwips )
}
template <typename T>
-OString writePercentage(T number)
+OString write1000thOfAPercent(T number)
{
- return OString::number(number) + "%";
+ return OString::number( number * 1000 );
}
#endif