[Libreoffice-commits] .: officecfg/registry sd/AllLangResTarget_sd.mk sd/inc sd/Library_sdui.mk sd/source sd/uiconfig

Andrzej J.R. Hunt ajrhunt at kemper.freedesktop.org
Tue Aug 7 09:04:46 PDT 2012


 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |    9 ++
 sd/AllLangResTarget_sd.mk                                                |    1 
 sd/Library_sdui.mk                                                       |    1 
 sd/inc/app.hrc                                                           |    1 
 sd/inc/sdabstdlg.hxx                                                     |    1 
 sd/inc/sdcommands.h                                                      |    1 
 sd/source/ui/dlg/RemoteDialog.cxx                                        |   25 +++++++
 sd/source/ui/dlg/RemoteDialog.src                                        |   33 ++++++++++
 sd/source/ui/dlg/sddlgfact.cxx                                           |    9 ++
 sd/source/ui/dlg/sddlgfact.hxx                                           |    1 
 sd/source/ui/inc/RemoteDialog.hrc                                        |   14 ++++
 sd/source/ui/inc/RemoteDialog.hxx                                        |   28 ++++++++
 sd/source/ui/inc/RemoteServer.hxx                                        |    1 
 sd/source/ui/remotecontrol/Server.cxx                                    |    6 +
 sd/source/ui/view/drviews6.cxx                                           |   10 +++
 sd/uiconfig/simpress/menubar/menubar.xml                                 |    1 
 16 files changed, 141 insertions(+), 1 deletion(-)

New commits:
commit 7435558847c7bbe9160e0ca6fb1a6115a34555fe
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Tue Aug 7 18:03:23 2012 +0200

    Basic framework for Remote Dialog.
    
    Change-Id: Ie744c1a0db1661b9dd57976d6f27b12a6f0ba824

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index d97348e..cc55a9e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -42,6 +42,15 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:Remote" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+
+          <value xml:lang="en-US">Impress ~Remote</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:RehearseTimings" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
 
diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk
index 89fc6a2..8b24917 100644
--- a/sd/AllLangResTarget_sd.mk
+++ b/sd/AllLangResTarget_sd.mk
@@ -92,6 +92,7 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
     sd/source/ui/dlg/present.src \
     sd/source/ui/dlg/prltempl.src \
     sd/source/ui/dlg/prntopts.src \
+    sd/source/ui/dlg/RemoteDialog.src \
     sd/source/ui/dlg/sdpreslt.src \
     sd/source/ui/dlg/tabtempl.src \
     sd/source/ui/dlg/tpaction.src \
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 102f88b..1e1cb5b 100644
--- a/sd/Library_sdui.mk
+++ b/sd/Library_sdui.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Library_add_exception_objects,sdui,\
     sd/source/ui/dlg/present \
     sd/source/ui/dlg/prltempl \
     sd/source/ui/dlg/prntopts \
+    sd/source/ui/dlg/RemoteDialog \
     sd/source/ui/dlg/sddlgfact \
     sd/source/ui/dlg/sdpreslt \
     sd/source/ui/dlg/sduiexp \
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index a279b29..950a930 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -355,6 +355,7 @@
 #define SID_CUSTOM_ANIMATION_SCHEMES_PANEL  (SID_SD_START+333)
 #define SID_SLIDE_TRANSITIONS_PANEL         (SID_SD_START+334)
 // free
+#define SID_REMOTE_DLG                      (SID_SD_START+337)
 #define SID_CONNECTION_DLG                  (SID_SD_START+338)
 #define SID_PRESENTATION_DLG                (SID_SD_START+339)
 #define SID_HYPHENATION                     (SID_SD_START+340)
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index f009214..6314383 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -202,6 +202,7 @@ public:
     virtual SfxAbstractTabDialog*       CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
     virtual AbstractSdStartPresDlg*     CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
                                                                      const std::vector<String> &rPageNames, List* pCSList ) = 0;
+//     virtual VclAbstractDialog*          CreateSdRemoteDlg( ::Window* pWindow );
     virtual SfxAbstractTabDialog*       CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
     virtual AbstractSdPresLayoutDlg*    CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
     virtual SfxAbstractTabDialog*       CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0;
diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h
index 02839d1..e51869c 100644
--- a/sd/inc/sdcommands.h
+++ b/sd/inc/sdcommands.h
@@ -93,6 +93,7 @@
 #define CMD_SID_OUTLINE_TEXT_AUTOFIT                ".uno.OutlineTextAutofit"
 #define CMD_SID_PAGESETUP                           ".uno:PageSetup"
 #define CMD_SID_PRESENTATION                        ".uno:Presentation"
+#define CMD_SID_REMOTE                              ".uno:Remote"
 #define CMD_SID_PRESENTATION_LAYOUT                 ".uno:PresentationLayout"
 #define CMD_SID_RENAMELAYER                         ".uno:RenameLayer"
 #define CMD_SID_RENAMEPAGE                          ".uno:RenamePage"
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
new file mode 100644
index 0000000..5574c02
--- /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 0000000..df261e9
--- /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 6eb2795..5e4e727 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 31f8e5e..4af3718 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 0000000..5e1a01f
--- /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 0000000..4f90951
--- /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 37fba75..e79d356 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 5970092..2919bda 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 6330708..40af283 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 ) );
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index ba55344..8d379ac 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -289,6 +289,7 @@
             <menu:menuitem menu:id=".uno:Presentation"/>
             <menu:menuitem menu:id=".uno:PresentationDialog"/>
             <menu:menuitem menu:id=".uno:RehearseTimings"/>
+            <menu:menuitem menu:id=".uno:Remote"/>
             <menu:menuseparator/>
             <menu:menuitem menu:id=".uno:AnimationEffects"/>
             <!--menu:menuitem menu:id=".uno:CustomAnimationSchemes" / -->


More information about the Libreoffice-commits mailing list