diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-10-29 17:40:02 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-10-30 14:44:31 +0100 |
commit | a631fbe78881707b74025f6ba392f100aad6419f (patch) | |
tree | faafea8e72ef6e1d8405004f726d53ed93c7fbee | |
parent | a6516c76c01b92f7d35bfb352b63af7de42b5707 (diff) |
sw: makeMark(): insert CH_TXT_ATR before inserting into sorted vector
... because if the new fieldmark is exactly around an existing
fieldmark, we get this on tdf112797-3.docx:
sw/source/core/doc/docbm.cxx:481: void {anonymous}::lcl_DebugMarks(const container_t&): Assertion `std::is_sorted(rMarks.begin(), rMarks.end(), lcl_MarkOrderingByStart)' failed.
Change-Id: If998c95d4c6c40654936773defc674ee55f736c4
Reviewed-on: https://gerrit.libreoffice.org/81700
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index b3d0470a3124..fed537289400 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -642,6 +642,9 @@ namespace sw { namespace mark if ( eType != IDocumentMarkAccess::MarkType::UNO_BOOKMARK ) pMark->SetName( getUniqueMarkName( pMark->GetName() ) ); + // insert any dummy chars before inserting into sorted vectors + pMark->InitDoc(m_pDoc, eMode, pSepPos); + // register mark lcl_InsertMarkSorted(m_vAllMarks, pMark.get()); switch(eType) @@ -666,7 +669,6 @@ namespace sw { namespace mark // no special array for these break; } - pMark->InitDoc(m_pDoc, eMode, pSepPos); SAL_INFO("sw.core", "--- makeType ---"); SAL_INFO("sw.core", "Marks"); lcl_DebugMarks(m_vAllMarks); |