Bug 97619

Summary: "Update to Match Selection" Feature is Broken
Product: LibreOffice Reporter: milkservice
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ilmari.lauhakangas, milkservice, oliver.specht, xiscofauli
Priority: medium    
Version: 5.0.4.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=62081
Whiteboard: target:5.2.0
Crash report or crash signature: Regression By:

Description milkservice 2016-02-07 13:51:46 UTC
The "Update to Match Selection" is broken in a way that makes the feature unusable.

Steps to reproduce:

1. Create a new document
2. Enter some words separated by newlines
3. The text has Paragraph Style "Default Style" by default
4. Select the first line and set the text to Bold
5. With the first line still selected, open the "Apply Style" dropdown and press the small arrow next to "Heading 1", then choose "Update to Match Selection"

Expected result:

The style "Heading 1" should be updated to match the formatting of the selection, and the Paragraph Style of the selected paragraph should be updated to "Heading 1". The look of the paragraph should not change.

Actual result:

The style "Heading 1" stays untouched. Instead the "Default Style" is updated with the formatting of the selection. The Paragraph Style of the selected paragraph does not change. In the whole document all paragraphs using the "Default Style" are updated with the new formatting.

Additional Notes:

This works correctly in Microsoft Word. This bug breaks the feature completely, as there is no way to update any Paragraph Style with the actual styling of a given paragraph, unless the paragraph already has that Paragraph Style.
Comment 1 Buovjaga 2016-02-11 09:25:35 UTC
Reproduced.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: a6f876d45bd4e41a7143594a6cb11b6893a0f620
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-11_00:07:38
Locale: fi-FI (fi_FI)
Comment 2 Commit Notification 2016-03-10 08:18:00 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2aec5d4f804f543fa83356ec18feeb6d76b5a16

tdf#97619: update to match selection fixed

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Xisco FaulĂ­ 2016-09-15 22:31:12 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?