Bug 158661 - FILEOPEN: DOCX: extra character in block SDT
Summary: FILEOPEN: DOCX: extra character in block SDT
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha1+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:25.2.0 target:24.8.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2023-12-12 11:50 UTC by Xisco Faulí
Modified: 2024-07-24 17:19 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparsion LibreOffice 24.2 master vs MSO (29.07 KB, image/png)
2023-12-12 11:50 UTC, Xisco Faulí
Details
Pxxx Survey Strategy_OpenTextScrubbedMIN.docx: minimized (39.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-07-23 17:08 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-12-12 11:50:58 UTC
Created attachment 191385 [details]
Comparsion LibreOffice 24.2 master vs MSO

Steps to reproduce:
1. Open attachment 52975 [details] from bug 42458

-> The first SDT is 'ffrelt' instead of 'frelt'. See comparison

Reproduced in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f0fda7ad2236f478fea396a23d4f982e5fc37e68
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2023-12-12 11:52:24 UTC
Regression introduced by:

author	Jaume Pujantell <jaume.pujantell@collabora.com>	2023-11-22 11:59:09 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	2023-11-23 08:27:57 +0100
commit 7c4dba1deffd81f647a4a3be7a79f68f3bf9f1ba (patch)
tree 32ea9bbd1ce1170e74220656688fc95577073870
parent 85852ad0d96bfd71413aef94edc1b6e2e6052e1a (diff)
fix a regression crash from commit 5082d50
 
Bisected with: bibisect-linux64-24.2

Adding Cc: to Jaume Pujantell
Comment 2 Xisco Faulí 2023-12-12 11:54:04 UTC
Same issue reproduced with attachment 53019 [details] from bug 42486
Comment 3 Justin L 2024-07-23 15:08:57 UTC
Pxxx Survey Strategy_OpenTextScrubbed.docx (attachment 195248 [details] from bug 162009) is another example of this.

Specifically, the floating table (over top of the header area), the first S from "Survey Strategy" was excluded starting with comment 1's commit.

The next table/control with "Test abc.123 XYXCAD – 97665 " was missing the first character inside the control already with the original commit 5082d50d24c3fec4487c724a15eb0d54a82ecd0d
Author: Jaume Pujantell on Wed Sep 13 08:58:21 2023 +0200
    writerfilter: use content controls for text in block SDTs
Comment 4 Justin L 2024-07-23 17:08:17 UTC
Created attachment 195458 [details]
Pxxx Survey Strategy_OpenTextScrubbedMIN.docx: minimized

My examples are actually the opposite affect - where the content control is one character too short instead of doubling up the first character.
Comment 5 Commit Notification 2024-07-24 11:51:34 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/62974cf6a8148377091cb709e7e00dacac152093

tdf#158661 docx import plaintext sdt: remove unnecessary goRight

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.
Comment 6 Xisco Faulí 2024-07-24 17:18:34 UTC
Verified in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b74b95bba6b84225248e5b7badf1de7ae401a79
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Justin, thanks for fixing this issue!!
Comment 7 Commit Notification 2024-07-24 17:19:40 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/69571fd0b36acb31d209fdadab6e84b845b48204

tdf#158661 docx import plaintext sdt: remove unnecessary goRight

It will be available in 24.8.0.2.

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.