dbaccess/source/core/dataaccess/databasedocument.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit ebc572c4366b871c737cd4785a48111c1344cad2 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Thu Feb 3 20:57:45 2022 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Feb 4 08:00:52 2022 +0100 Simplify a bit ODatabaseDocument::impl_getUntitledHelper_throw No need to call "m_xModuleManager->identify" which throws if the component var is an empty ref then do nothing with the exception. Change-Id: I213aaa3bf4c67c2a1b94b725283b2421c904abba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129474 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 4fce39de0b35..51a3457f7668 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2108,16 +2108,15 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext) ); OUString sModuleId; - try + uno::Reference< frame::XUntitledNumbers > xNumberedControllers; + TNumberedController::const_iterator aFind = m_aNumberedControllers.end(); + + if (_xComponent.is()) { sModuleId = m_xModuleManager->identify( _xComponent ); + aFind = m_aNumberedControllers.find(sModuleId); } - catch(const uno::Exception&) - { - } - uno::Reference< frame::XUntitledNumbers > xNumberedControllers; - TNumberedController::const_iterator aFind = m_aNumberedControllers.find(sModuleId); if ( aFind == m_aNumberedControllers.end() ) { rtl::Reference<::comphelper::NumberedCollection> pHelper = new ::comphelper::NumberedCollection();