Bug 32369

Summary: Heading styles are out of order
Product: LibreOffice Reporter: Chris Wilson <notgary>
Component: WriterAssignee: Sébastien Le Ray <sebastien-libreoffice>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium CC: cedric.bosdonnat.ooo, detective.conan.1412, LibreOffice, yfjiang
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: EasyHack target:3.5
i915 platform: i915 features:
Attachments: Add a CompareToNumeric to ByteString & UniString
Add compareToNumeric to OUString & Co
Patch to solve issue. Apply #43119 before this

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] [review]
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] [review]
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] [review]
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

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.