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

            Bug ID: 161327
           Summary: LibreOffice does not handle dr3d:end-angle values
                    correctly
           Product: LibreOffice
           Version: unspecified
          Hardware: All
               URL: https://docs.oasis-open.org/office/OpenDocument/v1.3/o
                    s/part3-schema/OpenDocument-v1.3-os-part3-schema.html#
                    __RefHeading__1419582_253892949
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Start a new Draw document.
Draw a diagonal line.
Convert the line to 3D Rotation Object (from context menu).
Select scene if not already selected and open the "3D Effects" dialog (from
context menu).
Enter the scene. The rotation object should be selected, otherwise select it.
Set line style to "solid".
In "3D Effects" dialog set field "Rotation Angle" to 180°.
Exit scene.
Save document, e.g. to .fodg.

Open the saved file in an editor.
Search for the attribute "dr3d:end-angle".
It has the value 1800. That is wrong.

ODF specifies, that the angle has datatype angle (18.3.1).
Open specification there.
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1416540_253892949

You read there:
<quote>
An angle, as defined in §4.1 of [SVG], is a double value that may be followed
immediately by one of the following angle unit identifiers: deg (degrees), grad
(gradiants) or rad (radians). If no unit identifier is specified, the value is
assumed to be in degrees.
</quote>

As LibreOffice does not write a unit, the value should be 180, not 1800.

Now we try reading that value. In editor set instead of the "1800" any of
"180deg", "200grad" or "3.14159265359rad".
Open the so changed document. In any case you get a rotation object with 360°.
That is, LibreOffice cannot interpret a unit identifier and uses the default
360° instead.

I think, the solution can be done in two steps.
1. Make LibreOffice able to interpret an angle unit identifier for the
dr3d:end-angle.
2. When writing to ODF 1.4, write "180deg" instead of "1800".

I think, we should keep interpreting a unit-less value in documents of ODF 1.3
and earlier as being 1/10 degree for to be backward-compatible with older
documents.

Michael, what do you think about the way to fix the problem?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to