summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-06 22:25:44 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-06 22:38:41 +0200
commit6497a45560fa34d7f1372412c0994632ec7ff75b (patch)
treefe44ebc48884bfd303eaa4f308cc737cb31bfea9
parent3a2863afd428958ea1ec78b4dc9971c73f704741 (diff)
fdo#38071: roll back change to MarkBase::IsCoveringPosition:
This change seems wrong as the end position is actually behind the CH_TXT_ATR_FIELDEND; fortunately it is also unnecessary because the change in MSWordExportBase::OutputTextNode is sufficient to fix the crash. Change-Id: I79d508b13ecc8d85c4e09149b44695436416ba6d (cherry picked from commit f2b6d71ccd04f41a849a0e5386f6619bfcc211da)
-rw-r--r--sw/source/core/crsr/bookmrk.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index b177ee145871..9c7192625f86 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -118,11 +118,12 @@ namespace sw { namespace mark
}
}
- //We consider the CH_TXT_ATR_FIELDSTART and CH_TXT_ATR_FIELDEND
- //themselves to be part of the covered range
+ // For fieldmarks, the CH_TXT_ATR_FIELDSTART and CH_TXT_ATR_FIELDEND
+ // themselves are part of the covered range. This is guaranteed by
+ // TextFieldmark::InitDoc/lcl_AssureFieldMarksSet.
bool MarkBase::IsCoveringPosition(const SwPosition& rPos) const
{
- return rPos >= GetMarkStart() && rPos <= GetMarkEnd();
+ return GetMarkStart() <= rPos && rPos < GetMarkEnd();
}
void MarkBase::SetMarkPos(const SwPosition& rNewPos)