summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc/fuins2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/drawfunc/fuins2.cxx')
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 41610a0ea11a..9a9e1328274e 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -114,7 +114,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
pDoc->LimitChartArea( nTab1, nCol1,nRow1, nCol2,nRow2 );
ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
- aRangeString = aRange.Format(ScRefFlags::RANGE_ABS_3D, &rScDoc);
+ aRangeString = aRange.Format(ScRefFlags::RANGE_ABS_3D, &rScDoc, rScDoc.GetAddressConvention());
}
}
}
@@ -186,7 +186,20 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
aArgs[3] = beans::PropertyValue(
OUString("DataRowSource"), -1,
uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE );
- xReceiver->setArguments( aArgs );
+
+ try
+ {
+ xReceiver->setArguments( aArgs );
+ }
+ catch (const lang::IllegalArgumentException& e)
+ {
+ // Can happen for invalid aRangeString, in which case a Chart
+ // will be created nevertheless and the range string can be
+ // edited.
+ SAL_WARN("sc.ui",
+ "lcl_ChartInit - caught IllegalArgumentException with message \"" << e.Message << "\","
+ " might be due to aRangeString: " << aRangeString);
+ }
// don't create chart listener here (range may be modified in chart dialog)
}