summaryrefslogtreecommitdiffstats
path: root/extensions/source/propctrlr/genericpropertyhandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr/genericpropertyhandler.cxx')
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx26
1 files changed, 21 insertions, 5 deletions
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 014b4cf55f0f..322bc3405143 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -39,8 +39,9 @@
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
+#include <o3tl/safeint.hxx>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -166,7 +167,7 @@ namespace pcr
sal_Int32 index = std::find( std::cbegin(aValues), std::cend(aValues), nAsInt ) - std::cbegin(aValues);
std::vector< OUString > aDescriptions( getDescriptions() );
- if ( ( index >= 0 ) && ( index < static_cast<sal_Int32>(aDescriptions.size()) ) )
+ if ( ( index >= 0 ) && ( o3tl::make_unsigned(index) < aDescriptions.size() ) )
sDescription = aDescriptions[ index ];
else
{
@@ -303,7 +304,7 @@ namespace pcr
// create an introspection adapter for the component
Reference< XIntrospection > xIntrospection = theIntrospection::get( m_xContext );
- Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( makeAny( _rxIntrospectee ) ) );
+ Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( Any( _rxIntrospectee ) ) );
if ( !xIntrospectionAccess.is() )
throw RuntimeException("The introspection service could not handle the given component.", *this );
@@ -457,7 +458,7 @@ namespace pcr
aProperties = xPSI->getProperties();
DBG_ASSERT( aProperties.hasElements(), "GenericPropertyHandler::getSupportedProperties: no properties!" );
- for ( auto const & property : std::as_const(aProperties) )
+ for (auto const& property : aProperties)
{
switch ( property.Type.getTypeClass() )
{
@@ -604,7 +605,22 @@ namespace pcr
// at this handler instance
}
- IMPLEMENT_FORWARD_XCOMPONENT( GenericPropertyHandler, GenericPropertyHandler_Base );
+ void SAL_CALL GenericPropertyHandler::dispose( )
+ {
+ GenericPropertyHandler_Base::WeakComponentImplHelperBase::dispose();
+ m_xComponentIntrospectionAccess.clear();
+ m_xComponent.clear();
+ m_xTypeConverter.clear();
+ m_xPropertyState.clear();
+ }
+ void SAL_CALL GenericPropertyHandler::addEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener )
+ {
+ GenericPropertyHandler_Base::WeakComponentImplHelperBase::addEventListener( Listener );
+ }
+ void SAL_CALL GenericPropertyHandler::removeEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener )
+ {
+ GenericPropertyHandler_Base::WeakComponentImplHelperBase::removeEventListener( Listener );
+ }
} // namespace pcr