diff options
-rw-r--r-- | include/vcl/weld.hxx | 4 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
3 files changed, 6 insertions, 10 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index d8d6b1a0492d..fedf414432c3 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1104,8 +1104,8 @@ public: virtual void set_sort_order(bool bAscending) = 0; // TRUE ascending, FALSE, descending, INDET, neither (off) - virtual void set_sort_indicator(TriState eState, int nColumn = -1) = 0; - virtual TriState get_sort_indicator(int nColumn = -1) const = 0; + virtual void set_sort_indicator(TriState eState, int nColumn) = 0; + virtual TriState get_sort_indicator(int nColumn) const = 0; virtual int get_sort_column() const = 0; virtual void set_sort_column(int nColumn) = 0; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 2b0e1c9c28cb..e00adc86f6a5 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4465,8 +4465,7 @@ public: virtual void set_sort_indicator(TriState eState, int col) override { - if (col == -1) - col = 0; + assert(col >= 0 && "cannot sort on expander column"); LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get()); if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr) @@ -4488,8 +4487,7 @@ public: virtual TriState get_sort_indicator(int col) const override { - if (col == -1) - col = 0; + assert(col >= 0 && "cannot sort on expander column"); LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get()); if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index b821ebe7302d..fe4d84a7397d 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -10145,8 +10145,7 @@ public: virtual void set_sort_indicator(TriState eState, int col) override { - if (col == -1) - col = get_view_col(m_nTextCol); + assert(col >= 0 && "cannot sort on expander column"); GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, col)); assert(pColumn && "wrong count"); @@ -10162,8 +10161,7 @@ public: virtual TriState get_sort_indicator(int col) const override { - if (col == -1) - col = get_view_col(m_nTextCol); + assert(col >= 0 && "cannot sort on expander column"); GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, col)); if (!gtk_tree_view_column_get_sort_indicator(pColumn)) |