[PATCH 2/2] Ignore return type of Region::Intersect
Daniel Bankston
daniel.dev.libreoffice at gmail.com
Mon Apr 2 17:35:34 PDT 2012
Caller of Region::Intersect was not ignore the return value in a conditional, so I refactored the conditional to not depend on the return value of Intersect without affect the original functionality of the code. This usage of Intersect may be a possible defect and should be checked out.
---
vcl/source/control/edit.cxx | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7d03316..b3f7516 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -670,7 +670,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
nIndex++;
}
i = nIndex;
- if( aClip.Intersect( aRegion ) && nAttr )
+ aClip.Intersect(aRegion);
+ if( nAttr )
{
Font aFont = GetFont();
if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE )
--
1.7.1
--------------070500040805020602000007--
More information about the LibreOffice
mailing list