diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-09 17:51:50 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-10-17 23:23:23 +0200 |
commit | 26dcd66646800bd343e2e49a6a45c5ed91d3bdec (patch) | |
tree | 69e44bc5f8d8ced35a3b4163f18b1e36f1e76991 /include/sax | |
parent | tdf#93688: Set CalcA1|ExcelA1 syntax only for imported docs (diff) | |
download | core-26dcd66646800bd343e2e49a6a45c5ed91d3bdec.tar.gz core-26dcd66646800bd343e2e49a6a45c5ed91d3bdec.zip |
xmloff: fix ODF import of gradient draw:angle attribute a bit
ODF 1.2 part 3, 18.3.1 angle, says "An angle, as defined in ยง4.1 of
[SVG]" and "If no unit identifier is specified, the value is assumed to
be in degrees."
Unfortunately OOo could only read and write 10th of degree here.
See also https://issues.oasis-open.org/browse/OFFICE-3774
As the first step towards fixing that, implement the import for
draw:angle values with an angle unit identifier, but leave the import
as-is if the angle identifier is missing.
Change-Id: Ib88d417c03998ebcfc569b01492f0e1f851bbc85
(cherry picked from commit aadda5d17f6e422da143ea774f759bfc5f629c5b)
Reviewed-on: https://gerrit.libreoffice.org/19283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 76a4665a09542fb67dd99c9a607c162e0b678ead)
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/tools/converter.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx index d06d0ceee7b1..2f46c3b087ff 100644 --- a/include/sax/tools/converter.hxx +++ b/include/sax/tools/converter.hxx @@ -139,6 +139,12 @@ public: /** convert string to double number (using ::rtl::math) without unit conversion */ static bool convertDouble(double& rValue, const OUString& rString); + /** convert number, 10th of degrees with range [0..3600] to SVG angle */ + static void convertAngle(OUStringBuffer& rBuffer, sal_Int16 nAngle); + + /** convert SVG angle to number, 10th of degrees with range [0..3600] */ + static bool convertAngle(sal_Int16& rAngle, OUString const& rString); + /** convert double to ISO "duration" string; negative durations allowed */ static void convertDuration(OUStringBuffer& rBuffer, const double fTime); |