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

            Bug ID: 149551
           Summary: OOXML bad import of attribute 'rot' of <bodyPr>
                    element
           Product: LibreOffice
           Version: 7.4.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Impress
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 180727
  --> https://bugs.documentfoundation.org/attachment.cgi?id=180727&action=edit
writing mode 'vert' plus text area rotation

The attribute 'rot' of <bodyPr> element specifies an additional rotation of the
text area. It has the same meaning as the attribute 'draw:text-rotate-angle' of
<draw:enhanced-geometry> in ODF.

Open attached document 'Vert plus rotation.pptx' in PowerPoint and in
LibreOffice. The additional text area rotation is missing in LO. Save it from
LO to pptx and open the saved file in PowerPoint. The additional rotation is
missing.

Open the file 'only rotation.pptx' in PowerPoint and in LO. Notice that the
text in LO is sheared.

Reason of the problems is this: LO reads the 'rot' attribute into the property
'TextPreRotateAngle'. But that property is designed to carry the writing-mode
rotations from attributes 'vert' and 'vert270'. Using it with arbitrary angles
produces shearing. In the first case the read values from 'rot' are overwritten
with the angle from 'vert' and so 'rot' is lost.

When this will be fixed, the export to ODF needs to be fixed too. It has in 
/core/xmloff/source/draw/shapeexport.cxx the lines 
4280   case EAS_TextPreRotateAngle :
4281   case EAS_TextRotateAngle :
4282   {
4283        double fTextRotateAngle = 0;
4284        if ( ( rGeoProp.Value >>= fTextRotateAngle ) && fTextRotateAngle !=
0 )
4285        {
4286            ::sax::Converter::convertDouble(
4287                aStrBuffer, fTextRotateAngle );
4288            aStr = aStrBuffer.makeStringAndClear();
4289            rExport.AddAttribute( XML_NAMESPACE_DRAW,
XML_TEXT_ROTATE_ANGLE, aStr );
4290        }

That will produce a "duplicate attribute" file format error, if both attributes
are set. Such is possible independent from OOXML import, when the property
values are set by a macro.

So it boils down to implementation errors of properties "TextPreRotateAngle"
and "TextRotateAngle".

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

Reply via email to