diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-21 10:19:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-21 13:59:34 +0100 |
commit | d4758e6f699259e865426fd761c58009d3eca7d1 (patch) | |
tree | 7e8b60f2c02fb947c05c0e6cd7ff511565e7b1b3 | |
parent | 6554c1f363e5c7d9edbd2cb7b58d391dff3c06a4 (diff) |
coverity#706084 Unintended sign extension
and
coverity#706085 Unintended sign extension
Change-Id: I4bb617cd6927542dfef6dea89c5417ec4f9ed495
-rw-r--r-- | include/vcl/texteng.hxx | 4 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 39947347f84e..9da46801085c 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -113,7 +113,7 @@ private: Font maFont; Color maTextColor; - sal_uInt16 mnCharHeight; + long mnCharHeight; sal_uInt16 mnFixCharWidth100; sal_uLong mnMaxTextLen; @@ -259,7 +259,7 @@ public: sal_uLong GetTextHeight() const; sal_uLong CalcTextWidth(); - sal_uInt16 GetCharHeight() const { return mnCharHeight; } + long GetCharHeight() const { return mnCharHeight; } sal_uLong GetParagraphCount() const; OUString GetText( sal_uLong nParagraph ) const; diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 65feb242e8af..c020ef0aded1 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -203,7 +203,7 @@ void TextEngine::SetFont( const Font& rFont ) mnDefTab = (sal_uInt16)aTextSize.Width(); if ( !mnDefTab ) mnDefTab = 1; - mnCharHeight = (sal_uInt16)aTextSize.Height(); + mnCharHeight = aTextSize.Height(); mnFixCharWidth100 = 0; FormatFullDoc(); |