diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-30 19:35:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-03 08:41:11 +0200 |
commit | d3971ec256450e6783920b46f672048b29719949 (patch) | |
tree | f4722d0e2bc321cf71b49b7573cf38640e9b28fc /sc | |
parent | f50bf3c5225b49b3c6f77f882e35305e5dc5ccd3 (diff) |
new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen5.cxx | 50 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 6 |
2 files changed, 26 insertions, 30 deletions
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 4e11c3108c2f..b7fc6ac2a774 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -530,40 +530,38 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, } if ( bChanged ) { - { - // Force the chart to be loaded now, so it registers itself for UNO events. - // UNO broadcasts are done after UpdateChartRef, so the chart will get this - // reference change. + // Force the chart to be loaded now, so it registers itself for UNO events. + // UNO broadcasts are done after UpdateChartRef, so the chart will get this + // reference change. - uno::Reference<embed::XEmbeddedObject> xIPObj = - FindOleObjectByName(pChartListener->GetName()); + uno::Reference<embed::XEmbeddedObject> xIPObj = + FindOleObjectByName(pChartListener->GetName()); - svt::EmbeddedObjectRef::TryRunningState( xIPObj ); + svt::EmbeddedObjectRef::TryRunningState( xIPObj ); - // After the change, chart keeps track of its own data source ranges, - // the listener doesn't need to listen anymore, except the chart has - // an internal data provider. - bool bInternalDataProvider = false; - if ( xIPObj.is() ) - { - try - { - uno::Reference< chart2::XChartDocument > xChartDoc( xIPObj->getComponent(), uno::UNO_QUERY_THROW ); - bInternalDataProvider = xChartDoc->hasInternalDataProvider(); - } - catch ( uno::Exception& ) - { - } - } - if ( bInternalDataProvider ) + // After the change, chart keeps track of its own data source ranges, + // the listener doesn't need to listen anymore, except the chart has + // an internal data provider. + bool bInternalDataProvider = false; + if ( xIPObj.is() ) + { + try { - pChartListener->ChangeListening( aNewRLR, bDataChanged ); + uno::Reference< chart2::XChartDocument > xChartDoc( xIPObj->getComponent(), uno::UNO_QUERY_THROW ); + bInternalDataProvider = xChartDoc->hasInternalDataProvider(); } - else + catch ( uno::Exception& ) { - pChartListener->ChangeListening( new ScRangeList, bDataChanged ); } } + if ( bInternalDataProvider ) + { + pChartListener->ChangeListening( aNewRLR, bDataChanged ); + } + else + { + pChartListener->ChangeListening( new ScRangeList, bDataChanged ); + } } } } diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index b216b38c584e..2def729ddccb 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2334,10 +2334,8 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO //!if ( nCol1 > 0 && !aViewData.GetDocument()->IsBlockEmpty( //! aViewData.GetTabNo(), //! 0, nRow1, nCol1-1, nRow2 ) ) - { - long nMarkPixel = (long)( SC_CLIPMARK_SIZE * aViewData.GetPPTX() ); - aStart.X() -= nMarkPixel * nLayoutSign; - } + long nMarkPixel = (long)( SC_CLIPMARK_SIZE * aViewData.GetPPTX() ); + aStart.X() -= nMarkPixel * nLayoutSign; } pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( tools::Rectangle( aStart,aEnd ) ) ); |