diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 7 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 29 | ||||
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 7 | ||||
-rw-r--r-- | svtools/source/uno/addrtempuno.cxx | 5 |
4 files changed, 16 insertions, 32 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index a5c1a1ac25bf..10f4c0e6f63f 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -498,11 +498,8 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, bool bSmart if (m_pImpl) aRet = m_pImpl->GetColorConfigValue(eEntry); - if (bSmart) - { - if(aRet.nColor == COL_AUTO) - aRet.nColor = ColorConfig::GetDefaultColor(eEntry); - } + if (bSmart && aRet.nColor == COL_AUTO) + aRet.nColor = ColorConfig::GetDefaultColor(eEntry); return aRet; } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 04d3622ed4ec..25bdbe3607d9 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -500,13 +500,10 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) { mbHasVisibleItems = false; - if (nStyle & WB_NONEFIELD) + if ((nStyle & WB_NONEFIELD) && mpNoneItem) { - if (mpNoneItem) - { - mpNoneItem->mbVisible = false; - mpNoneItem->maText = GetText(); - } + mpNoneItem->mbVisible = false; + mpNoneItem->maText = GetText(); } for (size_t i = 0; i < nItemCount; i++) @@ -1084,14 +1081,11 @@ void ValueSet::ImplTracking( const Point& rPos, bool bRepeat ) { if ( bRepeat || mbSelection ) { - if ( ImplScroll( rPos ) ) + if ( ImplScroll( rPos ) && mbSelection ) { - if ( mbSelection ) - { - maTimer.SetInvokeHandler( LINK( this, ValueSet, ImplTimerHdl ) ); - maTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() ); - maTimer.Start(); - } + maTimer.SetInvokeHandler( LINK( this, ValueSet, ImplTimerHdl ) ); + maTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() ); + maTimer.Start(); } } @@ -3113,13 +3107,10 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) { mbHasVisibleItems = false; - if (nStyle & WB_NONEFIELD) + if ((nStyle & WB_NONEFIELD) && mpNoneItem) { - if (mpNoneItem) - { - mpNoneItem->mbVisible = false; - mpNoneItem->maText = GetText(); - } + mpNoneItem->mbVisible = false; + mpNoneItem->maText = GetText(); } for (size_t i = 0; i < nItemCount; i++) diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 31af8385e797..b7baf49b85cb 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -332,11 +332,8 @@ short PrinterSetupDialog::run() short nRet = GenericDialogController::run(); // update data if the dialog was terminated with OK - if ( nRet == RET_OK ) - { - if ( mpTempPrinter ) - mpPrinter->SetPrinterProps( mpTempPrinter ); - } + if ( nRet == RET_OK && mpTempPrinter ) + mpPrinter->SetPrinterProps( mpTempPrinter ); maStatusTimer.Stop(); diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index e6d1bc4b056e..e2d585642b59 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -130,9 +130,8 @@ namespace { { OGenericUnoDialog::executedDialog(_nExecutionResult); - if ( _nExecutionResult ) - if ( m_aDialog ) - static_cast< AddressBookSourceDialog* >( m_aDialog.m_xVclDialog.get() )->getFieldMapping( m_aAliases ); + if ( _nExecutionResult && m_aDialog ) + static_cast< AddressBookSourceDialog* >( m_aDialog.m_xVclDialog.get() )->getFieldMapping( m_aAliases ); } void SAL_CALL OAddressBookSourceDialogUno::initialize(const Sequence< Any >& rArguments) |