Issue 122326 - SVG: missing text after breaking SVG
Summary: SVG: missing text after breaking SVG
Alias: None
Product: Draw
Classification: Application
Component: editing (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Reported: 2013-05-16 11:52 UTC by Ariel Constenla-Haile
Modified: 2013-07-12 16:40 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2013-05-16 11:52:53 UTC
- New Draw document
. Insert any of
- break the graphic
- the text is missing
Comment 1 Armin Le Grand 2013-05-16 15:22:17 UTC
ALG: The general problem here is that we have no code yet to convert a sequence of primitives to SdrObjects. Thus, the current path is to convert to a metafile and use the existing code to convert metafile to SdrObjects. That code is old and not complete, even if I add stuff from time to time (esp. the last 2 weeks already). A better and full solution would be to change a primitive_to_SdrObject converter what I would love to do, but earliest after 4.0.
Still, it's a defect and a good reason to get this done soon.
Comment 2 Ariel Constenla-Haile 2013-05-16 15:42:41 UTC
The problems seems to be in the break operation:

- Insert
- Convert to metafile - text is there in the metafile
- Break the metafile - text is missing
Comment 3 Armin Le Grand 2013-05-16 16:08:39 UTC
ALG: Yes, that's what I wanted to express with Comment 1.
Comment 4 Armin Le Grand 2013-05-17 09:57:36 UTC
ALG: Took a look and text is not handled properly. Adding text clipping (as text or as polygons when over clip bounds). Also correcting border distance settings to get the text not offsetted as currently. Adapted example tspan01.svg to have text inside, on and outside the clip region. Clip region: The SVG defines one, thus it's also set in the metafile. It defines one because the viewBox="0 0 1000 300" and the <rect x="1" y="1" width="998" height="298" fill="none" stroke="blue" stroke-width="2" /> overlap by -1 in x and y since the line of width '2' (which may have been intended to lay inside the definition) is centered on the rectangle.
Comment 5 SVN Robot 2013-05-17 09:58:33 UTC
"alg" committed SVN revision 1483717 into trunk:
i122326 added text clipping, corrected text box distances
Comment 6 Armin Le Grand 2013-05-17 09:58:47 UTC
ALG: Added, done.