Bug 100065 - text in rotated & flipped shapes rotate in the wrong direction (pptx import)
Summary: text in rotated & flipped shapes rotate in the wrong direction (pptx import)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.0.6.2 rc
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Paul Trojahn
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-26 12:40 UTC by Stefan Eckert
Modified: 2017-10-05 10:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bug_preview (183.90 KB, image/png)
2016-05-26 12:40 UTC, Stefan Eckert
Details
bug_doc (80.89 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-05-26 12:41 UTC, Stefan Eckert
Details
Sample file and screenshots (364.48 KB, application/zip)
2017-08-13 13:36 UTC, Ahmad Harthi
Details
Updated Screenshots after commit 3e33a2551532806b99f6c8ca415136cd3f2f9256 (481.04 KB, application/zip)
2017-08-28 10:32 UTC, Ahmad Harthi
Details
bug doc compared MSO, LO 5.0, 5.2, 5.3, 5.4, 6.0 (471.17 KB, image/png)
2017-08-28 16:19 UTC, Timur
Details
Screenshots Combined (885.99 KB, application/zip)
2017-08-28 19:03 UTC, Ahmad Harthi
Details
Screenshots after latest patch (182.10 KB, application/zip)
2017-09-21 13:24 UTC, Ahmad Harthi
Details
LOvsMSP Screenshots + Diff (216.39 KB, application/gzip)
2017-10-02 11:32 UTC, Ahmad Harthi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Eckert 2016-05-26 12:40:54 UTC
Created attachment 125295 [details]
bug_preview

pptx has one strange feature, the text in a flipped shape is automatically flipped back. In most cases Impress seems to do it correct, but i have some rotations where it does not work.
in attached exampple the wrong shapes have 45degree, but there could be more worng interpretations.
Comment 1 Stefan Eckert 2016-05-26 12:41:44 UTC
Created attachment 125296 [details]
bug_doc
Comment 2 Stefan Eckert 2016-05-26 12:44:02 UTC Comment hidden (obsolete)
Comment 3 Daniel Ammon 2016-05-27 12:47:49 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2016-05-27 15:15:44 UTC
(In reply to Stefan Eckert from comment #0)
> Created attachment 125295 [details]
> bug_preview

So what are we looking at here? Both images are wrong? If not, which is correct?
Comment 5 Carlos 2017-03-29 18:08:36 UTC
I can confirm that the bug is present in
Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 6 Buovjaga 2017-03-29 18:23:21 UTC Comment hidden (obsolete)
Comment 7 Ahmad Harthi 2017-08-13 13:36:03 UTC Comment hidden (obsolete)
Comment 8 Ahmad Harthi 2017-08-28 10:32:26 UTC
Created attachment 135822 [details]
Updated Screenshots after commit  3e33a2551532806b99f6c8ca415136cd3f2f9256

It seems bug 109317 fixed some parts of this, attached file with the latest patches using LO build id 2651df5a65d5b89f21b08b16628e98bd969fbccd
Comment 9 Timur 2017-08-28 16:19:54 UTC
Created attachment 135828 [details]
bug doc compared MSO, LO 5.0, 5.2, 5.3, 5.4, 6.0

This bug was not properly reported and was confirmed by Carlos before valid triage. That's not helpful.
Means that each position should be explained, how it was created, which flip, which rotation.. so this can be compared to other bugs and checked for fixes.
That's what Buovjaga also asked. 
Looks like a combination of flips and rotations, but needs to be specified. 

From what I see, upper middle was fixed. But lower middle and right were changed, so again not correct. 

(In reply to Ahmad Harthi from comment #8)
> It seems bug 109317 fixed some parts of this, attached file with the latest
> patches using LO build id 2651df5a65d5b89f21b08b16628e98bd969fbccd
Which some parts? Please be precise. 
I don't see a change from 5.4.1.2 to 6.0+ and change was in 5.4.1. 
But https://wiki.documentfoundation.org/ReleasePlan/5.4#5.4.1_release is empty.

(In reply to Stefan Eckert from comment #2)
> https://bugs.documentfoundation.org/show_bug.cgi?id=68759 similar bug?
This is fileopen and that is filesave. Daniel's issue is that, so I remove both.
Comment 10 Ahmad Harthi 2017-08-28 17:21:29 UTC
(In reply to Timur from comment #9)
> (In reply to Ahmad Harthi from comment #8)
> > It seems bug 109317 fixed some parts of this, attached file with the latest
> > patches using LO build id 2651df5a65d5b89f21b08b16628e98bd969fbccd
> Which some parts? Please be precise. 
> I don't see a change from 5.4.1.2 to 6.0+ and change was in 5.4.1. 
> But https://wiki.documentfoundation.org/ReleasePlan/5.4#5.4.1_release is
> empty.

Thank you Timur for checking this bug, I was comparing attachment 135515 [details] to attachment 135822 [details], I agree what I was comparing wasn't clear. I'll attach a new file in a moment which I hope will show changes more clearly.
Comment 11 Ahmad Harthi 2017-08-28 19:03:28 UTC
Created attachment 135831 [details]
Screenshots Combined

Attached are screen-shots in one zip comparing LO 5.4.0 to LO 6.0.0 and a screen-shot comparing LO 6.0.0 to MS PowerPoint.
Comment 12 Commit Notification 2017-09-16 15:14:59 UTC
Paul Trojahn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=33a6eb3df861009d0fe9ffee344ef00cd2906520

tdf#100065 PPTX Fix import of custom shapes in groups

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Ahmad Harthi 2017-09-21 13:24:02 UTC
Created attachment 136433 [details]
Screenshots after latest patch

Thanks a lot to Paul Trojahn,

The patch fixed the rotation issue, but some shapes and texts flips or rotates wrong.

BTW, I've found selecting items inside grouped items became bit tricky especially in Windows environment, is it related to this patch?
Comment 14 Buovjaga 2017-09-21 14:38:25 UTC
(In reply to Ahmad Harthi from comment #13)
> Created attachment 136433 [details]
> Screenshots after latest patch
> 
> Thanks a lot to Paul Trojahn,
> 
> The patch fixed the rotation issue, but some shapes and texts flips or
> rotates wrong.
> 
> BTW, I've found selecting items inside grouped items became bit tricky
> especially in Windows environment, is it related to this patch?

Paul: was not sure, if you get the bugmails while being assignee, so adding to CC.
Comment 15 Commit Notification 2017-09-26 11:53:55 UTC
Paul Trojahn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=808d048694630303d895e818cfd5fb48c9d16738

tdf#100065 Fix scale of transformation

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Paul Trojahn 2017-09-30 09:30:17 UTC
(In reply to Ahmad Harthi from comment #13)
> Created attachment 136433 [details]
> Screenshots after latest patch
> 
> Thanks a lot to Paul Trojahn,
> 
> The patch fixed the rotation issue, but some shapes and texts flips or
> rotates wrong.
> 
> BTW, I've found selecting items inside grouped items became bit tricky
> especially in Windows environment, is it related to this patch?

Thanks for the test document. The issue should be resolved now. Let me know if you find more edge cases.
Selecting shapes in groups works fine for me, though I only tested it on Linux. Do you have an example?


(In reply to Buovjaga from comment #14)
> (In reply to Ahmad Harthi from comment #13)
> > Created attachment 136433 [details]
> > Screenshots after latest patch
> > 
> > Thanks a lot to Paul Trojahn,
> > 
> > The patch fixed the rotation issue, but some shapes and texts flips or
> > rotates wrong.
> > 
> > BTW, I've found selecting items inside grouped items became bit tricky
> > especially in Windows environment, is it related to this patch?
> 
> Paul: was not sure, if you get the bugmails while being assignee, so adding
> to CC.

I get bugmails even without being on CC.
Comment 17 Ahmad Harthi 2017-10-02 11:11:20 UTC
(In reply to Paul Trojahn from comment #16)

I've tested many documents with a lot of shapes grouped and non-grouped all are good, amazing how well it works now thanks :)

> Selecting shapes in groups works fine for me, though I only tested it on
> Linux. Do you have an example?

I couldn't reproduce this issue using latest LODev tested in both Windows and Linux.

There are two minor issues, the first is some shapes report opposite angles than in MSP, and the second is small offsets in texts inside shapes (should I create a new bug?). I will attach screenshots for both issues.
Comment 18 Ahmad Harthi 2017-10-02 11:32:08 UTC
Created attachment 136682 [details]
LOvsMSP Screenshots + Diff

There are two pictures, the first is a diff image between LO and MSP which shows the offset issue in shape texts between the two, and the second show that LO reports a different angle than MSP (for some shapes only).
Comment 19 Xisco Faulí 2017-10-02 12:53:10 UTC
(In reply to Ahmad Harthi from comment #18)
> Created attachment 136682 [details]
> LOvsMSP Screenshots + Diff
> 
> There are two pictures, the first is a diff image between LO and MSP which
> shows the offset issue in shape texts between the two, and the second show
> that LO reports a different angle than MSP (for some shapes only).

Could you please open a new issue instead?

I've just tested this issue in

Version: 6.0.0.0.alpha0+
Build ID: 1d0fbc9927f357d25859b7cca7ea5e9a9637681e
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and it's completely fixed.

@Paul Trojahn, could you please close this as RESOLVED FIXED?
Comment 20 Commit Notification 2017-10-05 10:51:28 UTC
Paul Trojahn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=74977861a63c920f9b49e90087cac9a841392729

tdf#100065 Refactoring

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.