summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen5.cxx50
-rw-r--r--sc/source/ui/view/tabview3.cxx6
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 ) ) );