diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-03 13:41:45 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-03 17:14:15 +0100 |
commit | ecf00403376d13355fcf6fb7cd36b3500f19fc69 (patch) | |
tree | 96d76c3d9e9514a6f08e51c1fe3ddcdcb6a1060d | |
parent | 29c8b9a7c9a4d62b7df2e70b71beec488aae5722 (diff) |
loplugin: improve indentation
Change-Id: If0ddaa8fd7cfaf4df8589422cb50ce37f1be2ad1
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 31 | ||||
-rw-r--r-- | connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/mscodec.cxx | 10 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 6 | ||||
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 8 | ||||
-rw-r--r-- | i18npool/source/search/textsearch.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 3 | ||||
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 17 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 3 |
13 files changed, 59 insertions, 54 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 0da667653051..1b54b355edbe 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1220,23 +1220,26 @@ Sequence< Reference< XChartType > > ::std::vector< Reference< XChartType > > aResult; if(xDiagram.is()) - try { - Reference< XCoordinateSystemContainer > xCooSysCnt( - xDiagram, uno::UNO_QUERY_THROW ); - Sequence< Reference< XCoordinateSystem > > aCooSysSeq( - xCooSysCnt->getCoordinateSystems()); - for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i ) + try { - Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW ); - Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); - ::std::copy( aChartTypeSeq.getConstArray(), aChartTypeSeq.getConstArray() + aChartTypeSeq.getLength(), - ::std::back_inserter( aResult )); + Reference< XCoordinateSystemContainer > xCooSysCnt( + xDiagram, uno::UNO_QUERY_THROW ); + Sequence< Reference< XCoordinateSystem > > aCooSysSeq( + xCooSysCnt->getCoordinateSystems()); + for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i ) + { + Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW ); + Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); + ::std::copy( aChartTypeSeq.getConstArray(), + aChartTypeSeq.getConstArray() + aChartTypeSeq.getLength(), + ::std::back_inserter( aResult )); + } + } + catch( const uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); } - } - catch( const uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); } return ContainerHelper::ContainerToSequence( aResult ); diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx index 9de0b04f88da..a921a44ae251 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx @@ -1134,7 +1134,7 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& ::rtl::OString aPKQ,aPKO,aPKN; if ( catalog.hasValue() ) - aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); + aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding); diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index dd7ce6660cef..8cc09e6c0ba8 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -228,9 +228,13 @@ void MSCodec_XorWord95::Decode( sal_uInt8* pnData, sal_Size nBytes ) for( const sal_uInt8* pnDataEnd = pnData + nBytes; pnData < pnDataEnd; ++pnData ) { const sal_uInt8 cChar = *pnData ^ *pnCurrKey; - if (*pnData && cChar) - *pnData = cChar; - if( pnCurrKey < pnKeyLast ) ++pnCurrKey; else pnCurrKey = mpnKey; + if (*pnData && cChar) + *pnData = cChar; + + if( pnCurrKey < pnKeyLast ) + ++pnCurrKey; + else + pnCurrKey = mpnKey; } // update mnOffset diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index cc8de5869794..83f6cdd70550 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5687,9 +5687,8 @@ void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, sal_uLong nLenDg, { if(!this->GetShapeGroupContainerData( rSt, nLength, sal_True, nDrawingContainerId )) return; } - else // blanker Shape Container ? (ausserhalb vom Shape Group Container) - if( DFF_msofbtSpContainer == nFbt ) + else if( DFF_msofbtSpContainer == nFbt ) { if(!this->GetShapeContainerData( rSt, nLength, ULONG_MAX, nDrawingContainerId )) return; } @@ -5725,9 +5724,8 @@ sal_Bool SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt, return sal_False; bFirst = sal_False; } - else // eingeschachtelter Shape Group Container ? - if( DFF_msofbtSpgrContainer == nFbt ) + else if( DFF_msofbtSpgrContainer == nFbt ) { if ( !this->GetShapeGroupContainerData( rSt, nLength, sal_False, nDrawingContainerId ) ) return sal_False; diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 010f1e3e361c..90d560c851df 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -312,28 +312,26 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) // by others. if ( ! xCloseFrame->getCreator().is()) bCloseFrame = sal_True; - else // b) The help window cant disagree with any request. // Because it doesnt implement a controller - it uses a window only. // Further t cant be the last open frame - if we do all other things // right inside this CloseDispatcher implementation. // => close it! - if (aCheck1.m_bReferenceIsHelp) + else if (aCheck1.m_bReferenceIsHelp) bCloseFrame = sal_True; - else // c) If we are already in "backing mode", we have to terminate // the application, if this special frame is closed. // It doesnt matter, how many other frames (can be the help or hidden frames only) // are open then. // => terminate the application! - if (aCheck1.m_bReferenceIsBacking) + else if (aCheck1.m_bReferenceIsBacking) bTerminateApp = sal_True; - else // d) Otherwhise we have to: close all views to the same document, close the // document inside our own frame and decide then again, what has to be done! + else { if (implts_prepareFrameForClosing(m_xCloseFrame, bAllowSuspend, bCloseAllViewsToo, bControllerSuspended)) { diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index 03f2121d239f..cdca853bb8a6 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -202,7 +202,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta newStartPos = FindPosInSeq_Impl( offset, startPos ); if( endPos < searchStr.getLength() ) - newEndPos = FindPosInSeq_Impl( offset, endPos ); + newEndPos = FindPosInSeq_Impl( offset, endPos ); else newEndPos = in_str.getLength(); @@ -289,8 +289,8 @@ SearchResult TextSearch::searchBackward( const OUString& searchStr, sal_Int32 st // JP 20.6.2001: also the start and end positions must be corrected! if( startPos < searchStr.getLength() ) newStartPos = FindPosInSeq_Impl( offset, startPos ); - else - newStartPos = in_str.getLength(); + else + newStartPos = in_str.getLength(); if( endPos ) newEndPos = FindPosInSeq_Impl( offset, endPos ); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index c5806353b9c8..543096e14eeb 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1930,10 +1930,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam, else pClipDoc->ResetClip(this, pMarks); -// if ( bUseRangeForVBA ) -// CopyRangeNamesToClip(pClipDoc, aClipRange, nTab ); -// else - CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs); + CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs); for ( ; i < nEndTab; ++i) { diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 6d4478f1dc8b..d35c0f3322e3 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -292,8 +292,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) const SfxPoolItem* pFamItem; if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_True, &pFamItem ) ) eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue(); - else - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) ) + else if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) ) { String sFamily = ((const SfxStringItem*)pFamItem)->GetValue(); if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL) diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 98624b06593a..0d04732e4b09 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -225,11 +225,11 @@ namespace basprov // call method SbxVariableRef xReturn = new SbxVariable; ErrCode nErr = SbxERR_OK; - { - // if it's a document-based script, temporarily reset ThisComponent to the script invocation context - Any aOldThisComponent; - if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) - aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) ); + + // if it's a document-based script, temporarily reset ThisComponent to the script invocation context + Any aOldThisComponent; + if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) + aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) ); if ( m_caller.getLength() && m_caller[ 0 ].hasValue() ) { @@ -239,9 +239,10 @@ namespace basprov } else nErr = m_xMethod->Call( xReturn ); - if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) - m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); - } + + if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) + m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); + if ( nErr != SbxERR_OK ) { // TODO: throw InvocationTargetException ? diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index fb616f657545..20b9561faf0c 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -881,11 +881,14 @@ void PowerPointExport::WriteAnimationCondition( FSHelperPtr pFS, Any& rAny, sal_ const char* pEvent = NULL; if( rAny >>= fDelay ) - bHasFDelay = sal_True; - else if( rAny >>= eTiming ) { - if( eTiming == Timing_INDEFINITE ) - pDelay = "indefinite"; - } else if( rAny >>= aEvent ) { + bHasFDelay = sal_True; + else if( rAny >>= eTiming ) + { + if( eTiming == Timing_INDEFINITE ) + pDelay = "indefinite"; + } + else if( rAny >>= aEvent ) + { // TODO DBG(printf ("animation condition event: TODO\n")); DBG(printf ("event offset has value: %d triger: %d source has value: %d\n", aEvent.Offset.hasValue(), aEvent.Trigger, aEvent.Source.hasValue())); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 9255a3a14a01..cc3add543a17 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -534,8 +534,10 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) // Ask if possible, if page format should be taken over from printer. if ( ( bOriChg || bPgSzChg ) && RET_YES == QueryBox(0, WB_YES_NO | WB_DEF_OK, aMsg).Execute() ) - // Flags wich changes for <SetPrinter(SfxPrinter*)> are maintained - nChangedFlags |= nNewOpt; + { + // Flags wich changes for <SetPrinter(SfxPrinter*)> are maintained + nChangedFlags |= nNewOpt; + } // For the MAC to have its "temporary of class String" in next if() String aTempPrtName = pNewPrinter->GetName(); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 4f10f61f44c3..9a0a9d30b14f 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1302,8 +1302,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) } pSearchItem->SetLevenshtein( bIsChecked ); } - else - if ( pCtrl == &aNotesBtn) + else if ( pCtrl == &aNotesBtn) { if (aNotesBtn.IsChecked()) { diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8b9bc0ed484f..52d58f8a5831 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -375,6 +375,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri //remember default values for dataseries if(xProp.is()) + { try { mrSeriesDefaultsAndStyles.maSymbolTypeDefault = xProp->getPropertyValue(::rtl::OUString("SymbolType")); @@ -422,7 +423,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri (void)rEx; // avoid warning for pro build #endif } - // + } // if bool bCreateInternalDataProvider = false; if( m_rXLinkHRefAttributeToIndicateDataProvider == "." ) //data comes from the chart itself |