summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/findtxt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/crsr/findtxt.cxx')
-rw-r--r--sw/source/core/crsr/findtxt.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 79405979143b..9cd8a59dbd06 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -903,8 +903,8 @@ bool DoSearch(SwPaM & rSearchPam,
if( (bSrchForward || pSttNd != &rNdIdx.GetNode()) &&
rSearchPam.Move(fnMoveForward, GoInContent) &&
(!bSrchForward || pSttNd != &rSearchPam.GetPoint()->nNode.GetNode()) &&
- 1 == std::abs(static_cast<int>(rSearchPam.GetPoint()->nNode.GetIndex() -
- rSearchPam.GetMark()->nNode.GetIndex())))
+ SwNodeOffset(1) == abs(rSearchPam.GetPoint()->nNode.GetIndex() -
+ rSearchPam.GetMark()->nNode.GetIndex()))
{
// if backward search, switch point and mark
if( !bSrchForward )