diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-03-25 15:50:37 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-30 21:36:47 +0000 |
commit | a2f6402b1fe769a430019042e14e63c9414715dc (patch) | |
tree | 5b4f4cbaecfc3085f3889406222c259132291503 /vcl/source | |
parent | 51e05acf07093ac8f2b2dc8eeb86abe9446e3463 (diff) |
Use OUString and sal_Int32 in GetTextBreak()
Change-Id: I66b85365d1c59f802253b8abdb1e04e25950a09b
Reviewed-on: https://gerrit.libreoffice.org/3098
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 19b2598ef359..9cc6369c93b7 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -5795,7 +5795,7 @@ SalLayout* OutputDevice::ImplLayout( const OUString& rOrigStr, sal_Int32 nMinInd ImplInitFont(); // check string index and length - if( nMinIndex + nLen > rOrigStr.getLength() ) + if( -1 == nLen || nMinIndex + nLen > rOrigStr.getLength() ) { const sal_Int32 nNewLen = rOrigStr.getLength() - nMinIndex; if( nNewLen <= 0 ) @@ -6077,8 +6077,8 @@ sal_Bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, return (nCharPos != nIndex) ? sal_True : sal_False; } -xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth, - xub_StrLen nIndex, xub_StrLen nLen, +xub_StrLen OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, + sal_Int32 nIndex, sal_Int32 nLen, long nCharExtra, sal_Bool /*TODO: bCellBreaking*/ ) const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -6109,9 +6109,9 @@ xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth, return nRetVal; } -xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth, - sal_Unicode nHyphenatorChar, xub_StrLen& rHyphenatorPos, - xub_StrLen nIndex, xub_StrLen nLen, +xub_StrLen OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, + sal_Unicode nHyphenatorChar, sal_Int32& rHyphenatorPos, + sal_Int32 nIndex, sal_Int32 nLen, long nCharExtra ) const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -6143,7 +6143,7 @@ xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth, // calculate hyphenated break position rtl::OUString aHyphenatorStr(nHyphenatorChar); - xub_StrLen nTempLen = 1; + sal_Int32 nTempLen = 1; SalLayout* pHyphenatorLayout = ImplLayout( aHyphenatorStr, 0, nTempLen ); if( pHyphenatorLayout ) { |