Bug 156505 - View option to display of non-printable characters turned off during export to JPG
Summary: View option to display of non-printable characters turned off during export t...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: Formatting-Mark Graphics-Export
  Show dependency treegraph
 
Reported: 2023-07-28 10:09 UTC by ilya
Modified: 2024-10-19 11:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Video demonstration (18.43 MB, application/octet-stream)
2023-07-28 19:28 UTC, ilya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ilya 2023-07-28 10:09:52 UTC
Description:
1. Create a new Writer document
2. Make sure display of non-printable characters is enabled
3. Write any text
4. File -> Export -> Select file type as JPEG, save.
After that, displaying of non-printable characters magically disappears.


Steps to Reproduce:
1. Create a new Writer document
2. Make sure display of non-printable characters is enabled
3. Write any text
4. File -> Export -> Select file type as JPEG, save.


Actual Results:
After that, displaying of non-printable characters magically disappears.

Expected Results:
The appearance of documents and the display of non-printing characters should not change


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 1 ilya 2023-07-28 19:28:36 UTC
Created attachment 188615 [details]
Video demonstration

Video demonstration
Comment 2 Ezinne 2023-07-29 15:09:07 UTC
Reproducible in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e26aeb882dd236adf19679d5df9b7ba5da1ed226
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 3 Justin L 2024-10-18 17:35:37 UTC
repro 25.2+

The option to be able to export as JPG started in LO 4.1
with commit 6a6519c27a5a7ea07e6a19fcd43e76ca616dce4d
Author: Tomaž Vajngerl on Mon Mar 25 23:50:10 2013 +0100
  Export current Writer page as jpg/png

The implementation turns off non-printable characters.

Steps to reproduce
1.) create a new Writer document
2.) turn on "View - Formatting Marks" and notice the blue paragraph marker
3.) "File - Export" to PNG format and notice the blue markers is not showing (even though View - Formatting marks is still indicated as enabled).

[going to a print preview and then cancelling that re-paints the blue marker - as does starting the print dialog and then cancelling it.]
Comment 4 Justin L 2024-10-19 11:35:10 UTC
The paragraph markers etc are being turned off in SwViewOptionAdjust_Impl::AdjustViewOptions.

They are turned back on when the DTOR ~SwViewOptionAdjust_Impl runs.

See comments about "IsLastPage" in PrinterController::abortJob
Comment 5 Commit Notification 2024-10-19 11:36:17 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2bbd247f16d456eaa5591251e7a17ea198d3b39d

tdf#156505 sw: reset view options after export as graphic

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