summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/fields/postithelper.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 82e8531d4ad7..21041a6de01e 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -58,7 +58,22 @@ bool AnnotationMarkCoversCommentAnchor(const sw::mark::IMark* pAnnotationMark,
if (rMarkStart != rAnchorPos)
{
- return false;
+ // This can be the as-char case: the comment placeholder character is exactly between the
+ // annotation mark start and end.
+ SwPosition aPosition(rMarkStart);
+ ++aPosition.nContent;
+ if (aPosition != rAnchorPos)
+ {
+ return false;
+ }
+
+ ++aPosition.nContent;
+ if (aPosition != rMarkEnd)
+ {
+ return false;
+ }
+
+ return true;
}
if (rMarkStart.nNode != rMarkEnd.nNode)