diff options
author | Matteo Casalin <matteo.casalin@poste.it> | 2011-12-26 10:38:25 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@poste.it> | 2012-01-02 19:49:04 +0100 |
commit | fe36838f9db5fef3c281b677c64b4db0519c9d4d (patch) | |
tree | 70754a7b43bb35b8e723be826453eb070368dec6 /svtools/source | |
parent | 85d1ce27ad9ce7a3740bd8bbbaf1d3abe643ba10 (diff) |
Do not repeat the same test twice
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/valueset.cxx | 12 |
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 ); |