summaryrefslogtreecommitdiffstats
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-21 10:14:05 +0000
commit54a8a941c0c5f0a11c8c4fd40617bfdbb40c07ed (patch)
treebd9c152835fb12fe6650cbb9830205990eb71973
parentfdo#72530: drawinglayer: fix PDF export of lossless picture (diff)
downloadcore-54a8a941c0c5f0a11c8c4fd40617bfdbb40c07ed.tar.gz
core-54a8a941c0c5f0a11c8c4fd40617bfdbb40c07ed.zip
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> (cherry picked from commit 22183794b50d3d55094e1363755af74a10a4b555) Reviewed-on: https://gerrit.libreoffice.org/7542 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.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;