summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-27 21:59:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-28 11:40:17 +0100
commit9f18e327a1a51316ea5bc9f3997d83f657032226 (patch)
tree37d81fcddbfa044638431ebff78f8232338ed44a /forms
parent50cec31d5fa77ebc04f35e57718a02d328562417 (diff)
use more OInterfaceContainerHelper3 in forms
Change-Id: Ie4a6124beccb55c983b8d4f63c86ec5f2869e9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125956 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Button.cxx4
-rw-r--r--forms/source/component/DatabaseForm.cxx33
-rw-r--r--forms/source/component/DatabaseForm.hxx9
-rw-r--r--forms/source/component/Edit.hxx3
-rw-r--r--forms/source/component/File.cxx4
-rw-r--r--forms/source/component/File.hxx3
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/Grid.cxx4
-rw-r--r--forms/source/component/Grid.hxx7
-rw-r--r--forms/source/component/ImageControl.hxx3
-rw-r--r--forms/source/component/ListBox.hxx5
-rw-r--r--forms/source/component/clickableimage.cxx5
-rw-r--r--forms/source/component/clickableimage.hxx9
-rw-r--r--forms/source/component/entrylisthelper.hxx4
-rw-r--r--forms/source/component/errorbroadcaster.cxx5
-rw-r--r--forms/source/component/errorbroadcaster.hxx4
-rw-r--r--forms/source/helper/resettable.cxx4
-rw-r--r--forms/source/inc/FormComponent.hxx7
-rw-r--r--forms/source/inc/InterfaceContainer.hxx4
-rw-r--r--forms/source/inc/resettable.hxx4
-rw-r--r--forms/source/misc/InterfaceContainer.cxx2
-rw-r--r--forms/source/richtext/attributedispatcher.cxx4
-rw-r--r--forms/source/richtext/featuredispatcher.cxx4
-rw-r--r--forms/source/richtext/featuredispatcher.hxx6
-rw-r--r--forms/source/richtext/richtextmodel.hxx4
25 files changed, 73 insertions, 72 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 8b913ac7a0c3..6ab64ec1798c 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -460,7 +460,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick, void*, void)
if (FormButtonType_PUSH == *o3tl::doAccess<FormButtonType>(xSet->getPropertyValue(PROPERTY_BUTTONTYPE)))
{
// notify the action listeners for a push button
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aActionListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aActionListeners);
ActionEvent aEvt(static_cast<XWeak*>(this), m_aActionCommand);
while(aIter.hasMoreElements() )
{
@@ -469,7 +469,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick, void*, void)
// to get notified
try
{
- static_cast< XActionListener* >( aIter.next() )->actionPerformed(aEvt);
+ aIter.next()->actionPerformed(aEvt);
}
#ifdef DBG_UTIL
catch( const RuntimeException& )
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 60b35a8b5959..c9281843326c 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2116,12 +2116,12 @@ static void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLT
void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::awt::MouseEvent& MouseEvt)
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aSubmitListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aSubmitListeners);
EventObject aEvt(static_cast<XWeak*>(this));
bool bCanceled = false;
while (aIter.hasMoreElements() && !bCanceled)
{
- if (!static_cast<XSubmitListener*>(aIter.next())->approveSubmit(aEvt))
+ if (!aIter.next()->approveSubmit(aEvt))
bCanceled = true;
}
@@ -2924,11 +2924,11 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction
// the approval is done by the aggregate
if (!m_aRowSetApproveListeners.getLength())
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aLoadListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aLoadListeners);
aGuard.clear();
while (aIter.hasMoreElements())
- static_cast<XLoadListener*>(aIter.next())->reloading(aEvent);
+ aIter.next()->reloading(aEvent);
aGuard.reset();
}
@@ -2947,10 +2947,10 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction
if (bSuccess)
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aLoadListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aLoadListeners);
aGuard.clear();
while (aIter.hasMoreElements())
- static_cast<XLoadListener*>(aIter.next())->reloaded(aEvent);
+ aIter.next()->reloaded(aEvent);
// if we are on the insert row, we have to reset all controls
// to set the default values
@@ -3027,14 +3027,11 @@ void SAL_CALL ODatabaseForm::rowSetChanged(const EventObject& /*event*/)
bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, const bool _bAllowSQLException,
::osl::ClearableMutexGuard& _rGuard )
{
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aRowSetApproveListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aRowSetApproveListeners );
_rGuard.clear();
while ( aIter.hasMoreElements() )
{
- Reference< XRowSetApproveListener > xListener( static_cast< XRowSetApproveListener* >( aIter.next() ) );
- if ( !xListener.is() )
- continue;
-
+ Reference< XRowSetApproveListener > xListener( aIter.next() );
try
{
if ( !xListener->approveRowSetChange( _rEvent ) )
@@ -3072,13 +3069,10 @@ sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event)
// Our aggregate doesn't have any ApproveRowSetListeners (expect ourself), as we re-routed the queryInterface
// for XRowSetApproveBroadcaster-interface.
// So we have to multiplex this approve request.
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aRowSetApproveListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aRowSetApproveListeners );
while ( aIter.hasMoreElements() )
{
- Reference< XRowSetApproveListener > xListener( static_cast< XRowSetApproveListener* >( aIter.next() ) );
- if ( !xListener.is() )
- continue;
-
+ Reference< XRowSetApproveListener > xListener( aIter.next() );
try
{
if ( !xListener->approveCursorMove( event ) )
@@ -3121,13 +3115,10 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event)
// Our aggregate doesn't have any ApproveRowSetListeners (expect ourself), as we re-routed the queryInterface
// for XRowSetApproveBroadcaster-interface.
// So we have to multiplex this approve request.
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aRowSetApproveListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aRowSetApproveListeners );
while ( aIter.hasMoreElements() )
{
- Reference< XRowSetApproveListener > xListener( static_cast< XRowSetApproveListener* >( aIter.next() ) );
- if ( !xListener.is() )
- continue;
-
+ Reference< XRowSetApproveListener > xListener( aIter.next() );
try
{
if ( !xListener->approveRowChange( event ) )
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 4e7a670d0d23..a0ad6e3b86ae 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -63,6 +63,7 @@
#include <connectivity/warningscontainer.hxx>
#include <listenercontainers.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/propmultiplex.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase12.hxx>
@@ -149,10 +150,10 @@ class ODatabaseForm :public OFormComponents
friend class OFormSubmitResetThread;
// listener administration
- ::comphelper::OInterfaceContainerHelper2 m_aLoadListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aRowSetApproveListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aSubmitListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aErrorListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XLoadListener> m_aLoadListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::sdb::XRowSetApproveListener> m_aRowSetApproveListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XSubmitListener> m_aSubmitListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::sdb::XSQLErrorListener> m_aErrorListeners;
ResetListeners m_aResetListeners;
::osl::Mutex m_aResetSafety;
css::uno::Any m_aCycle;
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index 005e63e7cbef..219b41d21d17 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -23,6 +23,7 @@
#include "EditBase.hxx"
#include <tools/link.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/form/XChangeBroadcaster.hpp>
@@ -126,7 +127,7 @@ typedef ::cppu::ImplHelper3< css::awt::XFocusListener,
class OEditControl : public OBoundControl
,public OEditControl_BASE
{
- ::comphelper::OInterfaceContainerHelper2
+ ::comphelper::OInterfaceContainerHelper3<css::form::XChangeListener>
m_aChangeListeners;
OUString m_aHtmlChangeValue;
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 1859e38c97ad..c18282a09d73 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -233,11 +233,11 @@ void OFileControlModel::read(const Reference<css::io::XObjectInputStream>& _rxIn
void SAL_CALL OFileControlModel::reset()
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aResetListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aResetListeners);
EventObject aEvt(static_cast<XWeak*>(this));
bool bContinue = true;
while (aIter.hasMoreElements() && bContinue)
- bContinue = static_cast<XResetListener*>(aIter.next())->approveReset(aEvt);
+ bContinue = aIter.next()->approveReset(aEvt);
if (bContinue)
{
diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx
index 194bbdfa327f..6ef7532aa842 100644
--- a/forms/source/component/File.hxx
+++ b/forms/source/component/File.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <FormComponent.hxx>
+#include <comphelper/interfacecontainer3.hxx>
namespace frm
@@ -29,7 +30,7 @@ class OFileControlModel
:public OControlModel
,public css::form::XReset
{
- ::comphelper::OInterfaceContainerHelper2 m_aResetListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XResetListener> m_aResetListeners;
OUString m_sDefaultValue;
protected:
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 41a61c5cba09..46b1f52f828f 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1854,14 +1854,14 @@ sal_Bool SAL_CALL OBoundControlModel::commit()
// we reach this only if we're not working with an external binding
if ( !hasField() )
return true;
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aUpdateListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aUpdateListeners );
EventObject aEvent;
aEvent.Source = static_cast< XWeak* >( this );
bool bSuccess = true;
aLock.release();
// UNSAFE >
while (aIter.hasMoreElements() && bSuccess)
- bSuccess = static_cast< XUpdateListener* >( aIter.next() )->approveUpdate( aEvent );
+ bSuccess = aIter.next()->approveUpdate( aEvent );
// < UNSAFE
aLock.acquire();
if ( bSuccess )
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index df6e90140886..d09f03b4adfc 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -340,11 +340,11 @@ css::uno::Sequence<OUString> SAL_CALL OGridControlModel::getColumnTypes()
// XReset
void SAL_CALL OGridControlModel::reset()
{
- ::comphelper::OInterfaceIteratorHelper2 aIter(m_aResetListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIter(m_aResetListeners);
EventObject aEvt(static_cast<XWeak*>(this));
bool bContinue = true;
while (aIter.hasMoreElements() && bContinue)
- bContinue = static_cast<XResetListener*>(aIter.next())->approveReset(aEvt);
+ bContinue = aIter.next()->approveReset(aEvt);
if (bContinue)
{
_reset();
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index d4eaec67fe9e..8339bb49a539 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/sdb/XRowSetChangeBroadcaster.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/implbase7.hxx>
@@ -54,9 +55,9 @@ class OGridControlModel final :public OControlModel
,public FontControlModel
,public OGridControlModel_BASE
{
- ::comphelper::OInterfaceContainerHelper2 m_aSelectListeners,
- m_aResetListeners,
- m_aRowSetChangeListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::view::XSelectionChangeListener> m_aSelectListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XResetListener> m_aResetListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::sdb::XRowSetChangeListener> m_aRowSetChangeListeners;
// [properties]
css::uno::Any m_aRowHeight; // Row height
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index a31779f1a5a9..245d13163e4f 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/graphic/XGraphicObject.hpp>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/implbase2.hxx>
#include <rtl/ref.hxx>
@@ -145,7 +146,7 @@ class OImageControlControl : public OBoundControl
, public OImageControlControl_Base
{
private:
- ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> m_aModifyListeners;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index ec2927d01525..cad8cc708b4b 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/form/XChangeBroadcaster.hpp>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/asyncnotification.hxx>
#include <connectivity/FValue.hxx>
#include <cppuhelper/implbase4.hxx>
@@ -245,8 +246,8 @@ class OListBoxControl :public OBoundControl
,public IEventProcessor
{
private:
- ::comphelper::OInterfaceContainerHelper2 m_aChangeListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aItemListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XChangeListener> m_aChangeListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::awt::XItemListener> m_aItemListeners;
css::uno::Any m_aCurrentSelection;
Idle m_aChangeIdle;
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 808f05e6e1ce..3b9c1dd12499 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/awt/ActionEvent.hpp>
-#include <com/sun/star/awt/XActionListener.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/GraphicObject.hpp>
#include <com/sun/star/util/VetoException.hpp>
@@ -174,11 +173,11 @@ namespace frm
bool bCancelled = false;
EventObject aEvent( static_cast< XWeak* >( this ) );
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aApproveActionListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aApproveActionListeners );
while( !bCancelled && aIter.hasMoreElements() )
{
// Every approveAction method must be thread-safe!
- if( !static_cast< XApproveActionListener* >( aIter.next() )->approveAction( aEvent ) )
+ if( !aIter.next()->approveAction( aEvent ) )
bCancelled = true;
}
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index e7bd4094bc4d..48b511c86a5f 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -24,7 +24,9 @@
#include "EventThread.hxx"
#include "imgprod.hxx"
#include <tools/link.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/propmultiplex.hxx>
+#include <com/sun/star/awt/XActionListener.hpp>
#include <com/sun/star/form/XImageProducerSupplier.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/form/XApproveActionListener.hpp>
@@ -186,13 +188,14 @@ namespace frm
private:
rtl::Reference<OImageProducerThread_Impl> m_pThread;
- ::comphelper::OInterfaceContainerHelper2 m_aSubmissionVetoListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::submission::XSubmissionVetoListener>
+ m_aSubmissionVetoListeners;
::std::unique_ptr< ControlFeatureInterception >
m_pFeatureInterception;
protected:
- ::comphelper::OInterfaceContainerHelper2 m_aApproveActionListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aActionListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XApproveActionListener> m_aApproveActionListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::awt::XActionListener> m_aActionListeners;
OUString m_aActionCommand;
// XSubmission
diff --git a/forms/source/component/entrylisthelper.hxx b/forms/source/component/entrylisthelper.hxx
index 58f2369fcbcc..cb0e0789a4aa 100644
--- a/forms/source/component/entrylisthelper.hxx
+++ b/forms/source/component/entrylisthelper.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/form/binding/XListEntryListener.hpp>
#include <cppuhelper/implbase3.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
namespace frm
@@ -53,7 +53,7 @@ namespace frm
m_aStringItems; /// "overridden" StringItemList property value
css::uno::Sequence< css::uno::Any >
m_aTypedItems; /// "overridden" TypedItemList property value
- ::comphelper::OInterfaceContainerHelper2
+ ::comphelper::OInterfaceContainerHelper3<css::util::XRefreshListener>
m_aRefreshListeners;
diff --git a/forms/source/component/errorbroadcaster.cxx b/forms/source/component/errorbroadcaster.cxx
index 16e362865c7b..e22cd2efbb74 100644
--- a/forms/source/component/errorbroadcaster.cxx
+++ b/forms/source/component/errorbroadcaster.cxx
@@ -74,10 +74,9 @@ namespace frm
{
if ( m_aErrorListeners.getLength() )
{
-
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aErrorListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aErrorListeners );
while ( aIter.hasMoreElements() )
- static_cast< XSQLErrorListener* >( aIter.next() )->errorOccured( _rError );
+ aIter.next()->errorOccured( _rError );
}
}
diff --git a/forms/source/component/errorbroadcaster.hxx b/forms/source/component/errorbroadcaster.hxx
index c8ad66c1ee17..17fcb4d0f2d0 100644
--- a/forms/source/component/errorbroadcaster.hxx
+++ b/forms/source/component/errorbroadcaster.hxx
@@ -22,7 +22,7 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
#include <cppuhelper/interfacecontainer.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdb/SQLErrorEvent.hpp>
@@ -37,7 +37,7 @@ namespace frm
{
private:
::cppu::OBroadcastHelper& m_rBHelper;
- ::comphelper::OInterfaceContainerHelper2 m_aErrorListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::sdb::XSQLErrorListener> m_aErrorListeners;
protected:
explicit OErrorBroadcaster( ::cppu::OBroadcastHelper& _rBHelper );
diff --git a/forms/source/helper/resettable.cxx b/forms/source/helper/resettable.cxx
index 6eac1633d82d..8994254a6e20 100644
--- a/forms/source/helper/resettable.cxx
+++ b/forms/source/helper/resettable.cxx
@@ -48,12 +48,12 @@ namespace frm
bool ResetHelper::approveReset()
{
- ::comphelper::OInterfaceIteratorHelper2 aIter( m_aResetListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( m_aResetListeners );
EventObject aResetEvent( m_rParent );
bool bContinue = true;
while ( aIter.hasMoreElements() && bContinue )
- bContinue = static_cast< XResetListener* >( aIter.next() )->approveReset( aResetEvent );
+ bContinue = aIter.next()->approveReset( aResetEvent );
return bContinue;
}
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index 7a59d37d5574..833cd90df561 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -49,6 +49,7 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/form/XLoadable.hpp>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/propagg.hxx>
#include <comphelper/propmultiplex.hxx>
#include <comphelper/uno3.hxx>
@@ -536,8 +537,10 @@ private:
bool m_bValuePropertyMayBeVoid;
ResetHelper m_aResetHelper;
- ::comphelper::OInterfaceContainerHelper2 m_aUpdateListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aFormComponentListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XUpdateListener>
+ m_aUpdateListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::validation::XFormComponentValidityListener>
+ m_aFormComponentListeners;
css::uno::Reference< css::form::binding::XValueBinding >
m_xExternalBinding;
diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx
index da55f0ebebb1..66135a02e48e 100644
--- a/forms/source/inc/InterfaceContainer.hxx
+++ b/forms/source/inc/InterfaceContainer.hxx
@@ -34,7 +34,7 @@
#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <osl/mutex.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase8.hxx>
@@ -89,7 +89,7 @@ protected:
OInterfaceArray m_aItems;
OInterfaceMap m_aMap;
- ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners;
const css::uno::Type m_aElementType;
diff --git a/forms/source/inc/resettable.hxx b/forms/source/inc/resettable.hxx
index 2bdb16404b22..cbbc13e50b3f 100644
--- a/forms/source/inc/resettable.hxx
+++ b/forms/source/inc/resettable.hxx
@@ -21,7 +21,7 @@
#include <com/sun/star/form/XResetListener.hpp>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
namespace cppu
{
@@ -52,7 +52,7 @@ namespace frm
private:
::cppu::OWeakObject& m_rParent;
- ::comphelper::OInterfaceContainerHelper2 m_aResetListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XResetListener> m_aResetListeners;
};
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 7dd3bbc20544..1fda65382b62 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -560,7 +560,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
}
catch( const Exception& )
{
- SAL_WARN("forms.misc", "OInterfaceContainerHelper2::read: reading succeeded, but not inserting!" );
+ SAL_WARN("forms.misc", "OInterfaceContainerHelper3::read: reading succeeded, but not inserting!" );
// create a placeholder
xElement.set(lcl_createPlaceHolder( m_xContext ), css::uno::UNO_QUERY);
if ( !xElement.is() )
diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx
index 0cabb526c75f..29dbbf61628d 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -103,9 +103,9 @@ namespace frm
OSL_ENSURE( _nAttributeId == m_nAttributeId, "OAttributeDispatcher::onAttributeStateChanged: wrong attribute!" );
FeatureStateEvent aEvent( buildStatusEvent() );
- ::comphelper::OInterfaceIteratorHelper2 aIter( getStatusListeners() );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( getStatusListeners() );
while ( aIter.hasMoreElements() )
- doNotify( static_cast< XStatusListener* >( aIter.next() ), aEvent );
+ doNotify( aIter.next(), aEvent );
}
diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx
index d667790c9756..93f163d4379a 100644
--- a/forms/source/richtext/featuredispatcher.cxx
+++ b/forms/source/richtext/featuredispatcher.cxx
@@ -109,9 +109,9 @@ namespace frm
void ORichTextFeatureDispatcher::invalidateFeatureState_Broadcast()
{
FeatureStateEvent aEvent( buildStatusEvent() );
- ::comphelper::OInterfaceIteratorHelper2 aIter( getStatusListeners() );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( getStatusListeners() );
while ( aIter.hasMoreElements() )
- doNotify( static_cast< XStatusListener* >( aIter.next() ), aEvent );
+ doNotify( aIter.next(), aEvent );
}
diff --git a/forms/source/richtext/featuredispatcher.hxx b/forms/source/richtext/featuredispatcher.hxx
index feba00d5bfb2..53be887a4c40 100644
--- a/forms/source/richtext/featuredispatcher.hxx
+++ b/forms/source/richtext/featuredispatcher.hxx
@@ -21,7 +21,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -38,7 +38,7 @@ namespace frm
{
private:
css::util::URL m_aFeatureURL;
- ::comphelper::OInterfaceContainerHelper2 m_aStatusListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::frame::XStatusListener> m_aStatusListeners;
EditView* m_pEditView;
bool m_bDisposed;
@@ -48,7 +48,7 @@ namespace frm
protected:
const css::util::URL& getFeatureURL() const { return m_aFeatureURL; }
- ::comphelper::OInterfaceContainerHelper2& getStatusListeners() { return m_aStatusListeners; }
+ ::comphelper::OInterfaceContainerHelper3<css::frame::XStatusListener>& getStatusListeners() { return m_aStatusListeners; }
bool isDisposed() const { return m_bDisposed; }
void checkDisposed() const { if ( isDisposed() ) throw css::lang::DisposedException(); }
diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx
index dfb1093904c8..3dc0987b33b3 100644
--- a/forms/source/richtext/richtextmodel.hxx
+++ b/forms/source/richtext/richtextmodel.hxx
@@ -21,7 +21,7 @@
#include <FormComponent.hxx>
#include <formcontrolfont.hxx>
#include "richtextunowrapper.hxx"
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/propertycontainerhelper.hxx>
#include <com/sun/star/awt/XDevice.hpp>
@@ -101,7 +101,7 @@ namespace frm
m_pEngine;
bool m_bSettingEngineText;
- ::comphelper::OInterfaceContainerHelper2
+ ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener>
m_aModifyListeners;
public: