Apache OpenOffice (AOO) Bugzilla – Issue 123433
[SVG] marker-mid on pseudo vertices
Last modified: 2017-05-20 10:35: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.
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'))...
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...
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...
ALG: This is pretty much added changes described in task 119118.
"alg" committed SVN revision 1536730 into trunk: i123433 Detect pseudo-vertices at svg import, unify svg:d handling, correct s...
ALG: Looks good, comitting, done. @Regina: Please try to get a version and do some checks with it!
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.
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.
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.
"alg" committed SVN revision 1537886 into trunk: i123433 by error removed the export of the created svg:d in ExportConnectorSh...
Verified on AOO411m4(Build:9774) - Rev. 1614049 (=RC1)