Hi Miklos,
there is some progress in the meantime.
Commit
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b195cf4db4c21da3cf754689fb22f0b6a904a03e
moves "Octagon Bevel" and "Diamond Bevel" to the custGeom area for
export. I think that this step is definitely necessary.
Miklos Vajna schrieb am 13.04.2022 um 08:41:
Hi Regina,
On Tue, Apr 12, 2022 at 02:08:47PM +0200, Regina Henschel <rb.henschel@xxxxxxxxxxx> wrote:
I have created a similar shape in OOXML including handle and guides, see
attachment. The handle is correct in PowerPoint, but our import of
<custGeom> doesn't get the handle correctly.
And saving then to pptx again, will loose the handle because then it is not
known, that the shape comes from our preset and the general export methods
for ooxml-non-primitive are used, which cannot export handles at all.
Export handles for 'Octagon Bevel' and 'Diamond Bevel' nevertheless? Or
export them with guides (needed in PP for text area rectangle) and shading,
but without handles?
Hmm, that's an interesting trade-off. :-)
If I understand correctly, you need guides to be able to render
unchanged text at the correct text area rectangle.
Currently the text area is calculated from the static (current state of
the handles) shape. That results in values relative to the viewBox. But
OOXML needs them relative to the shape width and height. For this change
guides are needed. They are currently generated accordingly, independent
of any guides in the shape, and used to write the <a:rect> element in
OOXML. The text is then at the correct position and it is editable after
reopening. That works for all export cases which use custGeom. It will
have to be changed when general guide/handle export is implemented at
some point.
And you need handles
to be able to edit the shape easily.
Handles and their related guides are needed, if you want to change the
geometry of the shape in MS Office. But because of the previously (Apr
12) noted problems, I would prefer not to export the handle of "Octagon
Bevel" and "Diamond Bevel" and only export the current state of the
geometry.
If we have to choose between
correct rendering and easy editing, I would go for correct rendering of
the unchanged shape.
It is not really clear what kind of rendering is "correct". Please have
a look at bug "Rendering of shape 'Octagon Bevel' is faulty"
https://bugs.documentfoundation.org/show_bug.cgi?id=148501
and its follow-up
"Replace 'Octagon Bevel' and 'Diamond Bevel' with similar shapes
suitable for export to OOXML"
https://bugs.documentfoundation.org/show_bug.cgi?id=148655
The appearance we currently get (without any patch) cannot be exported
to OOXML, if we want, that it remains to be a shape. And when reopening
the file the shape will have different shading than before saving, if we
not change 'Octagon Bevel' and 'Diamond Bevel' to an OOXML-compatible
shape at the same time.
The alternative would be to export the shape not as a shape but as an
image. For what purpose are these bevel-shapes used? Likely for giving a
frame to a text. And then text and background should be still editable
after roundtrip. That is my opinion. So for me export as image would be
the worse solution.
Kind regards,
Regina