summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xichart.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel/xichart.cxx')
-rw-r--r--sc/source/filter/excel/xichart.cxx51
1 files changed, 27 insertions, 24 deletions
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 6313fa533074..c7bb18d4a862 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -818,35 +818,38 @@ Reference< XDataSequence > XclImpChSourceLink::CreateDataSequence( const OUStrin
{
Reference< XDataSequence > xDataSeq;
Reference< XDataProvider > xDataProv = GetDataProvider();
- if( xDataProv.is() && mxTokenArray )
+ if( xDataProv.is() )
{
- ScCompiler aComp( GetDocPtr(), ScAddress(), *mxTokenArray );
- aComp.SetGrammar(GetDoc().GetGrammar());
- OUStringBuffer aRangeRep;
- aComp.CreateStringFromTokenArray( aRangeRep );
- try
- {
- xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aRangeRep.makeStringAndClear() );
- // set sequence role
- ScfPropertySet aSeqProp( xDataSeq );
- aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
- }
- catch( Exception& )
+ if ( mxTokenArray )
{
-// OSL_FAIL( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
+ ScCompiler aComp( GetDocPtr(), ScAddress(), *mxTokenArray );
+ aComp.SetGrammar(GetDoc().GetGrammar());
+ OUStringBuffer aRangeRep;
+ aComp.CreateStringFromTokenArray( aRangeRep );
+ try
+ {
+ xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aRangeRep.makeStringAndClear() );
+ // set sequence role
+ ScfPropertySet aSeqProp( xDataSeq );
+ aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+ }
+ catch( Exception& )
+ {
+ // OSL_FAIL( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
+ }
}
- }
- else if( rRole == EXC_CHPROP_ROLE_LABEL && mxString && !mxString->GetText().isEmpty() )
- {
- try
+ else if( rRole == EXC_CHPROP_ROLE_LABEL && mxString && !mxString->GetText().isEmpty() )
{
- OUString aString("\"");
- xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aString + mxString->GetText() + aString );
- // set sequence role
- ScfPropertySet aSeqProp( xDataSeq );
- aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+ try
+ {
+ OUString aString("\"");
+ xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aString + mxString->GetText() + aString );
+ // set sequence role
+ ScfPropertySet aSeqProp( xDataSeq );
+ aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+ }
+ catch( Exception& ) { }
}
- catch( Exception& ) { }
}
return xDataSeq;
}