summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/core/dataaccess/definitioncontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/core/dataaccess/definitioncontainer.cxx')
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 8f3378d69748..807dc5ec98c3 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -22,7 +22,8 @@
#include <strings.hrc>
#include <strings.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <comphelper/enumhelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
@@ -286,7 +287,7 @@ void ODefinitionContainer::notifyByName( ResettableMutexGuard& _rGuard, const OU
if ( !rContainer.getLength() )
return;
- ContainerEvent aEvent( *this, makeAny( _rName ), makeAny( _xNewElement ), makeAny( _xOldElement ) );
+ ContainerEvent aEvent( *this, Any( _rName ), Any( _xNewElement ), Any( _xOldElement ) );
_rGuard.clear();
switch ( _eOperation )
@@ -372,7 +373,7 @@ Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex )
{
MutexGuard aGuard(m_aMutex);
- if ((_nIndex < 0) || (_nIndex >= static_cast<sal_Int32>(m_aDocuments.size())))
+ if ((_nIndex < 0) || (o3tl::make_unsigned(_nIndex) >= m_aDocuments.size()))
throw IndexOutOfBoundsException();
Documents::iterator aPos = m_aDocuments[_nIndex];
@@ -385,14 +386,14 @@ Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex )
// and update the name-access map
}
- return makeAny(xProp);
+ return Any(xProp);
}
Any SAL_CALL ODefinitionContainer::getByName( const OUString& _rName )
{
MutexGuard aGuard(m_aMutex);
- return makeAny( implGetByName( _rName, true ) );
+ return Any( implGetByName( _rName, true ) );
}
Reference< XContent > ODefinitionContainer::implGetByName(const OUString& _rName, bool _bReadIfNecessary)
@@ -532,7 +533,7 @@ void ODefinitionContainer::implAppend(const OUString& _rName, const Reference< X
// #i44786#
lcl_ensureName( _rxNewObject, _rName );
- ::rtl::Reference< OContentHelper > pContent = comphelper::getFromUnoTunnel<OContentHelper>( _rxNewObject );
+ ::rtl::Reference< OContentHelper > pContent = dynamic_cast<OContentHelper*>( _rxNewObject.get() );
if ( pContent.is() )
{
TContentPtr pImpl = pContent->getImpl();
@@ -591,7 +592,7 @@ void ODefinitionContainer::approveNewObject(const OUString& _sName,const Referen
DBA_RES( RID_STR_NAME_ALREADY_USED ),
*this );
- ::rtl::Reference< OContentHelper > pContent( comphelper::getFromUnoTunnel<OContentHelper>( _rxObject ) );
+ ::rtl::Reference< OContentHelper > pContent( dynamic_cast<OContentHelper*>( _rxObject.get() ) );
if ( !pContent.is() )
throw IllegalArgumentException(
DBA_RES( RID_STR_OBJECT_CONTAINER_MISMATCH ),