Bug 138529 - Drawing opens correctly in LibO 6.4 but not in 7.x
Summary: Drawing opens correctly in LibO 6.4 but not in 7.x
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-11-27 16:02 UTC by Callegar
Modified: 2020-11-28 12:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test doc (154.31 KB, application/vnd.oasis.opendocument.graphics)
2020-11-27 16:03 UTC, Callegar
Details
Comparison before and after (264.06 KB, image/png)
2020-11-27 16:24 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2020-11-27 16:02:50 UTC
Description:
I have a drawing (probably originally made a long time ago) that opens fine up to LibO 6.4 but incorrectly in 7.0.x and 7.1 beta.

The issue may actually be with the drawing and LibO up to 6.4 may just have been more tolerant. But please still check that there is no regression in LibO.

Steps to Reproduce:
Open the attached drawing both in LibO 6.4 and LibO 7.0 and 7.1. See the differences.

Actual Results:
Opened docs look different. The version obtained with LibO 7.x is wrong.

Expected Results:
LibO 7.x should open the sample doc just like LibO 6.4


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: DrawingDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Callegar 2020-11-27 16:03:34 UTC
Created attachment 167620 [details]
Test doc
Comment 2 Xisco Faulí 2020-11-27 16:24:54 UTC
Created attachment 167622 [details]
Comparison before  and after
Comment 3 Xisco Faulí 2020-11-27 16:31:34 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=bc886f523872d4f9845c188c7d525d72a1a60946

author	Regina Henschel <rb.henschel@t-online.de>	2020-01-02 17:37:32 +0100
committer	Regina Henschel <rb.henschel@t-online.de>	2020-01-17 18:03:38 +0100
commit bc886f523872d4f9845c188c7d525d72a1a60946 (patch)
tree 8677487eb45e619a9dcbc135c9c934e1a8e201d4
parent 21a5c7f77dea3c880ee1808f5385205f53271338 (diff)
tdf#98584 Correct import draw:transform values skewY and matrix

Bisected with: bibisect-linux64-7.0

Adding Cc: to Regina Henschel
Comment 4 Regina Henschel 2020-11-27 23:29:46 UTC
The document is faulty. It has an element <office:graphics> where it should be <office:drawing>.

The different placed triangle is the element <draw:polygon> in the first <draw:g> element in content.xml. Problematic values are svg:width="-1.999cm" and svg:height="-1.599cm" and svg:viewBox="0 0 -2000 -1600". Width and height may not be negative in SVG.

I cannot create such shape, tested older OOo and LO 3.5. Meta data tell, that the document was created with a Linux version of LO 3.4 in 2011-11-29. It might be, that Novell Go-oo had used these negative values.

I suspect that the negative values were used to describe a 180 degree rotation. But I don't know:
the center of rotation,
order of this rotation in regard to other transformations,
whether this was used for all kind of shapes,
how skew was written by that version.
So I see no obvious way how to repair such documents and keep the skew fixes. 

Open and save the file in LO 6.4. It repairs the document and then it will be OK in LO 7.1 too.
Comment 5 Callegar 2020-11-27 23:34:09 UTC
Thanks for the thorough analysis. Unfortunately, so much time has passed that I do not really remember how I made that drawing!
In any case, it is good to know that it is not a regression, but a broken document. And to have documented a workaround in case someone encounters a similar issue.
Comment 6 Xisco Faulí 2020-11-28 12:56:36 UTC
Hi Regina, thanks for the analysis. Closing as RESOLVED NOTABUG