Bug 151605 - Allow excluding hidden sections from Text/HTML export
Summary: Allow excluding hidden sections from Text/HTML export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:7.5.0 target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-17 14:21 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2023-03-06 22:50 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Bugdoc (10.01 KB, application/vnd.oasis.opendocument.text)
2022-10-17 14:22 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2022-10-17 14:21:19 UTC
1. Open attached document
2. Select all text
3. Paste to plain text editor

Expected: Only the visible text is pasted
Actual: The "Hidden Section" text is also pasted.

Same behavior when saving file as txt.

-> Add an option to allow excluding hidden sections from Text export / plain text paste.

EasyHack:
Code pointer: https://opengrok.libreoffice.org/xref/core/sw/source/filter/ascii/wrtasc.cxx?r=af23d1c1#94
Similiar commit adding a new option: 79b578b7f8b5e3a80fcd0fd86e83d96d7c900bb1
Comment 1 Samuel Mehrbrodt (allotropia) 2022-10-17 14:22:52 UTC
Created attachment 183096 [details]
Bugdoc
Comment 3 Samuel Mehrbrodt (allotropia) 2022-11-07 06:53:36 UTC
Same should be possible for HTML export (copy/paste to E-Mail-Editors uses HTML in most cases).
Comment 4 Commit Notification 2022-11-07 07:33:12 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

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

tdf#151605 Don't include hidden text by default in HTML filter

It will be available in 7.5.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 5 Commit Notification 2022-11-14 08:27:52 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31c5b3f10b3e1d1d86d9fc3553c6f55599b080ce

tdf#151605 Add option to not include hidden text in ASCII filter

It will be available in 7.5.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 6 Commit Notification 2023-03-06 22:50:51 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/55360ba58f33f3f45c83decce092c43d25c4e48c

tdf#151605: sw_uiwriter7: Add unittest

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.