One of the changes I introduced at revision 13544 was a modification of
scaleChildItemsRec()
so that it no longer recurses into groups to apply scaling changes associated with a change of units. This was breaking EMF import of clipped objects. That happened because during the recursion the coordinates of the clipped objects were changed directly, not by a transform. Since the clipping object (in defs) was not similarly scaled this broke the clip. See for instance:
https://bugs.launchpad.net/inkscape/+bug/1348417
In the changed version the scaling change is applied as a transform at the group level, and all the coordinates within that group are not directly modified, so the clipping object and clipped objects are still at the same scale and they continue to work together. Since EMF import of clipped objects always works like (pseudocode):
<g (clip reference)> clipped objects </g>
applying the transform at the group level fixes the problem in that context.
I suspect that scaleChildItemsRec() is still going to cause problems for any SVG object other than a group that looks something like (pseudocode):
<(not a group) (a clip or mask ref) x=100 y=100 (other stuff)
when the document units are changed because it will change the 100's to something else, and not modify the referenced clipping object. I have not confirmed this though.
In any case, would the people who worked on document units please see if my changes at revision 13544 break anything when the document units are changed? I did some preliminary testing and it looked OK, but I don't really know what test cases to use to explore all the edge cases.
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech