Issue 122593 - [SVG] drawing of inner svg element is disabled because of missing width/height and missing viewBox but should not
Summary: [SVG] drawing of inner svg element is disabled because of missing width/heigh...
Status: CLOSED DUPLICATE of issue 122594
Alias: None
Product: Draw
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL: http://www.w3.org/TR/SVG/struct.html#...
Keywords:
Depends on: 122600
Blocks:
  Show dependency tree
 
Reported: 2013-06-25 22:11 UTC by Regina Henschel
Modified: 2017-05-20 09:59 UTC (History)
3 users (show)

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


Attachments
inner svg element with only x and y attribute (535 bytes, image/svg+xml)
2013-06-25 22:11 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 2013-06-25 22:11:15 UTC
Created attachment 80912 [details]
inner svg element with only x and y attribute

Open the attached document in browser and in AOO. Notice, that there is a red square inside the blue rectangle, which is not drawn in AOO.

The reason is in SvgSvgNode::decomposeSvgNode. If no viewBox exists, the next check is for width/height. If they do not exists, value 0.0 is used. This results to 'false' in the check 'if(basegfx::fTools::more(fW, 0.0) && basegfx::fTools::more(fH, 0.0))', which disables rendering of the svg element.

The correct behavior is, to use the default values width="100%" and height="100%", see linked specification.
Comment 1 Rainer Bielefeld 2013-06-26 05:33:26 UTC
Reproducible with  "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701)  -  Rev. 1495357 Rev.1495357  2013-06-23]" on WIN7 Home Premium (64bit)", Common 4.0-dev User Profile.

When I open attached sample document on a page with default size the bloue border square will be shown, but the small red border square is missing.

Additional Info:
a) Same problem when I do menu 'Insert -> Picture -> From File' in Writer
b) Competitors:
   LibO 4.0.3: Works fine, shows both rectangles on page with blue rectangle size
   Calligra Karbon: Works fine, shows both rectangles on page with A4 size
c) Already a problem with AOO 3.4.0, probably before 3.4.0
Comment 2 Armin Le Grand 2013-06-26 16:12:09 UTC
ALG: May be double to #122594#
Comment 3 Armin Le Grand 2013-07-02 16:34:16 UTC
ALG: Not double, but related to #122594#, adding there. It's the same reason, Width and Height need to be detected relative when not given for inner SVG elements.

*** This issue has been marked as a duplicate of issue 122594 ***