Issue 125447 - [SVG] in path data digit 0 may be omitted
Summary: [SVG] in path data digit 0 may be omitted
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.1.0
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: 4.2.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Reported: 2014-08-17 12:39 UTC by Regina Henschel
Modified: 2017-05-20 10:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

floating point .8 and 5. in various combinations (1.62 KB, image/svg+xml)
2014-08-17 12:39 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2014-08-17 12:39:37 UTC
Created attachment 83842 [details]
floating point .8 and 5. in various combinations

The corresponding issue in LibreOffice is

The error has been discovered by test case "path-data-18-f.svg" from the W3C-SVG test suite. 

Read section "8.3.9 The grammar for path data". The BNF has
    fractional-constant exponent?
    | digit-sequence exponent
    digit-sequence? "." digit-sequence
    | digit-sequence "."

That means, that in a fractional-constant
(A) a leading zero can be omitted if a digit-sequence follows the dot.
(B) a trailing zero can be omitted if a digit-sequence is before the dot.

The attached example should show a black line same as the green line but only shifted down a little bit.
In AOO the case A fails. The affects the third, forth, fifth and sixth bar in the example.

In Seamonkey the case B fails (first and second bar), Batik shows all cases correctly.
Comment 1 Armin Le Grand 2014-08-25 10:04:55 UTC
Grepping to keep in focus
Comment 2 Armin Le Grand 2014-10-08 10:45:18 UTC
Had to adapt some of the string conversion tools in basegfx to handle the conversions of those numbers in the test doc correctly. Checked and investigated other usages, looks okay. Doing some more checks...
Comment 3 SVN Robot 2014-10-08 11:03:03 UTC
"alg" committed SVN revision 1630069 into trunk:
i125447 corrected some string to number conversion tools to correct svg:d imp...
Comment 4 Armin Le Grand 2014-10-08 11:03:26 UTC
Okay, done.