summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-30 19:35:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-03 08:41:11 +0200
commitd3971ec256450e6783920b46f672048b29719949 (patch)
treef4722d0e2bc321cf71b49b7573cf38640e9b28fc /framework
parentf50bf3c5225b49b3c6f77f882e35305e5dc5ccd3 (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 'framework')
-rw-r--r--framework/source/accelerators/documentacceleratorconfiguration.cxx24
-rw-r--r--framework/source/services/autorecovery.cxx12
2 files changed, 17 insertions, 19 deletions
diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx
index 6b0e75583ef9..651b6d0ed4a9 100644
--- a/framework/source/accelerators/documentacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx
@@ -101,20 +101,18 @@ DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration(
const css::uno::Sequence< css::uno::Any >& lArguments)
: DocumentAcceleratorConfiguration_BASE(xContext)
{
+ SolarMutexGuard g;
+ css::uno::Reference<css::embed::XStorage> xRoot;
+ if (lArguments.getLength() == 1 && (lArguments[0] >>= xRoot))
{
- SolarMutexGuard g;
- css::uno::Reference<css::embed::XStorage> xRoot;
- if (lArguments.getLength() == 1 && (lArguments[0] >>= xRoot))
- {
- m_xDocumentRoot = xRoot;
- }
- else
- {
- ::comphelper::SequenceAsHashMap lArgs(lArguments);
- m_xDocumentRoot = lArgs.getUnpackedValueOrDefault(
- "DocumentRoot",
- css::uno::Reference< css::embed::XStorage >());
- }
+ m_xDocumentRoot = xRoot;
+ }
+ else
+ {
+ ::comphelper::SequenceAsHashMap lArgs(lArguments);
+ m_xDocumentRoot = lArgs.getUnpackedValueOrDefault(
+ "DocumentRoot",
+ css::uno::Reference< css::embed::XStorage >());
}
}
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 80ab99ba0996..d1b106592d4e 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1127,7 +1127,7 @@ CacheLockGuard::~CacheLockGuard()
void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems)
{
- /* SAFE */ {
+ /* SAFE */
osl::MutexGuard g(m_rSharedMutex);
if (m_bLockedByThisGuard)
@@ -1153,12 +1153,12 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems)
++m_rCacheLock;
m_bLockedByThisGuard = true;
- } /* SAFE */
+ /* SAFE */
}
void CacheLockGuard::unlock()
{
- /* SAFE */ {
+ /* SAFE */
osl::MutexGuard g(m_rSharedMutex);
if ( ! m_bLockedByThisGuard)
@@ -1174,7 +1174,7 @@ void CacheLockGuard::unlock()
"Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)",
m_xOwner);
}
- } /* SAFE */
+ /* SAFE */
}
DispatchParams::DispatchParams()
@@ -1659,7 +1659,7 @@ void SAL_CALL AutoRecovery::modified(const css::lang::EventObject& aEvent)
void SAL_CALL AutoRecovery::disposing(const css::lang::EventObject& aEvent)
{
- /* SAFE */ {
+ /* SAFE */
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
if (aEvent.Source == m_xNewDocBroadcaster)
@@ -1684,7 +1684,7 @@ void SAL_CALL AutoRecovery::disposing(const css::lang::EventObject& aEvent)
return;
}
- } /* SAFE */
+ /* SAFE */
}
void AutoRecovery::implts_openConfig()