summaryrefslogtreecommitdiff
path: root/tubes/source/manager.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-10-10 20:28:44 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-10-10 20:55:25 +0200
commit1ad0aef2ab81eeb96396bd0bce1203f3f6e681af (patch)
tree378581251691e20d7bdb6d83fd6f6a2d7d434340 /tubes/source/manager.cxx
parent6f543a4309115008cf5b5b40eea0fe4dab9eb5c5 (diff)
tubes: getProcessServiceFactory does not return NULL anymore
Change-Id: I3e5e2e2c826a732028c1ffc32b9620d22c3409d1
Diffstat (limited to 'tubes/source/manager.cxx')
-rw-r--r--tubes/source/manager.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index 80899767bc97..26b4872a0a37 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -269,26 +269,23 @@ void TeleManager_fileReceived( const OUString& rStr, const OString& rUuid )
}
TeleManager::setCurrentUuid( sUuid );
- css::uno::Reference< css::lang::XMultiServiceFactory > rFactory =
- ::comphelper::getProcessServiceFactory();
-
- // Should happen only for unit test
- if (rFactory == NULL)
- return;
-
- css::uno::Sequence < css::beans::PropertyValue > args(0);
try
{
+ css::uno::Reference< css::lang::XMultiServiceFactory > rFactory =
+ comphelper::getProcessServiceFactory();
+
css::uno::Reference < css::frame::XComponentLoader > xLoader(
::comphelper::getProcessServiceFactory()->createInstance(
"com.sun.star.frame.Desktop" ),
css::uno::UNO_QUERY_THROW );
+ css::uno::Sequence < css::beans::PropertyValue > args(0);
css::uno::Reference < css::util::XCloseable > xDoc(
xLoader->loadComponentFromURL( rStr, "_blank", 0, args ),
css::uno::UNO_QUERY_THROW );
}
catch ( const css::uno::Exception& e )
{
+ // Expected to happen for unit test
SAL_WARN( "tubes", "TeleManager_fileReceived: exception when loading: " << e.Message );
}
}