Bug 128320 - RTF export: shape control RTF tokens outside context in output
Summary: RTF export: shape control RTF tokens outside context in output
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 normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords: filter:rtf, notBibisectable, regression
: 128319 (view as bug list)
Depends on:
Blocks: RTF
  Show dependency treegraph
 
Reported: 2019-10-22 09:18 UTC by Vasily Melenchuk (CIB)
Modified: 2019-12-18 08:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (31.23 KB, application/vnd.oasis.opendocument.text)
2019-10-22 09:19 UTC, Vasily Melenchuk (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily Melenchuk (CIB) 2019-10-22 09:18:24 UTC
Description:
Exported by Writer RTF document can contain shape-specific RTF tokens outside of {\shp ...}

Steps to Reproduce:
1. Open attached document (I suppose, that this behavior 
2. Save it as RTF document
3. Open resulting RTF document in any plain text viewer.

Actual Results:
There is "\shpwr2\shpwrk3\shpbypara\shpbyignore\shptop0\shpbxcolumn\shpbxignore\shpleft0" set of RTF tokens in beginning of document. They are expected only inside {\shp ..} destination.

Expected Results:
No shape specific tokens outside of shape context.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Vasily Melenchuk (CIB) 2019-10-22 09:18:57 UTC
*** Bug 128319 has been marked as a duplicate of this bug. ***
Comment 2 Vasily Melenchuk (CIB) 2019-10-22 09:19:32 UTC
Created attachment 155227 [details]
Example file
Comment 3 Samuel Mehrbrodt (allotropia) 2019-10-30 10:08:52 UTC
<vmiklos>: samuel_m: i didn't try to reproduce, but looks legit.
Comment 4 Xisco Faulí 2019-11-11 15:37:38 UTC
Somewhere in LibreOffice 4.1 it was added to 

\par \shpbypara\shpbyignore\shptop0\shpbxcolumn\shpbxignore\shpleft0\pard\plain \s0\ql\widctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\faauto\aspalpha\ltrpar\cf0\kerning1\dbch\af8\langfe1025\dbch\af11\afs22\alang1081\loch\f5\fs20\lang1031\ltrpar\rtlch \ltrch\loch

however, the bisect repo gives an incorrect result
Comment 5 Commit Notification 2019-12-17 08:07:05 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7b26e517d50ca4c34fa7a6291948fb200b2e5d71

tdf#128320: RTF export: do not write shape attrs for postponed shape

It will be available in 6.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 2019-12-18 08:06:14 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#128320: RTF export: do not write shape attrs for postponed shape

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