[Libreoffice-commits] .: Branch 'feature/remote' - 2 commits - sd/source
Michael Meeks
michael at kemper.freedesktop.org
Thu Jul 12 10:01:57 PDT 2012
sd/source/ui/remotecontrol/Listener.hxx | 2 -
sd/source/ui/remotecontrol/Receiver.cxx | 42 +++++++++++++++-----------------
sd/source/ui/remotecontrol/Receiver.hxx | 11 +++-----
sd/source/ui/remotecontrol/Server.cxx | 2 -
4 files changed, 27 insertions(+), 30 deletions(-)
New commits:
commit 57a8c43da65b0a2e4914965c29701f40a7fa11c6
Author: Michael Meeks <michael.meeks at suse.com>
Date: Thu Jul 12 17:59:08 2012 +0100
some namespace cleanups and explict type for Anys
Change-Id: I213989f2272929143d1d896a3dd28a8eb61035be
diff --git a/sd/source/ui/remotecontrol/Listener.hxx b/sd/source/ui/remotecontrol/Listener.hxx
index 8b2b97f..8c2ef1b 100644
--- a/sd/source/ui/remotecontrol/Listener.hxx
+++ b/sd/source/ui/remotecontrol/Listener.hxx
@@ -18,6 +18,7 @@
#include <osl/socket.hxx>
namespace css = ::com::sun::star;
+
namespace sd {
class Listener
: protected ::cppu::BaseMutex,
@@ -43,4 +44,4 @@ private:
};
}
#endif // _SD_IMPRESSREMOTE_LISTENER_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 06c9328..59fb4f2 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -19,13 +19,9 @@
#include <xmlsec/base64.h>
#include <rtl/ustrbuf.hxx>
#include <sax/tools/converter.hxx>
+
using namespace sd;
-// using namespace ::com::sun::star::presentation;
-// using namespace ::com::sun::star;
-// using namespace ::com::sun::star::frame;
-// using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::document;
-namespace css = ::com::sun::star;
+using namespace ::com::sun::star;
using rtl::OUString;
using rtl::OString;
using namespace ::osl;
@@ -39,7 +35,8 @@ Receiver::~Receiver()
{
}
-void Receiver::executeCommand( JsonObject *aObject, css::uno::Reference<css::presentation::XSlideShowController> xSlideShowController )
+void Receiver::executeCommand( JsonObject *aObject,
+ uno::Reference<presentation::XSlideShowController> xSlideShowController )
{
const char* aInstruction = json_node_get_string( json_object_get_member( aObject, "command" ) );
@@ -108,7 +105,8 @@ void Receiver::parseCommand( const char* aCommand, sal_Int32 size, osl::StreamSo
}
-void sendPreview(sal_uInt32 aSlideNumber, Reference<XSlideShowController> xSlideShowController, osl::StreamSocket &mStreamSocket )
+void sendPreview(sal_uInt32 aSlideNumber,
+ uno::Reference<presentation::XSlideShowController> xSlideShowController, osl::StreamSocket &mStreamSocket )
{
sal_uInt64 aSize; // Unused
@@ -134,38 +132,39 @@ void sendPreview(sal_uInt32 aSlideNumber, Reference<XSlideShowController> xSlide
}
-Sequence<sal_Int8> preparePreview(sal_uInt32 aSlideNumber, Reference<XSlideShowController> xSlideShowController, sal_uInt32 aWidth, sal_uInt32 aHeight, sal_uInt64 &rSize )
+uno::Sequence<sal_Int8>
+preparePreview(sal_uInt32 aSlideNumber,
+ uno::Reference<presentation::XSlideShowController> xSlideShowController,
+ sal_uInt32 aWidth, sal_uInt32 aHeight, sal_uInt64 &rSize )
{
-
+ (void)aWidth; (void)aHeight; // FIXME: remove me when I'm used
// Create temp file
OUString aFileURL;
FileBase::createTempFile( 0, 0, &aFileURL );
+ uno::Reference< lang::XMultiServiceFactory > xServiceManager(
+ ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- css::uno::Reference< css::lang::XMultiServiceFactory > xServiceManager(
- ::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW );
-
- css::uno::Reference< css::document::XFilter > xFilter( xServiceManager->createInstance(
- "com.sun.star.drawing.GraphicExportFilter" ) , css::uno::UNO_QUERY_THROW );
-
- css::uno::Reference< css::document::XExporter > xExporter( xFilter, css::uno::UNO_QUERY_THROW );
+ uno::Reference< document::XFilter > xFilter( xServiceManager->createInstance(
+ "com.sun.star.drawing.GraphicExportFilter" ) , uno::UNO_QUERY_THROW );
+ uno::Reference< document::XExporter > xExporter( xFilter, uno::UNO_QUERY_THROW );
css::uno::Reference< css::lang::XComponent > xSourceDoc(
xSlideShowController->getSlideByIndex( aSlideNumber ) , css::uno::UNO_QUERY_THROW );
xExporter->setSourceDocument( xSourceDoc );
- css::uno::Sequence< css::beans::PropertyValue > aFilterData(3);
+ uno::Sequence< beans::PropertyValue > aFilterData(3);
aFilterData[0].Name = "PixelWidth";
- aFilterData[0].Value <<= 2000;
+ aFilterData[0].Value <<= sal_Int32(2000);
aFilterData[1].Name = "PixelHeight";
- aFilterData[1].Value <<= 2000;
+ aFilterData[1].Value <<= sal_Int32(2000);
// Add quality if jpg "Quality" [1-100]
// FIXME: is setting color mode needed.
aFilterData[2].Name = "ColorMode";
- aFilterData[2].Value <<= 0; // Color
+ aFilterData[2].Value <<= sal_Int32(0); // Color
css::uno::Sequence< css::beans::PropertyValue > aProps(3);
aProps[0].Name = "MediaType";
@@ -198,4 +197,4 @@ Sequence<sal_Int8> preparePreview(sal_uInt32 aSlideNumber, Reference<XSlideShowC
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 04c51bd..e6b7d9f 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -11,6 +11,7 @@
#include "sddll.hxx"
#include "Server.hxx"
+#include "Receiver.hxx"
using namespace std;
using namespace sd;
@@ -110,4 +111,4 @@ void SdDLL::RegisterRemotes()
sd::Server::setup();
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7d99792abb7eb3bebef0b853a24637eba1fe8f94
Author: Michael Meeks <michael.meeks at suse.com>
Date: Thu Jul 12 14:36:57 2012 +0100
namespacing / compile fixing
Change-Id: Iead86be0a7b08213ae83870707bbcf3333a8bf10
diff --git a/sd/source/ui/remotecontrol/Receiver.hxx b/sd/source/ui/remotecontrol/Receiver.hxx
index 4590cde..15919f3 100644
--- a/sd/source/ui/remotecontrol/Receiver.hxx
+++ b/sd/source/ui/remotecontrol/Receiver.hxx
@@ -19,8 +19,8 @@
#include <glib-object.h>
#include <json-glib/json-glib.h>
-using namespace com::sun::star::presentation;
-using namespace com::sun::star::uno;
+namespace css = ::com::sun::star;
+
namespace sd
{
@@ -33,15 +33,15 @@ public:
private:
- void executeCommand( JsonObject *aObject, Reference<XSlideShowController> aController );
+ void executeCommand( JsonObject *aObject, css::uno::Reference<css::presentation::XSlideShowController> aController );
};
}
-Sequence<sal_Int8> preparePreview(sal_uInt32 aSlideNumber, Reference<XSlideShowController> xSlideShowController, sal_uInt32 aWidth, sal_uInt32 aHeight, sal_uInt64 &aSize );
+css::uno::Sequence<sal_Int8> preparePreview(sal_uInt32 aSlideNumber, css::uno::Reference<css::presentation::XSlideShowController> xSlideShowController, sal_uInt32 aWidth, sal_uInt32 aHeight, sal_uInt64 &aSize );
-void sendPreview(sal_uInt32 aSlideNumber, Reference<XSlideShowController> xSlideShowController, osl::StreamSocket &mStreamSocket );
+void sendPreview(sal_uInt32 aSlideNumber, css::uno::Reference<css::presentation::XSlideShowController> xSlideShowController, osl::StreamSocket &mStreamSocket );
#endif // _SD_IMPRESSREMOTE_RECEIVER_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list