diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-22 10:21:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-28 10:47:34 +0200 |
commit | bfc1600c6ade6f006eb774bffe7caa9c948e8603 (patch) | |
tree | c660fa18fc6a9e5f05c3cc58fa34411cdc4f4257 /filter | |
parent | f9514beb9bfed51aee69227797e74504afed31c6 (diff) |
loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 18 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 2 | ||||
-rw-r--r-- | filter/source/odfflatxml/OdfFlatXml.cxx | 46 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 18 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 8 | ||||
-rw-r--r-- | filter/source/xsltfilter/LibXSLTTransformer.cxx | 6 | ||||
-rw-r--r-- | filter/source/xsltfilter/XSLTFilter.cxx | 100 |
7 files changed, 99 insertions, 99 deletions
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 6d29cd972fae..3f28fb1385ff 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -108,17 +108,17 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath ) << " and we look for " << aURL); OUString aName = xModel->getURL() ; if (aName.isEmpty()) + { + uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW ); + xProps->getPropertyValue("Title") >>= aName; + aName = aName.getToken(0, '-').trim(); + if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 ) { - uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW ); - uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue("Title") >>= aName; - aName = aName.getToken(0, '-').trim(); - if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 ) - { - pFoundShell = pShell; - break; - } + pFoundShell = pShell; + break; } + } if ( sMacroURLOrPath.endsWithIgnoreAsciiCase( ".dot" ) ) { diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index df873c2bf122..1b5a30110a94 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2516,7 +2516,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) pMasterPersist = &(*pPageList)[ nMasterIndex ]; } m_pPPTStyleSheet = pMasterPersist->xStyleSheet.get(); - } + } } if ( !m_pPPTStyleSheet ) m_pPPTStyleSheet = m_pDefaultSheet; diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index 69deeb36ee71..4d60054317c0 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -120,13 +120,13 @@ OdfFlatXml::importer( sal_Int32 paramCount = sourceData.getLength(); for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++) - { - paramName = sourceData[paramIdx].Name; - if ( paramName == "InputStream" ) - sourceData[paramIdx].Value >>= inputStream; - else if ( paramName == "URL" ) - sourceData[paramIdx].Value >>= url; - } + { + paramName = sourceData[paramIdx].Name; + if ( paramName == "InputStream" ) + sourceData[paramIdx].Value >>= inputStream; + else if ( paramName == "URL" ) + sourceData[paramIdx].Value >>= url; + } OSL_ASSERT(inputStream.is()); if (!inputStream.is()) @@ -179,13 +179,13 @@ OdfFlatXml::importer( sal_Int32 paramCount = sourceData.getLength(); for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++) - { - paramName = sourceData[paramIdx].Name; - if ( paramName == "InputStream" ) - sourceData[paramIdx].Value >>= inputStream; - else if ( paramName == "URL" ) - sourceData[paramIdx].Value >>= url; - } + { + paramName = sourceData[paramIdx].Name; + if ( paramName == "InputStream" ) + sourceData[paramIdx].Value >>= inputStream; + else if ( paramName == "URL" ) + sourceData[paramIdx].Value >>= url; + } OSL_ASSERT(inputStream.is()); if (!inputStream.is()) @@ -226,17 +226,17 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData, // Read output stream and target URL from the parameters given in sourceData. sal_Int32 paramCount = sourceData.getLength(); for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++) - { - paramName = sourceData[paramIdx].Name; - if ( paramName == "OutputStream" ) - sourceData[paramIdx].Value >>= outputStream; - } + { + paramName = sourceData[paramIdx].Name; + if ( paramName == "OutputStream" ) + sourceData[paramIdx].Value >>= outputStream; + } if (!getDelegate().is()) - { - Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext); - setDelegate(saxWriter); - } + { + Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext); + setDelegate(saxWriter); + } // get data source interface ... Reference<XActiveDataSource> dataSource(getDelegate(), UNO_QUERY); OSL_ASSERT(dataSource.is()); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index a5fe44536d32..fbf3561352c3 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1282,14 +1282,14 @@ void SVGTextWriter::startTextShape() // if text is rotated, set transform matrix at text element const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetOrientation() ) - { - Point aRot( maTextPos ); - OUString aTransform = "rotate(" + - OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " + - OUString::number( aRot.X() ) + " " + - OUString::number( aRot.Y() ) + ")"; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); - } + { + Point aRot( maTextPos ); + OUString aTransform = "rotate(" + + OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " + + OUString::number( aRot.X() ) + " " + + OUString::number( aRot.Y() ) + ")"; + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); + } mpTextShapeElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, mbIWS )); startTextParagraph(); @@ -2876,7 +2876,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true ); return; - } + } } BitmapEx aBmpEx( rBmpEx ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index c00301bacfc3..032e00782a7b 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -442,10 +442,10 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp ) aSourceData[i++].Value <<= true; if( bUseDocType ) - { - aSourceData[i ].Name = "DocType_Public"; - aSourceData[i++].Value <<= m_xFilterInfo->maDocType; - } + { + aSourceData[i ].Name = "DocType_Public"; + aSourceData[i++].Value <<= m_xFilterInfo->maDocType; + } Reference< XExportFilter > xExporter( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.documentconversion.XSLTFilter", mxContext ), UNO_QUERY ); Reference< XDocumentHandler > xHandler( xExporter, UNO_QUERY ); diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index e11777a59e8d..7ebc7aeb457d 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -217,9 +217,9 @@ namespace XSLT css::uno::Reference<XInputStream> xis = m_transformer->getInputStream(); n = xis->readBytes(m_readBuf, len); if (n > 0) - { - memcpy(buffer, m_readBuf.getArray(), n); - } + { + memcpy(buffer, m_readBuf.getArray(), n); + } return n; } diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index f98b83b73c48..f7dcab9e5cdd 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -316,16 +316,16 @@ namespace XSLT css::uno::Reference<XInputStream> xInputStream; css::uno::Reference<XInteractionHandler> xInterActionHandler; for (sal_Int32 i = 0; i < nLength; i++) - { - aName = aSourceData[i].Name; - Any value = aSourceData[i].Value; - if ( aName == "InputStream" ) - value >>= xInputStream; - else if ( aName == "URL" ) - value >>= aURL; - else if ( aName == "InteractionHandler" ) - value >>= xInterActionHandler; - } + { + aName = aSourceData[i].Name; + Any value = aSourceData[i].Value; + if ( aName == "InputStream" ) + value >>= xInputStream; + else if ( aName == "URL" ) + value >>= aURL; + else if ( aName == "InteractionHandler" ) + value >>= xInterActionHandler; + } OSL_ASSERT(xInputStream.is()); if (!xInputStream.is()) return false; @@ -350,7 +350,7 @@ namespace XSLT OSL_ASSERT(xInputStream.is()); OSL_ASSERT(m_tcontrol.is()); if (xHandler.is() && xInputStream.is() && m_tcontrol.is()) - { + { try { css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY); @@ -430,11 +430,11 @@ namespace XSLT TOOLS_WARN_EXCEPTION("filter.xslt", ""); return false; } - } + } else - { - return false; - } + { + return false; + } } sal_Bool @@ -456,16 +456,16 @@ namespace XSLT css::uno::Reference<XInputStream> xInputStream; css::uno::Reference<XInteractionHandler> xInterActionHandler; for (sal_Int32 i = 0; i < nLength; i++) - { - aName = aSourceData[i].Name; - Any value = aSourceData[i].Value; - if ( aName == "InputStream" ) - value >>= xInputStream; - else if ( aName == "URL" ) - value >>= aURL; - else if ( aName == "InteractionHandler" ) - value >>= xInterActionHandler; - } + { + aName = aSourceData[i].Name; + Any value = aSourceData[i].Value; + if ( aName == "InputStream" ) + value >>= xInputStream; + else if ( aName == "URL" ) + value >>= aURL; + else if ( aName == "InteractionHandler" ) + value >>= xInterActionHandler; + } OSL_ASSERT(xInputStream.is()); if (!xInputStream.is()) return false; @@ -490,7 +490,7 @@ namespace XSLT OSL_ASSERT(xInputStream.is()); OSL_ASSERT(m_tcontrol.is()); if (xFastParser.is() && xInputStream.is() && m_tcontrol.is()) - { + { try { css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY); @@ -556,11 +556,11 @@ namespace XSLT TOOLS_WARN_EXCEPTION("filter.xslt", ""); return false; } - } + } else - { - return false; - } + { + return false; + } } sal_Bool @@ -582,23 +582,23 @@ namespace XSLT // css::uno::Reference<XOutputStream> rOutputStream; sal_Int32 nLength = aSourceData.getLength(); for (sal_Int32 i = 0; i < nLength; i++) - { - aName = aSourceData[i].Name; - if ( aName == "DocType_Public" ) - aSourceData[i].Value >>= aDoctypePublic; - else if ( aName == "OutputStream" ) - aSourceData[i].Value >>= m_rOutputStream; - else if ( aName == "URL" ) - aSourceData[i].Value >>= sURL; - } + { + aName = aSourceData[i].Name; + if ( aName == "DocType_Public" ) + aSourceData[i].Value >>= aDoctypePublic; + else if ( aName == "OutputStream" ) + aSourceData[i].Value >>= m_rOutputStream; + else if ( aName == "URL" ) + aSourceData[i].Value >>= sURL; + } if (!getDelegate().is()) - { - // get the document writer - setDelegate(css::uno::Reference<XExtendedDocumentHandler>( - Writer::create(m_xContext), - UNO_QUERY_THROW)); - } + { + // get the document writer + setDelegate(css::uno::Reference<XExtendedDocumentHandler>( + Writer::create(m_xContext), + UNO_QUERY_THROW)); + } // create transformer Sequence<Any> args(4); @@ -624,7 +624,7 @@ namespace XSLT OSL_ASSERT(m_rOutputStream.is()); OSL_ASSERT(m_tcontrol.is()); if (m_tcontrol.is() && m_rOutputStream.is()) - { + { // we want to be notified when the processing is done... m_tcontrol->addListener(new XSLTFilterStreamListener(*this)); @@ -648,11 +648,11 @@ namespace XSLT // we will start the transformation as soon as we receive the startDocument // event. return true; - } + } else - { - return false; - } + { + return false; + } } // for the DocumentHandler implementation, we just proxy the |