Bug 60355 - FORMATTING: Changing the text formatting in one single line (e.g. bold, italic) also changes text formatting in other lines and paragraphs
Summary: FORMATTING: Changing the text formatting in one single line (e.g. bold, itali...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-06 08:01 UTC by GS
Modified: 2018-11-04 00:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example 1-page document to explore the unwanted behaviour (16.76 KB, application/vnd.oasis.opendocument.text)
2013-02-06 08:01 UTC, GS
Details
style dropdown (8.55 KB, image/png)
2013-02-14 17:20 UTC, Brenda Granados
Details
formatting behavior (17.50 KB, application/vnd.oasis.opendocument.text)
2013-02-19 19:47 UTC, Brenda Granados
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GS 2013-02-06 08:01:27 UTC
Created attachment 74275 [details]
Example 1-page document to explore the unwanted behaviour

Problem description: 

I came up with a document where I could no longer independently change the formatting like bold or italic of individual lines. When I change the formatting of one line to "bold" in the same instance also the formatting of a whole paragraph at the top of the document changes to bold which is NOT intended. Or changing the formatting of another line to "italic" and also the formatting of other lines are changed to italics. This is not the intended behaviour and can really give you a hard time once the document is in this shape. Sometimes this change is not even undone when using the 'Undo' feature.

I eventually managed to get the document formatted the way I wanted it by manually working my way from top down and keeping reformatting all sections and reinserting the text in plain format when necessary.

Steps to reproduce:

I do not know how to reproduce a new document from scratch that shows this behaviour, but I have a sample 1-page document available as sample doc where this behaviour can be explored. It might have to do with some lines having parts being left and right aligned using tabs.

See attached document. 

Select whole line 
ERROR1::CHANGE-THIS-LINE-TO-ITALIC-AND-WATCH-OTHER-SUBTITLES-CHANGING-TOO
and change formatting to italic. You will see that also other lines (here called subtitles) change their format to italic which is NOT wanted.

Select whole line
ERROR2::CHANGE-THIS-LINE-TO-BOLD-AND-WATCH-BODYTEXT-UNDER-TITLE2-CHANGE-TOO
and change formatting to bold. You will see that also the whole text under TITLE2 changes to bold which is NOT wanted.



Current behavior:

Changing bold/italic formatting of one line also changes formatting of other paragraphs.

Expected behavior:

Only the line edited should be changed to the selected format.


Operating System: Ubuntu
Version: 3.5.4 release
Comment 1 Brenda Granados 2013-02-14 17:20:16 UTC
Created attachment 74828 [details]
style dropdown
Comment 2 Brenda Granados 2013-02-14 17:22:35 UTC
I think I know what's happening here! :)

I believe you have changed the formatting for this document. 

If you look at the styles dropdown box (see my attachment), and click on various pieces of the document, such as a title, you will see some match.  For example, click on Title 1, Title 2 or Title 3, and you will see the styles dropdown says "Heading".

The Subtitles, and text bodies all show up as "Text Body" on the Styles dropdown, but there must be some additional conditional formatting associated with them, because some affect Subtitles, and some affect text bodies.

I tried to play around with creating a custom format following an tutorials for LibreOffice, but I'm not very skilled. 

Let me know if you remember doing something similar.
Comment 3 Brenda Granados 2013-02-18 14:48:40 UTC
I will close this as RESOLVED- WORKSFORME. If this is still a bug for you, and you think it doesn't have to do with a custom formatting, you may reopen the bug.

Thanks!
Comment 4 GS 2013-02-19 07:50:11 UTC
Hi, thanks for the investigation. I think it is not the whole story but a step in the right direction... Originally I started with all text being formatted as 'Default' style and then started to select 'Headline' and 'Text Body' in my first attempt to overcome the problem described above and gain more control of the formatting of the different sections.

However, I just figured out that the reason seems to be releated to having checked 'Auto Update' in the styles window for the used styles. The help for "Auto Update" says:

AutoUpdate 
Updates the style when you apply direct formatting to a paragraph using this style in your document. The formatting of all paragraphs using this style is automatically updated. 

I now have the understanding that this means if I select AutoUpdate and directly change the formatting of a paragraph or line with this style then this is automatically applied to all other paragraphs with this style. Here also selecting one single line is equivalant to selecting a whole paragraph. If there is an additional blank behind the last word of the single line and only the text without the last blank is selected then the style is not changed and the everything works as expected. It has to do with selecting a whole paragraph (not single parts of it) and 'AutoUpdate=On'.

However, I still consider it as a bug or at least a not properly implemented feature as it does not change _all_ paragraphs of the same style type to the new updated format but only seems to pick some paragraphs at random.

For example, if you select the line

ERROR2::CHANGE-THIS-LINE-TO-BOLD-AND-WATCH-BODYTEXT-UNDER-TITLE2-CHANGE-TOO

and then change the style 'text body' to 'Bold' only the text unter TITLE2 changes to bold. Everything else remains unchanged although the style "text body" is also used in these other sections. It is also strange that an "Undo" right after selecting the line and hitting 'Bold' does NOT undo the last step! However, the style 'text body is now changed from 'Regular' to 'Bold' which is obviously "working as designed". 

The style for all text is, however, correctly formatted after selecting all text and selecting 'Clear Direct Formatting' at the end. So when clearing all direct formatting and unchecking 'AutoUpdate' the problem is solved. I then can directly format each line to my needs.

However, taking the document above, it shows that you can end up with a document which behaves strange, unpredictable and uncontrollable (i.e. only randomly picked paragraphs of the same style change) when using the "AutoUpdate" feature for this style and applying direct formatting to one paragraph of it. You cannot predict which paragraphs of the document with the same style do actually change their formatting when applying a direct format change of one line with "AutoUpdate=On". Furthermore the 'Undo' function does not undo this last step of action. 

At least I would say 'Undo' should work and something of the 'AutoUpdate' feature is slightly broken here. I would expect that 
(1) an 'Undo' should work also in this case and that 
(2) either all paragraphs of the same style do change the formatting (with AutoUpdate=On) when changing the format in one paragraph of this style or
(3) there is a way to tell which paragraphs of the same style will remain different due to an earlier applied direct formatting and will not respond to the new change of the style with AutoUpdate=On.

Please play around with the document and let me know what you think!

Thank you!
Comment 5 Brenda Granados 2013-02-19 19:46:27 UTC
Hi, thanks for responding with more info. I have looked at the document again. 

Here is a test case based on the document for further analysis:

1. Highlight all text, right click "Clear Direct Formatting"
2. Note that you can now format individual words and paragraphs.

Now...

3. Create a new custom format (Styles and formatting). Change font to red to highlight changes. Check Auto Update box.
4. Highlight ERROR 1... line and select your custom format.
5. Highlight ERROR 2... line and select custom format.
6. Change ERROR 1... line to italics - affects ERROR 2. Change one of them to bold. No effect. 

Upon retesting, changing one line back and forth from bold to italics had varying results of affect on the other line. The behavior is erratic, like GS has pointed out.
Comment 6 Brenda Granados 2013-02-19 19:47:29 UTC
Created attachment 75128 [details]
formatting behavior

This document shows odd behavior even after clearing direct formatting.
Comment 7 QA Administrators 2016-09-20 09:33:48 UTC Comment hidden (obsolete)
Comment 8 Thomas Lendo 2018-11-04 00:35:34 UTC
I can't reproduce the issue in comment 5.
All the other comments before are not valid if they are based on direct formatting.

Setting to RESOLVED WORKSFORME.

Version: 6.2.0.0.alpha1+
Build ID: 612a107464c1889fdc4806a3c86da8c2fbf452c8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: threaded