Kaydet (Commit) 02006778 authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#106089 catch legal IllegalArgumentException on bad range string

... that for example doesn't match the document's current address convention.
Further work is need to make that actually fly, but at least don't terminate
the application but come up with a default Chart instead where the range can be
edited.

Change-Id: I6cb6400c56c896dac7ab949b8a986c784690dfd3
üst 1324b7f1
......@@ -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 );
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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment