Kaydet (Commit) 9d0c51da authored tarafından Michael Stahl's avatar Michael Stahl

tdf#90808: sw: fix detection of duplicate CrossRefBookmarks

The check for existing bookmark positions is using the wrong position.
It must use the Start of the pam, because the constructor of
CrossRefBookmark only uses the Start of the pam.

Change-Id: I343f1c0e3571847a965a27571f01136810e83485
üst c8dad7eb
......@@ -376,7 +376,7 @@ namespace sw { namespace mark
" - more than USHRT_MAX marks are not supported correctly");
// There should only be one CrossRefBookmark per Textnode per Type
if ((eType == MarkType::CROSSREF_NUMITEM_BOOKMARK || eType == MarkType::CROSSREF_HEADING_BOOKMARK)
&& (lcl_FindMarkAtPos(m_vBookmarks, *rPaM.GetPoint(), eType) != m_vBookmarks.end()))
&& (lcl_FindMarkAtPos(m_vBookmarks, *rPaM.Start(), eType) != m_vBookmarks.end()))
{ // this can happen via UNO API
SAL_WARN("sw.core", "MarkManager::makeMark(..)"
" - refusing to create duplicate CrossRefBookmark");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment