diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 15:17:44 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 21:39:15 +0200 |
commit | baa7114906108b655f09fcd6d6c593d3212967bb (patch) | |
tree | d2ed2e04fe06622926f1921a18a4985ea1ae47ab /tubes | |
parent | tubes: move ScDocFuncRecv::fileReceived to TeleManager_fileReceived (diff) | |
download | core-baa7114906108b655f09fcd6d6c593d3212967bb.tar.gz core-baa7114906108b655f09fcd6d6c593d3212967bb.zip |
tubes: clean up commented out code, headers
Change-Id: I5962fb38d2320199e9c45c6f339131755f817960
Diffstat (limited to 'tubes')
-rw-r--r-- | tubes/inc/tubes/manager.hxx | 1 | ||||
-rw-r--r-- | tubes/source/manager.cxx | 51 |
2 files changed, 6 insertions, 46 deletions
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx index 21ee3c30eec9..f495c247ada3 100644 --- a/tubes/inc/tubes/manager.hxx +++ b/tubes/inc/tubes/manager.hxx @@ -39,7 +39,6 @@ #include <rtl/ref.hxx> #include <tools/link.hxx> #include <telepathy-glib/telepathy-glib.h> -#include <map> // For testing purposes, we might need more in future. #define LIBO_TUBES_DBUS_INTERFACE "org.libreoffice.calc" diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx index c7ef062227a5..e43612c1d587 100644 --- a/tubes/source/manager.cxx +++ b/tubes/source/manager.cxx @@ -28,24 +28,17 @@ #include "tubes/manager.hxx" #include "tubes/constants.h" -#include <rtl/strbuf.hxx> -#include <rtl/uuid.h> -#include <osl/mutex.hxx> -#include <cstring> -// new file send/recv fun ... #include <com/sun/star/uno/Sequence.hxx> -#include <unotools/tempfile.hxx> -#include <unotools/localfilehelper.hxx> -#include <comphelper/mediadescriptor.hxx> -#include <comphelper/processfactory.hxx> -#include <comphelper/componentcontext.hxx> -#include <com/sun/star/frame/XLoadable.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/document/XDocumentRecovery.hpp> #include <com/sun/star/util/XCloseable.hpp> +#include <comphelper/processfactory.hxx> +#include <osl/mutex.hxx> +#include <rtl/strbuf.hxx> +#include <rtl/uuid.h> +#include <map> namespace css = ::com::sun::star; @@ -193,42 +186,10 @@ SAL_DLLPUBLIC_EXPORT void TeleManager_fileReceived( const rtl::OUString &rStr ) fprintf( stderr, "incoming file '%s'\n", rtl::OUStringToOString( rStr, RTL_TEXTENCODING_UTF8 ).getStr() ); - // using the frame::XLoadable interface fails with a DoubleInitializationException -/* css::uno::Sequence < css::beans::PropertyValue > aLoadArgs(5); - aLoadArgs[0].Name = rtl::OUString( "URL" ); - aLoadArgs[0].Value <<= rpStr; - aLoadArgs[1].Name = rtl::OUString( "FilterName" ); - aLoadArgs[1].Value <<= rtl::OUString( "calc8" ); - aLoadArgs[2].Name = rtl::OUString( "Referer" ); - aLoadArgs[2].Value <<= rtl::OUString( "" ); - // no interaction handler ? - aLoadArgs[3].Name = rtl::OUString( "MacroExecutionMode" ); - aLoadArgs[3].Value <<= sal_Int32( 3 ); - aLoadArgs[4].Name = rtl::OUString( "UpdateDocMode" ); - aLoadArgs[4].Value <<= sal_Int32( 2 ); - try - { - css::uno::Reference < css::frame::XLoadable > xLoad( - rDocShell.GetBaseModel(), css::uno::UNO_QUERY_THROW ); - xLoad->load( aLoadArgs ); - } - catch ( css::uno::Exception& e ) - { - fprintf( stderr, "exception when loading '%s' !\n", - rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); - } */ -// #2 - tried out the SfxAutoReloadTimer_Impl - shove stuff at the SID_RELOAD slot ... - -// #3 - can we use the framework/inc/services/frame.hxx 's "sTargetFrameName" -// magic to load into our current frame ? ... :-) - css::uno::Reference< css::lang::XMultiServiceFactory > rFactory = ::comphelper::getProcessServiceFactory(); css::uno::Sequence < css::beans::PropertyValue > args(0); -// FIXME: should this be hidden before it is synched & ready ? ... -// args[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden")); -// args[0].Value <<= sal_True; try { css::uno::Reference < css::frame::XComponentLoader > xLoader( @@ -239,7 +200,7 @@ SAL_DLLPUBLIC_EXPORT void TeleManager_fileReceived( const rtl::OUString &rStr ) xLoader->loadComponentFromURL( rStr, "_blank", 0, args ), css::uno::UNO_QUERY_THROW ); } - catch ( css::uno::Exception& e ) + catch ( const css::uno::Exception& e ) { fprintf( stderr, "exception when loading '%s' !\n", rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); |