summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Schmidt <jsc@apache.org>2012-09-18 14:34:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-08 16:20:21 +0100
commitd56497365f36aa385f74ca5bb665f1ea541b52ef (patch)
tree599c23289596a40b7c31b0149308a9aa48cc8c5f
parent6ea2cc95f5996213c370dff61a36fb667dd6771e (diff)
Resolves: #i119831# check again the node if the bookmark belongs to it
(start and end position) Patch By: jsc Review By: orw (cherry picked from commit 016331f9cc330abca8ea3bedd1be9f50cd68dc18) Change-Id: I7ad4a10be855806aeb9fc6fef5fbfba377671fc8
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 83bd7943ce02..85d6b1150af2 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1634,8 +1634,8 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
xub_StrLen nBEnd = pMark->GetMarkEnd().nContent.GetIndex();
// Keep only the bookmars starting or ending in the snippet
- bool bIsStartOk = ( nBStart >= nStt ) && ( nBStart <= nEnd );
- bool bIsEndOk = ( nBEnd >= nStt ) && ( nBEnd <= nEnd );
+ bool bIsStartOk = ( pMark->GetMarkStart().nNode == nNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd );
+ bool bIsEndOk = ( pMark->GetMarkEnd().nNode == nNd ) && ( nBEnd >= nStt ) && ( nBEnd <= nEnd );
IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>(pMark);
if (pFieldmark && pFieldmark->GetFieldname() == ODF_COMMENTRANGE)