[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Feb 20 21:33:01 UTC 2017
sc/source/ui/drawfunc/fuins2.cxx | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit 0200677891c6d592a12343f0d6f82c569cd7a9e0
Author: Eike Rathke <erack at redhat.com>
Date: Mon Feb 20 22:26:40 2017 +0100
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
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 6f10373..59c0ba0 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)
}
More information about the Libreoffice-commits
mailing list