diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-15 21:46:13 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-06-17 08:56:36 +0200 |
commit | adc295a1b2e1f2ed43e7eb587fc89d7229e0f122 (patch) | |
tree | d045a927d1f88d2574bdef441bc1cbc0b81fd16b /toolkit | |
parent | d39846bfd16ad9873795149c370a95f42363bfd9 (diff) |
Add comphelper::getUnoTunnelImplementation template
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_*
Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596
Reviewed-on: https://gerrit.libreoffice.org/74107
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxgraphics.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxmenu.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtopwindow.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/stdtabcontroller.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/helper/unowrapper.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/helper/vclunohelper.cxx | 16 |
8 files changed, 15 insertions, 15 deletions
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index d4e158838923..f8cd331f668f 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -286,7 +286,7 @@ void VCLXGraphics::copy( const uno::Reference< awt::XDevice >& rxSource, sal_Int if ( mpOutputDevice ) { - VCLXDevice* pFromDev = VCLXDevice::getImplementation( rxSource ); + VCLXDevice* pFromDev = comphelper::getUnoTunnelImplementation<VCLXDevice>( rxSource ); DBG_ASSERT( pFromDev, "VCLXGraphics::copy - invalid device" ); if ( pFromDev ) { diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index a757b0a7647e..52ee47d42ac2 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -387,7 +387,7 @@ void VCLXMenu::setPopupMenu( SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - VCLXMenu* pVCLMenu = VCLXMenu::getImplementation( rxPopupMenu ); + VCLXMenu* pVCLMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( rxPopupMenu ); DBG_ASSERT( pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu(), "setPopupMenu: Invalid Menu!" ); if ( mpMenu && pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu() ) diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e09dee3d242c..904f95fd5e38 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1519,7 +1519,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( VclPtr<vcl::Window> pParent; if ( rDescriptor.Parent.is() ) { - VCLXWindow* pParentComponent = VCLXWindow::getImplementation( rDescriptor.Parent ); + VCLXWindow* pParentComponent = comphelper::getUnoTunnelImplementation<VCLXWindow>( rDescriptor.Parent ); // #103939# Don't throw assertion, may be it's a system dependent window, used in ImplCreateWindow. // DBG_ASSERT( pParentComponent, "ParentComponent not valid" ); diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index bd53b7238c92..9eb5ea5f7853 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -154,7 +154,7 @@ void VCLXTopWindow_Base::setMenuBar( const css::uno::Reference< css::awt::XMenuB pSystemWindow->SetMenuBar( nullptr ); if ( rxMenu.is() ) { - VCLXMenu* pMenu = VCLXMenu::getImplementation( rxMenu ); + VCLXMenu* pMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( rxMenu ); if ( pMenu && !pMenu->IsPopupMenu() ) pSystemWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() )); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index b1e2fc5cf536..04c8cffc2a2b 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1143,7 +1143,7 @@ void VCLXWindow::setPointer( const css::uno::Reference< css::awt::XPointer >& rx { SolarMutexGuard aGuard; - VCLXPointer* pPointer = VCLXPointer::getImplementation( rxPointer ); + VCLXPointer* pPointer = comphelper::getUnoTunnelImplementation<VCLXPointer>( rxPointer ); if ( pPointer && GetWindow() ) GetWindow()->SetPointer( pPointer->GetPointer() ); } diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index bdcee66c9ede..f7debf9f0c1a 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -150,7 +150,7 @@ void StdTabController::ImplActivateControl( bool bFirst ) const Reference< XWindowPeer > xCP = pControls[nCtrl]->getPeer(); if ( xCP.is() ) { - VCLXWindow* pC = VCLXWindow::getImplementation( xCP ); + VCLXWindow* pC = comphelper::getUnoTunnelImplementation<VCLXWindow>( xCP ); if ( pC && pC->GetWindow() && ( pC->GetWindow()->GetStyle() & WB_TABSTOP ) ) { pC->GetWindow()->GrabFocus(); diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 1d7ace5837ee..c5184b295425 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -170,7 +170,7 @@ VclPtr<vcl::Window> UnoWrapper::GetWindow(const css::uno::Reference<css::awt::XW void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer> xIFace ) { - VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( xIFace ); + VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( xIFace ); DBG_ASSERT( pVCLXWindow, "SetComponentInterface - unsupported type" ); if ( pVCLXWindow ) diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index c3e05cb2e6ac..6ba0ecf1d9d6 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -79,7 +79,7 @@ BitmapEx VCLUnoHelper::GetBitmap( const css::uno::Reference< css::awt::XBitmap>& } else if ( rxBitmap.is() ) { - VCLXBitmap* pVCLBitmap = VCLXBitmap::getImplementation( rxBitmap ); + VCLXBitmap* pVCLBitmap = comphelper::getUnoTunnelImplementation<VCLXBitmap>( rxBitmap ); if ( pVCLBitmap ) aBmp = pVCLBitmap->GetBitmap(); else @@ -110,26 +110,26 @@ css::uno::Reference< css::awt::XBitmap> VCLUnoHelper::CreateBitmap( const Bitmap VclPtr< vcl::Window > VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow ) { - VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : VclPtr< vcl::Window >(); } VclPtr< vcl::Window > VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow ) { - VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : VclPtr< vcl::Window >(); } VclPtr< vcl::Window > VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindow ) { - VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : VclPtr< vcl::Window >(); } vcl::Region VCLUnoHelper::GetRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) { vcl::Region aRegion; - VCLXRegion* pVCLRegion = VCLXRegion::getImplementation( rxRegion ); + VCLXRegion* pVCLRegion = comphelper::getUnoTunnelImplementation<VCLXRegion>( rxRegion ); if ( pVCLRegion ) aRegion = pVCLRegion->GetRegion(); else @@ -156,7 +156,7 @@ css::uno::Reference< css::awt::XWindow> VCLUnoHelper::GetInterface( vcl::Window* OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XDevice>& rxDevice ) { VclPtr<OutputDevice> pOutDev; - VCLXDevice* pDev = VCLXDevice::getImplementation( rxDevice ); + VCLXDevice* pDev = comphelper::getUnoTunnelImplementation<VCLXDevice>( rxDevice ); if ( pDev ) pOutDev = pDev->GetOutputDevice(); return pOutDev; @@ -165,7 +165,7 @@ OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XGraphics>& rxGraphics ) { OutputDevice* pOutDev = nullptr; - VCLXGraphics* pGrf = VCLXGraphics::getImplementation( rxGraphics ); + VCLXGraphics* pGrf = comphelper::getUnoTunnelImplementation<VCLXGraphics>( rxGraphics ); if ( pGrf ) pOutDev = pGrf->GetOutputDevice(); return pOutDev; @@ -258,7 +258,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons vcl::Font VCLUnoHelper::CreateFont( const css::uno::Reference< css::awt::XFont >& rxFont ) { vcl::Font aFont; - VCLXFont* pVCLXFont = VCLXFont::getImplementation( rxFont ); + VCLXFont* pVCLXFont = comphelper::getUnoTunnelImplementation<VCLXFont>( rxFont ); if ( pVCLXFont ) aFont = pVCLXFont->GetFont(); return aFont; |