How to export 'Octagon Bevel' and 'Diamond Bevel' to OOXML

Regina Henschel rb.henschel at t-online.de
Tue Apr 12 12:08:47 UTC 2022


Hi Miklos,

Miklos Vajna schrieb am 11.04.2022 um 08:27:
> Hi Regina,
> 
> On Sun, Apr 10, 2022 at 12:55:42AM +0200, Regina Henschel <rb.henschel at t-online.de> wrote:
>> Because there exist no suitable OOXML preset shape, we need to export them
>> with <custGeom>. I could make dedicated 'Write_Octagon_Bevel' and
>> 'Write_Diamond_Bevel' methods with OOXML handles and guides. Should I do
>> that?
>>
>> I can at least move them from lcl_IsOnDenylist to lcl_IsOnAllowlist. That
>> way the export will generate the outline as octagon or diamond with fixed
>> lines from the current handle state of the shape. I think that would be
>> better than the 'rect' now.
> 
> If we have a preset where there is no OOXML preset, then writing the
> full custom geometry sounds good to me.

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?

> 
>> The real problem is their shading. It is not contained as command in the
>> enhanced geometry. It is encoded into the type identifier, see
>> https://bz.apache.org/ooo/show_bug.cgi?id=33139. The current implementation
>> of that "feature" has a bug, see
>> https://bz.apache.org/ooo/show_bug.cgi?id=80216.
>> This "feature" uses more grades of shading than the four available in OOXML.
>> So what should I do with the shading of these shapes?
> 
> I think if our feature set there is more rich than what OOXML allows,
> then either we can just say this is not our problem or if this really
> bothers somebody, we can change our preset to use shading which is
> simple enough for OOXML to handle. >
> The trouble in the second case is to make sure we don't break old
> documents.

Old ODF-documents which use 'Octagon Bevel' or 'Diamond Bevel' have them 
only, if using ODF Format. So changes in OOXML export/import will not 
affect them.

The attached document has Versions A and B to make a similar shading 
with means of OOXML. Please have a look, which you like more. It is 
similar to OOo2.1 because current rendering in LO has bug tdf#148501.

It is not possible to get the exact lighten of OOo in OOXML, because OOo 
changes saturation in addition to luminance, whereas MS Office has a 
blending with White.

Kind regards,
Regina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Suggestion for OOXML export manu.pptx
Type: application/octet-stream
Size: 50775 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220412/595b3f21/attachment.obj>


More information about the LibreOffice mailing list