summaryrefslogtreecommitdiff
path: root/vcl/source/glyphs/graphite_layout.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-03 12:27:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-03 16:09:36 +0000
commitd83328b233f51d4a70bfeaae90129a68dccf825b (patch)
tree82f2aa22d722f744af83fdfb634d6f78be1bbc4e /vcl/source/glyphs/graphite_layout.cxx
parentf1bd4db85538e4979dea6e0d6d306ac89210ea32 (diff)
longparas: convert GetTextBreak to sal_Int32
Change-Id: I693e4c9916e1968c33ebd922829662f6efc27bfb
Diffstat (limited to 'vcl/source/glyphs/graphite_layout.cxx')
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 348c4e36cbcc..b4498cf1d739 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -680,7 +680,7 @@ bool GraphiteLayout::LayoutGlyphs(ImplLayoutArgs& rArgs, gr_segment * pSegment)
return true;
}
-int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) const
+sal_Int32 GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) const
{
#ifdef GRLAYOUT_DEBUG
fprintf(grLog(),"Gr::GetTextBreak c[%d-%d) maxWidth %ld char extra %ld factor %d\n",
@@ -689,7 +689,7 @@ int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) c
// return quickly if this segment is narrower than the target width
if (maxmnWidth > mnWidth * factor + char_extra * (mnEndCharPos - mnMinCharPos - 1))
- return STRING_LEN;
+ return -1;
long nWidth = mvCharDxs[0] * factor;
long wLastBreak = 0;
@@ -724,8 +724,10 @@ int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) c
fprintf(grLog(), "Gr::GetTextBreak break after %d, weights(%d, %d)\n", nBreak - mnMinCharPos, mvCharBreaks[nBreak - mnMinCharPos], mvCharBreaks[nBreak - mnMinCharPos - 1]);
#endif
- if (nBreak > mnEndCharPos) nBreak = STRING_LEN;
- else if (nBreak < mnMinCharPos) nBreak = mnMinCharPos;
+ if (nBreak > mnEndCharPos)
+ nBreak = -1;
+ else if (nBreak < mnMinCharPos)
+ nBreak = mnMinCharPos;
return nBreak;
}