codemaker/source/javamaker/javaoptions.cxx              |    7 -
 comphelper/source/container/embeddedobjectcontainer.cxx |    6 -
 comphelper/source/misc/accessiblewrapper.cxx            |    2 
 comphelper/source/misc/instancelocker.cxx               |    2 
 comphelper/source/misc/numberedcollection.cxx           |   66 ++++++++--------
 comphelper/source/misc/sequenceashashmap.cxx            |    6 -
 comphelper/source/property/propertystatecontainer.cxx   |    6 -
 comphelper/source/property/propstate.cxx                |    3 
 8 files changed, 50 insertions(+), 48 deletions(-)

New commits:
commit 3b9dcfee6492474398011755a92d77320a226604
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Feb 8 09:30:19 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Feb 8 10:01:40 2019 +0100

    loplugin:indentation in codemaker..comphelper
    
    Change-Id: I8dee6245cfa1f7998591b31a3752bbbae13f499d
    Reviewed-on: https://gerrit.libreoffice.org/67527
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/codemaker/source/javamaker/javaoptions.cxx 
b/codemaker/source/javamaker/javaoptions.cxx
index 612b3d6b2d97..2d583e51ac3f 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -86,8 +86,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
                 case 'n':
                     if (av[i][2] != 'D' || av[i][3] != '\0')
                     {
-                        OString tmp("'-nD', please check");
-                            tmp += " your input '" + OString(av[i]) + "'";
+                        OString tmp("'-nD', please check your input '" + 
OString(av[i]) + "'");
                         throw IllegalArgument(tmp);
                     }
 
@@ -189,8 +188,8 @@ bool JavaOptions::initOptions(int ac, char* av[], bool 
bCmdFile)
             if (av[i][0] == '@')
             {
                 FILE* cmdFile = fopen(av[i]+1, "r");
-                  if( cmdFile == nullptr )
-                  {
+                if( cmdFile == nullptr )
+                {
                     fprintf(stderr, "%s", prepareHelp().getStr());
                     ret = false;
                 } else
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(),
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to