[Libreoffice-commits] .: Branch 'feature/remote' - 4 commits - android/sdremote sd/source

Andrzej J.R. Hunt ajrhunt at kemper.freedesktop.org
Mon Jul 30 00:56:57 PDT 2012


 android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java               |    6 
 android/sdremote/src/org/libreoffice/impressremote/TestClient.java                         |    2 
 android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java |    1 
 android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java             |   22 +
 android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java            |   10 
 sd/source/ui/inc/RemoteServer.hxx                                                          |   62 ++++
 sd/source/ui/inc/Server.hxx                                                                |   62 ----
 sd/source/ui/remotecontrol/ImagePreparer.cxx                                               |  153 +++++++++-
 sd/source/ui/remotecontrol/ImagePreparer.hxx                                               |    3 
 sd/source/ui/remotecontrol/Listener.cxx                                                    |    2 
 sd/source/ui/remotecontrol/Listener.hxx                                                    |    6 
 sd/source/ui/remotecontrol/Server.cxx                                                      |   30 -
 sd/source/ui/slideshow/slideshowimpl.cxx                                                   |    6 
 13 files changed, 267 insertions(+), 98 deletions(-)

New commits:
commit 2a6b78d243e09d13a4abb490fb63f4a528d6860b
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon Jul 30 09:56:15 2012 +0200

    Basic (unstyled) note export and display working.
    
    Change-Id: Ic17267131d9a777955cd55415e5fe1e106d09e10

diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
index cf45e09..6372556 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
@@ -91,8 +91,10 @@ public class PresentationFragment extends Fragment {
 	}
 
 	private void updateSlideNumberDisplay() {
-		mNumberText.setText((mSlideShow.getCurrentSlide() + 1) + "/"
-		                + mSlideShow.getSize());
+		int aSlide = mSlideShow.getCurrentSlide();
+		mNumberText.setText((aSlide + 1) + "/" + mSlideShow.getSize());
+		mNotes.loadData("<html><body>" + mSlideShow.getNotes(aSlide)
+		                + "</html></body>", "text/html", null);
 	}
 
 	// -------------------------------------------------- RESIZING LISTENER ----
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
index b03c03b..258bff1 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
@@ -34,6 +34,7 @@ public class CommunicationService extends Service {
 	public static final int MSG_SLIDESHOW_STARTED = 1;
 	public static final int MSG_SLIDE_CHANGED = 2;
 	public static final int MSG_SLIDE_PREVIEW = 3;
+	public static final int MSG_SLIDE_NOTES = 4;
 
 	private Transmitter mTransmitter;
 
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
index e78f07e..1cecd49 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
@@ -90,6 +90,28 @@ public class Receiver {
 					// TODO Auto-generated catch block
 					e.printStackTrace();
 				}
+			} else if (aInstruction.equals("slide_notes")) {
+				int aSlideNumber = Integer.parseInt(aCommand.get(1));
+				String aNotes = new String();
+				for (int i = 2; i < aCommand.size(); i++) {
+					aNotes += aCommand.get(i);
+				}
+
+				// Store image internally
+				mSlideShow.putNotes(aSlideNumber, aNotes);
+
+				// Notify the frontend
+				Message aMessage = Message.obtain(null,
+				                CommunicationService.MSG_SLIDE_NOTES);
+				Bundle aData = new Bundle();
+				aData.putInt("slide_number", aSlideNumber);
+				aMessage.setData(aData);
+				try {
+					mActivityMessenger.send(aMessage);
+				} catch (RemoteException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
 			}
 
 		}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
index 75b13a8..74f9ba9 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
@@ -15,6 +15,8 @@ import android.util.SparseArray;
 public class SlideShow {
 
 	private SparseArray<byte[]> mPreviewImages = new SparseArray<byte[]>();
+	private SparseArray<String> mNotes = new SparseArray<String>();
+
 	private int mSize = 0;
 	private int mCurrentSlide = 0;
 
@@ -46,6 +48,14 @@ public class SlideShow {
 		return BitmapFactory.decodeByteArray(aImage, 0, aImage.length);
 	}
 
+	protected void putNotes(int aSlide, String aNotes) {
+		mNotes.put(aSlide, aNotes);
+	}
+
+	public String getNotes(int aSlide) {
+		return mNotes.get(aSlide);
+	}
+
 	// ---------------------------------------------------- TIMER --------------
 	private Timer mTimer = new Timer();
 
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index 17fdc09..fa2f81c 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -38,6 +38,7 @@
 #include <com/sun/star/document/XFilter.hpp>
 #include <com/sun/star/document/XExporter.hpp>
 #include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/presentation/XPresentationPage.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
 
 using namespace ::sd;
@@ -221,16 +222,24 @@ OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber )
     if ( !xController->isRunning() )
         return "";
 
+    uno::Reference<css::drawing::XDrawPage> aNotesPage;
     uno::Reference< drawing::XDrawPage > xSourceDoc(
         xController->getSlideByIndex( aSlideNumber ),
         uno::UNO_QUERY_THROW );
+    uno::Reference<presentation::XPresentationPage> xPresentationPage(
+        xSourceDoc, UNO_QUERY);
+    if (xPresentationPage.is())
+        aNotesPage = xPresentationPage->getNotesPage();
+    else
+        return "";
+
 
     static const ::rtl::OUString sNotesShapeName (
         "com.sun.star.presentation.NotesShape" );
     static const ::rtl::OUString sTextShapeName (
         "com.sun.star.drawing.TextShape" );
 
-    uno::Reference<container::XIndexAccess> xIndexAccess ( xSourceDoc, UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xIndexAccess ( aNotesPage, UNO_QUERY);
     if (xIndexAccess.is())
     {
 
commit f8c0ce790060954a5048516cfc61635292eaefb8
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon Jul 30 09:25:18 2012 +0200

    Notes export now working.
    
    Change-Id: I025c3e6421614c68ea76c9b8afd351abca8b6fad

diff --git a/android/sdremote/src/org/libreoffice/impressremote/TestClient.java b/android/sdremote/src/org/libreoffice/impressremote/TestClient.java
index 501cf97..ee8c57b 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/TestClient.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/TestClient.java
@@ -58,7 +58,6 @@ public class TestClient extends Activity {
 	@Override
 	protected void onPause() {
 		super.onPause();
-		// doUnbindService();
 	}
 
 	@Override
@@ -66,6 +65,7 @@ public class TestClient extends Activity {
 		// TODO Auto-generated method stub
 		mCommunicationService.disconnect();
 		stopService(new Intent(this, CommunicationService.class));
+		doUnbindService();
 		finish();
 		super.onBackPressed();
 	}
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index c129f3b..17fdc09 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -184,8 +184,32 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview(
 void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber )
 {
 
-    OString aOut = prepareNotes( aSlideNumber );
+    OString aNotes = prepareNotes( aSlideNumber );
 
+    if ( aNotes.getLength() == 0 )
+        return;
+
+//     OUStringBuffer aStrBuffer;
+//     ::sax::Converter::encodeBase64( aStrBuffer, aTemp );
+//
+//     OString aNotes = OUStringToOString(
+//         aStrBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
+
+    if ( !xController->isRunning() )
+        return;
+
+    // Start the writing
+    OStringBuffer aBuffer;
+
+    aBuffer.append( "slide_notes\n" );
+
+    aBuffer.append( OString::valueOf( sal_Int32( aSlideNumber ) ).getStr() );
+    aBuffer.append( "\n" );
+
+    aBuffer.append( aNotes );
+    aBuffer.append( "\n\n" );
+    pTransmitter->addMessage( aBuffer.makeStringAndClear(),
+        Transmitter::Priority::LOW );
 }
 
 
commit dcba5859de4bf74b3e9d06353cfaadc0452dd85e
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon Jul 30 09:11:16 2012 +0200

    Note extraction code added.
    
    Change-Id: I94f53dd24122943a4b81fc228115e3da7ff5c90e

diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index b81ff77..c129f3b 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -1,12 +1,30 @@
 /* -*- 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/.
- */
-
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
 #include "ImagePreparer.hxx"
 
 #include <comphelper/processfactory.hxx>
@@ -19,11 +37,14 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/document/XFilter.hpp>
 #include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
 
-using namespace sd;
-using namespace rtl;
-using namespace osl;
+using namespace ::sd;
+using namespace ::rtl;
+using namespace ::osl;
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
 
 ImagePreparer::ImagePreparer(
     const uno::Reference<presentation::XSlideShowController>& rxController,
@@ -51,7 +72,15 @@ void ImagePreparer::execute()
         }
         sendPreview( i );
     }
-    fprintf( stderr, "ImagePreparer done\n" );
+    fprintf( stderr, "Preparing slide notes\n" );
+    for ( sal_uInt32 i = 0; i < aSlides; i++ )
+    {
+        if ( !xController->isRunning() ) // stopped/disposed of.
+        {
+            break;
+        }
+        sendNotes( i );
+    }
     mRef.clear();
 }
 
@@ -105,6 +134,7 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview(
 
     if ( !xController->isRunning() )
         return uno::Sequence<sal_Int8>();
+
     uno::Reference< lang::XComponent > xSourceDoc(
         xController->getSlideByIndex( aSlideNumber ),
         uno::UNO_QUERY_THROW );
@@ -151,4 +181,72 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview(
 
 }
 
+void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber )
+{
+
+    OString aOut = prepareNotes( aSlideNumber );
+
+}
+
+
+// Code copied from sdremote/source/presenter/PresenterNotesView.cxx
+OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber )
+{
+    OUString aRet("");
+
+    if ( !xController->isRunning() )
+        return "";
+
+    uno::Reference< drawing::XDrawPage > xSourceDoc(
+        xController->getSlideByIndex( aSlideNumber ),
+        uno::UNO_QUERY_THROW );
+
+    static const ::rtl::OUString sNotesShapeName (
+        "com.sun.star.presentation.NotesShape" );
+    static const ::rtl::OUString sTextShapeName (
+        "com.sun.star.drawing.TextShape" );
+
+    uno::Reference<container::XIndexAccess> xIndexAccess ( xSourceDoc, UNO_QUERY);
+    if (xIndexAccess.is())
+    {
+
+        // Iterate over all shapes and find the one that holds the text.
+        sal_Int32 nCount (xIndexAccess->getCount());
+        for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
+        {
+
+            uno::Reference<lang::XServiceName> xServiceName (
+                xIndexAccess->getByIndex(nIndex), UNO_QUERY);
+            if (xServiceName.is()
+                && xServiceName->getServiceName().equals(sNotesShapeName))
+            {
+                uno::Reference<text::XTextRange> xText (xServiceName, UNO_QUERY);
+                if (xText.is())
+                {
+                    aRet += xText->getString();
+                }
+            }
+            else
+            {
+                uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor (
+                    xIndexAccess->getByIndex(nIndex), UNO_QUERY);
+                if (xShapeDescriptor.is())
+                {
+                    ::rtl::OUString sType (xShapeDescriptor->getShapeType());
+                    if (sType.equals(sNotesShapeName) || sType.equals(sTextShapeName))
+                    {
+                        uno::Reference<text::XTextRange> xText (
+                            xIndexAccess->getByIndex(nIndex), UNO_QUERY);
+                        if (xText.is())
+                        {
+                            aRet += xText->getString();
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return OUStringToOString(
+        aRet, RTL_TEXTENCODING_UTF8 );
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.hxx b/sd/source/ui/remotecontrol/ImagePreparer.hxx
index 7f193bb..130eeb6 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.hxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.hxx
@@ -42,6 +42,9 @@ private:
     void sendPreview( sal_uInt32 aSlideNumber );
     css::uno::Sequence<sal_Int8> preparePreview( sal_uInt32 aSlideNumber,
                 sal_uInt32 aWidth, sal_uInt32 aHeight, sal_uInt64 &rSize );
+
+    void sendNotes( sal_uInt32 aSlideNumber );
+    rtl::OString prepareNotes( sal_uInt32 aSlideNumber );
 };
 
 }
commit 1b97496689690f3c318c6900109776d799ea3a9d
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon Jul 30 08:34:41 2012 +0200

    Renamed Server to RemoteServer for obviousness.
    
    Change-Id: Ia935a97fe57eb1259c3426f0414bec7362f2e8cf

diff --git a/sd/source/ui/inc/RemoteServer.hxx b/sd/source/ui/inc/RemoteServer.hxx
new file mode 100644
index 0000000..37fba75
--- /dev/null
+++ b/sd/source/ui/inc/RemoteServer.hxx
@@ -0,0 +1,62 @@
+/* -*- 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_IMPRESSREMOTE_SERVER_HXX
+#define _SD_IMPRESSREMOTE_SERVER_HXX
+
+// SERVER
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <osl/socket.hxx>
+#include <rtl/ref.hxx>
+#include <salhelper/thread.hxx>
+
+#include <com/sun/star/presentation/XSlideShowController.hpp>
+
+namespace css = ::com::sun::star;
+
+/**
+* The port for use for the main communication between LibO and remote control app.
+*/
+#define PORT 1599
+
+#define CHARSET RTL_TEXTENCODING_UTF8
+
+namespace sd
+{
+
+    class Transmitter;
+    class Listener;
+    class ImagePreparer;
+
+    class RemoteServer : public salhelper::Thread
+    {
+        public:
+            static void setup();
+            static void presentationStarted( const css::uno::Reference<
+                css::presentation::XSlideShowController > &rController );
+            static void presentationStopped();
+            void informListenerDestroyed();
+        private:
+            RemoteServer();
+            ~RemoteServer();
+            static RemoteServer *spServer;
+            osl::AcceptorSocket mSocket;
+            osl::StreamSocket mStreamSocket;
+            void listenThread();
+            void execute();
+            static Transmitter *pTransmitter;
+            static rtl::Reference<Listener> mListener;
+    };
+}
+
+#endif // _SD_IMPRESSREMOTE_SERVER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sd/source/ui/inc/Server.hxx b/sd/source/ui/inc/Server.hxx
deleted file mode 100644
index f3595ad..0000000
--- a/sd/source/ui/inc/Server.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- 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_IMPRESSREMOTE_SERVER_HXX
-#define _SD_IMPRESSREMOTE_SERVER_HXX
-
-// SERVER
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#include <osl/socket.hxx>
-#include <rtl/ref.hxx>
-#include <salhelper/thread.hxx>
-
-#include <com/sun/star/presentation/XSlideShowController.hpp>
-
-namespace css = ::com::sun::star;
-
-/**
-* The port for use for the main communication between LibO and remote control app.
-*/
-#define PORT 1599
-
-#define CHARSET RTL_TEXTENCODING_UTF8
-
-namespace sd
-{
-
-    class Transmitter;
-    class Listener;
-    class ImagePreparer;
-
-    class Server : public salhelper::Thread
-    {
-        public:
-            static void setup();
-            static void presentationStarted( const css::uno::Reference<
-                css::presentation::XSlideShowController > &rController );
-            static void presentationStopped();
-            void informListenerDestroyed();
-        private:
-            Server();
-            ~Server();
-            static Server *spServer;
-            osl::AcceptorSocket mSocket;
-            osl::StreamSocket mStreamSocket;
-            void listenThread();
-            void execute();
-            static Transmitter *pTransmitter;
-            static rtl::Reference<Listener> mListener;
-    };
-}
-
-#endif // _SD_IMPRESSREMOTE_SERVER_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sd/source/ui/remotecontrol/Listener.cxx b/sd/source/ui/remotecontrol/Listener.cxx
index 2aac478..016becb 100644
--- a/sd/source/ui/remotecontrol/Listener.cxx
+++ b/sd/source/ui/remotecontrol/Listener.cxx
@@ -22,7 +22,7 @@ using rtl::OString;
 using rtl::OStringBuffer;
 
 
-Listener::Listener( const ::rtl::Reference<Server>& rServer, sd::Transmitter *aTransmitter  )
+Listener::Listener( const ::rtl::Reference<RemoteServer>& rServer, sd::Transmitter *aTransmitter  )
     : ::cppu::WeakComponentImplHelper1< XSlideShowListener >( m_aMutex ),
       mServer( rServer ),
       pTransmitter( NULL ),
diff --git a/sd/source/ui/remotecontrol/Listener.hxx b/sd/source/ui/remotecontrol/Listener.hxx
index 1fc411d..1a1226d 100644
--- a/sd/source/ui/remotecontrol/Listener.hxx
+++ b/sd/source/ui/remotecontrol/Listener.hxx
@@ -19,7 +19,7 @@
 #include <osl/socket.hxx>
 #include <rtl/ref.hxx>
 
-#include "Server.hxx"
+#include "RemoteServer.hxx"
 #include "Transmitter.hxx"
 #include "ImagePreparer.hxx"
 
@@ -35,7 +35,7 @@ class Listener
       public ::cppu::WeakComponentImplHelper1< css::presentation::XSlideShowListener >
 {
 public:
-    Listener( const ::rtl::Reference<Server>& rServer, sd::Transmitter *aTransmitter );
+    Listener( const ::rtl::Reference<RemoteServer>& rServer, sd::Transmitter *aTransmitter );
     ~Listener();
     void init( const css::uno::Reference< css::presentation::XSlideShowController >& aController );
 
@@ -65,7 +65,7 @@ public:
     throw (com::sun::star::uno::RuntimeException);
 
 private:
-    rtl::Reference<Server> mServer;
+    rtl::Reference<RemoteServer> mServer;
     sd::Transmitter *pTransmitter;
     css::uno::Reference< css::presentation::XSlideShowController > mController;
     rtl::Reference<sd::ImagePreparer> mPreparer;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 2f67d17..3b896fe 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -17,24 +17,24 @@
 #include "ImagePreparer.hxx"
 #include "Listener.hxx"
 #include "Receiver.hxx"
-#include "Server.hxx"
+#include "RemoteServer.hxx"
 
 using namespace std;
 using namespace sd;
 using namespace ::com::sun::star;
 using rtl::OString;
 
-Server::Server()
-:  Thread( "ServerThread" ), mSocket()
+RemoteServer::RemoteServer()
+:  Thread( "RemoteServerThread" ), mSocket()
 {
 }
 
-Server::~Server()
+RemoteServer::~RemoteServer()
 {
 }
 
 // Run as a thread
-void Server::listenThread()
+void RemoteServer::listenThread()
 {
     pTransmitter = new Transmitter( mStreamSocket );
     pTransmitter->launch();
@@ -98,7 +98,7 @@ void Server::listenThread()
 }
 
 
-void Server::execute()
+void RemoteServer::execute()
 {
     osl::SocketAddr aAddr( "0", PORT );
     if ( !mSocket.bind( aAddr ) )
@@ -120,12 +120,12 @@ void Server::execute()
 
 }
 
-void Server::informListenerDestroyed()
+void RemoteServer::informListenerDestroyed()
 {
     mListener.clear();
 }
 
-void Server::presentationStarted( const css::uno::Reference<
+void RemoteServer::presentationStarted( const css::uno::Reference<
      css::presentation::XSlideShowController > &rController )
 {
     if ( pTransmitter )
@@ -135,7 +135,7 @@ void Server::presentationStarted( const css::uno::Reference<
     }
 }
 
-void Server::presentationStopped()
+void RemoteServer::presentationStopped()
 {
     if ( mListener.is() )
     {
@@ -144,23 +144,23 @@ void Server::presentationStopped()
     }
 }
 
-Server *sd::Server::spServer = NULL;
-Transmitter *sd::Server::pTransmitter = NULL;
-rtl::Reference<Listener> sd::Server::mListener = NULL;
+RemoteServer *sd::RemoteServer::spServer = NULL;
+Transmitter *sd::RemoteServer::pTransmitter = NULL;
+rtl::Reference<Listener> sd::RemoteServer::mListener = NULL;
 
-void Server::setup()
+void RemoteServer::setup()
 {
   if (spServer)
     return;
 
-  spServer = new Server();
+  spServer = new RemoteServer();
   spServer->launch();
 }
 
 void SdDLL::RegisterRemotes()
 {
   fprintf( stderr, "Register our remote control goodness\n" );
-  sd::Server::setup();
+  sd::RemoteServer::setup();
 
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index d560417..f356822 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -82,7 +82,7 @@
 #include "canvas/elapsedtime.hxx"
 #include "avmedia/mediawindow.hxx"
 #include  "svtools/colrdlg.hxx"
-#include "Server.hxx"
+#include "RemoteServer.hxx"
 #include <boost/noncopyable.hpp>
 #include <boost/bind.hpp>
 
@@ -613,7 +613,7 @@ SlideshowImpl::~SlideshowImpl()
 
 void SAL_CALL SlideshowImpl::disposing()
 {
-    Server::presentationStopped();
+    RemoteServer::presentationStopped();
     if( mxShow.is() && mpDoc )
         NotifyDocumentEvent( mpDoc, "OnEndPresentation" );
 
@@ -1513,7 +1513,7 @@ void SAL_CALL SlideshowImpl::resume() throw (RuntimeException)
                 comphelper::anyToString( cppu::getCaughtException() ),
                 RTL_TEXTENCODING_UTF8 )).getStr() );
     }
-    Server::presentationStarted( this );
+    RemoteServer::presentationStarted( this );
 }
 
 // ---------------------------------------------------------


More information about the Libreoffice-commits mailing list