Bug 127392 - "Autofit text" reacts wrongly for custom shapes
Summary: "Autofit text" reacts wrongly for custom shapes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PPTX-Shapes Autofit
  Show dependency treegraph
 
Reported: 2019-09-06 05:45 UTC by nd101
Modified: 2023-09-11 11:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample PPTX document (27.08 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-09-06 05:45 UTC, nd101
Details
it is centered in MSO (6.44 KB, image/png)
2019-09-06 05:46 UTC, nd101
Details
not centered in Impress (5.45 KB, image/png)
2019-09-06 05:46 UTC, nd101
Details
Autofit problem in own file format (16.34 KB, application/vnd.oasis.opendocument.presentation)
2019-09-06 17:39 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nd101 2019-09-06 05:45:19 UTC
Text inside a triangular shape shall be center aligned.
Comment 1 nd101 2019-09-06 05:45:52 UTC
Created attachment 153952 [details]
sample PPTX document
Comment 2 nd101 2019-09-06 05:46:17 UTC
Created attachment 153953 [details]
it is centered in MSO
Comment 3 nd101 2019-09-06 05:46:38 UTC
Created attachment 153954 [details]
not centered in Impress
Comment 4 V Stuart Foote 2019-09-06 13:40:04 UTC
Confirming opening the OOXML .pptx on Winodws with 6.3.0.4 and current master. While from PowerPoint 2016 a save as ODF results in correct looking text annotation to the upper triangle object.

So guess this is an import filter issue for the draw objects.
Comment 5 Regina Henschel 2019-09-06 17:38:39 UTC
There is no "transparent shape", but that is a group. It has nothing to do with the problem. Ungrouping shows the same error.

The problem exists independent from pptx import filter.

I'll attach an odp-document with two custom-shapes. The left one is from our own set and therefore compatible to binary MS Office. The right one is from an OOXML shape, imported from pptx. The text box settings have anchor to center, the text alignment is horizontal and vertical center. The red rectangles mark the text area of the shape.

Error: If you enable "Autofit text", the text is shifted to the right.
Expected: The text keeps centered.
[The tool "Autofit text" is not included in the toolbars, you have to customize a toolbar to get it.]

In the example document, the error becomes only visible for the upper triangle, because the lower triangle is a freeform (custGeom) and its text area is entire width and height of the shape. Therefore the text fits into the text area. In the upper triangle the text does not fit into the text area. In both cases the text area has a right/left inset of 0.1inch and a top/bottom inset of 0.05inch. For the upper triangle it is the default value, for the lower triangle it is set explicitly. For both shapes "normAutofit" is set, which corresponds to our "Autofit text on".
Comment 6 Regina Henschel 2019-09-06 17:39:37 UTC
Created attachment 153997 [details]
Autofit problem in own file format
Comment 7 Xisco Faulí 2019-09-18 10:20:37 UTC
Problem with original PPTX file can be also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 8 QA Administrators 2023-03-20 03:26:45 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2023-09-11 11:24:20 UTC
Still reproducible with PPTX and ODP in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: beaea2e992912b4747d790070b26371f557b1f57
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded