bump product version to 5.0.4.1
[LibreOffice.git] / extensions / source / propctrlr / genericpropertyhandler.cxx
blob0aaa2cc36324f9cc83f94167e9ea6a4d184c727e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "genericpropertyhandler.hxx"
21 #include "formmetadata.hxx"
22 #include "handlerhelper.hxx"
23 #include "pcrservices.hxx"
25 #include <boost/noncopyable.hpp>
26 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
27 #include <com/sun/star/reflection/XEnumTypeDescription.hpp>
28 #include <com/sun/star/beans/theIntrospection.hpp>
29 #include <com/sun/star/inspection/PropertyControlType.hpp>
30 #include <com/sun/star/inspection/XHyperlinkControl.hpp>
31 #include <com/sun/star/awt/XActionListener.hpp>
32 #include <com/sun/star/script/Converter.hpp>
33 #include <com/sun/star/util/URLTransformer.hpp>
34 #include <com/sun/star/util/XURLTransformer.hpp>
35 #include <com/sun/star/frame/Desktop.hpp>
36 #include <com/sun/star/frame/XDispatchProvider.hpp>
38 #include <cppuhelper/supportsservice.hxx>
39 #include <comphelper/extract.hxx>
40 #include <tools/debug.hxx>
42 #include <algorithm>
43 #include <o3tl/compat_functional.hxx>
45 extern "C" void SAL_CALL createRegistryInfo_GenericPropertyHandler()
47 ::pcr::OAutoRegistration< ::pcr::GenericPropertyHandler > aAutoRegistration;
50 namespace pcr
53 using namespace ::com::sun::star::uno;
54 using namespace ::com::sun::star::beans;
55 using namespace ::com::sun::star::script;
56 using namespace ::com::sun::star::frame;
57 using namespace ::com::sun::star::lang;
58 using namespace ::com::sun::star::util;
59 using namespace ::com::sun::star::container;
60 using namespace ::com::sun::star::reflection;
61 using namespace ::com::sun::star::inspection;
62 using ::com::sun::star::awt::XActionListener;
63 using ::com::sun::star::awt::ActionEvent;
65 class EnumRepresentation:
66 public IPropertyEnumRepresentation, private boost::noncopyable
68 private:
69 Reference< XEnumTypeDescription > m_xTypeDescription;
70 Type m_aEnumType;
72 public:
73 EnumRepresentation( const Reference< XComponentContext >& _rxContext, const Type& _rEnumType );
75 // IPropertyEnumRepresentation implementqation
76 virtual ::std::vector< OUString >
77 SAL_CALL getDescriptions() const SAL_OVERRIDE;
78 virtual void SAL_CALL getValueFromDescription( const OUString& _rDescription, ::com::sun::star::uno::Any& _out_rValue ) const SAL_OVERRIDE;
79 virtual OUString SAL_CALL getDescriptionForValue( const ::com::sun::star::uno::Any& _rEnumValue ) const SAL_OVERRIDE;
81 private:
82 void impl_getValues( Sequence< sal_Int32 >& _out_rValues ) const;
85 EnumRepresentation::EnumRepresentation( const Reference< XComponentContext >& _rxContext, const Type& _rEnumType )
86 :m_aEnumType( _rEnumType )
88 try
90 if ( _rxContext.is() )
92 Reference< XHierarchicalNameAccess > xTypeDescProv(
93 _rxContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
94 UNO_QUERY_THROW );
96 m_xTypeDescription = Reference< XEnumTypeDescription >( xTypeDescProv->getByHierarchicalName( m_aEnumType.getTypeName() ), UNO_QUERY_THROW );
99 catch( const Exception& )
101 OSL_FAIL( "EnumRepresentation::EnumRepresentation: caught an exception!" );
105 ::std::vector< OUString > EnumRepresentation::getDescriptions() const
107 Sequence< OUString > aNames;
110 if ( m_xTypeDescription.is() )
111 aNames = m_xTypeDescription->getEnumNames();
113 catch( const Exception& )
115 OSL_FAIL( "EnumRepresentation::getDescriptions: caught an exception!" );
118 return ::std::vector< OUString >( aNames.getConstArray(), aNames.getConstArray() + aNames.getLength() );
121 void EnumRepresentation::impl_getValues( Sequence< sal_Int32 >& _out_rValues ) const
123 _out_rValues.realloc( 0 );
126 if ( m_xTypeDescription.is() )
127 _out_rValues = m_xTypeDescription->getEnumValues();
129 catch( const Exception& )
131 OSL_FAIL( "EnumRepresentation::impl_getValues: caught an exception!" );
135 void EnumRepresentation::getValueFromDescription( const OUString& _rDescription, Any& _out_rValue ) const
137 ::std::vector< OUString > aDescriptions( getDescriptions() );
139 sal_Int32 index = ::std::find( aDescriptions.begin(), aDescriptions.end(),
140 _rDescription ) - aDescriptions.begin();
142 Sequence< sal_Int32 > aValues;
143 impl_getValues( aValues );
145 if ( ( index >= 0 ) && ( index < aValues.getLength() ) )
146 _out_rValue = ::cppu::int2enum( aValues[ index ], m_aEnumType );
147 else
149 OSL_FAIL( "EnumRepresentation::getValueFromDescription: cannot convert!" );
150 _out_rValue.clear();
154 OUString EnumRepresentation::getDescriptionForValue( const Any& _rEnumValue ) const
156 OUString sDescription;
158 sal_Int32 nAsInt = 0;
159 OSL_VERIFY( ::cppu::enum2int( nAsInt, _rEnumValue ) );
161 Sequence< sal_Int32 > aValues;
162 impl_getValues( aValues );
164 sal_Int32 index = ::std::find( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
165 nAsInt ) - aValues.getConstArray();
167 ::std::vector< OUString > aDescriptions( getDescriptions() );
168 if ( ( index >= 0 ) && ( index < (sal_Int32)aDescriptions.size() ) )
169 sDescription = aDescriptions[ index ];
170 else
172 OSL_FAIL( "EnumRepresentation::getDescriptionForValue: cannot convert!" );
174 return sDescription;
177 typedef ::cppu::WeakImplHelper1 < XActionListener
178 > UrlClickHandler_Base;
179 class UrlClickHandler : public UrlClickHandler_Base
181 Reference<XComponentContext> m_xContext;
182 public:
183 UrlClickHandler( const Reference<XComponentContext>& _rContext, const Reference< XHyperlinkControl >& _rxControl );
185 protected:
186 virtual ~UrlClickHandler();
188 // XActionListener
189 virtual void SAL_CALL actionPerformed( const ActionEvent& rEvent ) throw (RuntimeException, std::exception) SAL_OVERRIDE;
191 // XEventListener
192 virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException, std::exception) SAL_OVERRIDE;
194 protected:
195 void impl_dispatch_throw( const OUString& _rURL );
199 UrlClickHandler::UrlClickHandler( const Reference<XComponentContext>& _rContext, const Reference< XHyperlinkControl >& _rxControl )
200 :m_xContext( _rContext )
202 if ( !_rxControl.is() )
203 throw NullPointerException();
205 osl_atomic_increment( &m_refCount );
207 _rxControl->addActionListener( this );
209 osl_atomic_decrement( &m_refCount );
210 OSL_ENSURE( m_refCount > 0, "UrlClickHandler::UrlClickHandler: leaking!" );
214 UrlClickHandler::~UrlClickHandler()
218 void SAL_CALL UrlClickHandler::actionPerformed( const ActionEvent& rEvent ) throw (RuntimeException, std::exception)
220 Reference< XPropertyControl > xControl( rEvent.Source, UNO_QUERY_THROW );
221 Any aControlValue( xControl->getValue() );
223 OUString sURL;
224 if ( aControlValue.hasValue() && !( aControlValue >>= sURL ) )
225 throw RuntimeException( OUString(), *this );
227 if ( sURL.isEmpty() )
228 return;
230 impl_dispatch_throw( sURL );
233 void SAL_CALL UrlClickHandler::disposing( const EventObject& /*Source*/ ) throw (RuntimeException, std::exception)
235 // not interested in
238 void UrlClickHandler::impl_dispatch_throw( const OUString& _rURL )
240 Reference< XURLTransformer > xTransformer( URLTransformer::create(m_xContext) );
241 URL aURL; aURL.Complete = ".uno:OpenHyperlink";
242 xTransformer->parseStrict( aURL );
244 Reference< XDesktop2 > xDispProv = Desktop::create( m_xContext );
245 Reference< XDispatch > xDispatch( xDispProv->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW );
247 Sequence< PropertyValue > aDispatchArgs(1);
248 aDispatchArgs[0].Name = "URL";
249 aDispatchArgs[0].Value <<= _rURL;
251 xDispatch->dispatch( aURL, aDispatchArgs );
255 GenericPropertyHandler::GenericPropertyHandler( const Reference< XComponentContext >& _rxContext )
256 :GenericPropertyHandler_Base( m_aMutex )
257 ,m_xContext( _rxContext )
258 ,m_aPropertyListeners( m_aMutex )
259 ,m_bPropertyMapInitialized( false )
261 m_xTypeConverter = Converter::create(_rxContext);
264 GenericPropertyHandler::~GenericPropertyHandler()
268 OUString SAL_CALL GenericPropertyHandler::getImplementationName( ) throw (RuntimeException, std::exception)
270 return getImplementationName_static();
273 sal_Bool SAL_CALL GenericPropertyHandler::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception)
275 return cppu::supportsService(this, ServiceName);
278 Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
280 return getSupportedServiceNames_static();
283 OUString SAL_CALL GenericPropertyHandler::getImplementationName_static( ) throw (RuntimeException)
285 return OUString( "com.sun.star.comp.extensions.GenericPropertyHandler" );
288 Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException)
290 Sequence< OUString > aSupported( 1 );
291 aSupported[0] = "com.sun.star.inspection.GenericPropertyHandler";
292 return aSupported;
295 Reference< XInterface > SAL_CALL GenericPropertyHandler::Create( const Reference< XComponentContext >& _rxContext )
297 return *( new GenericPropertyHandler( _rxContext ) );
300 void SAL_CALL GenericPropertyHandler::inspect( const Reference< XInterface >& _rxIntrospectee ) throw (RuntimeException, NullPointerException, std::exception)
302 ::osl::MutexGuard aGuard( m_aMutex );
304 if ( !_rxIntrospectee.is() )
305 throw NullPointerException();
307 // revoke old property change listeners
308 ::cppu::OInterfaceIteratorHelper iterRemove( m_aPropertyListeners );
309 ::cppu::OInterfaceIteratorHelper iterReAdd( m_aPropertyListeners ); // this holds a copy of the container ...
310 while ( iterRemove.hasMoreElements() )
311 m_xComponent->removePropertyChangeListener( OUString(), static_cast< XPropertyChangeListener* >( iterRemove.next() ) );
313 m_xComponentIntrospectionAccess.clear();
314 m_xComponent.clear();
315 m_xPropertyState.clear();
317 // create an introspection adapter for the component
318 Reference< XIntrospection > xIntrospection = theIntrospection::get( m_xContext );
320 Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( makeAny( _rxIntrospectee ) ) );
321 if ( !xIntrospectionAccess.is() )
322 throw RuntimeException("The introspection service could not handle the given component.", *this );
324 m_xComponent = Reference< XPropertySet >( xIntrospectionAccess->queryAdapter( cppu::UnoType<XPropertySet>::get() ), UNO_QUERY_THROW );
325 // now that we survived so far, remember m_xComponentIntrospectionAccess
326 m_xComponentIntrospectionAccess = xIntrospectionAccess;
327 m_xPropertyState.set(m_xComponent, css::uno::UNO_QUERY);
329 m_bPropertyMapInitialized = false;
330 m_aProperties.clear();
332 // re-add the property change listeners
333 while ( iterReAdd.hasMoreElements() )
334 m_xComponent->addPropertyChangeListener( OUString(), static_cast< XPropertyChangeListener* >( iterReAdd.next() ) );
337 Any SAL_CALL GenericPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
339 ::osl::MutexGuard aGuard( m_aMutex );
340 if ( !m_xComponent.is() )
341 throw UnknownPropertyException();
343 return m_xComponent->getPropertyValue( _rPropertyName );
346 void SAL_CALL GenericPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
348 ::osl::MutexGuard aGuard( m_aMutex );
349 if ( !m_xComponent.is() )
350 throw UnknownPropertyException();
352 m_xComponent->setPropertyValue( _rPropertyName, _rValue );
355 ::rtl::Reference< IPropertyEnumRepresentation > GenericPropertyHandler::impl_getEnumConverter( const Type& _rEnumType )
357 ::rtl::Reference< IPropertyEnumRepresentation >& rConverter = m_aEnumConverters[ _rEnumType ];
358 if ( !rConverter.is() )
359 rConverter = new EnumRepresentation( m_xContext, _rEnumType );
360 return rConverter;
363 Any SAL_CALL GenericPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
365 ::osl::MutexGuard aGuard( m_aMutex );
366 const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
368 PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
369 if ( pos == m_aProperties.end() )
370 throw UnknownPropertyException();
372 Any aPropertyValue;
373 if ( !_rControlValue.hasValue() )
374 // NULL is converted to NULL
375 return aPropertyValue;
377 if ( pos->second.Type.getTypeClass() == TypeClass_ENUM )
379 OUString sControlValue;
380 OSL_VERIFY( _rControlValue >>= sControlValue );
381 impl_getEnumConverter( pos->second.Type )->getValueFromDescription( sControlValue, aPropertyValue );
383 else
384 aPropertyValue = PropertyHandlerHelper::convertToPropertyValue( m_xContext, m_xTypeConverter, pos->second, _rControlValue );
386 return aPropertyValue;
389 Any SAL_CALL GenericPropertyHandler::convertToControlValue( const OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException, std::exception)
391 ::osl::MutexGuard aGuard( m_aMutex );
392 const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
394 PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
395 if ( pos == m_aProperties.end() )
396 throw UnknownPropertyException();
398 Any aControlValue;
399 if ( !_rPropertyValue.hasValue() )
400 // NULL is converted to NULL
401 return aControlValue;
403 if ( pos->second.Type.getTypeClass() == TypeClass_ENUM )
405 aControlValue <<= impl_getEnumConverter( pos->second.Type )->getDescriptionForValue( _rPropertyValue );
407 else
408 aControlValue = PropertyHandlerHelper::convertToControlValue( m_xContext, m_xTypeConverter, _rPropertyValue, _rControlValueType );
409 return aControlValue;
412 PropertyState SAL_CALL GenericPropertyHandler::getPropertyState( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
414 ::osl::MutexGuard aGuard( m_aMutex );
415 PropertyState eState = PropertyState_DIRECT_VALUE;
416 if ( m_xPropertyState.is() )
417 eState = m_xPropertyState->getPropertyState( _rPropertyName );
418 return eState;
421 void SAL_CALL GenericPropertyHandler::addPropertyChangeListener(const Reference< XPropertyChangeListener >& _rxListener)
422 throw (NullPointerException, RuntimeException, std::exception)
424 if ( !_rxListener.is() )
425 throw NullPointerException();
427 ::osl::MutexGuard aGuard( m_aMutex );
428 m_aPropertyListeners.addInterface( _rxListener );
429 if ( m_xComponent.is() )
433 m_xComponent->addPropertyChangeListener( OUString(), _rxListener );
435 catch( const UnknownPropertyException& )
437 OSL_FAIL( "GenericPropertyHandler::addPropertyChangeListener:\nThe inspected component does not allow registering for all properties at once! This violates the interface contract!" );
442 void SAL_CALL GenericPropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException, std::exception)
444 ::osl::MutexGuard aGuard( m_aMutex );
445 if ( m_xComponent.is() )
449 m_xComponent->removePropertyChangeListener( OUString(), _rxListener );
451 catch( const UnknownPropertyException& )
453 OSL_FAIL( "GenericPropertyHandler::removePropertyChangeListener:\nThe inspected component does not allow de-registering for all properties at once! This violates the interface contract!" );
456 m_aPropertyListeners.removeInterface( _rxListener );
459 void GenericPropertyHandler::impl_ensurePropertyMap()
461 if ( !m_bPropertyMapInitialized )
463 m_bPropertyMapInitialized = true;
466 Reference< XPropertySetInfo > xPSI;
467 if ( m_xComponent.is() )
468 xPSI = m_xComponent->getPropertySetInfo();
469 Sequence< Property > aProperties;
470 if ( xPSI.is() )
471 aProperties = xPSI->getProperties();
472 DBG_ASSERT( aProperties.getLength(), "GenericPropertyHandler::getSupportedProperties: no properties!" );
474 for ( const Property* pProperties = aProperties.getConstArray();
475 pProperties != aProperties.getConstArray() + aProperties.getLength();
476 ++pProperties
479 switch ( pProperties->Type.getTypeClass() )
481 case TypeClass_BOOLEAN:
482 case TypeClass_BYTE:
483 case TypeClass_SHORT:
484 case TypeClass_UNSIGNED_SHORT:
485 case TypeClass_LONG:
486 case TypeClass_UNSIGNED_LONG:
487 case TypeClass_HYPER:
488 case TypeClass_UNSIGNED_HYPER:
489 case TypeClass_FLOAT:
490 case TypeClass_DOUBLE:
491 case TypeClass_ENUM:
492 case TypeClass_STRING:
493 // allowed, we can handle this type
494 break;
496 case TypeClass_SEQUENCE:
498 TypeClass eElementTypeClass = ::comphelper::getSequenceElementType( pProperties->Type ).getTypeClass();
499 if ( ( eElementTypeClass != TypeClass_STRING )
500 && ( eElementTypeClass != TypeClass_BYTE )
501 && ( eElementTypeClass != TypeClass_SHORT )
502 && ( eElementTypeClass != TypeClass_UNSIGNED_SHORT )
503 && ( eElementTypeClass != TypeClass_LONG )
504 && ( eElementTypeClass != TypeClass_UNSIGNED_LONG )
506 // can only handle the above
507 continue;
509 break;
511 default:
512 // next property, we don't support this type
513 continue;
516 m_aProperties.insert( PropertyMap::value_type( pProperties->Name, *pProperties ) );
519 catch( const Exception& )
521 OSL_FAIL( "GenericPropertyHandler::impl_ensurePropertyMap: caught an exception!" );
526 Sequence< Property > SAL_CALL GenericPropertyHandler::getSupportedProperties() throw (RuntimeException, std::exception)
528 ::osl::MutexGuard aGuard( m_aMutex );
529 const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
531 Sequence< Property > aReturn( m_aProperties.size() );
532 ::std::transform( m_aProperties.begin(), m_aProperties.end(),
533 aReturn.getArray(), ::o3tl::select2nd< PropertyMap::value_type >() );
534 return aReturn;
537 Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupersededProperties( ) throw (RuntimeException, std::exception)
539 // no superseded properties at all. This handler offers the very basic PropertyHandler
540 // functionality, so it's much more likely that other handlers want to supersede
541 // *our* properties ....
542 return Sequence< OUString >( );
545 Sequence< OUString > SAL_CALL GenericPropertyHandler::getActuatingProperties( ) throw (RuntimeException, std::exception)
547 // This basic PropertyHandler implementation is too dumb^Wgeneric to know
548 // anything about property dependencies
549 return Sequence< OUString >( );
552 LineDescriptor SAL_CALL GenericPropertyHandler::describePropertyLine( const OUString& _rPropertyName,
553 const Reference< XPropertyControlFactory >& _rxControlFactory )
554 throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
556 if ( !_rxControlFactory.is() )
557 throw NullPointerException();
559 ::osl::MutexGuard aGuard( m_aMutex );
560 const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
562 PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
563 if ( pos == m_aProperties.end() )
564 throw UnknownPropertyException();
566 LineDescriptor aDescriptor;
567 aDescriptor.DisplayName = _rPropertyName;
568 switch ( pos->second.Type.getTypeClass() )
570 case TypeClass_ENUM:
571 aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory,
572 impl_getEnumConverter( pos->second.Type )->getDescriptions(),
573 PropertyHandlerHelper::requiresReadOnlyControl( pos->second.Attributes ),
574 false );
575 break;
576 case TypeClass_STRING:
578 // some special handling for URL properties
579 bool bIsURLProperty = _rPropertyName.endsWith( "URL" );
580 if ( bIsURLProperty )
582 aDescriptor.Control = _rxControlFactory->createPropertyControl(
583 PropertyControlType::HyperlinkField, PropertyHandlerHelper::requiresReadOnlyControl( pos->second.Attributes ) );
585 Reference< XHyperlinkControl > xControl( aDescriptor.Control, UNO_QUERY_THROW );
586 Reference< XActionListener > xEnsureDelete( new UrlClickHandler( m_xContext, xControl ) );
589 break;
590 default:
591 break;
593 // fallback
594 if ( !aDescriptor.Control.is() )
595 PropertyHandlerHelper::describePropertyLine( pos->second, aDescriptor, _rxControlFactory );
597 aDescriptor.Category = "General";
598 return aDescriptor;
601 sal_Bool SAL_CALL GenericPropertyHandler::isComposable( const OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException, std::exception)
603 return sal_False;
606 InteractiveSelectionResult SAL_CALL GenericPropertyHandler::onInteractivePropertySelection( const OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
608 OSL_FAIL( "GenericPropertyHandler::onInteractivePropertySelection: I'm too dumb to know anything about property browse buttons!" );
609 return InteractiveSelectionResult_Cancelled;
612 void SAL_CALL GenericPropertyHandler::actuatingPropertyChanged( const OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException, std::exception)
614 OSL_FAIL( "GenericPropertyHandler::actuatingPropertyChanged: no no no, I did not register for any actuating properties!" );
617 sal_Bool SAL_CALL GenericPropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception)
619 return sal_True;
622 void SAL_CALL GenericPropertyHandler::disposing()
624 m_aPropertyListeners.clear();
625 // not disposeAndClear: the listeners are (virtually) listeners at our introspectee, not
626 // at this handler instance
629 IMPLEMENT_FORWARD_XCOMPONENT( GenericPropertyHandler, GenericPropertyHandler_Base );
631 } // namespace pcr
633 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */