summaryrefslogtreecommitdiff
path: root/chart2/source/tools/DiagramHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/DiagramHelper.cxx')
-rw-r--r--chart2/source/tools/DiagramHelper.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 4ce623ae460c..36afef60a6d4 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -475,18 +475,20 @@ sal_Int32 DiagramHelper::getDimension( const Reference< XDiagram > & xDiagram )
try
{
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
-
- for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
+ Reference< XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
+ if( xCooSysCnt.is() )
{
- Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] );
- if(xCooSys.is())
+ Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+
+ for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
{
- nResult = xCooSys->getDimension();
- break;
+ Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] );
+ if(xCooSys.is())
+ {
+ nResult = xCooSys->getDimension();
+ break;
+ }
}
}
}