summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwshb.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabvwshb.cxx')
-rw-r--r--sc/source/ui/view/tabvwshb.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 2765f71ca67f..b1fc8d378b0d 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -59,6 +59,9 @@
#include "drawview.hxx"
#include "ChartRangeSelectionListener.hxx"
+#include <tools/urlobj.hxx>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
@@ -301,6 +304,19 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
FuInsertOLE(this, pWin, pView, pDrModel, rReq);
break;
+ case SID_INSERT_DIAGRAM_FROM_FILE:
+ {
+ sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ 0, OUString("com.sun.star.chart2.ChartDocument"));
+ if(aDlg.Execute() == ERRCODE_NONE )
+ {
+ INetURLObject aURLObj( aDlg.GetPath() );
+ OUString aURL = aURLObj.GetURLNoPass();
+ FuInsertChartFromFile(this, pWin, pView, pDrModel, rReq, aURL);
+ }
+ }
+ break;
+
case SID_OBJECTRESIZE:
{
// Der Server moechte die Clientgrosse verandern