Bug Hunting Session
Bug 54335 - [FORMATTING, EDITING] Typing an existing style name into Style box changes hierarchy of styles
Summary: [FORMATTING, EDITING] Typing an existing style name into Style box changes hi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.6.2 release
Hardware: Other All
: medium normal
Assignee: Jorendc
URL:
Whiteboard: target:4.1.0 target:4.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-31 17:17 UTC by Mirosław Zalewski
Modified: 2013-03-04 10:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirosław Zalewski 2012-08-31 17:17:13 UTC
Steps to reproduce:
1. Open new Writer window, type in any text.
2. Open Styles and formatting window (F11)
3. Change filter to "Hierarchical" (not necessary, but makes bug visible)
4. In "Apply style" input box (on toolbar), type in name of some style that is both:
  a) not used anywhere else in the document
  b) not on default drop-down list of Apply style box
"Heading 4", "Title", "Quotations" and "Sender" are nice examples
5. Press Enter

Result:
Applied style will be made child of whatever style paragraph has been before. So, if typed text was "Text body", and you type in "Heading 4" in Apply style box, then Heading 4 will suddenly be child of Text body.
And since child styles inherit properties from their parents, this can give quite a headache.

I could reproduce it on:
- LO 3.6.1 on Debian (amd64) and Windows 7 (i686)
- LO 3.5.6 on Arch Linux (i686).

Best regards,
Mirosław Zalewski
Comment 1 Jorendc 2013-01-25 00:54:48 UTC
Thanks for reporting! 

I can reproduce this using Mac OSX 10.8.2 and LibreOffice Version 4.1.0.0.alpha0+ (Build ID: b1d0fd4f969976e2133f8eaa37c1fb8360c20f6)
TinderBox: MacOSX-Intel@1-built_no-moz_on_10.6.8, Branch:master, Time: 2013-01-24_00:28:35
Comment 3 Jorendc 2013-02-02 17:25:02 UTC
Didn't change the bug status correctly. I'm not going to promise I can fix this issue. But at least I can try.

Kind regards,
Joren
Comment 4 Not Assigned 2013-02-27 12:13:08 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "master":

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

resolve fdo#54335 type an existing style name into Style box changes hierarchy



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 5 Jorendc 2013-02-27 12:17:13 UTC
Marking it as RESOLVED FIXED. I'll try to backport it to 3.6 and 4.0 branch as well.

Kind regards,
Joren
Comment 6 Commit Notification 2013-03-04 10:10:04 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c56ae179f83034df407cd609a69c140d24d3ec6d&h=libreoffice-4-0

resolve fdo#54335 type an existing style name into Style box changes hierarchy


It will be available in LibreOffice 4.0.2.

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.