summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-01-17 23:09:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-01-20 14:50:50 +0000
commit22183794b50d3d55094e1363755af74a10a4b555 (patch)
tree567066a0ccd102486aa25b017cfcc78d3766b973
parentffdea858b69b1e7181023a60a136688ccf449a2c (diff)
fdo#73660: sw: fix Find of words containing soft-hyphen
Soft hyphen was not detected if there is no hint (-1). (regression from ebeff3f074dd94dce4ce6cc55abd0495103684bd) Change-Id: I09108796a32429a01eff93f797a6de521ab1d08a (cherry picked from commit 156a0235bd8ff06840cecad1e70a57ffc5b8e7e1) Reviewed-on: https://gerrit.libreoffice.org/7511 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/crsr/findtxt.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 796da83246f8..5567cfad7b4a 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -89,7 +89,9 @@ lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
bNewHint = true;
}
// Check if next stop is a soft hyphen.
- else if (-1 != nSoftHyphen && nSoftHyphen < nHintStart && nSoftHyphen < nEnd)
+ else if ( -1 != nSoftHyphen
+ && (-1 == nHintStart || nSoftHyphen < nHintStart)
+ && nSoftHyphen < nEnd)
{
nStt = nSoftHyphen;
bNewSoftHyphen = true;