Files
odfstudio/include
Mike Kaganski 1dc3b23162 cool#16078: OOXML round-trip of the clip polygon
A placeholder clipped to an outline carries it as custom geometry, which an
image shape has nowhere to keep, so the outline was dropped on load and the save
wrote a plain rectangle over it. Read it into GraphicClipPolyPolygon, and write
it back from there.

The two directions are not equally capable. Import reads paths of literal
coordinates: one driven by guides or formulas, and an arc, both need the
custom-shape machinery. A quadratic curve is read, converting exactly to the
cubic the model keeps. A path that states no w and h is not read either - such
coordinates are absolute EMU rather than a space to scale from, and no file
authored that way turned up to check the reading against. Export writes whatever
polygon the model holds, so that direction loses nothing - a geometry the import
gave up on was never stored. A curve that closes a contour states no end point
of its own, and the point the contour started from answers for it.

A path that states fill="none" states that it paints nothing, and PowerPoint
leaves it out of the clip: a picture clipped by two paths shows through the
plain one and not through the nofill one, while the same file with that one
attribute removed - or with stroke="0" in its place - shows through both. So
such a path is read past, while the shading variants and stroke="0" are not:
those say how an area is painted, not whether there is one.

Several paths become one polygon by area, not by concatenation: the contours of
one path are filled by the even-odd rule, so two of them overlapping leave a
hole, while paths are filled one after another and the shape covers what they
cover together. Concatenating them instead cut a hole wherever two paths
overlap, which the file does not describe and PowerPoint does not draw.

A shape's own custom geometry now replaces the one it inherits, the way a preset
geometry already did. Saving states the outline on the slide as well as on its
layout, so reading that back gave the slide placeholder its own geometry beside
the inherited one, and two geometries at once are not one this reads - the
placeholder came back unclipped while PowerPoint showed the same file correctly.

The outline reaches the drawing the commit before this one added, so a
placeholder read from a file shows what sits behind the parts it does not cover.
It survives a round-trip through ODF as well, where the property already travels
as coext:graphic-clip-poly, with nothing to carry until now.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I87bd21e68bcea648c8c9151b6af5439578f1c2cf
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9303
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 04bbb74a24bad4ae54f257b6b028f3fd48955272)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210123
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-27 21:14:55 +02:00
..
2026-08-25 14:45:31 +02:00
2026-08-25 11:17:36 +02:00
2026-08-25 14:45:31 +02:00
2026-08-21 14:19:46 +02:00
…
2026-08-27 13:59:07 +02:00
2026-06-04 10:00:29 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 11:57:36 +02:00
2026-08-21 09:31:35 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 14:45:31 +02:00
2026-08-25 11:57:36 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 14:31:09 +02:00
2026-08-21 14:19:46 +02:00
2026-08-21 14:19:46 +02:00
2026-08-27 20:39:06 +02:00
2026-08-21 14:19:46 +02:00
…
2026-08-21 14:19:46 +02:00
…
2026-08-27 20:39:06 +02:00
2026-08-27 13:59:07 +02:00
2026-08-21 09:31:35 +02:00
2026-08-20 19:06:29 +02:00
2026-08-21 14:19:46 +02:00
2026-08-27 15:00:22 +02:00
…
…