summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-02-03 20:57:45 +0100
committerJulien Nabet <serval2412@yahoo.fr>2022-02-04 08:00:52 +0100
commitebc572c4366b871c737cd4785a48111c1344cad2 (patch)
treeafb4ce1d6d9909931d021412aed7cb42ea968e02 /dbaccess
parentbcf10015c5d12d363d0be9f6da25092c83112692 (diff)
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 <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx11
1 files changed, 5 insertions, 6 deletions
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();