summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-05-19 21:32:05 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-07-16 09:52:35 +0200
commit87297284782adbf1fcb73663ad2d2a38b5ae1872 (patch)
treeb2ef66d5d8835c61b517f0802d26e351b3b42ce5 /sfx2/source
parentee79541aa892ff218e1dc3f869a3ac11b6f296ba (diff)
RemoteFilesDialog
Change-Id: I296ce6233287dac5447462faa4b7404c25297f8b
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appopen.cxx7
-rw-r--r--sfx2/source/dialog/backingwindow.cxx12
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
3 files changed, 20 insertions, 0 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 866412820ce6..a641ebb51ed6 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -98,6 +98,7 @@
#include <sfx2/event.hxx>
#include <sfx2/templatedlg.hxx>
#include "openuriexternally.hxx"
+#include <svtools/RemoteFilesDialog.hxx>
#include <officecfg/Office/ProtocolHandler.hxx>
@@ -1124,4 +1125,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
}
+void SfxApplication::OpenRemoteExec_Impl( SfxRequest& )
+{
+ ScopedVclPtrInstance< RemoteFilesDialog > aDlg((vcl::Window*)NULL, WB_OPEN);
+ aDlg->Execute();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 40be80d9b8cd..419be21c99d0 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -69,6 +69,7 @@ const char BASE_URL[] = "private:factory/sdatabase?Interactive";
const char MATH_URL[] = "private:factory/smath";
const char TEMPLATE_URL[] = ".uno:NewDoc";
const char OPEN_URL[] = ".uno:Open";
+const char REMOTE_URL[] = ".uno:OpenRemote";
const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess";
// increase size of the text in the buttons on the left fMultiplier-times
@@ -103,6 +104,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "sfx/ui/startcenter.ui", "StartCenter" );
get(mpOpenButton, "open_all");
+ get(mpRemoteButton, "open_remote");
get(mpRecentButton, "open_recent");
get(mpTemplateButton, "templates_all");
@@ -215,6 +217,7 @@ void BackingWindow::dispose()
}
disposeBuilder();
mpOpenButton.clear();
+ mpRemoteButton.clear();
mpRecentButton.clear();
mpTemplateButton.clear();
mpCreateLabel.clear();
@@ -291,6 +294,7 @@ void BackingWindow::initControls()
mpLocalView->setOpenTemplateHdl(LINK(this,BackingWindow,OpenTemplateHdl));
setupButton( mpOpenButton );
+ setupButton( mpRemoteButton );
setupButton( mpRecentButton );
setupButton( mpTemplateButton );
setupButton( mpWriterAllButton );
@@ -577,6 +581,14 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
dispatchURL( OPEN_URL, OUString(), xFrame, aArgs );
}
+ else if( pButton == mpRemoteButton )
+ {
+ Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
+
+ Sequence< com::sun::star::beans::PropertyValue > aArgs(0);
+
+ dispatchURL( REMOTE_URL, OUString(), xFrame, aArgs );
+ }
else if( pButton == mpRecentButton )
{
mpLocalView->Hide();
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index 4b9df07715fe..7bf4ca725a4a 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -61,6 +61,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
VclPtr<PushButton> mpOpenButton;
VclPtr<PushButton> mpRecentButton;
+ VclPtr<PushButton> mpRemoteButton;
VclPtr<MenuButton> mpTemplateButton;
VclPtr<FixedText> mpCreateLabel;