summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx6
-rw-r--r--sw/source/core/inc/MarkManager.hxx2
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 14775d1e050a..89628faa0918 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -22,6 +22,7 @@
#include <doc.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
+#include <MarkManager.hxx>
#include <docary.hxx>
#include <editsh.hxx>
#include <fmtanchr.hxx>
@@ -265,6 +266,11 @@ void ContentIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, updater_t& rUpdater)
SetRightMarkPos(pMark, aEntry.m_bOther, &aNewPos);
}
}
+ if (!m_aBkmkEntries.empty())
+ { // tdf#105705 sort bookmarks because SaveBkmks special handling of
+ // "bMarkPosEqual" may destroy sort order
+ dynamic_cast<sw::mark::MarkManager*>(pMarkAccess)->sortMarks();
+ }
}
void ContentIdxStoreImpl::SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent)
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index bc0aecd6064a..093e11855bcb 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -101,7 +101,9 @@ namespace sw {
// make names
OUString getUniqueMarkName(const OUString& rName) const;
+ public: // FIXME should be private, needs refactor
void sortMarks();
+ private:
void sortSubsetMarks();
// container for all marks