Bug 118711 - DOCX: Copy-pasting bulleted list entries insert page break
Summary: DOCX: Copy-pasting bulleted list entries insert page break
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.2.0 target:7.1.0.0.beta2
Keywords: filter:docx
: 32344 107861 122835 125456 135692 137755 (view as bug list)
Depends on:
Blocks: Paste DOCX-Bullet-Number-Outline-Lists DOC-Bullet-Number-Lists
  Show dependency treegraph
 
Reported: 2018-07-12 01:39 UTC by Aron Budea
Modified: 2022-02-08 10:00 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODT (8.43 KB, application/vnd.oasis.opendocument.text)
2018-07-12 01:39 UTC, Aron Budea
Details
Sample DOCX (saved from ODT in Writer) (4.91 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-07-12 01:40 UTC, Aron Budea
Details
Sample DOC (saved from ODT in Writer) (10.00 KB, application/msword)
2018-07-12 01:40 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-07-12 01:39:21 UTC
Created attachment 143494 [details]
Sample ODT

Attaching a document with three bulleted lines (ODT original + DOC & DOCX saved from it in Writer).

- Copy the first two entries.
- Paste them at the beginning of the third entry.

=> With DOC(X) this inserts a page break before the pasted lines. With ODT no page break is inserted (as expected).

Observed using LO 6.1.0.1 & 3.3.0 / Windows 7.
Comment 1 Aron Budea 2018-07-12 01:40:07 UTC
Created attachment 143495 [details]
Sample DOCX (saved from ODT in Writer)
Comment 2 Aron Budea 2018-07-12 01:40:36 UTC
Created attachment 143496 [details]
Sample DOC (saved from ODT in Writer)
Comment 3 Dieter 2018-07-12 07:45:42 UTC
I confirm the described behaviour, but I wouldn't expect a page break, so for me it's not a bug.
Comment 4 Aron Budea 2018-07-12 09:41:13 UTC
(In reply to Dieter Praas from comment #3)
> I confirm the described behaviour, but I wouldn't expect a page break, so
> for me it's not a bug.
That's what I meant, I consider the behavior with ODT correct, and the one with DOC(X) incorrect.
Comment 5 Dieter 2018-07-12 10:07:21 UTC Comment hidden (obsolete)
Comment 6 Aron Budea 2019-03-11 23:12:52 UTC
Simpler repro case:
- open an empty DOCX,
- add a line break,
- copy both empty lines to the clipboard,
- paste them into the second line.

=> A page break is inserted between the two.

There are lots of possible repro cases, this is just the simplest of them.
Comment 7 Gabor Kelemen (allotropia) 2019-05-23 08:31:47 UTC
*** Bug 125456 has been marked as a duplicate of this bug. ***
Comment 8 László Németh 2019-05-23 08:39:20 UTC
Note: DOCX import always sets a master page, that is why the first paragraph of an imported document contains a page break=before setting. (It's equivalent of applying a page style in a new ODT document.)
Comment 9 Justin L 2020-04-23 19:33:40 UTC
This was fixed for a regular paragraph with https://cgit.freedesktop.org/libreoffice/core/commit/?id=b0facbbedf42a02449d9f35bb4ac8bd7ec2d8917

I'm sure I saw a duplicate bug report about this for tables too, so whoever works on this should try to make it generic without causing any regressions. :-)
Comment 10 Justin L 2020-04-24 06:57:41 UTC
*** Bug 32344 has been marked as a duplicate of this bug. ***
Comment 11 NISZ LibreOffice Team 2020-07-09 10:07:22 UTC
(In reply to Justin L from comment #9)
> This was fixed for a regular paragraph with
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=b0facbbedf42a02449d9f35bb4ac8bd7ec2d8917
> 
> I'm sure I saw a duplicate bug report about this for tables too, so whoever
> works on this should try to make it generic without causing any regressions.
> :-)

I can still reproduce the originally reported problem with a newly saved docx-version of attachment #143494 [details]

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 5483d4e10aad27889b961b9cb94d7ba6c86aed0b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Turning off manually for the first paragraph the Text Flow - Breaks - Insert box makes the copy-pasting work as expected.
Comment 12 NISZ LibreOffice Team 2020-12-08 08:48:10 UTC
*** Bug 137755 has been marked as a duplicate of this bug. ***
Comment 13 Justin L 2020-12-10 11:22:07 UTC
*** Bug 122835 has been marked as a duplicate of this bug. ***
Comment 14 Justin L 2020-12-10 11:29:16 UTC
*** Bug 135692 has been marked as a duplicate of this bug. ***
Comment 15 Justin L 2020-12-10 14:02:18 UTC
Merry Christmas Telesto!
Proposed fix at http://gerrit.libreoffice.org/c/core/+/107555
Comment 16 Telesto 2020-12-10 15:16:38 UTC
(In reply to Justin L from comment #15)
> Merry Christmas Telesto!
> Proposed fix at http://gerrit.libreoffice.org/c/core/+/107555

Thanks, is it Christmas already :-) Or are you opting for holiday break :P
Anyhow patch being welcome! Nice job Justin!
Comment 17 Commit Notification 2020-12-15 08:29:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8787a45f9cbb5dce61b20817ef0e549b5a227a95

tdf#118711 writerfilter: don't hardcode default page description

It will be available in 7.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 18 Xisco Faulí 2020-12-16 09:30:29 UTC
Verified in

Version: 7.2.0.0.alpha0+
Build ID: 8b3982681e98818388c09233960ad6eaacee205a
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Justin, thanks for fixing this issue!!
Comment 19 Commit Notification 2020-12-16 09:31:41 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#118711 writerfilter: don't hardcode default page description

It will be available in 7.1.0.0.beta2.

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 20 NISZ LibreOffice Team 2021-01-25 13:46:23 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 96bafa464ebdbce3ef04bec9beae5e745bb37794
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-GB
Calc: threaded

Thanks for fixing!
Comment 21 Timur 2021-01-26 09:27:30 UTC
When setting Verified, please make clear if all duplicates are tested. Thanks.
Comment 22 Timur 2021-02-19 13:53:35 UTC
Bug was reported for both Doc/X which is fine, but here was solved DOCX so we need a separate bug for DOC. 
Justin, please comment, you are in a minority of devs who also work with DOC.
Comment 23 Justin L 2021-02-19 18:23:04 UTC
(In reply to Timur from comment #22)
> Bug was reported for both Doc/X which is fine, but here was solved DOCX only.
I'm not so familiar with the DOC import code. But after taking a look, it seems like it should be relatively safe to try to implement the same thing.

Proposed fix at http://gerrit.libreoffice.org/c/core/+/111240
Comment 24 Commit Notification 2021-02-26 11:25:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1c8df3e58940bf6abdbda0b2f932a5990b577fae

tdf#118711 doc import: don't hardcode default page description

It will be available in 7.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 25 Justin L 2021-02-27 09:35:54 UTC
@Timur - I'm happy the leave the DOC version fix only in 7.2. That way if the DOCX version proves to be problematic, it can be more easily reverted - and also gives more time to test the DOC version of the fix.
Comment 26 Timur 2021-02-27 13:44:34 UTC
of course, always glad to see Inherited fixed, cheers
Comment 27 Justin L 2022-02-08 10:00:49 UTC
*** Bug 107861 has been marked as a duplicate of this bug. ***