Bug 92352 - Paragraph style is lost when dealing with direct formatting copied from DOCX
Summary: Paragraph style is lost when dealing with direct formatting copied from DOCX
Status: RESOLVED DUPLICATE of bug 73483
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles
  Show dependency treegraph
 
Reported: 2015-06-26 13:35 UTC by Stanislav Horacek
Modified: 2023-05-31 06:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX for bug demonstration (7.91 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-06-26 13:35 UTC, Stanislav Horacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Horacek 2015-06-26 13:35:56 UTC
Created attachment 116843 [details]
DOCX for bug demonstration

Under certain conditions (probably depending on import from DOCX and on direct formatting), paragraph style is lost after reopening a file. I face this bug quite often when processing files sent by MS Office users.

Steps to reproduce:
1. Open the attached file "sample.docx". (It contains two lines of "Normal (web)" style, however heading is formatted directly.)
2. Copy all content of the file (Ctrl+A, Ctrl+C).
3. Create a new file and paste the content to it (Ctrl+N, Ctrl+V).
4. Apply styles (of the default LO template) to the content: "Default Style" to the second line, "Heading" (not "Heading 1" etc.) to the first line. The first line is still directly formatted and does not look like "Heading".
5. Remove all direct formatting (Ctrl+A, Ctrl+M). The first line looks now as expected.
6. Save the file as ODT file.
7. Close the file and reopen it.

Observed: The first line has "Default Style" set.
Expected: The first line should have "Heading" style.

Experienced in all versions I've tested, clean user profile applied:
Ubuntu 14.10: 4.3.7.2, 4.4.4.3, 5.0.0.1
Windows 7: 4.4.3.2 to 3.5.4.2 (the earliest I have, bug probably inherited from OOo)

Interesting change in 5.0: in step 4, applying the style on the first line removes direct formatting (contrary to earlier versions), so there is no need to remove them manually. However, after doing that, the bug still occurs.
Comment 1 Buovjaga 2015-07-01 15:45:13 UTC
Repro.

Win 7 Pro 64-bit, Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: fi_FI
Comment 2 QA Administrators 2016-09-20 10:14:38 UTC Comment hidden (obsolete)
Comment 3 Stanislav Horacek 2016-10-16 12:01:34 UTC
Still reproducible in 5.1.5, 5.2.2 and 5.3.0.0alpha0+ from 2016-10-07.
Comment 4 QA Administrators 2017-10-23 14:02:26 UTC Comment hidden (obsolete)
Comment 5 Stanislav Horacek 2017-10-24 19:06:16 UTC
Still reproducible in:

Version: 6.0.0.0.alpha0+, 
Build ID: 141fe1c5e7fbf67a083b34e49e19b6ea78a0eb2b
Comment 6 QA Administrators 2019-09-22 02:58:52 UTC Comment hidden (obsolete)
Comment 7 NISZ LibreOffice Team 2020-11-25 14:03:05 UTC
No longer reproduced, was fixed in 6.3.0 since:

https://git.libreoffice.org/core/+/43836a58ffe943e2fc65be638f9a7d343102cb07

author
Justin Luth <justin.luth@collabora.com> Wed Dec 26 10:49:55 2018 +0300 
committer
Justin Luth <justin_luth@sil.org> Sat Dec 29 05:11:22 2018 +0100 

tdf#47471 odfexport: use stylename if autostyle missing.

@Justin: thanks for fixing this one :)

*** This bug has been marked as a duplicate of bug 47471 ***
Comment 8 Mike Kaganski 2023-05-31 06:29:43 UTC

*** This bug has been marked as a duplicate of bug 73483 ***