Bug 116371 - FILEOPEN: .doc image rotation not imported; not exported to .doc & .docx
Summary: FILEOPEN: .doc image rotation not imported; not exported to .doc & .docx
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: filter:doc, filter:docx, filter:ooxml
Depends on:
Blocks: DOCX-Images DOC-Images
  Show dependency treegraph
 
Reported: 2018-03-12 20:35 UTC by Mikhail Novosyolov
Modified: 2023-05-28 14:56 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
1 (128.57 KB, application/vnd.oasis.opendocument.text)
2018-03-12 20:36 UTC, Mikhail Novosyolov
Details
2 (105.49 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-03-12 20:37 UTC, Mikhail Novosyolov
Details
3 (119.50 KB, application/msword)
2018-03-12 20:37 UTC, Mikhail Novosyolov
Details
4 (111.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-03-12 20:37 UTC, Mikhail Novosyolov
Details
5 (224.50 KB, application/msword)
2018-03-12 20:37 UTC, Mikhail Novosyolov
Details
.doc file in Word2010 (248.10 KB, image/png)
2018-03-13 04:56 UTC, raal
Details
5-2 wps-rotation-image-MSO.doc (84.00 KB, application/msword)
2018-03-13 09:03 UTC, Mikhail Novosyolov
Details
screenshot from MSO (1) (162.07 KB, image/jpeg)
2018-03-15 16:52 UTC, Mikhail Novosyolov
Details
screenshot from MSO (2) (126.53 KB, image/jpeg)
2018-03-15 16:53 UTC, Mikhail Novosyolov
Details
Bug is present in LibreOffice 6.3.1.png (162.24 KB, image/png)
2019-09-11 21:30 UTC, Mikhail Novosyolov
Details
ODT saved and compared in MSO and LO (912.31 KB, image/png)
2020-09-17 12:56 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Novosyolov 2018-03-12 20:35:48 UTC
Description:
1. image rotation is NOT imported from .doc
2. image rotation is imported correctly from .docx
3. image rotation is NOT exported to both .doc and .docx

Minimal test cases are attached.

Steps to Reproduce:
---------------------

EXPORT TEST
1. "test-image-rotation.odt" was created in Libreoffice and exported to "test-image-rotation.doc" and "test-image-rotation.docx". doc and docx were reopened with Libreoffice itself and WPS Office (Linux). The image was not rotated in doc and docx.
------------------------------------

IMPORT TEST
1. "wps-image-rotation.docx" was created in WPS Office and also saved as "wps-image-rotation.doc".
2. "wps-image-rotation.docx" was opened with Libreoffice 6.0.2 and OpenOffice 4 — the image was rotated.
3. "wps-image-rotation.doc" was opened in Libreoffice — the image was NOT rotated.


Actual Results:  
.

Expected Results:
.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.146 Chrome/65.0.3325.146 Safari/537.36
Comment 1 Mikhail Novosyolov 2018-03-12 20:36:38 UTC
Created attachment 140588 [details]
1
Comment 2 Mikhail Novosyolov 2018-03-12 20:37:00 UTC
Created attachment 140589 [details]
2
Comment 3 Mikhail Novosyolov 2018-03-12 20:37:16 UTC
Created attachment 140590 [details]
3
Comment 4 Mikhail Novosyolov 2018-03-12 20:37:36 UTC
Created attachment 140591 [details]
4
Comment 5 Mikhail Novosyolov 2018-03-12 20:37:48 UTC
Created attachment 140592 [details]
5
Comment 6 Mikhail Novosyolov 2018-03-12 20:49:53 UTC
Reproducible with both JPG and PNG.
Comment 7 raal 2018-03-13 04:56:31 UTC
Created attachment 140599 [details]
.doc file in Word2010

3. "wps-image-rotation.doc" was opened in Libreoffice — the image was NOT rotated.

When I open the file test-image-rotation.doc in Word 2010, the image is not rotated. See printscreen.
Comment 8 Mikhail Novosyolov 2018-03-13 09:03:51 UTC
Created attachment 140602 [details]
5-2 wps-rotation-image-MSO.doc
Comment 9 Mikhail Novosyolov 2018-03-13 09:07:00 UTC
@raal please try "wps-image-rotation-MSO.doc". It was created in MSO 2013, not WPS Office. As for the original "wps-image-rotation.doc", it was created in WPS Office, but the image is rotated when opened in Word 2013. MS Office Online does not rotate the image in both cases and I will not be surprised if different versions of MSO are not compatible with each other. The image is not rotated when the new file is opened in Libreoffice.
Comment 10 Buovjaga 2018-03-14 14:54:15 UTC
(In reply to Mikhail Novosyolov from comment #9)
> @raal please try "wps-image-rotation-MSO.doc". It was created in MSO 2013,
> not WPS Office. As for the original "wps-image-rotation.doc", it was created
> in WPS Office, but the image is rotated when opened in Word 2013. MS Office
> Online does not rotate the image in both cases and I will not be surprised
> if different versions of MSO are not compatible with each other. The image
> is not rotated when the new file is opened in Libreoffice.

Rotated how? Please attach a screenshot (or PDF) from MSO 2013.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 11 Mikhail Novosyolov 2018-03-15 16:52:57 UTC
Created attachment 140657 [details]
screenshot from MSO (1)
Comment 12 Mikhail Novosyolov 2018-03-15 16:53:31 UTC
Created attachment 140658 [details]
screenshot from MSO (2)
Comment 13 Mikhail Novosyolov 2018-03-15 16:54:01 UTC
Sorry, I don't have MSO, above are screenshots made by a friend of mine.
Comment 14 Buovjaga 2018-03-15 18:56:38 UTC
(In reply to Mikhail Novosyolov from comment #11)
> Created attachment 140657 [details]
> screenshot from MSO (1)

Ok, thanks. Confirmed.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 28e8c3e28bf4944ecad23961602b9b1f72613d39
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 15th 2018
Comment 15 Justin L 2018-08-20 18:39:27 UTC
3. image roation is NOT export to .doc looks similar to olakasegirao.odt (attachment 88076 [details]) from bug 70838's comment0. 

1. image rotation is NOT imported from .doc might be related to bug 118375.

I'm surprised to see that #3 docx export still isn't fixed in 6.2 master.
Comment 16 Mike Kaganski 2019-01-26 09:58:58 UTC
Taking the export to DOCX part.
Comment 17 Mike Kaganski 2019-01-26 14:14:53 UTC
https://gerrit.libreoffice.org/66963
Comment 18 Commit Notification 2019-01-26 16:03:04 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b226383a83e41bbced9fc2a02dc09a449401ec97%5E%21

tdf#116371: export rotation of SwGrfNode

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 19 Mike Kaganski 2019-01-26 16:06:06 UTC
DOC parts are TODO.
Comment 20 Miklos Vajna 2019-01-31 11:56:05 UTC
I'll look at the RTF part.
Comment 21 Commit Notification 2019-01-31 18:14:55 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d8cf61f39181073da2d8748be74d9dadae79d647%5E%21

Related: tdf#116371 RTF export: handle rotation of SwGrfNode

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 22 raal 2019-04-08 17:12:32 UTC
*** Bug 124615 has been marked as a duplicate of this bug. ***
Comment 23 Luke 2019-04-08 23:04:29 UTC Comment hidden (obsolete)
Comment 24 Mikhail Novosyolov 2019-09-11 21:30:52 UTC
Created attachment 154119 [details]
Bug is present in LibreOffice 6.3.1.png

Original .doc file is still displayed without rotation in LO 6.3.1
Comment 25 Timur 2020-09-17 12:56:51 UTC
Created attachment 165623 [details]
ODT saved and compared in MSO and LO

Let's try to untangle this all-in-one bug:

attachment 140602 [details] wps-image-rotation-MSO.DOC still opens wrong in LO 7.1+ but it's FILEOPEN bug 47596 (regardless that it's PNG and here JPEG image, probably the same issue).
Already noticed that fileopen of DOCX is OK. 

FILESAVE of ODT attachment 140588 [details] to DOC is wrong, as seen opening in MSO. I can't says why Comment 23 says it's fixed. Anyway, this bug is too hard to follow. That deserves a separate bug, maybe with different angles, after seeing . 
FILESAVE of ODT to DOCX is done here, so I close as Fixed.
Comment 26 Timur 2020-09-17 13:05:32 UTC
Let's keep filesave DOC in bug 124615.
Comment 27 Luke 2023-05-28 14:56:04 UTC
Yes, ignore Comment 23. I was wrong about what it fixed.