Kaydet (Commit) d610e861 authored tarafından Caolán McNamara's avatar Caolán McNamara

longparas: none of the callers check for the error case

so we can safely change the return of 0xFFFF to 0 without
changing any callers. Which makes this safe seeing as before
now every caller would have done something stupid with the
results

Change-Id: I10d9f12525de10661ed82f3405e6c728d38be106
üst 62d8fea7
...@@ -323,7 +323,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai ...@@ -323,7 +323,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
// Create the text primitives // Create the text primitives
sal_uInt16 nLineStart = 0; sal_uInt16 nLineStart = 0;
for (sal_uInt16 i=0; i<aTextEngine.GetLineCount(0); ++i) for (sal_uInt16 i=0; i < aTextEngine.GetLineCount(0); ++i)
{ {
sal_uInt16 nLineLength = aTextEngine.GetLineLen(0, i); sal_uInt16 nLineLength = aTextEngine.GetLineLen(0, i);
double nLineWidth = aTextDev.getTextWidth (aText, nLineStart, nLineLength); double nLineWidth = aTextDev.getTextWidth (aText, nLineStart, nLineLength);
......
...@@ -1260,7 +1260,7 @@ sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const ...@@ -1260,7 +1260,7 @@ sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const
if ( pPPortion ) if ( pPPortion )
return pPPortion->GetLines().size(); return pPPortion->GetLines().size();
return 0xFFFF; return 0;
} }
sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const
...@@ -1274,7 +1274,7 @@ sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) cons ...@@ -1274,7 +1274,7 @@ sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) cons
return pLine->GetLen(); return pLine->GetLen();
} }
return 0xFFFF; return 0;
} }
sal_uLong TextEngine::CalcParaHeight( sal_uLong nParagraph ) const sal_uLong TextEngine::CalcParaHeight( sal_uLong nParagraph ) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment