summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@poste.it>2011-12-26 10:38:25 +0100
committerMatteo Casalin <matteo.casalin@poste.it>2012-01-02 19:49:04 +0100
commitfe36838f9db5fef3c281b677c64b4db0519c9d4d (patch)
tree70754a7b43bb35b8e723be826453eb070368dec6 /svtools
parent85d1ce27ad9ce7a3740bd8bbbaf1d3abe643ba10 (diff)
Do not repeat the same test twice
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueset.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 576a091c1a0c..97ecc035c302 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -700,16 +700,10 @@ void ValueSet::ImplDrawSelect()
if ( !IsReallyVisible() )
return;
- sal_Bool bFocus = HasFocus();
- sal_Bool bDrawSel;
+ const bool bFocus = HasFocus();
+ const bool bDrawSel = !( (mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight) );
- if ( (mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight) )
- bDrawSel = sal_False;
- else
- bDrawSel = sal_True;
-
- if ( !bFocus &&
- ((mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight)) )
+ if ( !bFocus && !bDrawSel )
{
XubString aEmptyStr;
ImplDrawItemText( aEmptyStr );