diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-09 17:51:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-10-09 18:03:49 +0200 |
commit | aadda5d17f6e422da143ea774f759bfc5f629c5b (patch) | |
tree | 753fcbc7c0da18a7f4f2b2152db79a1c84d4f688 /include/sax | |
parent | filter: convert OSL_FAIL to SAL_WARN (diff) | |
download | core-aadda5d17f6e422da143ea774f759bfc5f629c5b.tar.gz core-aadda5d17f6e422da143ea774f759bfc5f629c5b.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
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 3c451a0d3a9e..9626c108a7c3 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); |