diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-08-14 18:08:38 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-08-14 22:42:16 +0200 |
commit | 32a92502fdbabe7615330e668357568cc4812e54 (patch) | |
tree | fb8de242f7985e683d1978ea43f3944cdb2bf28d /vcl/source | |
parent | 8e8383612e2cf860acfc0fd3f5620da55d4ef35a (diff) |
GetTextBreak takes a DeviceCoordinate as width
Change-Id: Ie03732a0966eedf6c0226beed83356ae4886a016
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 6 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 21ee47f898af..de39d873788c 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1278,14 +1278,14 @@ void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) co } } -sal_Int32 GenericSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const +sal_Int32 GenericSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, long nCharExtra, int nFactor ) const { int nCharCapacity = mnEndCharPos - mnMinCharPos; DeviceCoordinate* pCharWidths = (DeviceCoordinate*)alloca( nCharCapacity * sizeof(DeviceCoordinate) ); if( !GetCharWidths( pCharWidths ) ) return -1; - long nWidth = 0; + DeviceCoordinate nWidth = 0; for( int i = mnMinCharPos; i < mnEndCharPos; ++i ) { nWidth += pCharWidths[ i - mnMinCharPos ] * nFactor; @@ -1908,7 +1908,7 @@ void MultiSalLayout::DrawText( SalGraphics& rGraphics ) const // NOTE: now the baselevel font is active again } -sal_Int32 MultiSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const +sal_Int32 MultiSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, long nCharExtra, int nFactor ) const { if( mnLevel <= 0 ) return -1; diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index e5cb5a700e03..12b5ea9e889d 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -681,7 +681,7 @@ bool GraphiteLayout::LayoutGlyphs(ImplLayoutArgs& rArgs, gr_segment * pSegment) return true; } -sal_Int32 GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) const +sal_Int32 GraphiteLayout::GetTextBreak(DeviceCoordinate 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", @@ -692,7 +692,7 @@ sal_Int32 GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int fac if (maxmnWidth > mnWidth * factor + char_extra * (mnEndCharPos - mnMinCharPos - 1)) return -1; - long nWidth = mvCharDxs[0] * factor; + DeviceCoordinate nWidth = mvCharDxs[0] * factor; long wLastBreak = 0; int nLastBreak = -1; int nEmergency = -1; |