resolves tdf#164985 Incorrect bookmarks list in bookmark dialog after
column sort followed by delete Change-Id: Id0ff9213b7a09faf4ed490a216e85ac7ec277af2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181006 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
This commit is contained in:
@@ -78,6 +78,7 @@ public:
|
||||
}
|
||||
void start_editing(weld::TreeIter const& rIter) { m_xControl->start_editing(rIter); }
|
||||
void make_sorted() { m_xControl->make_sorted(); }
|
||||
void make_unsorted() { m_xControl->make_unsorted(); }
|
||||
bool get_sort_order() const { return m_xControl->get_sort_order(); }
|
||||
void set_sort_order(bool bAscending) { m_xControl->set_sort_order(bAscending); }
|
||||
int get_sort_column() const { return m_xControl->get_sort_column(); }
|
||||
|
||||
@@ -348,6 +348,10 @@ void SwInsertBookmarkDlg::PopulateTable()
|
||||
m_aTableBookmarks.clear();
|
||||
m_xBookmarksBox->clear();
|
||||
|
||||
int nSortColumn = m_xBookmarksBox->get_sort_column();
|
||||
if (nSortColumn != -1)
|
||||
m_xBookmarksBox->make_unsorted();
|
||||
|
||||
m_rSh.StartAllAction();
|
||||
IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess();
|
||||
for (auto ppBookmark = pMarkAccess->getBookmarksBegin();
|
||||
@@ -360,6 +364,10 @@ void SwInsertBookmarkDlg::PopulateTable()
|
||||
}
|
||||
}
|
||||
m_rSh.EndAllAction();
|
||||
|
||||
if (nSortColumn != -1)
|
||||
m_xBookmarksBox->make_sorted();
|
||||
|
||||
m_nLastBookmarksCount = pMarkAccess->getBookmarksCount();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user