summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/awt/vclxwindows.hxx9
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx14
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx3
-rw-r--r--toolkit/source/awt/vclxwindows.cxx32
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx5
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx31
-rw-r--r--toolkit/source/helper/unowrapper.cxx3
7 files changed, 12 insertions, 85 deletions
diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index 983bcff726b4..ce96248494ea 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -121,9 +121,6 @@ public:
VCLXDialog();
virtual ~VCLXDialog() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
// css::awt::XDialog2
virtual void SAL_CALL endDialog( ::sal_Int32 Result ) override;
virtual void SAL_CALL setHelpId( const OUString& Id ) override;
@@ -154,9 +151,6 @@ public:
VCLXTabPage();
virtual ~VCLXTabPage() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
// css::awt::XView
void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
@@ -180,9 +174,6 @@ public:
VCLXMultiPage();
virtual ~VCLXMultiPage() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
// css::lang::XComponent
void SAL_CALL dispose( ) override;
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 6d0798bda590..7fbb1ea1ccd6 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
@@ -106,15 +105,6 @@ uno::Sequence< OUString > VCLXAccessibleComponent::getSupportedServiceNames()
return aNames;
}
-sal_Int64 VCLXAccessibleComponent::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
-}
-
-css::uno::Sequence<sal_Int8> const & VCLXAccessibleComponent::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&, rEvent, void )
{
/* Ignore VclEventId::WindowEndPopupMode, because the UNO accessibility wrapper
@@ -179,7 +169,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVc
uno::Reference<XAccessibleContext> xChildContext = xAcc->getAccessibleContext();
if (xChildContext.is())
{
- VCLXAccessibleComponent* pChildComponent = comphelper::getFromUnoTunnel<VCLXAccessibleComponent>(xChildContext);
+ VCLXAccessibleComponent* pChildComponent = dynamic_cast<VCLXAccessibleComponent*>(xChildContext.get());
if (pChildComponent)
{
css::uno::Any aNewStateValue;
@@ -200,7 +190,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVc
uno::Reference<XAccessibleContext> xChildContext = xAcc->getAccessibleContext();
if (xChildContext.is())
{
- VCLXAccessibleComponent* pChildComponent = comphelper::getFromUnoTunnel<VCLXAccessibleComponent>(xChildContext);
+ VCLXAccessibleComponent* pChildComponent = dynamic_cast<VCLXAccessibleComponent*>(xChildContext.get());
if (pChildComponent)
{
css::uno::Any aOldStateValue;
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index fd86d5e371b9..7a3e3e7cfbcb 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -139,7 +139,6 @@
#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/profilezone.hxx>
-#include <comphelper/servicehelper.hxx>
#include <helper/msgbox.hxx>
#include <helper/scrollabledialog.hxx>
@@ -1546,7 +1545,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference<VCLXWindow>* ppNewCom
// which creates a component object.
css::uno::Reference< css::awt::XWindowPeer > xWinPeer = pNewWindow->GetComponentInterface( false );
if ( xWinPeer.is() )
- *ppNewComp = comphelper::getFromUnoTunnel< VCLXDialog >( xWinPeer );
+ *ppNewComp = dynamic_cast< VCLXDialog* >( xWinPeer.get() );
else
*ppNewComp = new VCLXDialog;
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 7cf80879148a..8fc6dc0277db 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/awt/TextAlign.hpp>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/servicehelper.hxx>
#include <sal/log.hxx>
#include <awt/vclxwindows.hxx>
@@ -2224,16 +2223,6 @@ VCLXDialog::~VCLXDialog()
SAL_INFO("toolkit", __FUNCTION__);
}
-sal_Int64 VCLXDialog::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<VCLXWindow>{});
-}
-
-css::uno::Sequence<sal_Int8> const & VCLXDialog::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result )
{
SolarMutexGuard aGuard;
@@ -2409,17 +2398,6 @@ void VCLXMultiPage::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
VCLXMultiPage::~VCLXMultiPage()
{
}
-
-sal_Int64 VCLXMultiPage::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<VCLXWindow>{});
-}
-
-css::uno::Sequence<sal_Int8> const & VCLXMultiPage::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
void SAL_CALL VCLXMultiPage::dispose()
{
SolarMutexGuard aGuard;
@@ -2672,16 +2650,6 @@ VCLXTabPage::~VCLXTabPage()
{
}
-sal_Int64 VCLXTabPage::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<VCLXWindow>{});
-}
-
-css::uno::Sequence<sal_Int8> const & VCLXTabPage::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
// css::awt::XView
void SAL_CALL VCLXTabPage::draw( sal_Int32 nX, sal_Int32 nY )
{
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index ba0054714c0c..67ee3bcc6719 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -36,7 +36,6 @@
#include <cppuhelper/weak.hxx>
#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/outdev.hxx>
#include <vcl/image.hxx>
@@ -788,11 +787,11 @@ void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxCo
uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), uno::UNO_QUERY );
- VCLXTabPage* pXPage = comphelper::getFromUnoTunnel< VCLXTabPage >( xPage );
+ VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() );
TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
if ( xTabCntrl.is() && pPage )
{
- VCLXMultiPage* pXTab = comphelper::getFromUnoTunnel< VCLXMultiPage >( xTabCntrl );
+ VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() );
if ( pXTab )
{
OUString sTitle;
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index bf09ff269564..090a6738f517 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -22,9 +22,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ref.hxx>
@@ -79,8 +77,7 @@ private:
Reference< XTreeNode > mxRootNode;
};
-class MutableTreeNode:
- public ::cppu::WeakAggImplHelper3< XMutableTreeNode, XServiceInfo, css::lang::XUnoTunnel >
+class MutableTreeNode: public ::cppu::WeakAggImplHelper2< XMutableTreeNode, XServiceInfo >
{
friend class MutableTreeDataModel;
@@ -121,9 +118,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
private:
TreeNodeVector maChildren;
Any maDisplayValue;
@@ -183,13 +177,12 @@ void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode >
if( mxRootNode.is() )
{
- rtl::Reference< MutableTreeNode > xOldImpl( comphelper::getFromUnoTunnel< MutableTreeNode >( mxRootNode ) );
+ rtl::Reference< MutableTreeNode > xOldImpl( dynamic_cast< MutableTreeNode* >( mxRootNode.get() ) );
if( xOldImpl.is() )
xOldImpl->mbIsInserted = false;
}
- rtl::Reference< MutableTreeNode > xImpl(
- comphelper::getFromUnoTunnel< MutableTreeNode >( xNode ) );
+ rtl::Reference< MutableTreeNode > xImpl( dynamic_cast< MutableTreeNode* >( xNode.get() ) );
if( !xImpl.is() || xImpl->mbIsInserted )
throw IllegalArgumentException();
@@ -309,8 +302,7 @@ void SAL_CALL MutableTreeNode::setDataValue( const Any& _datavalue )
void SAL_CALL MutableTreeNode::appendChild( const Reference< XMutableTreeNode >& xChildNode )
{
std::unique_lock aGuard( maMutex );
- rtl::Reference< MutableTreeNode > xImpl(
- comphelper::getFromUnoTunnel< MutableTreeNode >( xChildNode ) );
+ rtl::Reference< MutableTreeNode > xImpl( dynamic_cast< MutableTreeNode* >( xChildNode.get() ) );
if( !xImpl.is() || xImpl->mbIsInserted || (this == xImpl.get()) )
throw IllegalArgumentException();
@@ -329,8 +321,7 @@ void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const
if( (nChildIndex < 0) || (o3tl::make_unsigned(nChildIndex) > maChildren.size()) )
throw IndexOutOfBoundsException();
- rtl::Reference< MutableTreeNode > xImpl(
- comphelper::getFromUnoTunnel< MutableTreeNode >( xChildNode ) );
+ rtl::Reference< MutableTreeNode > xImpl( dynamic_cast< MutableTreeNode* >( xChildNode.get() ) );
if( !xImpl.is() || xImpl->mbIsInserted || (this == xImpl.get()) )
throw IllegalArgumentException();
@@ -460,8 +451,7 @@ sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNod
{
std::scoped_lock aGuard( maMutex );
- rtl::Reference< MutableTreeNode > xImpl(
- comphelper::getFromUnoTunnel< MutableTreeNode >( xNode ) );
+ rtl::Reference< MutableTreeNode > xImpl( dynamic_cast< MutableTreeNode* >( xNode.get() ) );
if( xImpl.is() )
{
sal_Int32 nChildCount = maChildren.size();
@@ -521,15 +511,6 @@ Sequence< OUString > SAL_CALL MutableTreeNode::getSupportedServiceNames( )
return aSeq;
}
-sal_Int64 MutableTreeNode::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
-}
-
-css::uno::Sequence<sal_Int8> const & MutableTreeNode::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
-}
-
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 2874087e14ef..080847154cb2 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -26,7 +26,6 @@
#include <awt/vclxtopwindow.hxx>
#include <awt/vclxwindows.hxx>
-#include <comphelper/servicehelper.hxx>
#include <toolkit/dllapi.h>
#include <vcl/menu.hxx>
@@ -180,7 +179,7 @@ void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, const css::uno::Refer
css::uno::Reference< css::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
if( xPeer.is() )
{
- bool bSameInstance( pVCLXWindow == comphelper::getFromUnoTunnel< VCLXWindow >( xPeer ));
+ bool bSameInstance( pVCLXWindow == dynamic_cast< VCLXWindow* >( xPeer.get() ));
SAL_WARN_IF( !bSameInstance, "toolkit.helper", "UnoWrapper::SetWindowInterface: there is already a WindowPeer/ComponentInterface for this VCL window" );
if ( bSameInstance )
return;