Bug 97128 - FILEOPEN: landscape frame not properly shown in DOCX
Summary: FILEOPEN: landscape frame not properly shown in DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.6.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Frames Vertical-Text
  Show dependency treegraph
 
Reported: 2016-01-14 11:16 UTC by Timur
Modified: 2023-04-25 12:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
DOC with headers in portrat and landcape (25.00 KB, application/vnd.ms-word)
2016-01-14 11:16 UTC, Timur
Details
printscreen from Word 2010 (20.45 KB, image/png)
2016-01-14 12:35 UTC, raal
Details
DOC with frame not in header (17.50 KB, application/msword)
2019-01-25 01:20 UTC, Luke
Details
DOCX landscape frames also incorrectly rendered (16.79 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-01-25 01:24 UTC, Luke
Details
Example document with 0 90 and 270 degree text rotation (27.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-05-20 08:45 UTC, NISZ LibreOffice Team
Details
Screenshot of the example document in Word and Writer 7.0 (62.14 KB, image/png)
2020-05-20 08:47 UTC, NISZ LibreOffice Team
Details
DOCX with headers in portrait and landcape (20.74 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-08 07:16 UTC, Timur
Details
Example document with 0 90 and 270 - compared MSO LO (95.96 KB, image/png)
2020-10-08 07:20 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2016-01-14 11:16:20 UTC
Created attachment 121928 [details]
DOC with headers in portrat and landcape

While looking at Bug 37146, I noticed that header with frame from landcape is not properly shown in DOC, even if it's portrait only document.
Comment 1 Timur 2016-01-14 11:44:02 UTC Comment hidden (no-value)
Comment 2 raal 2016-01-14 12:35:40 UTC
Created attachment 121932 [details]
printscreen from Word 2010

I can confirm with LO  5.2.0.0.alpha0+
Comment 3 Timur 2017-12-07 13:48:08 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2018-12-13 03:50:09 UTC Comment hidden (obsolete)
Comment 5 Roman Kuznetsov 2018-12-13 07:35:34 UTC
still repro in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 6 Justin L 2019-01-23 05:38:43 UTC
LO can rotate textboxes, but frames cannot be rotated?
Comment 7 Luke 2019-01-23 19:41:04 UTC
Justin,

See: http://www.addbalance.com/word/frames_textboxes.htm


> Frames cannot be rotated

> For text at 180 degrees rotation in Word before Word 2010, you need to use Frames in landscape mode.


We should not be able to rotate frames. This would introduce export issues. Rather frames need to be extended to correctly render landscape pages like word does.
Comment 8 Luke 2019-01-25 01:20:40 UTC
Created attachment 148612 [details]
DOC with frame not in header

Example showing that the issue is not related to the header/footer
Comment 9 Luke 2019-01-25 01:24:42 UTC
Created attachment 148613 [details]
DOCX landscape frames also incorrectly rendered
Comment 10 NISZ LibreOffice Team 2020-05-20 08:45:36 UTC
Created attachment 161024 [details]
Example document with 0 90 and 270 degree text rotation

An improved version of attachment 160866 [details] from bug #69175

There a VML shape is rotated, which is converted by Writer to a frame. The text direction setting is imported correctly this way, only the shape dimensions are incorrect.

Word can convert those VML shapes to frames, which opens up this bug.
The text direction setting is not imported in frames, but the frame dimensions are correct at least.
Comment 11 NISZ LibreOffice Team 2020-05-20 08:47:17 UTC
Created attachment 161025 [details]
Screenshot of the example document in Word and Writer 7.0

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 442c7b95e2ee94b66a9854d0cb22f8ecb76532c6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 12 NISZ LibreOffice Team 2020-09-08 08:49:15 UTC
Sorry for the noise this is indeed a frame import bug.
Comment 13 NISZ LibreOffice Team 2020-09-08 13:27:55 UTC
@Tibor I thought you might be interested in this
Comment 14 Commit Notification 2020-10-06 10:31:54 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/af4e5ee0f93c1ff442d08caed5c875f2b2c1fd43

tdf#97128 DOCX import: fix frame direction

It will be available in 7.1.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 15 Timur 2020-10-08 07:16:23 UTC
Created attachment 166172 [details]
DOCX with headers in portrait and landcape

Timur added DOC attachment 121928 [details] as original sample with headers in portrait and landcape, DOCX variant added now
Luke added DOC attachment 148612 [details] and DOCX attachment 148613 [details] with frame in body 
NISZ added DOCX attachment 161024 [details] example document with 0 90 and 270 degree text rotation and Screenshot attachment 161025 [details]
Comment 16 Timur 2020-10-08 07:20:00 UTC
Created attachment 166173 [details]
Example document with 0 90 and 270  - compared MSO LO

This is a nasty bug. Obviously DOCX example attachment 166172 [details] and attachment 148613 [details] had more issues, not all resolved.

What I see improved or fixed is DOCX attachment 161024 [details]. Here is a screenshot MSO and LO 7.1+ before and after the fix.

I guess DOC will remain, not a problem to open a new bug for that.
Comment 17 Justin L 2020-12-14 05:58:39 UTC Comment hidden (obsolete)
Comment 18 Xisco Faulí 2021-02-25 15:35:24 UTC Comment hidden (no-value)
Comment 19 Dániel Arató (NISZ) 2021-02-25 15:49:34 UTC Comment hidden (obsolete)
Comment 20 Xisco Faulí 2021-02-25 15:57:19 UTC Comment hidden (obsolete)
Comment 21 Xisco Faulí 2022-05-02 14:41:54 UTC Comment hidden (no-value)
Comment 22 Commit Notification 2023-03-15 16:16:42 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d21ba804040bdb275234254fbbe742ce830420c2

tdf#154129 tdf#97128 writerfilter framePr: deduplicate PopFrameDirection

It will be available in 7.6.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 23 Commit Notification 2023-04-23 00:57:06 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/deb1a14adb115710b5e40dd305dc5da4a4e3b065

tdf#97128 tdf#154703 docx export framePr: export frame textDirection

It will be available in 7.6.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 24 Justin L 2023-04-23 00:59:01 UTC
I think this bug is probably fixed for DOCX now. The DOCXs can round-trip.
Comment 25 Timur 2023-04-24 14:48:03 UTC
Justin, thanks, I confirm attachment 166172 [details] opens and roundtrips well. 
Can you please see attachment 148613 [details] which opens OK but saves NOK?

Since this one had DOCX commits, I turn it to DOCX only. DOC should be reported separately and Seel Also to this one.
Comment 26 Justin L 2023-04-24 14:58:01 UTC
(In reply to Timur from comment #25)
> Since this one had DOCX commits, I turn it to DOCX only. DOC should be
> reported separately and See Also to this one.
This bug report from the start was clearly about DOC. I don't see much point in duplicating it.

> Can you please see attachment 148613 [details] which opens OK but saves NOK?
It looks fine to me even after two round-trips. In fact, my unit test was based off of LandscapeFrame.docx.
Comment 27 Timur 2023-04-25 12:47:52 UTC
Oh, I had a misconfiguration, really attachment 148613 [details] is OK. 
I close this as Fixed. 
It started as DOC but went to DOCX and got improvment.