diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-14 23:20:48 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-15 01:30:55 +0100 |
commit | 4517bb391afea870f856e030d8b1e5e8ee9364ac (patch) | |
tree | 4949d9d12301e4873b0cad8cb53c576fadea0d1a /sc/source/ui/view/tabvwshb.cxx | |
parent | b327b0dc2724958acce6e1df1620c1a919ea6bf8 (diff) |
first step for Insert->Chart From File
This needs some tweaks but it looks like we are already able to choose
the chart and import it. There are some more tweaks needed to handle
internal vs. external data provider, errors, other components, ...
Change-Id: Ib3e7f8bbf7b7f49b071d85120930624e2add91a7
Diffstat (limited to 'sc/source/ui/view/tabvwshb.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 16 |
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 |