diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-30 19:35:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-03 08:41:11 +0200 |
commit | d3971ec256450e6783920b46f672048b29719949 (patch) | |
tree | f4722d0e2bc321cf71b49b7573cf38640e9b28fc /svx | |
parent | f50bf3c5225b49b3c6f77f882e35305e5dc5ccd3 (diff) |
new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/ParseContext.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdovirt.cxx | 14 |
3 files changed, 13 insertions, 21 deletions
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index e48d24b50dbc..ba05aa98b0db 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -387,16 +387,12 @@ void SAL_CALL SvxPixelCtlAccessible::disposing() { if( !rBHelper.bDisposed ) { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( mnClientId ) { - ::osl::MutexGuard aGuard( m_aMutex ); - if ( mnClientId ) - { - comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this ); - mnClientId = 0; - } + comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this ); + mnClientId = 0; } - //mxParent.clear(); - } } diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 333907a5b35a..6464b9879b99 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -185,11 +185,9 @@ OParseContextClient::OParseContextClient() OParseContextClient::~OParseContextClient() { - { - ::osl::MutexGuard aGuard( getSafteyMutex() ); - if ( 0 == osl_atomic_decrement( &getCounter() ) ) - delete getSharedContext(nullptr,true); - } + ::osl::MutexGuard aGuard( getSafteyMutex() ); + if ( 0 == osl_atomic_decrement( &getCounter() ) ) + delete getSharedContext(nullptr,true); } const OSystemParseContext* OParseContextClient::getParseContext() const diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index d4d995064424..7c9f54e35bd8 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -430,14 +430,12 @@ const tools::Rectangle& SdrVirtObj::GetSnapRect() const void SdrVirtObj::SetSnapRect(const tools::Rectangle& rRect) { - { - tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - tools::Rectangle aR(rRect); - aR-=aAnchor; - rRefObj.SetSnapRect(aR); - SetRectsDirty(); - SendUserCall(SdrUserCallType::Resize,aBoundRect0); - } + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aR(rRect); + aR-=aAnchor; + rRefObj.SetSnapRect(aR); + SetRectsDirty(); + SendUserCall(SdrUserCallType::Resize,aBoundRect0); } void SdrVirtObj::NbcSetSnapRect(const tools::Rectangle& rRect) |