[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - cui/source include/svx sc/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Sep 5 09:33:03 UTC 2020


 cui/source/options/optaboutconfig.cxx  |    4 +++-
 include/svx/ctredlin.hxx               |    1 +
 sc/source/ui/dialogs/searchresults.cxx |    4 +++-
 svx/source/dialog/ctredlin.cxx         |    4 +++-
 sw/source/ui/misc/bookmark.cxx         |    4 +++-
 sw/source/uibase/misc/redlndlg.cxx     |    4 ++++
 6 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 6c75668ebf3062b087e83c7a3559448d4ceefdeb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 11:47:49 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Sep 5 11:32:23 2020 +0200

    Resolves: tdf#136189 don't try and sort until treeview is filled
    
    Change-Id: Ic5ac71d88bab7627e14220912f4b9c935f2f1f26
    
    and...
    
    Related: tdf#136189 don't assert on unsetting non-existing previous sort column
    
    Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101710
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit c52ac477beefc46802148033adbca9edb9970ac1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101967
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index a5adf7638c8d..217b0bc5308f 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/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 55462c9dce28..08538bf18b02 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -104,6 +104,7 @@ public:
     void set_size_request(int nWidth, int nHeight);
 
     weld::TreeView& GetWidget() { return *pTreeView; }
+    bool IsSorted() const { return bSorted; }
 
     ~SvxRedlinTable();
 
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 3604e1599a16..e78f91d5b458 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -181,7 +181,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 15155c6c6edc..f3243e0d1b4c 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -113,7 +113,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 e5be414d7bdb..7267f5a059f4 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -367,7 +367,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);
     }
 
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 1fc7a359bbf6..807fa1633a2e 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -716,6 +716,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
         pCurrRedline = nullptr;
 
     rTreeView.freeze();
+    if (m_pTable->IsSorted())
+        rTreeView.make_unsorted();
     for (SwRedlineTable::size_type i = nStart; i <= nEnd; i++)
     {
         const SwRangeRedline& rRedln = pSh->GetRedline(i);
@@ -762,6 +764,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
         InsertChildren(pRedlineParent, rRedln, bHasRedlineAutoFormat);
     }
     rTreeView.thaw();
+    if (m_pTable->IsSorted())
+        rTreeView.make_sorted();
 }
 
 void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept )


More information about the Libreoffice-commits mailing list