Bug 130182 - FILEOPEN: PPTX: anchorCtr="0" is imported as TextHorizontalAdjust_CENTER
Summary: FILEOPEN: PPTX: anchorCtr="0" is imported as TextHorizontalAdjust_CENTER
Status: RESOLVED DUPLICATE of bug 129685
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PPTX-Shapes
  Show dependency treegraph
 
Reported: 2020-01-24 19:44 UTC by Xisco Faulí
Modified: 2020-09-21 14:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (22.00 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-01-24 19:44 UTC, Xisco Faulí
Details
Comparison MSO 2010 and LibreOffice 6.5 master (47.54 KB, image/png)
2020-01-24 19:46 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-01-24 19:44:56 UTC
Created attachment 157413 [details]
sample file

Found while investigating bug 129685

Steps to reproduce:
1. Open attached document

-> Text in all shapes is centered. it should be aligned to the left. See comparison image

I think the problem is in https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=a7f28581#80

something like this fixes the issue

    const OptValue<bool> bAnchorCtr = rAttribs.getBool( XML_anchorCtr );
    if( bAnchorCtr.has() )
    {
        mrTextBodyProp.mbAnchorCtr = bAnchorCtr.get();
        if( mrTextBodyProp.mbAnchorCtr )
            mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_CENTER );
        else
            mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_LEFT );
    }

however, it makes test sd/qa/unit/data/n819614.pptx to fail as text is left aligned, while it should be centered

Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 6b4fe3e44b4daa89fef6a3385919b00472eaed60
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2020-01-24 19:46:30 UTC
Created attachment 157414 [details]
Comparison MSO 2010 and LibreOffice 6.5 master
Comment 2 Xisco Faulí 2020-01-24 19:47:39 UTC
Also reproduced in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Regina Henschel 2020-01-24 21:07:51 UTC
Hi Xisco, I have investigated in text positioning some time ago and have put my results in https://wiki.documentfoundation.org/Documentation/Text_in_Custom_Shapes#Horizontal_Position
It might be interesting in this context.
Comment 4 Aron Budea 2020-01-27 07:23:00 UTC
Confirmed with LO 6.5.0.0.alpha0+ (fc1f85127968d1c2e0a53dace51bf8a78f9e6ca5) / Ubuntu.
Comment 5 Xisco Faulí 2020-09-21 14:51:27 UTC
Issue fixed by https://git.libreoffice.org/core/commit/10bb02efd8afd42e633e370480104e2575546d8e
Closing as a duplicate of bug 129685

*** This bug has been marked as a duplicate of bug 129685 ***