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 | 1d349a8c551ae9acefd66fafb270c53c456b6d93 (patch) | |
tree | a1174000b6e5af38863a2ca41463ec5bf67e0e30 /sfx2/source/dialog/templdlg.cxx | |
parent | 31bd3dfd4c0df460e710a859c86fb00ae73d5bcf (diff) |
and now use the Collator+BreakIterator wrapper
Diffstat (limited to 'sfx2/source/dialog/templdlg.cxx')
-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 5f279a18d2..8a97d4e9cc 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(); } |