summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-06 16:00:35 +0100
committerEike Rathke <erack@redhat.com>2014-10-08 14:09:50 +0000
commitcd603063f44c152bbc3a1f3eb3796722eb422c0e (patch)
tree9d4da1167db64475ba4717870116067d6f3e8849
parentfa00d2ec45aa24a433b832c5287f3e8f41475326 (diff)
Resolves: fdo#80101 inserting non-chart as chart -> unhandled exception
Change-Id: I4d5438292d9a5c49f1336304ebd3dc4e155dd212 (cherry picked from commit 76d4db3181dfd1524620377bb12a8e0332ae8ab0) Reviewed-on: https://gerrit.libreoffice.org/11833 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/ui/view/tabvwshb.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 3871bc8dce35..b8ae65bf290a 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -311,6 +311,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
break;
case SID_INSERT_DIAGRAM_FROM_FILE:
+ try
{
sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
0, OUString("com.sun.star.chart2.ChartDocument"));
@@ -321,6 +322,10 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
FuInsertChartFromFile(this, pWin, pView, pDrModel, rReq, aURL);
}
}
+ catch (const uno::Exception& e)
+ {
+ SAL_WARN( "sc", "Cannot Insert Chart: " << e.Message);
+ }
break;
case SID_OBJECTRESIZE: