diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-10-05 13:05:05 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-10-05 20:35:59 +0200 |
commit | 74410e57bda7ec355e92ced5c21c956f83a0f6b7 (patch) | |
tree | ef18da59d1877c0f6394d43d56b2a523d187ad64 | |
parent | 27d0c8cbba2a9c2b6aa43e97d56f62d15b3b5bca (diff) |
Replace useless lcl_throwIllegalArgumentException function (forms)
Change-Id: Icad8c36ef91edd12da8cc533e3ce24c0000a8a28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157590
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index f7278117899c..90a918f5edcd 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -71,15 +71,6 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::form; using namespace ::com::sun::star::util; -namespace -{ - - void lcl_throwIllegalArgumentException() - { - throw IllegalArgumentException(); - } -} - static bool lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) { @@ -739,17 +730,17 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r // it has to support our element type interface Any aCorrectType = _rxObject->queryInterface( m_aElementType ); if ( !aCorrectType.hasValue() ) - lcl_throwIllegalArgumentException(); + throw IllegalArgumentException(); // it has to have a "Name" property if ( !hasProperty( PROPERTY_NAME, _rxObject ) ) - lcl_throwIllegalArgumentException(); + throw IllegalArgumentException(); // it has to be a child, and it must not have a parent already Reference< XChild > xChild( _rxObject, UNO_QUERY ); if ( !xChild.is() || xChild->getParent().is() ) { - lcl_throwIllegalArgumentException(); + throw IllegalArgumentException(); } // passed all tests. cache the information we have so far @@ -1107,14 +1098,14 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any throw NoSuchElementException(); if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE) - lcl_throwIllegalArgumentException(); + throw IllegalArgumentException(); Reference<XPropertySet> xSet; Element >>= xSet; if (xSet.is()) { if (!hasProperty(PROPERTY_NAME, xSet)) - lcl_throwIllegalArgumentException(); + throw IllegalArgumentException(); xSet->setPropertyValue(PROPERTY_NAME, Any(Name)); } |