summaryrefslogtreecommitdiff
path: root/vcl/win/source
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/win/source
parentf1bd4db85538e4979dea6e0d6d306ac89210ea32 (diff)
longparas: convert GetTextBreak to sal_Int32
Change-Id: I693e4c9916e1968c33ebd922829662f6efc27bfb
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/gdi/winlayout.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index f240f17e68a5..a0f1ec4660b6 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -669,12 +669,12 @@ long SimpleWinLayout::FillDXArray( long* pDXArray ) const
// -----------------------------------------------------------------------
-int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
+sal_Int32 SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
// NOTE: the nFactor is used to prevent rounding errors for small nCharExtra values
{
if( mnWidth )
if( (mnWidth * nFactor + mnCharCount * nCharExtra) <= nMaxWidth )
- return STRING_LEN;
+ return -1;
long nExtraWidth = mnBaseAdv * nFactor;
for( int n = 0; n < mnCharCount; ++n )
@@ -689,7 +689,7 @@ int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor
nExtraWidth += nCharExtra;
}
- return STRING_LEN;
+ return -1;
}
// -----------------------------------------------------------------------
@@ -2182,7 +2182,7 @@ long UniscribeLayout::FillDXArray( long* pDXArray ) const
// -----------------------------------------------------------------------
-int UniscribeLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
+sal_Int32 UniscribeLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
{
long nWidth = 0;
for( int i = mnMinCharPos; i < mnEndCharPos; ++i )
@@ -2222,7 +2222,7 @@ int UniscribeLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor
}
// the whole layout did fit inside the nMaxWidth
- return STRING_LEN;
+ return -1;
}
// -----------------------------------------------------------------------