diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2015-06-24 18:15:26 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2015-07-16 09:53:07 +0200 |
commit | 7a77b45830225de507593f5d60b103098132ff0b (patch) | |
tree | cee772efc7c845618ea21f57aeea84daeea90a99 /sfx2 | |
parent | 3c0766319f9820f583f193c665c0ebc49b358646 (diff) |
OK button handler & opening the files (very basic)
Change-Id: I14ea89b118fdd5d97cb162523b55ca61cee0c97a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/sfx.sdi | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 57dd23c57e55..8ccc619890fe 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -3801,7 +3801,7 @@ SfxObjectItem Open SID_OPENDOC ] SfxObjectItem OpenRemote SID_OPENREMOTE -() +(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION,SfxStringItem Referer SID_REFERER,SfxStringItem SuggestedSaveAsDir SID_DEFAULTFILEPATH,SfxStringItem SuggestedSaveAsName SID_DEFAULTFILENAME) [ /* flags: */ AutoUpdate = FALSE, diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 001ed1b176d3..7fce0c2a0d6a 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -1125,7 +1125,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) } } -void SfxApplication::OpenRemoteExec_Impl( SfxRequest& ) +void SfxApplication::OpenRemoteExec_Impl( SfxRequest& rReq ) { ScopedVclPtrInstance< RemoteFilesDialog > aDlg((vcl::Window*)NULL, WB_OPEN); @@ -1135,6 +1135,15 @@ void SfxApplication::OpenRemoteExec_Impl( SfxRequest& ) aDlg->AddFilter("ODS files", "*.ods"); aDlg->Execute(); + + OUString sFileName = aDlg->GetPath(); + + rReq.AppendItem( SfxStringItem( SID_TARGETNAME, OUString("_default") ) ); + rReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) ); + rReq.RemoveItem( SID_FILE_NAME ); + rReq.AppendItem( SfxStringItem( SID_FILE_NAME, sFileName ) ); + + GetDispatcher_Impl()->Execute( SID_OPENDOC, SfxCallMode::SYNCHRON, *rReq.GetArgs() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |