summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-05 14:55:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-05 14:56:19 +0200
commit24391f605703bda1bcfa99ef06e5a73c6b52d267 (patch)
tree3a4cf9732c8a8c82b56cdc038e5dfda857cdc518 /basic
parent1c7a54e3a14ad932e68b9281420e6c469e5dd2e5 (diff)
Some clean up of previous commit
Change-Id: I14097acf09e9663af7d7abc5f0c9d481880ecc51
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/vbahelper.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx
index 6b07178bf5a0..d5c24667f39a 100644
--- a/basic/source/basmgr/vbahelper.cxx
+++ b/basic/source/basmgr/vbahelper.cxx
@@ -42,18 +42,10 @@ namespace {
/** Create an instance of a module manager.
*/
-uno::Reference< frame::XModuleManager > lclCreateModuleManager()
+uno::Reference< frame::XModuleManager2 > lclCreateModuleManager()
{
- uno::Reference< frame::XModuleManager > xModuleManager;
- try
- {
- uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext(), uno::UNO_QUERY_THROW );
- xModuleManager.set( frame::ModuleManager::create(xContext), uno::UNO_QUERY );
- }
- catch(const uno::Exception& )
- {
- }
- return xModuleManager;
+ uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext(), uno::UNO_QUERY_THROW );
+ return frame::ModuleManager::create(xContext);
}
// ----------------------------------------------------------------------------
@@ -76,7 +68,7 @@ DocumentsEnumeration::DocumentsEnumeration( const uno::Reference< frame::XModel
{
try
{
- uno::Reference< frame::XModuleManager > xModuleManager( lclCreateModuleManager(), uno::UNO_SET_THROW );
+ uno::Reference< frame::XModuleManager2 > xModuleManager( lclCreateModuleManager() );
::rtl::OUString aIdentifier = xModuleManager->identify( rxModel );
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XDesktop > xDesktop( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), uno::UNO_QUERY_THROW );
@@ -213,7 +205,7 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c
::osl::MutexGuard aGuard( rPool.maMutex );
try
{
- uno::Reference< frame::XModuleManager > xModuleManager( lclCreateModuleManager(), uno::UNO_SET_THROW );
+ uno::Reference< frame::XModuleManager2 > xModuleManager( lclCreateModuleManager() );
::rtl::OUString aIdentifier = xModuleManager->identify( rxModel );
if( !aIdentifier.isEmpty() )
rPool.maCurrDirs[ aIdentifier ] = rPath;