diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-15 19:35:32 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-16 09:10:21 +0200 |
commit | 98244c3cb47824babc746ebc14a199977e9768d1 (patch) | |
tree | 0077631b678997f61a1fae245e32467bd7afbe00 /vcl/source/edit/textview.cxx | |
parent | caa828da96b120f5a3c979237081c29f8c2f3848 (diff) |
sal_uLong to sal_Int32/long
Change-Id: Ia4ae190da37351b8c2b7ee9fc953508c5b1ab062
Diffstat (limited to 'vcl/source/edit/textview.cxx')
-rw-r--r-- | vcl/source/edit/textview.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 8ad8bd573b8b..487ee388ebf6 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -405,7 +405,7 @@ void TextView::ImpHighlight( const TextSelection& rSel ) const sal_uInt32 nEndPara = aSel.GetEnd().GetPara(); for ( sal_uInt32 nPara = 0; nPara <= nEndPara; ++nPara ) { - long nParaHeight = (long)mpImpl->mpTextEngine->CalcParaHeight( nPara ); + const long nParaHeight = mpImpl->mpTextEngine->CalcParaHeight( nPara ); if ( ( nPara >= nStartPara ) && ( ( nY + nParaHeight ) > aVisArea.Top() ) ) { TEParaPortion* pTEParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( nPara ); @@ -1920,20 +1920,20 @@ bool TextView::ImplTruncateNewText( OUString& rNewText ) const { bool bTruncated = false; - sal_uLong nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen(); + const sal_Int32 nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen(); // 0 means unlimited if( nMaxLen != 0 ) { - sal_uLong nCurLen = mpImpl->mpTextEngine->GetTextLen(); + const sal_Int32 nCurLen = mpImpl->mpTextEngine->GetTextLen(); - sal_uInt32 nNewLen = rNewText.getLength(); + const sal_Int32 nNewLen = rNewText.getLength(); if ( nCurLen + nNewLen > nMaxLen ) { // see how much text will be replaced - sal_uLong nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection ); + const sal_Int32 nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection ); if ( nCurLen + nNewLen - nSelLen > nMaxLen ) { - sal_uInt32 nTruncatedLen = static_cast<sal_uInt32>(nMaxLen - (nCurLen - nSelLen)); + const sal_Int32 nTruncatedLen = nMaxLen - (nCurLen - nSelLen); rNewText = rNewText.copy( 0, nTruncatedLen ); bTruncated = true; } @@ -1947,8 +1947,7 @@ bool TextView::ImplCheckTextLen( const OUString& rNewText ) bool bOK = true; if ( mpImpl->mpTextEngine->GetMaxTextLen() ) { - sal_uLong n = mpImpl->mpTextEngine->GetTextLen(); - n += rNewText.getLength(); + sal_Int32 n = mpImpl->mpTextEngine->GetTextLen() + rNewText.getLength(); if ( n > mpImpl->mpTextEngine->GetMaxTextLen() ) { // calculate how much text is being deleted |