summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2014-06-08 16:35:32 +0300
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-09-09 23:20:56 +0200
commit1af3d8a211852da5a1f130aa22e00ab329301ee7 (patch)
treebb5369af24677709d0853cefbb6d434cd9a98b3f /include
parentc4c11a1b9e7b9c88dc7f64bfb5eb5d316c7b5366 (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. Reviewed-on: https://gerrit.libreoffice.org/9681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 2211a67cc5e577f8abdcc96c9c63865be5fb988d) Conflicts: oox/source/export/drawingml.cxx Change-Id: I6bd74df26951974f85173227c832386c70034afb
Diffstat (limited to 'include')
-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 588d231a0491..2c4fcec3b480 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -50,9 +50,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