Bug 32369 - Heading styles are out of order
Summary: Heading styles are out of order
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Sébastien Le Ray
URL:
Whiteboard: target:3.5
Keywords: easyHack
Depends on:
Blocks:
 
Reported: 2010-12-13 18:53 UTC by Chris Wilson
Modified: 2015-12-18 09:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Add a CompareToNumeric to ByteString & UniString (7.56 KB, patch)
2011-02-08 09:03 UTC, Sébastien Le Ray
Details
Add compareToNumeric to OUString & Co (12.01 KB, patch)
2011-02-08 12:06 UTC, Sébastien Le Ray
Details
Patch to solve issue. Apply #43119 before this (7.04 KB, patch)
2011-02-09 03:31 UTC, Sébastien Le Ray
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wilson 2010-12-13 18:53:58 UTC
When one opens up LibreOffice Writer and opens 'Format' -> 'Styles and Formatting', it can be seen that the 'Heading 10' appears between 'Heading 1' and 'Heading 2'. This I believe is simply due to the algorithm that determines the order of these entries not being aware of the precedence of 10 over 9 in a numerical sequence, and is placing 'Heading 10' in it's present location because it starts with a 1.
Comment 1 Yifan Jiang 2010-12-13 21:44:49 UTC
Thanks for reporting the usability enhancement.

Hi Cedric, should this be marked as easyhack?:) Thanks!
Comment 2 Cédric Bosdonnat 2010-12-14 00:22:02 UTC
(In reply to comment #1)
> Thanks for reporting the usability enhancement.
> 
> Hi Cedric, should this be marked as easyhack?:) Thanks!

Indeed, this could be an easy hack. The code responsible for this is located here:
http://docs.go-oo.org/sfx2/html/templdlg_8cxx-source.html#l01167

Any taker?
Comment 3 Sébastien Le Ray 2011-02-07 12:22:41 UTC
I'm gonna try this one...
Comment 4 Sébastien Le Ray 2011-02-08 09:03:53 UTC
Created attachment 43119 [details]
Add a CompareToNumeric to ByteString & UniString

Since this feature might be usefull elsewhere, attached is a patch to add CompareToNumeric to UniString & ByteString with its unit tests.
I'll wait the review before go on. If it's OK, I've the same kind of patch for rtl classes.
BTW code pointed in the first comment is not the right place to fix :)
Comment 5 Cédric Bosdonnat 2011-02-08 09:10:16 UTC
(In reply to comment #4)
> Created an attachment (id=43119) [details]
> Add a CompareToNumeric to ByteString & UniString
> 
> Since this feature might be usefull elsewhere, attached is a patch to add
> CompareToNumeric to UniString & ByteString with its unit tests.
> I'll wait the review before go on. If it's OK, I've the same kind of patch for
> rtl classes.
> BTW code pointed in the first comment is not the right place to fix :)

Well... those two types are obsolete and we would like to remove them and use rtl::OUString and rtl::OString instead.
Comment 6 Sébastien Le Ray 2011-02-08 09:14:55 UTC
I know that they're obsolete but changing all the style handling to use OUString/OString would be too much for this bug I guess, that's why I've another set of patch to add the same feature to O(U)String to come if this one is OK. That way the moving from deprecated classes will be easier.
Comment 7 Sébastien Le Ray 2011-02-08 12:06:10 UTC
Created attachment 43126 [details]
Add compareToNumeric to OUString & Co

Same as #43119 but for non-obsolete classes. Awaiting review for final patch for this issue.
Comment 8 Sébastien Le Ray 2011-02-09 03:31:26 UTC
Created attachment 43158 [details]
Patch to solve issue. Apply #43119 before this

This patch solves the problem in hierarchical and plain view.
Comment 10 Timothy Arceri 2011-09-04 01:02:04 UTC
This is still happening in 3.4
Comment 11 Korrawit Pruegsanusak 2011-09-09 23:00:17 UTC
(In reply to comment #10)
> This is still happening in 3.4

This fix will be in 3.5. I've checked the daily build (2011-09-09) on Windows XP and it works fine.
Comment 12 Rainer Bielefeld Retired 2012-04-10 02:39:08 UTC
EasyHack tags unification: tags only allowed in Whiteboard to make queries more easy and reliable
Comment 13 Robinson Tryon (qubit) 2015-12-18 09:56:28 UTC
Migrating Whiteboard tags to Keywords: (EasyHack)
[NinjaEdit]