diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-14 15:39:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-14 20:52:32 +0000 |
commit | fa58785e39f08e57ecdbe07343fba9d141ff3e9d (patch) | |
tree | c2c8cf169175f0adc3f82eec8b8c0e36a8dc2078 /sfx2/source | |
parent | 47506b8c83660b109a069207b7d292872f5718e7 (diff) |
and now use the Collator+BreakIterator wrapper
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 0c90572fa94e..071a20fbf0c3 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -670,6 +670,11 @@ void StyleTree_Impl::Put(StyleTree_Impl* pIns, ULONG lPos) StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) { const USHORT nCount = rArr.Count(); + + comphelper::string::NaturalStringSorter aSorter( + ::comphelper::getProcessComponentContext(), + Application::GetSettings().GetLocale()); + // Alle unter ihren Parents einordnen USHORT i; for(i = 0; i < nCount; ++i) @@ -685,7 +690,7 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) // initial sortiert einfuegen USHORT nPos; for( nPos = 0 ; nPos < pCmp->Count() && - comphelper::string::compareNatural((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++); + aSorter.compare((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++); pCmp->Put(pEntry,nPos); break; } @@ -1313,12 +1318,16 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) SvLBoxEntry* pEntry = aFmtLb.First(); SvStringsDtor aStrings; + comphelper::string::NaturalStringSorter aSorter( + ::comphelper::getProcessComponentContext(), + Application::GetSettings().GetLocale()); + while( pStyle ) { //Bubblesort USHORT nPos; for( nPos = aStrings.Count() ; nPos && - comphelper::string::compareNatural(*(aStrings[nPos-1]), pStyle->GetName()) > 0 ; nPos--); + aSorter.compare(*(aStrings[nPos-1]), pStyle->GetName()) > 0 ; nPos--); aStrings.Insert( new String( pStyle->GetName() ), nPos ); pStyle = pStyleSheetPool->Next(); } |