Bug 144743 - FILEOPEN PPTX reference to guide is treated as constant number, if guide name starts with digit
Summary: FILEOPEN PPTX reference to guide is treated as constant number, if guide name...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shapes
  Show dependency treegraph
 
Reported: 2021-09-26 20:49 UTC by Regina Henschel
Modified: 2023-08-13 09:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
prstGeom 'funnel' plus image of it (36.58 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2021-09-26 20:49 UTC, Regina Henschel
Details
needed change in oox-drawingml-cs-presets.diff (2.24 KB, patch)
2021-09-26 21:10 UTC, Regina Henschel
Details
preset shapes with guide name with starting digit (38.09 KB, application/haansoftpptx)
2021-10-01 11:06 UTC, Regina Henschel
Details
custGeom element with guide with name starting with digit (23.87 KB, application/haansoftpptx)
2021-10-01 11:13 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-09-26 20:49:25 UTC
Created attachment 175288 [details]
prstGeom 'funnel' plus image of it

Open attached document. It has the autoshape 'funnel' on the left side and an image of it on the right side.
Notice, that a point right,top and a point left,bottom is wrong.

I have replaced the prstGeom with a custGeom, as provided by the standard. PowerPoint shows both the same. Therefore I think, that the custGeom definition of the standard has no error.
Comment 1 Regina Henschel 2021-09-26 21:10:26 UTC
Created attachment 175289 [details]
needed change in oox-drawingml-cs-presets.diff

There is an error in oox-drawingml-cs-presets, see attached diff.
It has as 11. and 12. equation (count from 0)
"10800000+2-0"   which should corresponds to <gd name="swAng1" fmla="+- cd2 2da 0" />
and
which should corresponds to <gd name="swAng3" fmla="+- cd2 0 2da" />

2da is calculated in 9. equation

So the equations should be
10800000+?9-0
10800000+0-?9

I thought this file was generated. So I wonder how this error comes in. From which source has the file been generated?
Comment 2 Xisco Faulí 2021-09-29 09:53:40 UTC
Reproduced in

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: ac34bafb6cad056f843ff3ff0dee293bf1e18c56
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Regina Henschel 2021-10-01 11:03:30 UTC
The problem in oox-drawingml-cs-presets is only a symptom of a deeper problem. If a guide has a name, that starts with a digit, then this digit is used as constant value where it has to be a reference to the guide.

The preset shapes "mathEqual" and "mathNotEqual" are affected too. They have a guide with name "2a1". The original shape has a handle on the right side, which movement is constraint, so that the top of the rectangle of the equal sign does not move outside the snap rectangle of the shape. After import by LibreOffice this restriction fails.

The problem is not only in preset shapes but with custGeom too. If you use a guide name with starting digit, then this digit is used instead of a reference to the guide.
Comment 4 Regina Henschel 2021-10-01 11:06:07 UTC
Created attachment 175438 [details]
preset shapes with guide name with starting digit

The presentation contains all preset shapes, which have guide names that start with a digit. That are "funnel", "mathEqual" and "mathNotEqual".
Comment 5 Regina Henschel 2021-10-01 11:13:03 UTC
Created attachment 175439 [details]
custGeom element with guide with name starting with digit

The presentation contains on the left side a shape with as custGeom element with the markup of preset shape "triangle". On the right side is a shape, where I have replaced all occurrences of guide name "x2" with "7x2".
This effects the handle at the tip of the triangle. If you inspect the handle position you will find a constant value "7" for its x-coordinate.
You can test with PowerPoint, that the handle in the right shape should work same as in the left shape.