Bug 76084 - Update style from selection does not work
Summary: Update style from selection does not work
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
: 93248 101156 (view as bug list)
Depends on:
Blocks: Styles-Management
  Show dependency treegraph
Reported: 2014-03-12 18:26 UTC by Henrik
Modified: 2020-03-03 03:04 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Henrik 2014-03-12 18:26:01 UTC
I want to apply the attributes from the style "Heading 1" to its parent style "Heading". I am subsequnetly planning to change the style "Heading 1".

First I select a part of my document which is already formatted in the style "Heading 1".

In the Styles and Formatting window I the select (one click) the Style "Heading" and then I click the top left button with the tool tip "New style from selection". In the drop down menu I select "Update style".

The expected behaviour is that the style "Heading" should adopt the attributes of the selected text thereby becomming identical to the style "Heading 1".

The actual behaviour is that nothing happens. The style "Heading" retains all its prior attributes.
Comment 1 Dominique Boutry 2014-03-13 10:43:04 UTC
Reproduced with LibO on Win7.

Not tied to the fact that Heading is the parent style of Heading 1; it occurs also when trying to update the Heading 2 style with Heading 1 definition. NEW
Comment 2 Joel Madero 2015-05-02 15:44:10 UTC Comment hidden (obsolete)
Comment 3 Hans Deragon 2015-05-26 12:54:55 UTC
Confirming the problem.

Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale: en_US

LibreOffice Writer has a serious problem with styles; there are a lot of bugs opened against them.  I find them difficult to use and a waste of time because I always have to fight the software, trying to work around the bugs.  I believe it needs an overhaul.
Comment 4 Buovjaga 2015-09-03 16:20:15 UTC
*** Bug 93248 has been marked as a duplicate of this bug. ***
Comment 5 Henrik 2015-09-08 09:34:49 UTC
Confirmed in version on Windows 10.
Comment 6 Buovjaga 2016-08-05 18:41:29 UTC
*** Bug 101156 has been marked as a duplicate of this bug. ***
Comment 7 tefaa8 2016-09-02 19:19:09 UTC
Can confirm 


Linux Mint 18
Comment 8 Xisco Faulí 2017-09-29 08:53:11 UTC Comment hidden (obsolete)
Comment 9 Hans Deragon 2017-09-30 00:05:12 UTC
I still reproduced the probem.  However, isn't this behavior normal after all?  Once you select the style you desire to change, the selection has been moved from the text to the select box.  When one then selects 'Update style', there is no selection in the text, no source paragraph to update from.  Thus, nothing happens.
Comment 10 donotspam 2017-09-30 00:39:53 UTC
Selecting text of a particular style, changing the formatting, then updating the style, works for me with LibreOffice Writer 

But updating a style which is not currently applied to the selected text results in the (unchanged) style being applied to the selection.  

In my case the selection remains selected, using the per-style dropdown/actions menu from within the main toolbar style menu.
Comment 11 tefaa8 2017-09-30 04:25:56 UTC
donotspam@fastmail.fm  is correct, the problem exists if I try to update a style that is currently not applied to the text.

Let me give you an example.

Select a block of text that is "text body" and simply press to update heading 1 based on this text. You will see that instead oft the "Heading 1" style being updated to the formatting of the selected text, the selected text is now formatted based on the old "Heading 1" format. The expected behavior should be that Heading 1 would simply adopt the formatting of the text.

It can be still reproduced in LO in Manjaro KDE
Comment 12 QA Administrators 2018-10-01 02:53:16 UTC Comment hidden (obsolete)
Comment 13 sdc.blanco 2020-01-24 15:30:21 UTC
I am closing this bug as WFM.

Possibly was a misunderstanding of how "Update Style" works and therefore NAB.

"Update Style" is used in cases where you have directly modified a paragraph in your document, and now want to "update" (i.e., automatically copy the modifications into the current Paragraph Style).  

See:   https://help.libreoffice.org/latest/en-US/text/swriter/guide/stylist_update.html

It would not be possible to update "across" paragraph styles (see Comment 1 that set this as NEW)

In relation to OP.  In Styles window, select Heading 1, right-click, New  (then you can make a NewHeading style and then modify Heading [1-n] to inherit from NewHeading.
Comment 14 donotspam 2020-03-02 22:39:25 UTC
This is still buggy (though improved) in (Debian)

I cannot replicate the procedure described in Comment 1 in but the title of the bug report is not inaccurate.

To reproduce problem:

Type some text in LO Writer in default style.

Select it and change the formatting.

Open the style dropdown menu from the toolbar (which may need to be configured to appear)

Click the down arrow next to Heading 1.  A menu appears.  Click "Update style to match selection".

Font formatting is changed (which is an improvement since I commented previously) but Heading 1's existing spacing above and below the paragraph is applied, rather than being updated to zero to match the spacing of the selection.  Thus, the style is not properly updated to match the selection.
Comment 15 sdc.blanco 2020-03-02 23:52:12 UTC
(In reply to donotspam from comment #14)
> Click the down arrow next to Heading 1.  A menu appears.  Click "Update
> style to match selection".
Try this:

1. Apply Heading 1 style to a paragraph.
2. Modify that paragraph as you want.
3. Use "Update style to match selection" on Heading 1 (as you described).

When I do this, then Heading 1 is updated to the modifications that were made (including spacing) (using

This is the same procedure as the original report, which I understand you also confirm as WFM.

I believe the command label has mislead you to think that you can use this command to take manual formatting on one style (e.g. "default style") to use that to update another style (e.g., "Heading 1") 

I do not think this was the intention of "update style to match selection" (note that it is now "Update to match selection" ).

That issue is different from this bug report.  I would recommend that you close this report again and file a new ticket to make an enhancement request for what you want: to update an existing style from the manual formatting from another style.
Comment 16 donotspam 2020-03-03 01:42:32 UTC
Either I did not test as thoroughly as I should have when I confirmed WFM and did not notice that spacing is not applied correctly, or maybe later versions introduced a regression in comparison to the version I was testing with at the time (I'm afraid I don't know which version that was.)

> I believe the command label has mislead you to think that you can use this command to take manual formatting on one style (e.g. "default style") to use that to update another style (e.g., "Heading 1") 

The fact that "Update to match selection" exists in relation to *all* styles when text is selected, and the fact that it actually works to some extent,  suggests that that is precisely its purpose.  For that reason, I don't think an enhancement request is appropriate.

The interface gives the impression that "Update to match selection" is a shortcut to "New style from selection" > "Update style" in the style manager.  

This also exists in relation to all styles when text is selected, but does nothing (as opposed to being partially effective) when updating a style not currently applied.  If that is not the purpose, why is the option available (like "Update to match selection") for all styles when text is selected?  

If that is not the purpose, then the style manager does not contain the function which does appear to have that purpose in the style dropdown, which would be a significant omission.
Comment 17 donotspam 2020-03-03 01:57:29 UTC
I have just realised I responding with WFM in error.  My WFM actually related to my observation that font formatting IS now applied to non-current styles when "updated to match" from the style dropdown.

This is nothing to do with the actual bug report, but related to my original comment 10. *That* issue has been fixed.

But the issue as originally reported here is still a bug.
Comment 18 donotspam 2020-03-03 03:04:08 UTC
[accessed 3/3/20 02:58]

does not suggest that only the style of the current selection can be updated via the style manager.

It does however say

"Only the manually formatted attributes of the text at the cursor position in the document will be added to the style that is selected in the Styles window. Any attributes that were applied as part of a style will not be added to the updated style."

This explains why the spacing isn't being updated/transferred in, but the fact that "update to match selection" then does work as expected on non-currently selected styles suggests that the style manager function should too.