summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-07 11:58:42 +0200
committerMichael Meeks <michael.meeks@suse.com>2013-07-08 08:54:56 +0000
commit4d268e8302d13b81494305eab68e60ab6d0ef264 (patch)
tree7a67ea47dff571b3f3de398738c65eea9b273cc0 /sw/source/core/txtnode/fntcache.cxx
parent5430b9e0f4082025ff9bf7621d18292db0361121 (diff)
fdo#66478: sw: un-break hyphenation
The main problem is calling SetHyphPos with a stack pointer. Converting STRING_LEN <-> -1 can't hurt though. (regression from a2f6402b1fe769a430019042e14e63c9414715dc) Change-Id: I59a4e3b16b418082de468c7d7f7f38a9b0bccd01 (cherry picked from commit 6fa07d2d608646004bc45261275c4ebabb578a09) Reviewed-on: https://gerrit.libreoffice.org/4757 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 83981599c0df..80b2ea8e6249 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2444,8 +2444,8 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
nTxtBreak = rInf.GetOut().GetTextBreak( sTmpText, nTextWidth,
static_cast<sal_Unicode>('-'), nHyphPos,
nTmpIdx2, nTmpLen2, nKern );
- xub_StrLen nTmpHyphPos = static_cast<xub_StrLen>(nHyphPos);
- rInf.SetHyphPos(&nTmpHyphPos);
+ *rInf.GetHyphPos() = (nHyphPos == -1)
+ ? STRING_LEN : static_cast<xub_StrLen>(nHyphPos);
}
else
nTxtBreak = rInf.GetOut().GetTextBreak( sTmpText, nTextWidth,