summaryrefslogtreecommitdiff
path: root/vcl/source/treelist/treelistbox.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-18 12:11:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-19 22:18:10 +0100
commit12a59a1f2948274c6a845ab4a0963bab8aff45b8 (patch)
treed7877f8e78aad8b53df428773947228e88a151f3 /vcl/source/treelist/treelistbox.cxx
parente9bc6efbb8f1c1d012e60f3fc9877d311a48ee03 (diff)
weld ChineseDictionaryDialog
and ChineseTranslationDialog Change-Id: I3b754c405c8379fc0c5fa94437cc0464a1dea999 Reviewed-on: https://gerrit.libreoffice.org/67991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/treelist/treelistbox.cxx')
-rw-r--r--vcl/source/treelist/treelistbox.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index e306d7df0e47..6c45fc325ebe 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3312,16 +3312,21 @@ void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt )
Control::RequestHelp( rHEvt );
}
+sal_Int32 SvTreeListBox::DefaultCompare(const SvLBoxString* pLeftText, const SvLBoxString* pRightText)
+{
+ OUString aLeft = pLeftText ? pLeftText->GetText() : OUString();
+ OUString aRight = pRightText ? pRightText->GetText() : OUString();
+ pImpl->UpdateStringSorter();
+ return pImpl->m_pStringSorter->compare(aLeft, aRight);
+}
+
IMPL_LINK( SvTreeListBox, DefaultCompare, const SvSortData&, rData, sal_Int32 )
{
const SvTreeListEntry* pLeft = rData.pLeft;
const SvTreeListEntry* pRight = rData.pRight;
const SvLBoxString* pLeftText = static_cast<const SvLBoxString*>(pLeft->GetFirstItem(SvLBoxItemType::String));
const SvLBoxString* pRightText = static_cast<const SvLBoxString*>(pRight->GetFirstItem(SvLBoxItemType::String));
- OUString aLeft = pLeftText ? pLeftText->GetText() : OUString();
- OUString aRight = pRightText ? pRightText->GetText() : OUString();
- pImpl->UpdateStringSorter();
- return pImpl->m_pStringSorter->compare(aLeft, aRight);
+ return DefaultCompare(pLeftText, pRightText);
}
void SvTreeListBox::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEntry1,