diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-08 09:30:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-08 10:01:40 +0100 |
commit | 3b9dcfee6492474398011755a92d77320a226604 (patch) | |
tree | 90b8585c617e599ddd05fdcb2aa915b0b5986f72 /comphelper | |
parent | 21b224211c998e756a7eb03de30d0737e07b2350 (diff) |
loplugin:indentation in codemaker..comphelper
Change-Id: I8dee6245cfa1f7998591b31a3752bbbae13f499d
Reviewed-on: https://gerrit.libreoffice.org/67527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/container/embeddedobjectcontainer.cxx | 6 | ||||
-rw-r--r-- | comphelper/source/misc/accessiblewrapper.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/instancelocker.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/numberedcollection.cxx | 66 | ||||
-rw-r--r-- | comphelper/source/misc/sequenceashashmap.cxx | 6 | ||||
-rw-r--r-- | comphelper/source/property/propertystatecontainer.cxx | 6 | ||||
-rw-r--r-- | comphelper/source/property/propstate.cxx | 3 |
7 files changed, 47 insertions, 44 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 81e5064f34e2..c2e61bcc6f72 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -614,7 +614,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde pImpl->mxStorage, rNewName, aMedium, aObjDescr ), uno::UNO_QUERY ); uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY ); - OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED, + OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED, "A freshly create object should be running always!" ); // possible optimization: store later! @@ -646,7 +646,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY ); - OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED, + OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED, "A freshly create object should be running always!" ); // possible optimization: store later! @@ -791,7 +791,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb } } - if ( xResult.is() ) + if ( xResult.is() ) AddEmbeddedObject( xResult, rName ); } catch (const uno::Exception&) diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index b28b2a240e56..9736b031f618 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -242,7 +242,7 @@ namespace comphelper #if OSL_DEBUG_LEVEL > 0 if ( m_aChildrenMap.end() == aDisposedPos ) { - OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did this come from?" ); + OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did this come from?" ); // helper for diagnostics Reference< XAccessible > xOwningAccessible( m_aOwningAccessible ); Reference< XAccessibleContext > xContext; diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index 61b6338b67ca..43991cec43b1 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -68,7 +68,7 @@ void SAL_CALL OInstanceLocker::dispose() if ( m_bDisposed ) throw lang::DisposedException(); - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); if ( m_pListenersContainer ) m_pListenersContainer->disposeAndClear( aSource ); diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index 8f5f2061fc1c..671804386ea6 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -46,7 +46,7 @@ void NumberedCollection::setOwner(const css::uno::Reference< css::uno::XInterfac // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - m_xOwner = xOwner; + m_xOwner = xOwner; // <- SYNCHRONIZED } @@ -57,7 +57,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - m_sUntitledPrefix = sPrefix; + m_sUntitledPrefix = sPrefix; // <- SYNCHRONIZED } @@ -68,31 +68,31 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - if ( ! xComponent.is ()) - throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1); + if ( ! xComponent.is ()) + throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1); - sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() ); - TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent); + sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() ); + TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent); - // a) component already exists - return its number directly - if (pIt != m_lComponents.end()) - return pIt->second.nNumber; + // a) component already exists - return its number directly + if (pIt != m_lComponents.end()) + return pIt->second.nNumber; - // b) component must be added new to this container + // b) component must be added new to this container - // b1) collection is full - no further components possible - // -> return INVALID_NUMBER - ::sal_Int32 nFreeNumber = impl_searchFreeNumber(); - if (nFreeNumber == css::frame::UntitledNumbersConst::INVALID_NUMBER) - return css::frame::UntitledNumbersConst::INVALID_NUMBER; + // b1) collection is full - no further components possible + // -> return INVALID_NUMBER + ::sal_Int32 nFreeNumber = impl_searchFreeNumber(); + if (nFreeNumber == css::frame::UntitledNumbersConst::INVALID_NUMBER) + return css::frame::UntitledNumbersConst::INVALID_NUMBER; - // b2) add component to collection and return its number - TNumberedItem aItem; - aItem.xItem = css::uno::WeakReference< css::uno::XInterface >(xComponent); - aItem.nNumber = nFreeNumber; - m_lComponents[pComponent] = aItem; + // b2) add component to collection and return its number + TNumberedItem aItem; + aItem.xItem = css::uno::WeakReference< css::uno::XInterface >(xComponent); + aItem.nNumber = nFreeNumber; + m_lComponents[pComponent] = aItem; - return nFreeNumber; + return nFreeNumber; // <- SYNCHRONIZED } @@ -140,18 +140,18 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - if ( ! xComponent.is ()) - throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1); + if ( ! xComponent.is ()) + throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1); - sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() ); - TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent); + sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() ); + TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent); - // a) component exists and will be removed - if (pIt != m_lComponents.end()) - m_lComponents.erase(pIt); + // a) component exists and will be removed + if (pIt != m_lComponents.end()) + m_lComponents.erase(pIt); - // else - // b) component does not exists - nothing todo here (ignore request!) + // else + // b) component does not exists - nothing todo here (ignore request!) // <- SYNCHRONIZED } @@ -162,7 +162,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix() // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - return m_sUntitledPrefix; + return m_sUntitledPrefix; // <- SYNCHRONIZED } @@ -196,7 +196,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix() // SYNCHRONIZED -> ::osl::ResettableMutexGuard aLock(m_aMutex); - + { TDeadItemList lDeadItems; TNumberedItemHash::const_iterator pComponent; @@ -226,7 +226,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix() // b) return first free number return *(lPossibleNumbers.begin ()); - + } // <- SYNCHRONIZED } diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 08301f5a8021..0ba26b689a71 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -128,7 +128,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::beans::Propert { clear(); - sal_Int32 c = lSource.getLength(); + sal_Int32 c = lSource.getLength(); const css::beans::PropertyValue* pSource = lSource.getConstArray(); for (sal_Int32 i=0; i<c; ++i) @@ -139,7 +139,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::beans::NamedVa { clear(); - sal_Int32 c = lSource.getLength(); + sal_Int32 c = lSource.getLength(); const css::beans::NamedValue* pSource = lSource.getConstArray(); for (sal_Int32 i=0; i<c; ++i) @@ -210,7 +210,7 @@ bool SequenceAsHashMap::match(const SequenceAsHashMap& rCheck) const { const OUString& sCheckName = elem.first; const css::uno::Any& aCheckValue = elem.second; - const_iterator pFound = find(sCheckName); + const_iterator pFound = find(sCheckName); if (pFound == end()) return false; diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index a2e1245fe57c..031ae9193d82 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -152,8 +152,10 @@ namespace comphelper PropertyState OPropertyStateContainer::getPropertyStateByHandle( sal_Int32 _nHandle ) const { // simply compare the current and the default value - Any aCurrentValue; getFastPropertyValue( aCurrentValue, _nHandle ); - Any aDefaultValue; getPropertyDefaultByHandle( _nHandle, aDefaultValue ); + Any aCurrentValue; + getFastPropertyValue( aCurrentValue, _nHandle ); + Any aDefaultValue; + getPropertyDefaultByHandle( _nHandle, aDefaultValue ); bool bEqual = uno_type_equalData( const_cast< void* >( aCurrentValue.getValue() ), aCurrentValue.getValueType().getTypeLibType(), diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index b391b4af3f74..346fcce44624 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -146,7 +146,8 @@ namespace comphelper { // simply compare the current and the default value Any aCurrentValue = getPropertyDefaultByHandle( _nHandle ); - Any aDefaultValue; getFastPropertyValue( aDefaultValue, _nHandle ); + Any aDefaultValue; + getFastPropertyValue( aDefaultValue, _nHandle ); bool bEqual = uno_type_equalData( const_cast< void* >( aCurrentValue.getValue() ), aCurrentValue.getValueType().getTypeLibType(), |