diff options
-rw-r--r-- | accessibility/source/extended/textwindowaccessibility.cxx | 8 | ||||
-rw-r--r-- | include/vcl/texteng.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 4 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 6 |
4 files changed, 10 insertions, 14 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 2224fecb99bd..23b7b1e903ab 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1373,10 +1373,8 @@ Document::retrieveParagraphLineBoundary( Paragraph const * pParagraph, ::sal_uInt16 nLineCount = m_rEngine.GetLineCount( nNumber ); for ( ::sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine ) { - ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( - m_rEngine.GetLineLen( nNumber, nLine ) ); nLineStart = nLineEnd; - nLineEnd += nLineLength; + nLineEnd += m_rEngine.GetLineLen( nNumber, nLine ); if ( nIndex >= nLineStart && ( ( nLine == nLineCount - 1 ) ? nIndex <= nLineEnd : nIndex < nLineEnd ) ) { aBoundary.startPos = nLineStart; @@ -1412,10 +1410,8 @@ Document::retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph, ::sal_Int32 nLineEnd = 0; for ( ::sal_Int32 nLine = 0; nLine <= nLineNo; ++nLine ) { - ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( - m_rEngine.GetLineLen( nNumber, nLine ) ); nLineStart = nLineEnd; - nLineEnd += nLineLength; + nLineEnd += m_rEngine.GetLineLen( nNumber, nLine ); } aBoundary.startPos = nLineStart; diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index d0a43f77e4ad..2d8e83188a56 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -198,7 +198,7 @@ protected: sal_Int32 GetCharPos( sal_uLong nPara, sal_uInt16 nLine, long nDocPosX, bool bSmart = false ); Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); - sal_uInt16 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ); + sal_Int32 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ); long ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion ); long ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false ); long ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 ); @@ -214,7 +214,7 @@ protected: // for Undo/Redo void InsertContent( TextNode* pNode, sal_uLong nPara ); - TextPaM SplitContent( sal_uLong nNode, sal_uInt16 nSepPos ); + TextPaM SplitContent( sal_uLong nNode, sal_Int32 nSepPos ); TextPaM ConnectContents( sal_uLong nLeftNode ); // adjust PaM's and selections that were transferred to the API to a valid range @@ -265,7 +265,7 @@ public: sal_uLong GetTextHeight( sal_uLong nParagraph ) const; sal_uInt16 GetLineCount( sal_uLong nParagraph ) const; - sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; + sal_Int32 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; void SetRightToLeft( bool bR2L ); bool IsRightToLeft() const { return mbRightToLeft; } diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index ba82a1efd51c..8aaf33f28a29 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -334,7 +334,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai sal_uInt16 nLineStart = 0; for (sal_uInt16 i=0; i < aTextEngine.GetLineCount(0); ++i) { - sal_uInt16 nLineLength = aTextEngine.GetLineLen(0, i); + sal_Int32 nLineLength = aTextEngine.GetLineLen(0, i); double nLineWidth = aTextDev.getTextWidth (aText, nLineStart, nLineLength); bool bTooLong = (aPos.getY() + aTextEngine.GetCharHeight()) > maDrawArea.Bottom(); @@ -343,7 +343,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai // Add the '...' to the last line to show, even though it may require to shorten the line double nDotsWidth = aTextDev.getTextWidth(OUString("..."),0,3); - sal_uInt16 nLength = nLineLength - 1; + sal_Int32 nLength = nLineLength - 1; while ( nDotsWidth + aTextDev.getTextWidth(aText, nLineStart, nLength) > maDrawArea.getWidth() && nLength > 0) { --nLength; diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index bedcb58d4356..f964d16cd7bd 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1067,7 +1067,7 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart ) return TextPaM( nLastNode, pLast->GetText().getLength() ); } -sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ) +sal_Int32 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ) { DBG_ASSERT( IsFormatted(), "GetPaM: Not formatted" ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); @@ -1252,7 +1252,7 @@ sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const return 0; } -sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const +sal_Int32 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const { DBG_ASSERT( nParagraph < mpTEParaPortions->Count(), "GetLineCount: Out of range" ); @@ -1364,7 +1364,7 @@ void TextEngine::InsertContent( TextNode* pNode, sal_uLong nPara ) ImpParagraphInserted( nPara ); } -TextPaM TextEngine::SplitContent( sal_uLong nNode, sal_uInt16 nSepPos ) +TextPaM TextEngine::SplitContent( sal_uLong nNode, sal_Int32 nSepPos ) { #ifdef DBG_UTIL TextNode* pNode = mpDoc->GetNodes()[ nNode ]; |