[Libreoffice-commits] core.git: cui/source sc/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 31 18:14:10 UTC 2020


 cui/source/options/optaboutconfig.cxx  |    4 +++-
 sc/source/ui/dialogs/searchresults.cxx |    4 +++-
 svx/source/dialog/ctredlin.cxx         |    4 +++-
 sw/source/ui/misc/bookmark.cxx         |    4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 78876b03874915459f7ebe2135ac146ece92aaf4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 11:28:04 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 31 20:13:22 2020 +0200

    Related: tdf#136189 don't assert on unsetting non-existing previous sort column
    
    Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101708
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index cd91c4735048..f813c9a7c609 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -181,7 +181,9 @@ IMPL_LINK(CuiAboutConfigTabPage, HeaderBarClick, int, nColumn, void)
     }
     else
     {
-        m_xPrefBox->set_sort_indicator(TRISTATE_INDET, m_xPrefBox->get_sort_column());
+        int nOldSortColumn = m_xPrefBox->get_sort_column();
+        if (nOldSortColumn != -1)
+            m_xPrefBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
         m_xPrefBox->set_sort_column(nColumn);
     }
 
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 950726a18c4e..0f94c64f32e7 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -196,7 +196,9 @@ IMPL_LINK(SearchResultsDlg, HeaderBarClick, int, nColumn, void)
     }
     else
     {
-        mxList->set_sort_indicator(TRISTATE_INDET, mxList->get_sort_column());
+        int nOldSortColumn = mxList->get_sort_column();
+        if (nOldSortColumn != -1)
+            mxList->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
         mxList->set_sort_column(nColumn);
     }
 
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 3b07ab66fb9d..2980d80ba6b2 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -111,7 +111,9 @@ IMPL_LINK(SvxRedlinTable, HeaderBarClick, int, nColumn, void)
     }
     else
     {
-        pTreeView->set_sort_indicator(TRISTATE_INDET, pTreeView->get_sort_column());
+        int nOldSortColumn = pTreeView->get_sort_column();
+        if (nOldSortColumn != -1)
+            pTreeView->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
         pTreeView->set_sort_column(nColumn);
     }
 
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 852a74c0d529..e62f778cc68c 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -362,7 +362,9 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
     }
     else
     {
-        m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, m_xBookmarksBox->get_sort_column());
+        int nOldSortColumn = m_xBookmarksBox->get_sort_column();
+        if (nOldSortColumn != -1)
+            m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
         m_xBookmarksBox->set_sort_column(nColumn);
     }
 


More information about the Libreoffice-commits mailing list