summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-07 18:03:23 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-07 18:04:10 +0200
commit7435558847c7bbe9160e0ca6fb1a6115a34555fe (patch)
treea83781468d9f9d13d6f67760fabcf60ad5ac2dcf /sd/source
parent57aae2766dca48830d18828bb88b21cbbcb9e7de (diff)
Basic framework for Remote Dialog.
Change-Id: Ie744c1a0db1661b9dd57976d6f27b12a6f0ba824
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx25
-rw-r--r--sd/source/ui/dlg/RemoteDialog.src33
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx9
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx1
-rw-r--r--sd/source/ui/inc/RemoteDialog.hrc14
-rw-r--r--sd/source/ui/inc/RemoteDialog.hxx28
-rw-r--r--sd/source/ui/inc/RemoteServer.hxx1
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx6
-rw-r--r--sd/source/ui/view/drviews6.cxx10
9 files changed, 126 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
new file mode 100644
index 000000000000..5574c02956b6
--- /dev/null
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <svl/itemset.hxx>
+
+#include "sdattr.hxx"
+#include "sdresid.hxx"
+#include "cusshow.hxx"
+
+#include "RemoteDialog.hxx"
+#include "RemoteDialog.hrc"
+
+SdRemoteDlg::SdRemoteDlg( Window *pWindow ) :
+ ModalDialog ( pWindow, SdResId( DLG_PAIR_REMOTE ) )
+{
+FreeResource();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sd/source/ui/dlg/RemoteDialog.src b/sd/source/ui/dlg/RemoteDialog.src
new file mode 100644
index 000000000000..df261e94732e
--- /dev/null
+++ b/sd/source/ui/dlg/RemoteDialog.src
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#include "helpids.h"
+#include <svx/svxids.hrc>
+#include "RemoteDialog.hrc"
+
+ModalDialog DLG_PAIR_REMOTE
+{
+
+ HelpID = CMD_SID_REMOTE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 256, 205 ) ;
+ Text [ en-US ] = "Impress Remote" ;
+ Moveable = TRUE ;
+
+ OKButton BTN_CONNECT
+ {
+ Pos = MAP_APPFONT ( 200, 6 ) ;
+ Size = MAP_APPFONT ( 50, 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 6eb279550d1e..5e4e727a975f 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -49,6 +49,7 @@
#include "OutlineBulletDlg.hxx"
#include "paragr.hxx"
#include "present.hxx"
+#include "RemoteDialog.hxx"
#include "prltempl.hxx"
#include "sdpreslt.hxx"
#include "tabtempl.hxx"
@@ -322,7 +323,6 @@ void AbstractSdStartPresDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
{
pDlg->GetAttr( rOutAttrs );
}
-// AbstractSdStartPresDlg_Impl end
//AbstractSdPresLayoutDlg_Impl begin
void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
@@ -491,6 +491,13 @@ AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentatio
}
// add for SdStartPresentationDlg end
+// add for SdRemoteDlg begin
+// VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateSdRemoteDlg( ::Window* pWindow )
+// {
+// return new VclAbstractDialog_Impl( new SdRemoteDlg( pWindow ) );
+// }
+// add for SdRemoteDlg end
+
// add for SdPresLayoutTemplateDlg begin
SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool )
{
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 31f8e5ecc6c5..4af3718f803c 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -276,6 +276,7 @@ public:
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
const std::vector<String> &rPageNames, List* pCSList );
+// virtual VclAbstractDialog* CreateSdRemoteDlg( ::Window* pWindow );
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );
diff --git a/sd/source/ui/inc/RemoteDialog.hrc b/sd/source/ui/inc/RemoteDialog.hrc
new file mode 100644
index 000000000000..5e1a01fc8ee0
--- /dev/null
+++ b/sd/source/ui/inc/RemoteDialog.hrc
@@ -0,0 +1,14 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#include <sfx2/sfx.hrc>
+
+#define DLG_PAIR_REMOTE RID_APP_START+700
+
+#define BTN_CONNECT 1
+
diff --git a/sd/source/ui/inc/RemoteDialog.hxx b/sd/source/ui/inc/RemoteDialog.hxx
new file mode 100644
index 000000000000..4f909519460a
--- /dev/null
+++ b/sd/source/ui/inc/RemoteDialog.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef _SD_REMOTEDIALOG_HXX_
+#define _SD_REMOTEDIALOG_HXX_
+
+#include <vcl/lstbox.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/field.hxx>
+
+class SdRemoteDlg : public ModalDialog
+{
+
+public:
+ SdRemoteDlg( Window* pWindow );
+
+};
+
+#endif // _SD_REMOTEDIALOG_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sd/source/ui/inc/RemoteServer.hxx b/sd/source/ui/inc/RemoteServer.hxx
index 37fba7552038..e79d356bd51f 100644
--- a/sd/source/ui/inc/RemoteServer.hxx
+++ b/sd/source/ui/inc/RemoteServer.hxx
@@ -51,6 +51,7 @@ namespace sd
static RemoteServer *spServer;
osl::AcceptorSocket mSocket;
osl::StreamSocket mStreamSocket;
+ void pairClient();
void listenThread();
void execute();
static Transmitter *pTransmitter;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 5970092d423d..2919bdaca1c9 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -97,6 +97,12 @@ void RemoteServer::listenThread()
fprintf( stderr, "Finished listening\n" );
}
+void RemoteServer::pairClient()
+{
+ // Pairing: client sends PIN, server asks user, replies with accepted/rejected.
+ // We have to wait here until the user opens the dialog via the menu,
+ // typs in the pin etc.
+}
void RemoteServer::execute()
{
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 6330708ed266..40af283eb0c8 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -58,6 +58,7 @@
#include "NavigatorChildWindow.hxx"
#include "LayerDialogChildWindow.hxx"
#include "sdresid.hxx"
+// #include "sdabstdlg.hxx"
#include "fupoor.hxx"
#include "fusldlg.hxx"
#include "drawdoc.hxx"
@@ -632,6 +633,15 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq)
}
break;
+ case SID_REMOTE_DLG:
+ {
+// SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
+// VclAbstractDialog* pDlg = pFact ? pFact->CreateSdRemoteDlg(GetActiveWindow()) : 0;
+// if (pDlg)
+// pDlg->Execute();
+ }
+ break;
+
case SID_CUSTOMSHOW_DLG:
{
SetCurrentFunction( FuCustomShowDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );