Bug 104988 - Style information lost when removing direct formatting
Summary: Style information lost when removing direct formatting
Status: RESOLVED DUPLICATE of bug 73483
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-29 19:44 UTC by Timur Davletshin
Modified: 2023-05-31 06:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Testcase file (15.93 KB, application/vnd.oasis.opendocument.text)
2016-12-29 19:45 UTC, Timur Davletshin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Davletshin 2016-12-29 19:44:51 UTC
Description:
I loose all style and formatting information in saved file when I try to remove direct formatting from text.

Steps to Reproduce:
1. Ctrl+A
2. Ctrl+M
3. Ctrl+S
4. Close file
5. Ctrl+O open file which you just saved

Actual Results:  
All formatting lost while it existed before file was closed.

Expected Results:
Direct formatting removed, style information for every parts remains in-place.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Timur Davletshin 2016-12-29 19:45:43 UTC
Created attachment 130019 [details]
Testcase file
Comment 2 m_a_riosv 2016-12-29 22:31:35 UTC
Reproducible.

Version: 5.2.4.1 (x64)
Build ID: 9b50003582f07ac674d6451e411e9b77cccd2b22
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: es-ES (es_ES); Calc: group
Version: 5.3.0.1 (x64)
Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; Locale: es-ES (es_ES); Calc: group
Version: 5.4.0.0.alpha0+
Build ID: d0288a482a3dc0f50f535565e4c66a95bb140942
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-26_23:25:18
Locale: es-ES (es_ES); Calc: CL
Comment 3 MM 2016-12-30 00:36:22 UTC
Style and formatting information seems to have been removed when saving to ODT, but not when saving to DOC/DOCX.
Comment 4 Timur Davletshin 2017-01-01 17:07:15 UTC
I tried ODT/RTF/DOC — style information is lost in all cases. IMO this is very critical for users, in my case I lost all formatting in 100+ pages document.
Comment 5 m_a_riosv 2017-01-01 19:54:52 UTC
I'm not sure so critical, it's inherited form Ooo, and I couldn't find a bug report about this same matter.

And I'm not able to reproduce with other files.

Even with the sample file giving again the Heading 2 style for title and Annotation for rest, Ctrl-A plus Ctrl-M, save and reopen and styles are there, so looks as a corner case.
Comment 6 Timur Davletshin 2017-01-01 20:02:36 UTC
(In reply to m.a.riosv from comment #5)
> I'm not sure so critical, it's inherited form Ooo, and I couldn't find a bug
> report about this same matter.
> 
> And I'm not able to reproduce with other files.
> 
> Even with the sample file giving again the Heading 2 style for title and
> Annotation for rest, Ctrl-A plus Ctrl-M, save and reopen and styles are
> there, so looks as a corner case.

What version of LO did you try?
Comment 7 m_a_riosv 2017-01-01 20:06:20 UTC
Version: 5.2.4.1 (x64)
Build ID: 9b50003582f07ac674d6451e411e9b77cccd2b22
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: es-ES (es_ES); Calc: group
Comment 8 Timur Davletshin 2017-01-01 20:18:26 UTC
(In reply to m.a.riosv from comment #7)
> Version: 5.2.4.1 (x64)
> Build ID: 9b50003582f07ac674d6451e411e9b77cccd2b22
> CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
> Locale: es-ES (es_ES); Calc: group

Version: 5.2.4.2
Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

Bug is there, after reopening everything is styled with "Default Style".
Comment 9 Timur Davletshin 2017-01-06 13:40:53 UTC
Interesting thing related to thing bug which I just discovered: Style information will be lost only if file was saved straight after Ctrl+M, but it looks OK if some other changes were applied to it.
Comment 10 seven 2017-01-27 08:18:24 UTC
English: Can you create testcase how to create this document?
Russian: Можете ли вы создать TestCase, как создать этот документ?
Comment 11 Timur Davletshin 2017-01-27 08:21:56 UTC
(In reply to seven from comment #10)
> English: Can you create testcase how to create this document?
> Russian: Можете ли вы создать TestCase, как создать этот документ?

Test case is already in the attachment to this bug report.
Comment 12 bdfy 2017-08-03 14:19:12 UTC
Same bug on windows Version: 5.3.4.2
Comment 13 Fede 2017-09-18 16:27:10 UTC
I have reproduced the bug (as documented by Timur) in LibreOffice 3.5.7.2.

I have found this ticket looking for a bug I have suffered in 5.3 (both Linux & Windows), 4.1 (Windows) & 3.5 (Linux). Steps for reproducing my bug (the same one, I suppose) without a given file:

1. Create new text document.
2. Write "Hello!".
3. Create a new page style ("Untitled1" is OK) with a coloured background.
4. Apply it.
5. Edit > Select All (Ctrl+A).
6. Format > Clear Direct Formatting (Ctrl+M).
7. Save.
8. Close.
9. Open the same document.

The page style is not applied! The background is lost!

Moreover, the saved file seems to suffer some kind of corruption, at least in some cases that I can't reproduce right now, but last week (in LibreOffice 5.3 on Linux), after step 9, some editing, saving & closing produced a file that Writer couldn't open any more. So I think this bug is very very serious.
Comment 14 Fede 2017-09-18 16:59:49 UTC
(In reply to m.a.riosv from comment #5)
> I'm not sure so critical, it's inherited form Ooo, and I couldn't find a bug
> report about this same matter.

Perhaps this one?

>>  47471 | Clear Direct Formatting damages the document's styles

BTW, it has reappeared more recently:

>> 111002 | Paragraph style lost on save after Clear Direct Formatting (Ctrl+M) or rename and went back to Default

And this one may be related too (but no styles involved, just formatting, Ctrl+M & saving):

>>  90221 | Formatting not saving after "clear direct formatting"
Comment 15 Timur Davletshin 2018-02-01 15:59:09 UTC
Still can be reproduced in LO 6.0
Comment 16 Buovjaga 2018-10-15 14:35:38 UTC
Let's dupe to 47471

*** This bug has been marked as a duplicate of bug 47471 ***
Comment 17 Timur 2019-01-03 10:21:36 UTC
Verified with master~2019-01-03_00.08.33_LibreOfficeDev_6.3.0.0.alpha0_Win_x86.
Comment 18 Mike Kaganski 2023-05-31 06:30:25 UTC

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