[Libreoffice-commits] core.git: 2 commits - sal/rtl soltools/cpp soltools/mkdepend sot/source starmath/source stoc/source svl/qa svl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Feb 10 10:18:49 UTC 2019


 sal/rtl/bootstrap.cxx                              |   16 ---
 soltools/cpp/_include.c                            |    2 
 soltools/cpp/_tokens.c                             |    6 -
 soltools/mkdepend/main.c                           |    2 
 sot/source/base/exchange.cxx                       |    2 
 sot/source/sdstor/ucbstorage.cxx                   |    4 
 sot/source/unoolestorage/xolesimplestorage.cxx     |   20 ++--
 starmath/source/cursor.cxx                         |    2 
 starmath/source/mathmlexport.cxx                   |    2 
 starmath/source/mathtype.cxx                       |    4 
 starmath/source/smmod.cxx                          |    2 
 starmath/source/symbol.cxx                         |    2 
 starmath/source/unomodel.cxx                       |    2 
 starmath/source/view.cxx                           |   10 +-
 stoc/source/defaultregistry/defaultregistry.cxx    |    2 
 stoc/source/implementationregistration/implreg.cxx |    9 -
 stoc/source/invocation/invocation.cxx              |    2 
 svl/qa/unit/items/test_IndexedStyleSheets.cxx      |    2 
 svl/source/crypto/cryptosign.cxx                   |  104 ++++++++++-----------
 svl/source/fsstor/fsstorage.cxx                    |   16 +--
 svl/source/items/globalnameitem.cxx                |    2 
 svl/source/items/srchitem.cxx                      |    2 
 svl/source/items/style.cxx                         |    4 
 23 files changed, 99 insertions(+), 120 deletions(-)

New commits:
commit f68f3b98cc47868cda3a75298a211c5735c0a4e7
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Feb 8 13:55:44 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Feb 10 11:18:35 2019 +0100

    loplugin:indentation in soltools..svl
    
    Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485
    Reviewed-on: https://gerrit.libreoffice.org/67565
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c
index c9f20537f5eb..57ca137cb2cd 100644
--- a/soltools/cpp/_include.c
+++ b/soltools/cpp/_include.c
@@ -117,7 +117,7 @@ void
             error(FATAL, "#%s too deeply nested", import ? "import" : "include");
         if (Xflag)
             genimport(fname, angled, iname, import);
-         if (Iflag)
+        if (Iflag)
             error(INFO, "Open %s file [%s]", import ? "import" : "include", iname );
 
         for (i = NINCLUDE - 1; i >= 0; i--)
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index 6842de38301f..cb0beecf991d 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -429,11 +429,11 @@ void
                         int nlen = (int)(ntp->len + ntp->wslen);
 
                         memcpy(wbp, "if(", 3 );
-                         wbp += 4;
+                        wbp += 4;
                         memcpy(wbp, np, nlen );
-                         wbp += nlen;
+                        wbp += nlen;
                         memcpy(wbp, ")", 1 );
-                         wbp++;
+                        wbp++;
 
                         memcpy(wbp, p, len);
                     }
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index a32e0dd38316..ee1cfb8efc7d 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -227,7 +227,7 @@ int main(int argc, char    **argv)
         argc = 1;
         for (p = args; argc < nargc; p += strlen(p) + 1)
             if (*p) nargv[argc++] = p;
-                argv = nargv;
+        argv = nargv;
     }
     for(argc--, argv++; argc; argc--, argv++) {
             /* if looking for endmarker then check before parsing */
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index cb9c502b0561..146114b8b238 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -206,7 +206,7 @@ namespace
             /*145 SotClipboardFormatId::RICHTEXT*/ { "text/richtext", "Richtext Format", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /*146 SotClipboardFormatId::STRING_TSVC*/            { "application/x-libreoffice-tsvc", "Text TSV-Calc", &cppu::UnoType<OUString>::get() }
             };
-        return &aInstance[0];
+            return &aInstance[0];
         }
     };
 
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 6bdcffbf42b3..0f76afcfafca 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1681,7 +1681,7 @@ void UCBStorage_Impl::CreateContent()
 
 void UCBStorage_Impl::ReadContent()
 {
-   if ( m_bListCreated )
+    if ( m_bListCreated )
         return;
 
     m_bListCreated = true;
@@ -2506,7 +2506,7 @@ bool UCBStorage::CopyTo( const OUString& rElemName, BaseStorage* pDest, const OU
     else
     {
         // for copying no optimization is useful, because in every case the stream data must be copied
-            UCBStorageElement_Impl* pElement = FindElement_Impl( rElemName );
+        UCBStorageElement_Impl* pElement = FindElement_Impl( rElemName );
         if ( pElement )
             return CopyStorageElement_Impl( *pElement, pDest, rNew );
         else
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 1725a990f3d3..1de1f56792a7 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -267,7 +267,7 @@ void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno::
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-      if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     uno::Reference< io::XStream > xStream;
@@ -316,7 +316,7 @@ void SAL_CALL OLESimpleStorage::removeByName( const OUString& aName )
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-      if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     if ( !m_bNoTemporaryCopy && !m_xStream.is() )
@@ -350,7 +350,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno:
     }
     catch( container::ElementExistException& )
     {
-           uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
 
         throw lang::WrappedTargetException("Can't copy raw stream",
                                             uno::Reference< uno::XInterface >(),
@@ -366,7 +366,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-      if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     if ( !m_pStorage->IsContained( aName ) )
@@ -468,7 +468,7 @@ uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getElementNames()
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-      if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     SvStorageInfoList aList;
@@ -495,7 +495,7 @@ sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-     if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     bool bResult = m_pStorage->IsContained( aName );
@@ -528,7 +528,7 @@ sal_Bool SAL_CALL OLESimpleStorage::hasElements()
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-      if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     SvStorageInfoList aList;
@@ -556,7 +556,7 @@ void SAL_CALL OLESimpleStorage::dispose()
 
     if ( m_pListenersContainer )
     {
-           lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
+        lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
         m_pListenersContainer->disposeAndClear( aSource );
     }
 
@@ -608,7 +608,7 @@ void SAL_CALL OLESimpleStorage::commit()
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-     if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     if ( !m_bNoTemporaryCopy && !m_xStream.is() )
@@ -631,7 +631,7 @@ void SAL_CALL OLESimpleStorage::revert()
     if ( m_bDisposed )
         throw lang::DisposedException();
 
-     if ( !m_pStorage )
+    if ( !m_pStorage )
         throw uno::RuntimeException();
 
     if ( !m_bNoTemporaryCopy && !m_xStream.is() )
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 3b6a61fe6326..f3c451528565 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -327,7 +327,7 @@ void SmCursor::InsertNodes(std::unique_ptr<SmNodeList> pNewNodes){
             patchIt = insIt;
     }
     //Patch the places we've changed stuff
-                        PatchLineList(pLineList.get(), patchIt);
+    PatchLineList(pLineList.get(), patchIt);
     SmCaretPos PosAfterInsert = PatchLineList(pLineList.get(), it);
     //Release list, we've taken the nodes
     pNewNodes.reset();
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 9e15844cd347..a1b842c7509e 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -203,7 +203,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
         }
         if ( bRet )
         {
-           if (xStatusIndicator.is())
+            if (xStatusIndicator.is())
                 xStatusIndicator->setValue(nSteps++);
 
             bRet = WriteThroughComponent(
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 1a0bb30885a9..201034320fef 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -2287,7 +2287,7 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
         }
         else
             pS->WriteUChar( LINE|0x10 );
-    pS->WriteUChar( END ); //line
+        pS->WriteUChar( END ); //line
     }
 
     //After subscript mathtype will keep the size of
@@ -3259,7 +3259,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
                 pS->WriteUChar( 2 );
                 break;
             }
-        pS->Seek(nPos);
+            pS->Seek(nPos);
         }
     }
 }
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 7179c257e853..cec24592c43e 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -221,7 +221,7 @@ std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId )
                 SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS,
                 SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{});
 
-            GetConfig()->ConfigToItemSet(*pRet);
+        GetConfig()->ConfigToItemSet(*pRet);
     }
     return pRet;
 }
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index e2b2bf3abc49..e37c69c6726b 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -157,7 +157,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
             // global symbol manager somewhat to chance.
         }
 
-    OSL_ENSURE( bAdded, "failed to add symbol" );
+        OSL_ENSURE( bAdded, "failed to add symbol" );
         if (bAdded)
             m_bModified = true;
         OSL_ENSURE( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index f87ff05fb696..a3ae716c8e4d 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -875,7 +875,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
             // #i33095# Security Options
             case HANDLE_LOAD_READONLY :
             {
-                 *pValue <<= pDocSh->IsLoadReadonly();
+                *pValue <<= pDocSh->IsLoadReadonly();
                 break;
             }
             // #i972#
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 4c47d9203678..f8c7b2f276d6 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -700,11 +700,11 @@ SmViewShell * SmCmdBoxWindow::GetView()
 
 void SmCmdBoxWindow::Resize()
 {
-     tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel());
-     aRect.AdjustLeft(CMD_BOX_PADDING );
-     aRect.AdjustTop(CMD_BOX_PADDING_TOP );
-     aRect.AdjustRight( -(CMD_BOX_PADDING) );
-     aRect.AdjustBottom( -(CMD_BOX_PADDING) );
+    tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel());
+    aRect.AdjustLeft(CMD_BOX_PADDING );
+    aRect.AdjustTop(CMD_BOX_PADDING_TOP );
+    aRect.AdjustRight( -(CMD_BOX_PADDING) );
+    aRect.AdjustBottom( -(CMD_BOX_PADDING) );
 
     DecorationView aView(this);
     aRect = aView.DrawFrame(aRect, DrawFrameStyle::In, DrawFrameFlags::NoDraw);
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index a8a8418b80b5..0e605fed9298 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -266,7 +266,7 @@ sal_Bool SAL_CALL NestedKeyImpl::isReadOnly(  )
     if ( !m_localKey.is() || !m_localKey->isValid() )
         throw InvalidRegistryException();
 
-   return m_localKey->isReadOnly();
+    return m_localKey->isReadOnly();
 }
 
 
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index ede4e6f050b4..363a8bf7c52c 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -262,10 +262,7 @@ OUString searchImplForLink(
 OUString searchLinkTargetForImpl(const Reference < XRegistryKey >& xRootKey,
                                         const OUString& linkName,
                                         const OUString& implName)
-    // throw ( InvalidRegistryException, RuntimeException )
 {
-//      try
-//      {
         Reference < XRegistryKey > xKey = xRootKey->openKey( slash_IMPLEMENTATIONS );
 
         if (xKey.is())
@@ -289,12 +286,8 @@ OUString searchLinkTargetForImpl(const Reference < XRegistryKey >& xRootKey,
                 }
             }
         }
-//      }
-//      catch(InvalidRegistryException&)
-//      {
-//      }
 
-    return OUString();
+        return OUString();
 }
 
 
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 34c93c5cb781..a4eec6a2fb76 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -883,7 +883,7 @@ InvocationInfo SAL_CALL Invocation_Impl::getInfoForName( const OUString& aName,
             if( _xIntrospectionAccess.is() && _xIntrospectionAccess->hasProperty
                  ( aExactName, PropertyConcept::ALL ^ PropertyConcept::DANGEROUS ) )
             {
-                 Property aProp = _xIntrospectionAccess->getProperty
+                Property aProp = _xIntrospectionAccess->getProperty
                     ( aExactName, PropertyConcept::ALL ^ PropertyConcept::DANGEROUS );
                 fillInfoForProperty( aRetInfo, aProp );
                 bFound = true;
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index b00833f418cf..5326b5b5cabc 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -199,7 +199,7 @@ void IndexedStyleSheetsTest::OnlyOneStyleSheetIsReturnedWhenReturnFirstIsUsed()
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Only one style sheet is returned.", static_cast<size_t>(1), v.size());
 
     std::vector<unsigned> w = iss.FindPositionsByNameAndPredicate(name, predicate);
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("All style sheets are returned.", static_cast<size_t>(3), w.size());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("All style sheets are returned.", static_cast<size_t>(3), w.size());
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(IndexedStyleSheetsTest);
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 58dafc378af4..cf0013931910 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -406,71 +406,71 @@ my_SEC_StringToOID(SECItem *to, const char *from, PRUint32 len)
 
     if (!from || !to) {
         PORT_SetError(SEC_ERROR_INVALID_ARGS);
-    return SECFailure;
+        return SECFailure;
     }
     if (!len) {
         len = PL_strlen(from);
     }
     if (len >= 4 && !PL_strncasecmp(from, OIDstring, 4)) {
         from += 4; /* skip leading "OID." if present */
-    len  -= 4;
+        len  -= 4;
     }
     if (!len) {
 bad_data:
         PORT_SetError(SEC_ERROR_BAD_DATA);
-    return SECFailure;
+        return SECFailure;
     }
     do {
-    PRUint32 decimal = 0;
+        PRUint32 decimal = 0;
         while (len > 0 && rtl::isAsciiDigit(static_cast<unsigned char>(*from))) {
-        PRUint32 addend = *from++ - '0';
-        --len;
-        if (decimal > max_decimal)  /* overflow */
-            goto bad_data;
-        decimal = (decimal * 10) + addend;
-        if (decimal < addend)   /* overflow */
-        goto bad_data;
-    }
-    if (len != 0 && *from != '.') {
-        goto bad_data;
-    }
-    if (decimal_numbers == 0) {
-        if (decimal > 2)
-            goto bad_data;
-        result[0] = decimal * 40;
-        result_bytes = 1;
-    } else if (decimal_numbers == 1) {
-        if (decimal > 40)
-            goto bad_data;
-        result[0] += decimal;
-    } else {
-        /* encode the decimal number,  */
-        PRUint8 * rp;
-        PRUint32 num_bytes = 0;
-        PRUint32 tmp = decimal;
-        while (tmp) {
-            num_bytes++;
-        tmp >>= 7;
+            PRUint32 addend = *from++ - '0';
+            --len;
+            if (decimal > max_decimal)  /* overflow */
+                goto bad_data;
+            decimal = (decimal * 10) + addend;
+            if (decimal < addend)   /* overflow */
+                goto bad_data;
         }
-        if (!num_bytes )
-            ++num_bytes;  /* use one byte for a zero value */
-        if (num_bytes + result_bytes > sizeof result)
+        if (len != 0 && *from != '.') {
             goto bad_data;
-        tmp = num_bytes;
-        rp = result + result_bytes - 1;
-        rp[tmp] = static_cast<PRUint8>(decimal & 0x7f);
-        decimal >>= 7;
-        while (--tmp > 0) {
-        rp[tmp] = static_cast<PRUint8>(decimal | 0x80);
-        decimal >>= 7;
         }
-        result_bytes += num_bytes;
-    }
-    ++decimal_numbers;
-    if (len > 0) { /* skip trailing '.' */
-        ++from;
-        --len;
-    }
+        if (decimal_numbers == 0) {
+            if (decimal > 2)
+                goto bad_data;
+            result[0] = decimal * 40;
+            result_bytes = 1;
+        } else if (decimal_numbers == 1) {
+            if (decimal > 40)
+                goto bad_data;
+            result[0] += decimal;
+        } else {
+            /* encode the decimal number,  */
+            PRUint8 * rp;
+            PRUint32 num_bytes = 0;
+            PRUint32 tmp = decimal;
+            while (tmp) {
+                num_bytes++;
+                tmp >>= 7;
+            }
+            if (!num_bytes )
+                ++num_bytes;  /* use one byte for a zero value */
+            if (num_bytes + result_bytes > sizeof result)
+                goto bad_data;
+            tmp = num_bytes;
+            rp = result + result_bytes - 1;
+            rp[tmp] = static_cast<PRUint8>(decimal & 0x7f);
+            decimal >>= 7;
+            while (--tmp > 0) {
+                rp[tmp] = static_cast<PRUint8>(decimal | 0x80);
+                decimal >>= 7;
+            }
+            result_bytes += num_bytes;
+        }
+        ++decimal_numbers;
+        if (len > 0) { /* skip trailing '.' */
+            ++from;
+            --len;
+        }
     } while (len > 0);
     /* now result contains result_bytes of data */
     if (to->data && to->len >= result_bytes) {
@@ -479,9 +479,9 @@ bad_data:
         rv = SECSuccess;
     } else {
         SECItem result_item = {siBuffer, nullptr, 0 };
-    result_item.data = result;
-    result_item.len  = result_bytes;
-    rv = SECITEM_CopyItem(nullptr, to, &result_item);
+        result_item.data = result;
+        result_item.len  = result_bytes;
+        rv = SECITEM_CopyItem(nullptr, to, &result_item);
     }
     return rv;
 }
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 1c4de783df95..f928c278500b 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -123,7 +123,7 @@ bool FSStorage::MakeFolderNoUI( const OUString& rFolder )
     ::ucbhelper::Content aParent;
     ::ucbhelper::Content aResultContent;
 
-       if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
+    if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
                                  uno::Reference< ucb::XCommandEnvironment >(),
                                  comphelper::getProcessComponentContext(),
                                  aParent ) )
@@ -319,7 +319,7 @@ void SAL_CALL FSStorage::copyToStorage( const uno::Reference< embed::XStorage >&
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -412,7 +412,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -502,7 +502,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -565,7 +565,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -703,7 +703,7 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -777,7 +777,7 @@ void SAL_CALL FSStorage::copyElementTo( const OUString& aElementName,
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
@@ -1199,7 +1199,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
     }
     catch( uno::Exception& )
     {
-          uno::Any aCaught( ::cppu::getCaughtException() );
+        uno::Any aCaught( ::cppu::getCaughtException() );
         throw embed::StorageWrappedTargetException("Can't copy raw stream",
                                                  uno::Reference< io::XInputStream >(),
                                                  aCaught );
diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx
index 46b3972e283b..74b9e1f580cb 100644
--- a/svl/source/items/globalnameitem.cxx
+++ b/svl/source/items/globalnameitem.cxx
@@ -84,7 +84,7 @@ bool SfxGlobalNameItem::PutValue( const css::uno::Any& rVal, sal_uInt8 )
 // virtual
 bool SfxGlobalNameItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
 {
-       css::uno::Sequence< sal_Int8 > aSeq( 16 );
+    css::uno::Sequence< sal_Int8 > aSeq( 16 );
     void const * pData = &m_aName.GetCLSID();
     memcpy( aSeq.getArray(), pData, 16 );
     rVal <<= aSeq;
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 945ecc1aeded..d8995e6b0a8f 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -648,7 +648,7 @@ bool SvxSearchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
             bRet = (rVal >>= nInt);
             if (bRet)
                 m_aSearchOpt.transliterateFlags = static_cast<TransliterationFlags>(nInt);
-             break;
+            break;
         }
         case MID_SEARCH_LOCALE:
         {
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index c4c9cadef9b1..a563e5a00cbf 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -400,8 +400,8 @@ SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
     pBasePool=pBase;
     nSearchFamily=eFam;
     bSearchUsed=false;
-        if( (( n & SfxStyleSearchBits::AllVisible ) != SfxStyleSearchBits::AllVisible )
-                && ((n & SfxStyleSearchBits::Used) == SfxStyleSearchBits::Used))
+    if( (( n & SfxStyleSearchBits::AllVisible ) != SfxStyleSearchBits::AllVisible )
+        && ((n & SfxStyleSearchBits::Used) == SfxStyleSearchBits::Used))
     {
         bSearchUsed = true;
         n &= ~SfxStyleSearchBits::Used;
commit b95512e936b4eebb301c169e091bd9064c1eb2ac
Author:     Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Sun Feb 10 11:46:55 2019 +0300
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Feb 10 11:18:26 2019 +0100

    tdf#39593 use existing find() to reduce copypaste
    
    Change-Id: Id6280424627a3bbcb484d61cee2f2003aa1ca9b6
    Reviewed-on: https://gerrit.libreoffice.org/67604
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 9c6675586ef9..3482017958c0 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -196,21 +196,7 @@ static bool getFromCommandLineArgs(
         return tmp;
     }();
 
-    bool found = false;
-
-    for(NameValueVector::iterator ii = nameValueVector.begin();
-        ii != nameValueVector.end();
-        ++ii)
-    {
-        if ((*ii).sName == key)
-        {
-            *value = (*ii).sValue;
-            found = true;
-            break;
-        }
-    }
-
-    return found;
+    return find(nameValueVector, key, value);
 }
 
 static void getExecutableDirectory_Impl(rtl_uString ** ppDirURL)


More information about the Libreoffice-commits mailing list