diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/drawfunc/fuins2.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 6f1037385121..59c0ba07adca 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -185,7 +185,20 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie aArgs[3] = beans::PropertyValue( "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) } |