summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/toolkit/treelist.hxx2
-rw-r--r--vcl/source/app/salvtables.cxx4
-rw-r--r--vcl/source/treelist/treelist.cxx8
-rw-r--r--vcl/source/treelist/treelistbox.cxx4
4 files changed, 9 insertions, 9 deletions
diff --git a/include/vcl/toolkit/treelist.hxx b/include/vcl/toolkit/treelist.hxx
index e45d0d933c01..d4c6da101e6d 100644
--- a/include/vcl/toolkit/treelist.hxx
+++ b/include/vcl/toolkit/treelist.hxx
@@ -50,7 +50,7 @@ class SvTreeListEntry;
class SvListView;
class SvViewDataEntry;
-enum SvSortMode { SortAscending, SortDescending, SortNone };
+enum class SvSortMode { Ascending, Descending, None };
// For the return values of Sortlink:
// See International::Compare( pLeft, pRight )
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2b1908f55834..608baded3b4f 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4777,13 +4777,13 @@ void SalInstanceTreeView::make_unsorted()
void SalInstanceTreeView::set_sort_order(bool bAscending)
{
SvTreeList* pListModel = m_xTreeView->GetModel();
- pListModel->SetSortMode(bAscending ? SortAscending : SortDescending);
+ pListModel->SetSortMode(bAscending ? SvSortMode::Ascending : SvSortMode::Descending);
pListModel->Resort();
}
bool SalInstanceTreeView::get_sort_order() const
{
- return m_xTreeView->GetModel()->GetSortMode() == SortAscending;
+ return m_xTreeView->GetModel()->GetSortMode() == SvSortMode::Ascending;
}
void SalInstanceTreeView::set_sort_indicator(TriState eState, int col)
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 6809eddb6a84..9c111bf99893 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -65,7 +65,7 @@ SvTreeList::SvTreeList(SvListView& listView) :
nEntryCount = 0;
bAbsPositionsValid = false;
pRootItem.reset(new SvTreeListEntry);
- eSortMode = SortNone;
+ eSortMode = SvSortMode::None;
}
SvTreeList::~SvTreeList()
@@ -1391,7 +1391,7 @@ public:
std::unique_ptr<SvTreeListEntry> const& rpRight) const
{
int nCompare = mrList.Compare(rpLeft.get(), rpRight.get());
- if (nCompare != 0 && mrList.GetSortMode() == SortDescending)
+ if (nCompare != 0 && mrList.GetSortMode() == SvSortMode::Descending)
{
if( nCompare < 0 )
nCompare = 1;
@@ -1429,7 +1429,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry const * pEntry, SvTreeListEntr
{
DBG_ASSERT(pEntry,"No Entry");
- if( eSortMode == SortNone )
+ if( eSortMode == SvSortMode::None )
return;
rPos = TREELIST_ENTRY_NOTFOUND;
@@ -1448,7 +1448,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry const * pEntry, SvTreeListEntr
k = (i+j)/2;
const SvTreeListEntry* pTempEntry = rChildList[k].get();
nCompare = Compare( pEntry, pTempEntry );
- if (nCompare != 0 && eSortMode == SortDescending)
+ if (nCompare != 0 && eSortMode == SvSortMode::Descending)
{
if( nCompare < 0 )
nCompare = 1;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index f2357b890fe2..278f42dde1c2 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2544,12 +2544,12 @@ void SvTreeListBox::ImplInitStyle()
nTreeFlags |= SvTreeFlags::RECALCTABS;
if (nWindowStyle & WB_SORT)
{
- GetModel()->SetSortMode(SortAscending);
+ GetModel()->SetSortMode(SvSortMode::Ascending);
GetModel()->SetCompareHdl(LINK(this, SvTreeListBox, DefaultCompare));
}
else
{
- GetModel()->SetSortMode(SortNone);
+ GetModel()->SetSortMode(SvSortMode::None);
GetModel()->SetCompareHdl(Link<const SvSortData&,sal_Int32>());
}
pImpl->SetStyle(nWindowStyle);