Bug 159259 - DOCX: a floating content control imports as a separate paragraph
Summary: DOCX: a floating content control imports as a separate paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords:
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2024-01-18 11:07 UTC by Mike Kaganski
Modified: 2024-01-23 08:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A floating content control (12.05 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-18 11:07 UTC, Mike Kaganski
Details
Screenshot of the document in Word 2016 and Writer master (77.16 KB, image/png)
2024-01-18 18:27 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-01-18 11:07:44 UTC
Created attachment 192033 [details]
A floating content control

In the attachment, the content control (an sdt element with page number "1") is made floating, by applying a framePr attribute to its content's p element. It is right-aligned in Word, on the same line as the left-aligned "Lorem ipsum" text.

When opened in Writer, the field in imported as a separate paragraph, before the Lorem ipsum paragraph. Also, the whole text of the document (the page number, and the Lorem ipsum text) are enclosed into the content control.
Comment 1 Commit Notification 2024-01-18 18:05:57 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4d0f2d5ec9f7f988a1493916ae35bac1986c95a8

Related: tdf#159259 Drop obsolete exclusion of framePr inside sdt

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 2 Gabor Kelemen (allotropia) 2024-01-18 18:27:58 UTC
Created attachment 192042 [details]
Screenshot of the document in Word 2016 and Writer master
Comment 3 Commit Notification 2024-01-23 04:34:33 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13a11632014ccc27199667c6a1e313f8ff616d6d

tdf#159259: make sure to set FieldStartRange in sdt helper

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 4 Commit Notification 2024-01-23 08:30:04 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/883aa0695524d171c9009c87b4f32488b134629f

Related: tdf#159259 Drop obsolete exclusion of framePr inside sdt

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 5 Commit Notification 2024-01-23 08:48:11 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#159259: make sure to set FieldStartRange in sdt helper

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.