diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 11:26:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 11:54:12 +0100 |
commit | 1ae61b0ac4187b2938647f3ca0289a070a5dc7d2 (patch) | |
tree | 9461c0532919f4fe61f3e0e3fa8556e954244fbd /svtools/source/misc/embedhlp.cxx | |
parent | 04bb9549e0a0ee567f3bd48a7707286c5abd631a (diff) |
loplugin:flatten in svtools
almost completely automatically rewritten, only had to tweak
the indentation on a couple of lines.
Change-Id: Ieec92e5b602d180d7ec556e3421ce3c835c1f646
Reviewed-on: https://gerrit.libreoffice.org/45072
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/misc/embedhlp.cxx')
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 5355ce320b3a..45beb0d17853 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -159,23 +159,23 @@ void SAL_CALL EmbedEventListener_Impl::stateChanged( const lang::EventObject&, void SAL_CALL EmbedEventListener_Impl::modified( const lang::EventObject& ) { SolarMutexGuard aGuard; - if ( pObject && pObject->GetViewAspect() != embed::Aspects::MSOLE_ICON ) + if ( !(pObject && pObject->GetViewAspect() != embed::Aspects::MSOLE_ICON) ) + return; + + if ( nState == embed::EmbedStates::RUNNING ) { - if ( nState == embed::EmbedStates::RUNNING ) - { - // updates only necessary in non-active states - if( pObject->IsChart() ) - pObject->UpdateReplacementOnDemand(); - else - pObject->UpdateReplacement(); - } - else if ( nState == embed::EmbedStates::ACTIVE || - nState == embed::EmbedStates::UI_ACTIVE || - nState == embed::EmbedStates::INPLACE_ACTIVE ) - { - // in case the object is inplace or UI active the replacement image should be updated on demand + // updates only necessary in non-active states + if( pObject->IsChart() ) pObject->UpdateReplacementOnDemand(); - } + else + pObject->UpdateReplacement(); + } + else if ( nState == embed::EmbedStates::ACTIVE || + nState == embed::EmbedStates::UI_ACTIVE || + nState == embed::EmbedStates::INPLACE_ACTIVE ) + { + // in case the object is inplace or UI active the replacement image should be updated on demand + pObject->UpdateReplacementOnDemand(); } } |