[Libreoffice-bugs] [Bug 134289] FILEOPEN PPTX: text shifts to the left when box is too narrow (text horizontally centers around upper/left corner instead of starting there)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 17 14:32:56 UTC 2020


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

Regina Henschel <rb.henschel at t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rb.henschel at t-online.de

--- Comment #10 from Regina Henschel <rb.henschel at t-online.de> ---
The error is in
https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=ef08f18e#73

Because MS Office has "not centered" as default and LibreOffice has "centered"
in its default style, the value "not centered" needs to be set explicitly.

So instead of
    mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
    if( mrTextBodyProp.mbAnchorCtr )
        mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
TextHorizontalAdjust_CENTER );

it needs to be
    mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
    if( mrTextBodyProp.mbAnchorCtr )
        mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
TextHorizontalAdjust_CENTER );
    else
        mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
TextHorizontalAdjust_LEFT );


I have not tested, whether other places have to be adapted in addition. At
least the import works with this change.

-- 
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/20200717/fe63509e/attachment.htm>


More information about the Libreoffice-bugs mailing list