<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:rb.henschel@t-online.de" title="Regina Henschel <rb.henschel@t-online.de>"> <span class="fn">Regina Henschel</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN PPTX: text shifts to the left when box is too narrow (text horizontally centers around upper/left corner instead of starting there)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=134289">bug 134289</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>rb.henschel@t-online.de
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN PPTX: text shifts to the left when box is too narrow (text horizontally centers around upper/left corner instead of starting there)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=134289#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN PPTX: text shifts to the left when box is too narrow (text horizontally centers around upper/left corner instead of starting there)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=134289">bug 134289</a>
from <span class="vcard"><a class="email" href="mailto:rb.henschel@t-online.de" title="Regina Henschel <rb.henschel@t-online.de>"> <span class="fn">Regina Henschel</span></a>
</span></b>
<pre>The error is in
<a href="https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=ef08f18e#73">https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=ef08f18e#73</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>