summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-14 12:51:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-14 13:09:44 +0000
commitd610e8618e04075d99bbbf78fc741637914f1c7e (patch)
treedef7b18e28f36f2bcd5d05c4e3e14bce6e5b54f5
parent62d8fea76ed4f0c97c6ef2bb78228e5904b72be1 (diff)
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
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 9f60f37965cd..5ca236ee3ab5 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -323,7 +323,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
// Create the text primitives
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);
double nLineWidth = aTextDev.getTextWidth (aText, nLineStart, nLineLength);
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index c2eac5348c3e..68a42007c9be 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1260,7 +1260,7 @@ sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const
if ( pPPortion )
return pPPortion->GetLines().size();
- return 0xFFFF;
+ return 0;
}
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
return pLine->GetLen();
}
- return 0xFFFF;
+ return 0;
}
sal_uLong TextEngine::CalcParaHeight( sal_uLong nParagraph ) const