Issue 123433 - [SVG] marker-mid on pseudo vertices
Summary: [SVG] marker-mid on pseudo vertices
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.1.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Reported: 2013-10-06 13:26 UTC by Regina Henschel
Modified: 2017-05-20 10:35 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

compare the attached svg graphic in browser and AOO to notice the wrong, additional marker-mid (1.10 KB, image/svg+xml)
2013-10-06 13:26 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-10-06 13:26:40 UTC
Created attachment 81715 [details]
compare the attached svg graphic in browser and AOO to notice the wrong, additional marker-mid

The elliptical arc curve commands are implemented by resolving the curve with Bezier curve segments. That generates vertices, where the original svg graphic does not have vertices. Because the current implementation of markers do not use the original d attribute, but the generated polypolygon, marker-mid not only shown on the vertices defined in d, but on the generated ones too.

Such pseudo vertices might occur in other context too, see comment#8 in bug 119118.

It is needed, that the original information about the kind of command is someway kept. For example add a property to track, if a point belongs to a svg command vertex. This might be done by a sequence similar to flags or by extending the "NORMAL" flag, or something else..

To solve this, deeper changes are needed, therefore I set this issue to enhancement.
Comment 1 Armin Le Grand 2013-10-29 11:42:16 UTC
ALG: Took a look and preparing to also create a std::set of polygon coordinate pairs < poly#, point# > which can describe the 'fake' point created (fake in the sense that it is not a real point of the svg:d but a created one for any other svg:d command (currently 'a' and 'A'))...
Comment 2 Armin Le Grand 2013-10-29 12:46:32 UTC
ALG: Works as expected; This needs changes at the methods importFromSvgPoints/exportToSvgPoints, checking if this is a good point in time to get the unification of svg:d im/exporters from aw080 to trunk, getting rid of the 2nd set in xmloff (SdXMLImExPointsElement, SdXMLImExSvgDElement). Also worth trying: get SdXMLImExViewBox to the version with doubles as in aw080...
Comment 3 Armin Le Grand 2013-10-29 13:46:53 UTC
ALG: Integrated, adapted (with some changes). This also adds the compatible mode to svg:d read/write (to importFromSvgD and exportToSvgD, both have now a boolean bHandleRelativeNextPointCompatible which is true for all usages in xmloff (ODF format) and false for all usages in svgio (svg importer)).
The svg importer will now trace standars svg:d without the offset error with relative 'z' statemants. Also added code to handle 'l' or 'L' directly after 'z' or 'Z' with missing 'm' or 'M'.
Added code to export absolute 'M' statements for svg:d in ODF, this should ensure that these can be imported later without error handling. Checked that existing AOO version import that format flawlessly. Other AOO derivates should be able to import this correctly too. I would recommend other AOO derivatives to do the same: write 'M' in svg:d export instead of 'm'...
Checked the svg importer in svgio, all my test files look well. Also checked with 'MarkerDirection' example from Regina, all look well now (only one marker direction different from IE in top-left example, but I think IE is wrong here).
Doing some more data exchange tests...
Comment 4 Armin Le Grand 2013-10-29 13:49:16 UTC
ALG: This is pretty much added changes described in task 119118.
Comment 5 SVN Robot 2013-10-29 14:11:46 UTC
"alg" committed SVN revision 1536730 into trunk:
i123433 Detect pseudo-vertices at svg import, unify svg:d handling, correct s...
Comment 6 Armin Le Grand 2013-10-29 14:12:49 UTC
ALG: Looks good, comitting, done.
@Regina: Please try to get a version and do some checks with it!
Comment 7 Regina Henschel 2013-10-30 10:02:34 UTC
I've build r1536830. This issue about markers on pseudo vertices is fixed.

Your commit touches a lot other parts, it will take some time to test that all. Perhaps a call on the qa-list, to examine drawings which use paths in some way, might be useful.
Comment 8 Armin Le Grand 2013-10-30 12:53:50 UTC
ALG: Detected and corrected an error in polygon export; it is not okay to destroy SvXMLElementExport in XMLShapeExport::ImpExportPolygonShape early and do ImpExportDescription..ImpExportText afterwards since the destructor already writes the hierarchical origanized XML objecft description and the following stuff would be outside the object's XML context.
Comment 9 Armin Le Grand 2013-10-30 12:55:58 UTC
ALG: Yes that's why I re-checked and already corrected something; this indirectly also shows errors in aw080 which I changed there, too. Reason to do it now is to just have it in the next release for better data exchange and the 'relative' long time to the potential next release.
Comment 10 SVN Robot 2013-11-01 10:26:45 UTC
"alg" committed SVN revision 1537886 into trunk:
i123433 by error removed the export of the created svg:d in ExportConnectorSh...
Comment 11 Regina Henschel 2014-08-01 13:27:20 UTC
Verified on AOO411m4(Build:9774)  -  Rev. 1614049 (=RC1)