[Libreoffice-bugs] [Bug 142432] [DOCX] Arc is rendered as Pie, rotation is incorrect

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon May 24 13:25:19 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142432

--- Comment #6 from Regina Henschel <rb.henschel at t-online.de> ---
Further analysis results:
The element <wpc:wpc> is used for the drawing canvas. This is not implemented
at all in LibreOffice. So LibreOffice uses the <mc:Fallback> part of the
<mc:AlternateContent> element. It has the drawing canvas as <v:group> and the
arc objects as <v:shape>. The geometry is given in the 'style' and the 'path'
attribute.

The 'path' attribute describes the path by commands followed by coordinates.
They allow building subpaths and disabling fill and stroke for each individual
subpath.

Currently LibreOffice uses the SdrPathObj. That corresponds to ODF element
'draw:path' and that uses svd:d to describe the path.
The SdrPathObj is unsuitable here, because svd:d does not allow to set 'filled'
and 'stroked' for individual subpaths.
The implementation of LibreOffice for 'draw:path' does not allow mixed open and
closed subpaths.

The needed path features are available in custom shapes. So that has to be used
in case the vml path has ns or nf or mixed open and closed subpaths.

But pure vml graphic occurs not often nowadays, because MSO uses it mostly as
fallback. So priority should be to implement import of <wpc:wpc>. From point of
LibreOffice that element acts similar to a group.

The <mc:Fallback> has no information, that it is ersatz for an arc and does not
know anything about handles. So improving that part would not result in the
same object as in Word.


The wrong rotation happens in 
https://opengrok.libreoffice.org/xref/core/oox/source/vml/vmlshape.cxx?r=a0656ec6#1089
The rotation angle in the example file is "2955973fd" and maRotation contains
it as that. toDouble converts it to 2955973.0
"fd" means, that it in deg*2^16.
The correct angle in deg100 is already in Prop_RotateAngle. Either that is used
or here again the convertion from
https://opengrok.libreoffice.org/xref/core/oox/source/vml/vmlshape.cxx?r=a0656ec6#696
has to be used again.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210524/20122d54/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list