diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-15 23:57:04 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-18 10:33:13 +0000 |
commit | 277945413e8f8ba0573be143db877007f8517221 (patch) | |
tree | 9185acaaf4d4f2235491951bccd4765035f19e09 | |
parent | fad75997e6060c63e6d79327573dd51950da1acb (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.
(cherry picked from commit 9d0c51daea67104349cac26de9839afa8baeb099)
Conflicts:
sw/source/core/doc/docbm.cxx
Change-Id: I343f1c0e3571847a965a27571f01136810e83485
Reviewed-on: https://gerrit.libreoffice.org/15745
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 9567c3ab7606..ce0ff19b1b3f 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -377,7 +377,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 == CROSSREF_NUMITEM_BOOKMARK || eType == 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"); |