diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-20 10:45:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-20 11:01:54 +0100 |
commit | 9aa1b2d05848b4598cbf49da9f7f2bd509ace88e (patch) | |
tree | 05fe3792c77bc9bce83710fe64b1bb292849a22e /framework | |
parent | a8a1180056960ef689578db8e6d3542f0d3c7360 (diff) |
survive missing configuration
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 59cb3b531e2b..efa4dfb901ae 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -122,12 +122,18 @@ ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons , m_aListenerContainer( m_aLock.getShareableOslMutex() ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier" ); - // Retrieve known modules and insert them into our boost::unordered_map to speed-up access time. - Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY ); - const Sequence< ::rtl::OUString > aNameSeq = xNameAccess->getElementNames(); - const ::rtl::OUString* pNameSeq = aNameSeq.getConstArray(); - for ( sal_Int32 n = 0; n < aNameSeq.getLength(); n++ ) - m_aModuleToModuleUICfgMgrMap.insert( ModuleToModuleCfgMgr::value_type( pNameSeq[n], Reference< XUIConfigurationManager >() )); + try + { + // Retrieve known modules and insert them into our boost::unordered_map to speed-up access time. + Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY_THROW ); + const Sequence< ::rtl::OUString > aNameSeq = xNameAccess->getElementNames(); + const ::rtl::OUString* pNameSeq = aNameSeq.getConstArray(); + for ( sal_Int32 n = 0; n < aNameSeq.getLength(); n++ ) + m_aModuleToModuleUICfgMgrMap.insert( ModuleToModuleCfgMgr::value_type( pNameSeq[n], Reference< XUIConfigurationManager >() )); + } + catch(...) + { + } } ModuleUIConfigurationManagerSupplier::~ModuleUIConfigurationManagerSupplier() |