Bug 159254 - Paper tray settings ignored in rtf and docx import
Summary: Paper tray settings ignored in rtf and docx import
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords:
Depends on:
Blocks: RTF
  Show dependency treegraph
 
Reported: 2024-01-18 06:48 UTC by Oliver Specht (CIB)
Modified: 2024-03-04 22:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with paper tray set (43.10 KB, application/msword)
2024-01-18 06:48 UTC, Oliver Specht (CIB)
Details
Another reproducer RTF: automatic tray (43.22 KB, application/msword)
2024-01-19 17:16 UTC, Gabor Kelemen (allotropia)
Details
RTF reproducer: main tray (40.68 KB, application/msword)
2024-01-19 17:24 UTC, Gabor Kelemen (allotropia)
Details
The automatic setting in Word 2016 and Writer 7.6 (89.49 KB, image/png)
2024-01-19 17:44 UTC, Gabor Kelemen (allotropia)
Details
The main tray setting in Word 2016 and Writer 7.6 (87.27 KB, image/png)
2024-01-19 17:50 UTC, Gabor Kelemen (allotropia)
Details
The automatic setting example in docx format (12.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-19 18:10 UTC, Gabor Kelemen (allotropia)
Details
The main tray setting example in docx format (11.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-19 18:31 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Specht (CIB) 2024-01-18 06:48:52 UTC
Created attachment 192028 [details]
Document with paper tray set

The paper tray is ignored when reading rtf or docx documenents.

To reproduce create a document in Word and define the paper source in the page setup.
Save the document as rtf or docx and load it in LO. 

The page style dialog should show the same tray but it doesn't.

Please note: Paper tray values differ between printers. They can only be applied if the printers have the same tray identifiers. 
They will probably only work on Windows.
Comment 1 m_a_riosv 2024-01-19 00:46:12 UTC
Do you have active Menu/Tools/Options/Load and save/General - Load printer settings with document?
Comment 2 Gabor Kelemen (allotropia) 2024-01-19 17:16:31 UTC
Created attachment 192061 [details]
Another reproducer RTF: automatic tray

On my machine, there are two non-default options with my printer, one of these is the automatic setting.
Comment 3 Gabor Kelemen (allotropia) 2024-01-19 17:24:47 UTC
Created attachment 192062 [details]
RTF reproducer: main tray
Comment 4 Gabor Kelemen (allotropia) 2024-01-19 17:44:37 UTC
Created attachment 192063 [details]
The automatic setting in Word 2016 and Writer 7.6
Comment 5 Gabor Kelemen (allotropia) 2024-01-19 17:50:31 UTC
Created attachment 192064 [details]
The main tray setting in Word 2016 and Writer 7.6
Comment 6 Gabor Kelemen (allotropia) 2024-01-19 18:10:48 UTC
Created attachment 192066 [details]
The automatic setting example in docx format
Comment 7 Gabor Kelemen (allotropia) 2024-01-19 18:31:10 UTC
Created attachment 192067 [details]
The main tray setting example in docx format
Comment 8 Gabor Kelemen (allotropia) 2024-01-19 18:37:50 UTC
Confirming.
With the proposed patch at https://gerrit.libreoffice.org/c/core/+/162236 the settings are imported correctly from RTF, but still not from DOCX.

Another problem is that Word supports two tray settings for the first page and all the others, while Writer supports only one.
Comment 9 Commit Notification 2024-01-19 22:33:56 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159254 import paper bin/paper source from rtf/docx files

It will be available in 24.8.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 10 Commit Notification 2024-02-08 22:22:08 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#159254 import paper bin/paper source from rtf/docx files

It will be available in 24.2.1.

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 11 Gabor Kelemen (allotropia) 2024-02-16 12:16:36 UTC
Let's say this is mostly fixed, followup bugs are filed for remaining issues.
Comment 12 Commit Notification 2024-02-19 17:06:45 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159254 fix import of printer tray in docx

It will be available in 24.8.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.