summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-05-19 21:32:05 +0200
committerAndras Timar <andras.timar@collabora.com>2015-10-18 23:48:59 +0200
commitbf86643b3e71519ae20620fb816b04bba2d99bdb (patch)
treef37b8afc6cd27407bc8738f6599e0c2201c120bc /sfx2/source/dialog
parent6cc58b9fa7ed6b5781963427df47b03417f17973 (diff)
RemoteFilesDialog
Change-Id: I296ce6233287dac5447462faa4b7404c25297f8b (cherry picked from commit 87297284782adbf1fcb73663ad2d2a38b5ae1872)
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx12
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
3 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index e58505be0837..dabfeaf82ff1 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 c2c146220502..1adc6e1be1a2 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;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index a1a38f542c4e..d4d9e14b2c94 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -863,6 +863,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
pServiceName = FILE_OPEN_SERVICE_NAME_OOO;
else if ( nDialog == SFX2_IMPL_DIALOG_OOO )
pServiceName = FILE_OPEN_SERVICE_NAME_OOO;
+ else if ( nDialog == SFX2_IMPL_DIALOG_REMOTE )
+ pServiceName = "com.sun.star.ui.dialogs.RemoteFilePicker";
else
pServiceName = "com.sun.star.ui.dialogs.FilePicker";
OUString aService = OUString::createFromAscii( pServiceName );