Bug 111002 - Paragraph style lost on save after Clear Direct Formatting (Ctrl+M) or rename and went back to Default
Summary: Paragraph style lost on save after Clear Direct Formatting (Ctrl+M) or rename...
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 normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-01 19:27 UTC by Mike Kaganski
Modified: 2023-05-31 06:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple example to demonstrate lost formatting (17.44 KB, application/vnd.oasis.opendocument.text)
2017-09-18 15:30 UTC, David Burleigh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2017-08-01 19:27:58 UTC
Prerequisites:
1. Two system input languages.
2. Options-Language Settings-Languages-Ignore system input languages is *NOT* checked.

Steps to reproduce:

1. Create a new text document.
2. Create a new paragraph style, named e.g. "red". Modify it to have red character color (to be easily visible). It is automatically set as current.
3. Type some characters in first paragraph (in first system language, e.g. in Russian). Language in status bar should reflect currently selected language.
4. Add an empty paragraph.
5. Switch input language (I used English). Type some letters to make two other paragraphs. Again, language in status bar should reflect currently selected language.
6. Add new empty paragraph. Switch back the input language. Add some characters to last paragraph (after empty one).

Having done the above, I had this:
==== CONTENT BEGINS BELOW ====
первый

second
third

четвёртый
====  CONTENT ENDS ABOVE  ====
They all were colored red (because their paragraph style was "red"). First and last paragraphs had Russian language, middle two had English language.

7. Select the two middle paragraphs and apply "Highlight Color" tool.
8. Select text of first of these two middle paragraphs and use drop-down next to "Highlight Color" tool to apply "No Fill".
9. Select text of second of these two middle paragraphs and use Ctrl+M (Clear Direct Formatting).

At this stage, both middle paragraphs should have returned to normal state: no highlight, red text color.

10. Save file (without doing anything else after step 9). Close and reopen.

Expected result: text should stay as it was prior to saving.
Actual result: second of the two middle paragraphs (the one on which Ctrl+M was applied) lost paragraph style and reverted to Default style (and it is black).

Tested with Version: 5.4.0.3 (x64)
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: ru-RU (ru_RU); Calc: group

and Version 3.6.0.4 (Build ID: 932b512)

but not with LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735

This is loss of formatting.
Comment 1 Timur 2017-08-02 15:56:23 UTC
I'll confirm as reproduced. Also with OO. Looks like Bug 104988 but you added it to cc, so I guess you consider not duplicate, although really similar.
Comment 2 Mike Kaganski 2017-08-03 11:52:57 UTC
Possibly the same problem:

1. Create new text document
2. Add a new paragraph style (I used name "red") and edit it to be distinct (I set text color to red). It applies to current paragraph automatically.
3. Type some paragraphs (they will have "red" paragraph style and red text color), like:
aaa
bbb
ccc
4. Rename paragraph style "red" to something other (e.g., "red1")
5. Now save the file to ODT, close and reopen.

You will see that the paragraphs have their paragraph style reset to default style.
Comment 3 bdfy 2017-08-03 14:17:00 UTC
Same bug.
Comment 4 David Burleigh 2017-09-18 15:30:08 UTC
Created attachment 136341 [details]
Simple example to demonstrate lost formatting

See instructions in comment by david.burleigh@parchmentpress.net
Comment 5 David Burleigh 2017-09-18 15:36:55 UTC
Clear and simple example:

Open Example1.odt and note formatting
Select all
Type Ctrl-M (Clear direct formatting)
Close and save
Open file again, and note that the title reverts to Default style and the header text is lost.
Comment 6 Octavio Alvarez 2018-07-28 17:46:20 UTC
Confirmed on Linux, LibO 6.0.3
Comment 7 Thomas Lendo 2018-10-15 17:39:25 UTC
(In reply to Mike Kaganski from comment #0)
Mike, what's the difference to the older bug 47471?
Comment 8 Mike Kaganski 2018-10-15 18:12:19 UTC
(In reply to Thomas Lendo from comment #7)
> Mike, what's the difference to the older bug 47471?

If only I remembered ;-) Please feel free to close as duplicate (I honestly don't remember why did I file it separately, given that I knew about the first one in See Also list, that I mentioned right at creation...)
Comment 9 Thomas Lendo 2018-10-15 18:14:34 UTC
Thanks, Mike.

*** This bug has been marked as a duplicate of bug 47471 ***
Comment 10 Timur 2019-01-03 10:18:17 UTC
(In reply to Mike Kaganski from comment #2)
> 1. Create new text document
> 2. Add a new paragraph style (I used name "red") and edit it to be distinct
> (I set text color to red). It applies to current paragraph automatically.
> 3. Type some paragraphs (they will have "red" paragraph style and red text
> color), like:
> aaa
> bbb
> ccc
> 4. Rename paragraph style "red" to something other (e.g., "red1")
> 5. Now save the file to ODT, close and reopen.
> 
> You will see that the paragraphs have their paragraph style reset to default
> style.
No repro with master~2019-01-03_00.08.33_LibreOfficeDev_6.3.0.0.alpha0_Win_x86.


(In reply to David Burleigh from comment #5)
> Open attachment 136341 [details] and note formatting
> Select all
> Type Ctrl-M (Clear direct formatting)
> Close and save
> Open file again, and note that the title reverts to Default style and the
> header text is lost.

Title remains Title now. 
Header text is still lost but that's something different.
Comment 11 Mike Kaganski 2023-05-31 06:32:49 UTC

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