https://issues.apache.org/ooo/show_bug.cgi?id=122599
Bug ID: 122599
Issue Type: ENHANCEMENT
Summary: [SVG] DIN A4 is unsuitable as substitute for a missing
viewport for SvgSvgNode.
Product: Draw
Version: AOO400-dev
Hardware: PC
URL: http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Created attachment 80921
--> https://issues.apache.org/ooo/attachment.cgi?id=80921&action=edit
Svg graphic to insert. It has only a simple square in size of the viewBox
If an outermost svg element has no width/height given, there exists no
intrinsic viewport. A browser can determine a viewport from the window into
which the svg document is rendered. This is not possible for AOO (right?).
Therefore a substitute is used in SvgSvgNode::decomposeSvgNode if width/height
is missing. SvgNumber::solve has a similar substitute if a viewport is missing.
In both cases a DIN A4 portrait is used as target range. That has
disadvantages:
The viewBox attribute establishes an intrinsic aspect ratio, see linked spec.
It is better if the range used as substitute has exactly this aspect ratio.
The target range is the object size in AOO. It is much too large and produces a
lot of empty space around the real drawing. So when combining the svg graphic
with Draw properties like default gluepoints or background color, these use the
larger area instead of the real drawing. In addition a portrait orientation
fits badly to the landscape orientation in Impress.
The behavior is different from other programs with a paper like canvas.
Inkscape imports the svg graphic with viewBox values interpreted in unit px.
Corel Draw notices the missing size on import and offers to drag a target
range, and otherwise uses a fixed size, but I don't know the unit. Both have
the object size same as the viewBox.
My suggestion is to do it like Inkscape and set the initial viewport to the
viewBox values in unit px in case there is no way to get the real target range.
[There is an additional problem with preserveAspectRatio, but that will be
covered by another issue.]
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.