diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-15 23:57:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-16 00:16:09 +0200 |
commit | 9d0c51daea67104349cac26de9839afa8baeb099 (patch) | |
tree | ddb350dc304b13c511f2d5ab2492867648c48871 | |
parent | c8dad7ebb7c1738ae1348f92d67124c165d83f00 (diff) |
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
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index ea6621ca0cae..fda07570b88b 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -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"); |