tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / cppuhelper / propshlp.hxx
blob48e68c77349b01de989bfed2d75d521a8525e363
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 .
21 * This file is part of LibreOffice published API.
24 #ifndef INCLUDED_CPPUHELPER_PROPSHLP_HXX
25 #define INCLUDED_CPPUHELPER_PROPSHLP_HXX
27 #include "rtl/alloc.h"
29 #include "cppuhelper/interfacecontainer.h"
31 #include "com/sun/star/beans/XPropertySet.hpp"
32 #include "com/sun/star/beans/XPropertySetOption.hpp"
33 #include "com/sun/star/beans/XMultiPropertySet.hpp"
34 #include "com/sun/star/beans/XFastPropertySet.hpp"
36 #include "cppuhelper/cppuhelperdllapi.h"
39 namespace cppu
43 /*************************************************************************
44 *************************************************************************/
47 /**
48 This interface is used by the OPropertyHelper, to access the property description.
50 class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC IPropertyArrayHelper
52 public:
53 // these are here to force memory de/allocation to sal lib.
54 static void * SAL_CALL operator new( size_t nSize )
55 { return ::rtl_allocateMemory( nSize ); }
56 static void SAL_CALL operator delete( void * pMem )
57 { ::rtl_freeMemory( pMem ); }
58 static void * SAL_CALL operator new( size_t, void * pMem )
59 { return pMem; }
60 static void SAL_CALL operator delete( void *, void * )
63 /**
64 Following the rule, the first virtual method implies a virtual destructor.
66 virtual ~IPropertyArrayHelper();
68 /**
69 Return the property members Name and Attribute from the handle nHandle.
70 @param nHandle the handle of a property. If the values of the handles
71 are sorted in the same way as the names and the highest handle value
72 is getCount() -1, then it must be an indexed access to the property array.
73 @param pPropName is an out parameter filled with property name of the property with the
74 handle nHandle. May be NULL.
75 @param pAttributes is an out parameter filled with attributes of the property with the
76 handle nHandle. May be NULL.
77 @return True, if the handle exist, otherwise false.
79 virtual sal_Bool SAL_CALL fillPropertyMembersByHandle(
80 ::rtl::OUString * pPropName, sal_Int16 * pAttributes, sal_Int32 nHandle ) = 0;
81 /**
82 Return the sequence of properties. The sequence is sorted by name.
84 virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() = 0;
85 /**
86 Return the property with the name rPropertyName.
87 @param rPropertyName the name of the property.
88 @exception UnknownPropertyException thrown if the property name is unknown.
90 virtual css::beans::Property SAL_CALL getPropertyByName(
91 const ::rtl::OUString& rPropertyName ) = 0;
92 /**
93 Return true if the property with the name rPropertyName exist, otherwise false.
94 @param rPropertyName the name of the property.
96 virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName) = 0;
97 /**
98 Return the handle of the property with the name rPropertyName.
99 If the property does not exist -1 is returned.
100 @param rPropertyName the name of the property.
102 virtual sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ) = 0;
104 Fill the array with the handles of the properties.
105 @return the handles of the names from the pHandles array. -1
106 indicates an unknown property name.
108 virtual sal_Int32 SAL_CALL fillHandles(
109 /*out*/ sal_Int32 * pHandles, const css::uno::Sequence< ::rtl::OUString > & rPropNames ) = 0;
113 You can use this helper class to map a XPropertySet-Interface to a XFast-
114 or a XMultiPropertySet interface.
116 class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC OPropertyArrayHelper : public IPropertyArrayHelper
118 public:
120 Create an object which supports the common property interfaces.
122 @param pProps array of properties
123 The array pProps should be sorted.
124 @param nElements is the number of properties in the pProps structure.
125 @param bSorted indicates that the elements are sorted.
126 *********/
127 OPropertyArrayHelper(
128 css::beans::Property *pProps,
129 sal_Int32 nElements ,
130 sal_Bool bSorted = true );
133 Create an object which supports the common property interfaces.
134 @param aProps sequence of properties which are supported by this helper.
135 The sequence aProps should be sorted.
136 @param bSorted indicates that the elements are sorted.
138 OPropertyArrayHelper(
139 const css::uno::Sequence< css::beans::Property > & aProps,
140 sal_Bool bSorted = true );
143 Return the number of properties.
145 sal_Int32 SAL_CALL getCount() const;
147 Return the property members Name and Attribute from the handle nHandle.
148 @param nHandle the handle of a property. If the values of the handles
149 are sorted in the same way as the names and the highest handle value
150 is getCount() -1, then it is only an indexed access to the property array.
151 Otherwise it is a linear search through the array.
152 @param pPropName is an out parameter filled with property name of the property with the
153 handle nHandle. May be NULL.
154 @param pAttributes is an out parameter filled with attributes of the property with the
155 handle nHandle. May be NULL.
156 @return True, if the handle exist, otherwise false.
158 virtual sal_Bool SAL_CALL fillPropertyMembersByHandle(
159 ::rtl::OUString * pPropName, sal_Int16 * pAttributes, sal_Int32 nHandle ) SAL_OVERRIDE;
161 Return the sequence of properties. The sequence is sorted by name.
163 virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() SAL_OVERRIDE;
165 Return the property with the name rPropertyName.
166 @param rPropertyName the name of the property.
167 @exception UnknownPropertyException thrown if the property name is unknown.
169 virtual css::beans::Property SAL_CALL getPropertyByName(
170 const ::rtl::OUString& rPropertyName ) SAL_OVERRIDE;
172 Return true if the property with the name rPropertyName exist, otherwise false.
173 @param rPropertyName the name of the property.
175 virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName) SAL_OVERRIDE;
177 Return the handle of the property with the name rPropertyName.
178 If the property does not exist -1 is returned.
179 @param rPropertyName the name of the property.
181 virtual sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ) SAL_OVERRIDE;
183 Fill the array with the handles of the properties.
184 @return the handles of the names from the pHandles array. -1
185 indicates an unknown property name.
187 virtual sal_Int32 SAL_CALL fillHandles(
188 /*out*/sal_Int32 * pHandles, const css::uno::Sequence< ::rtl::OUString > & rPropNames ) SAL_OVERRIDE;
190 protected:
191 /** reserved for future use. do not use.
193 void * m_pReserved;
195 private:
196 void init( sal_Bool bSorted );
198 /** The sequence generated from the pProperties array. */
199 css::uno::Sequence< css::beans::Property > aInfos;
202 True, If the values of the handles are sorted in the same way as the names
203 and the highest handle value is getCount() -1, otherwise false.
205 sal_Bool bRightOrdered;
209 // helper defines needed for an interface container with a 32 bit key values
211 struct equalInt32_Impl
213 bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const
214 { return i1 == i2; }
217 struct hashInt32_Impl
219 size_t operator()(const sal_Int32 & i) const
220 { return i; }
223 /** Specialized class for key type sal_Int32,
224 without explicit usage of STL symbols.
226 class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC OMultiTypeInterfaceContainerHelperInt32
228 public:
229 // these are here to force memory de/allocation to sal lib.
230 static void * SAL_CALL operator new( size_t nSize )
231 { return ::rtl_allocateMemory( nSize ); }
232 static void SAL_CALL operator delete( void * pMem )
233 { ::rtl_freeMemory( pMem ); }
234 static void * SAL_CALL operator new( size_t, void * pMem )
235 { return pMem; }
236 static void SAL_CALL operator delete( void *, void * )
240 Create a container of interface containers.
242 @param rMutex the mutex to protect multi thread access.
243 The lifetime must be longer than the lifetime
244 of this object.
246 OMultiTypeInterfaceContainerHelperInt32( ::osl::Mutex & rMutex );
248 Delete all containers.
250 ~OMultiTypeInterfaceContainerHelperInt32();
253 Return all id's under which at least one interface is added.
255 css::uno::Sequence< sal_Int32 > SAL_CALL getContainedTypes() const;
258 Return the container created under this key.
259 @return the container created under this key. If the container
260 was not created, null was returned.
262 OInterfaceContainerHelper * SAL_CALL getContainer( const sal_Int32 & rKey ) const;
265 Insert an element in the container specified with the key. The position is not specified.
266 @param rKey the id of the container.
267 @param r the added interface. It is allowed to insert null or
268 the same pointer more than once.
269 @return the new count of elements in the container.
271 sal_Int32 SAL_CALL addInterface(
272 const sal_Int32 & rKey,
273 const css::uno::Reference< css::uno::XInterface > & r );
276 Remove an element from the container specified with the key.
277 It uses the equal definition of uno objects to remove the interfaces.
278 @param rKey the id of the container.
279 @param rxIFace the removed interface.
280 @return the new count of elements in the container.
282 sal_Int32 SAL_CALL removeInterface(
283 const sal_Int32 & rKey,
284 const css::uno::Reference< css::uno::XInterface > & rxIFace );
287 Call disposing on all objects in the container that
288 support XEventListener. Then clear the container.
290 void SAL_CALL disposeAndClear( const css::lang::EventObject & rEvt );
292 Remove all elements of all containers. Does not delete the container.
294 void SAL_CALL clear();
296 typedef sal_Int32 keyType;
297 private:
298 void * m_pMap;
299 ::osl::Mutex & rMutex;
301 OMultiTypeInterfaceContainerHelperInt32( const OMultiTypeInterfaceContainerHelperInt32 & ) SAL_DELETED_FUNCTION;
302 OMultiTypeInterfaceContainerHelperInt32 & operator = ( const OMultiTypeInterfaceContainerHelperInt32 & )SAL_DELETED_FUNCTION;
306 /** An interface to extend event notification actions.
308 class IEventNotificationHook
310 public:
312 Method to be called by OPropertySetHelper::fire.
314 @param pnHandles the id's of the properties that changed.
315 @param nCount the number of elements in the arrays pnHandles, pNewValues and pOldValues.
316 @param bVetoable true means fire to VetoableChangeListener, false means fire to
317 XPropertyChangedListener and XMultiPropertyChangedListener.
318 @param bIgnoreRuntimeExceptionsWhileFiring
319 indicates whether occurring RuntimeExceptions will be
320 ignored when firing notifications
321 (vetoableChange(), propertyChange())
322 to listeners.
323 PropertyVetoExceptions may still be thrown.
324 This flag is useful in an inter-process scenario when
325 remote bridges may break down
326 (firing DisposedExceptions).
328 @see OPropertySetHelper::fire
330 virtual void fireEvents(
331 sal_Int32 * pnHandles,
332 sal_Int32 nCount,
333 sal_Bool bVetoable,
334 bool bIgnoreRuntimeExceptionsWhileFiring) = 0;
336 #if !defined _MSC_VER // public -> protected changes mangled names there
337 protected:
338 #endif
339 ~IEventNotificationHook() {}
340 // avoid warnings about virtual members and non-virtual dtor
345 This abstract class maps the methods of the interfaces XMultiPropertySet, XFastPropertySet
346 and XPropertySet to the methods getInfoHelper, convertFastPropertyValue,
347 setFastPropertyValue_NoBroadcast and getFastPropertyValue. You must derive from
348 this class and override the methods.
349 It provides a standard implementation of the XPropertySetInfo.
350 The XPropertiesChangeListener are inserted in the rBHelper.aLC structure.
351 The XPropertyChangeListener and XVetoableChangeListener with no names are inserted
352 in the rBHelper.aLC structure. So it is possible to advise property listeners with
353 the connection point interfaces. But only listeners that listen to all property changes.
356 class CPPUHELPER_DLLPUBLIC OPropertySetHelper :
357 public css::beans::XMultiPropertySet,
358 public css::beans::XFastPropertySet,
359 public css::beans::XPropertySet
361 public:
363 @param rBHelper this structure contains the basic members of
364 a broadcaster.
365 The lifetime must be longer than the lifetime
366 of this object. Stored in the variable rBHelper.
368 OPropertySetHelper( OBroadcastHelper & rBHelper );
370 /** Constructor.
372 @param rBHelper
373 this structure contains the basic members of
374 a broadcaster.
375 The lifetime must be longer than the lifetime
376 of this object. Stored in the variable rBHelper.
378 @param bIgnoreRuntimeExceptionsWhileFiring
379 indicates whether occurring RuntimeExceptions will be
380 ignored when firing notifications
381 (vetoableChange(), propertyChange())
382 to listeners.
383 PropertyVetoExceptions may still be thrown.
384 This flag is useful in an inter-process scenario when
385 remote bridges may break down
386 (firing DisposedExceptions).
388 OPropertySetHelper(
389 OBroadcastHelper & rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring );
391 /** Constructor.
393 @param rBHelper
394 this structure contains the basic members of
395 a broadcaster.
396 The lifetime must be longer than the lifetime
397 of this object. Stored in the variable rBHelper.
399 @param i_pFireEvents
400 additional event notifier
402 @param bIgnoreRuntimeExceptionsWhileFiring
403 indicates whether occurring RuntimeExceptions will be
404 ignored when firing notifications
405 (vetoableChange(), propertyChange())
406 to listeners.
407 PropertyVetoExceptions may still be thrown.
408 This flag is useful in an inter-process scenario when
409 remote bridges may break down
410 (firing DisposedExceptions).
412 OPropertySetHelper(
413 OBroadcastHelper & rBHelper,
414 IEventNotificationHook *i_pFireEvents,
415 bool bIgnoreRuntimeExceptionsWhileFiring = false);
418 Only returns a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and
419 XEventListener.
421 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) SAL_OVERRIDE;
423 /** eases implementing XTypeProvider::getTypes, returns the types of XMultiPropertySet, XFastPropertySet, XPropertySet
425 @throws css::uno::RuntimeException
427 css::uno::Sequence< css::uno::Type > getTypes();
430 Send a disposing notification to the listeners in the containers aBoundLC
431 and aVetoableLC.
433 @see OComponentHelper
435 void SAL_CALL disposing();
438 Throw UnknownPropertyException or PropertyVetoException if the property with the name
439 rPropertyName does not exist or is readonly. Otherwise rPropertyName is changed to its handle
440 value and setFastPropertyValue is called.
442 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const css::uno::Any& aValue ) SAL_OVERRIDE;
444 Throw UnknownPropertyException if the property with the name
445 rPropertyName does not exist.
447 virtual css::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) SAL_OVERRIDE;
448 /** Ignored if the property is not bound. */
449 virtual void SAL_CALL addPropertyChangeListener(
450 const ::rtl::OUString& aPropertyName,
451 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener) SAL_OVERRIDE;
453 /** Ignored if the property is not bound. */
454 virtual void SAL_CALL removePropertyChangeListener(
455 const ::rtl::OUString& aPropertyName,
456 const css::uno::Reference < css::beans::XPropertyChangeListener >& aListener) SAL_OVERRIDE;
458 /** Ignored if the property is not constrained. */
459 virtual void SAL_CALL addVetoableChangeListener(
460 const ::rtl::OUString& aPropertyName,
461 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener) SAL_OVERRIDE;
463 /** Ignored if the property is not constrained. */
464 virtual void SAL_CALL removeVetoableChangeListener(
465 const ::rtl::OUString& aPropertyName,
466 const css::uno::Reference< css::beans::XVetoableChangeListener > & aListener ) SAL_OVERRIDE;
469 Throw UnknownPropertyException or PropertyVetoException if the property with the name
470 rPropertyName does not exist or is readonly. Otherwise the method convertFastPropertyValue
471 is called, then the vetoable listeners are notified. After this the value of the property
472 is changed with the setFastPropertyValue_NoBroadcast method and the bound listeners are
473 notified.
475 virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) SAL_OVERRIDE;
478 @exception css::beans::UnknownPropertyException
479 if the property with the handle nHandle does not exist.
481 virtual css::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) SAL_OVERRIDE;
483 // XMultiPropertySet
484 virtual void SAL_CALL setPropertyValues(
485 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
486 const css::uno::Sequence< css::uno::Any >& Values ) SAL_OVERRIDE;
488 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(
489 const css::uno::Sequence< ::rtl::OUString >& PropertyNames ) SAL_OVERRIDE;
491 virtual void SAL_CALL addPropertiesChangeListener(
492 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
493 const css::uno::Reference< css::beans::XPropertiesChangeListener >& Listener ) SAL_OVERRIDE;
495 virtual void SAL_CALL removePropertiesChangeListener(
496 const css::uno::Reference< css::beans::XPropertiesChangeListener >& Listener ) SAL_OVERRIDE;
498 virtual void SAL_CALL firePropertiesChangeEvent(
499 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
500 const css::uno::Reference< css::beans::XPropertiesChangeListener > & Listener ) SAL_OVERRIDE;
503 The property sequence is created in the call. The interface isn't used after the call.
505 static css::uno::Reference < css::beans::XPropertySetInfo > SAL_CALL
506 createPropertySetInfo( IPropertyArrayHelper & rProperties );
507 protected:
509 This method fire events to all registered property listeners.
510 @param pnHandles the id's of the properties that changed.
511 @param pNewValues the new values of the properties.
512 @param pOldValues the old values of the properties.
513 @param nCount the number of elements in the arrays pnHandles, pNewValues and pOldValues.
514 @param bVetoable true means fire to VetoableChangeListener, false means fire to
515 XPropertyChangedListener and XMultiPropertyChangedListener.
517 void SAL_CALL fire(
518 sal_Int32 * pnHandles,
519 const css::uno::Any * pNewValues,
520 const css::uno::Any * pOldValues,
521 sal_Int32 nCount,
522 sal_Bool bVetoable );
525 Set multiple properties with the handles.
526 @param nSeqLen the length of the arrays pHandles and Values.
527 @param pHandles the handles of the properties. The number of elements
528 in the Values sequence is the length of the handle array. A value of -1
529 of a handle means invalid property. These are ignored.
530 @param pValues the values of the properties.
531 @param nHitCount the number of valid entries in the handle array.
533 void SAL_CALL setFastPropertyValues(
534 sal_Int32 nSeqLen,
535 sal_Int32 * pHandles,
536 const css::uno::Any * pValues,
537 sal_Int32 nHitCount );
540 This abstract method must return the name to index table. This table contains all property
541 names and types of this object. The method is not implemented in this class.
543 virtual IPropertyArrayHelper & SAL_CALL getInfoHelper() = 0;
546 Converted the value rValue and return the result in rConvertedValue and the
547 old value in rOldValue. An IllegalArgumentException is thrown.
548 The method is not implemented in this class. After this call the vetoable
549 listeners are notified.
551 @param rConvertedValue the converted value. Only set if return is true.
552 @param rOldValue the old value. Only set if return is true.
553 @param nHandle the handle of the property.
554 @param rValue the value to be converted
555 @return true if the value converted.
556 @throws css::lang::IllegalArgumentException
557 @throws css::beans::UnknownPropertyException
558 @throws css::uno::RuntimeException
560 virtual sal_Bool SAL_CALL convertFastPropertyValue(
561 css::uno::Any & rConvertedValue,
562 css::uno::Any & rOldValue,
563 sal_Int32 nHandle,
564 const css::uno::Any& rValue ) = 0;
566 /** The same as setFastPropertyValue; nHandle is always valid.
567 The changes must not be broadcasted in this method.
568 The method is implemented in a derived class.
570 @attention
571 Although you are permitted to throw any UNO exception, only the following
572 are valid for usage:
573 -- css::beans::UnknownPropertyException
574 -- css::beans::PropertyVetoException
575 -- css::lang::IllegalArgumentException
576 -- css::lang::WrappedTargetException
577 -- css::uno::RuntimeException
579 @param nHandle
580 handle
581 @param rValue
582 value
583 @throws css::uno::Exception
585 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
586 sal_Int32 nHandle,
587 const css::uno::Any& rValue ) = 0;
589 The same as getFastPropertyValue, but return the value through rValue and nHandle
590 is always valid.
591 The method is not implemented in this class.
593 virtual void SAL_CALL getFastPropertyValue(
594 css::uno::Any& rValue,
595 sal_Int32 nHandle ) const = 0;
597 /** sets an dependent property's value
599 <p>Sometimes setting a given property needs to implicitly modify another property's value. Calling |setPropertyValue|
600 from within |setFastPropertyValue_NoBroadcast| is not an option here, as it would notify the property listeners
601 while our mutex is still locked. Setting the dependent property's value directly (e.g. by calling |setFastPropertyValue_NoBroadcast|
602 recursively) is not an option, too, since it would miss firing the property change event.</p>
604 <p>So, in such cases, you use |setDependentFastPropertyValue| from within |setFastPropertyValue_NoBroadcast|.
605 It will convert and actually set the property value (invoking |convertFastPropertyValue| and |setFastPropertyValue_NoBroadcast|
606 for the given handle and value), and add the property change event to the list of events to be notified
607 when the bottom-most |setFastPropertyValue_NoBroadcast| on the stack returns.</p>
609 <p><strong>Note</strong>: The method will <em>not</em> invoke veto listeners for the property.</p>
611 <p><strong>Note</strong>: It's the caller's responsibility to ensure that our mutex is locked. This is
612 canonically given when the method is invoked from within |setFastPropertyValue_NoBroadcast|, in other
613 contexts, you might need to take own measures.</p>
615 void setDependentFastPropertyValue(
616 sal_Int32 i_handle,
617 const css::uno::Any& i_value
620 /** The common data of a broadcaster. Use the mutex, disposing state and the listener container. */
621 OBroadcastHelper &rBHelper;
623 Container for the XPropertyChangedListener. The listeners are inserted by handle.
625 OMultiTypeInterfaceContainerHelperInt32 aBoundLC;
627 Container for the XPropertyVetoableListener. The listeners are inserted by handle.
629 OMultiTypeInterfaceContainerHelperInt32 aVetoableLC;
631 class Impl;
633 /** reserved for future use. finally, the future has arrived...
635 Impl * const m_pReserved;
637 private:
638 OPropertySetHelper( const OPropertySetHelper & ) SAL_DELETED_FUNCTION;
639 OPropertySetHelper & operator = ( const OPropertySetHelper & )
640 SAL_DELETED_FUNCTION;
642 /** notifies the given changes in property's values, <em>plus</em> all property changes collected during recent
643 |setDependentFastPropertyValue| calls.
645 void impl_fireAll(
646 sal_Int32* i_handles,
647 const css::uno::Any * i_newValues,
648 const css::uno::Any * i_oldValues,
649 sal_Int32 i_count
652 #if defined _MSC_VER // public -> protected changes mangled names there
653 public:
654 #else
655 protected:
656 #endif
658 You must call disposing before destruction.
660 ~OPropertySetHelper();
664 OPropertySetHelper plus XPropertySetOption
666 @attention
667 The getTypes() inherited from OPropertysetHelper does not cover
668 XPropertySetOption.
670 class CPPUHELPER_DLLPUBLIC OPropertySetHelper2 : public OPropertySetHelper,
671 public css::beans::XPropertySetOption
673 public:
674 /** Constructor.
676 See OPropertySetHelper constructors documentation
678 explicit OPropertySetHelper2(
679 OBroadcastHelper & rBHelper,
680 IEventNotificationHook *i_pFireEvents = NULL,
681 bool bIgnoreRuntimeExceptionsWhileFiring = false);
683 // XInterface
684 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) SAL_OVERRIDE;
686 // XPropertySetOption
687 virtual void SAL_CALL enableChangeListenerNotification( sal_Bool bEnable ) SAL_OVERRIDE;
690 private:
691 OPropertySetHelper2( const OPropertySetHelper2 & ) SAL_DELETED_FUNCTION;
692 OPropertySetHelper2 & operator = ( const OPropertySetHelper2 & )
693 SAL_DELETED_FUNCTION;
695 #if defined _MSC_VER // public -> protected changes mangled names there
696 public:
697 #else
698 protected:
699 #endif
700 // Suppress warning about virtual functions but non-virtual destructor:
702 You must call disposing before destruction.
704 virtual ~OPropertySetHelper2();
707 } // end namespace cppuhelper
708 #endif
711 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */