tdf#39593 remove IMPL_XUNOTUNNEL* macros

Replace with UNO3_GETIMPLEMENTATION* macros.
Replace single usage of IMPL_XUNOTUNNEL_MINIMAL with it's body.

Change-Id: I7d4ad76399b999ebb2178ecf57edcf6bd2aa6c3e
Reviewed-on: https://gerrit.libreoffice.org/73424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 3537e91..cdaa36a 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -83,7 +83,7 @@

    if( aValue >>= xRenderDevice )
    {
        VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
        VCLXDevice* pDevice = VCLXDevice::getImplementation(xRenderDevice);
        VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >();
        pPrinter = dynamic_cast<Printer*>(pOut.get());
    }
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 6c3be3d..cd972a3 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -167,7 +167,7 @@
        }
        if( m_xParentWindow.is() )
        {
            VCLXWindow* pImplementation = VCLXWindow::GetImplementation(m_xParentWindow);
            VCLXWindow* pImplementation = VCLXWindow::getImplementation(m_xParentWindow);
            if (pImplementation)
                pParent = pImplementation->GetWindow().get();
        }
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 6b87466..6c2e671 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -430,7 +430,7 @@
    if(xFrame.is())
    {
        uno::Reference< awt::XWindow > xContainerWindow = xFrame->getContainerWindow();
        VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xContainerWindow);
        VCLXWindow* pParentComponent = VCLXWindow::getImplementation(xContainerWindow);
        assert(pParentComponent);
        if (pParentComponent)
            pParentComponent->setVisible(true);
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 8907ed5..90e441b 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1269,7 +1269,7 @@

        if (comphelper::LibreOfficeKit::isActive())
        {
            PopupMenu* pPopupMenu = static_cast<PopupMenu*>(VCLXMenu::GetImplementation(xPopupMenu)->GetMenu());
            PopupMenu* pPopupMenu = static_cast<PopupMenu*>(VCLXMenu::getImplementation(xPopupMenu)->GetMenu());
            pPopupMenu->SetLOKNotifier(SfxViewShell::Current());

            // the context menu expects a position related to the document window,
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 2ab7690..73a9728 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -251,7 +251,7 @@
            throw IllegalArgumentException("need a frame", *this, 1 );

        xParent = xFrame->getContainerWindow();
        VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xParent);
        VCLXWindow* pParentComponent = VCLXWindow::getImplementation(xParent);
        VclPtr< vcl::Window > pParentWin = pParentComponent ? pParentComponent->GetWindow() : VclPtr< vcl::Window >();
        if (!pParentWin)
        {
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index 859b100..f8fa6d7 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -68,7 +68,7 @@
        vcl::Window* pParentWin = nullptr;
        if (rParentPeer.is())
        {
            VCLXWindow* pParent = VCLXWindow::GetImplementation(rParentPeer);
            VCLXWindow* pParent = VCLXWindow::getImplementation(rParentPeer);
            if (pParent)
                pParentWin = pParent->GetWindow().get();
        }
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 4030539..343c99c 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -150,7 +150,7 @@

                                    if(xWindowPeer.is())
                                    {
                                        VCLXWindow* pVCLXWindow = VCLXWindow::GetImplementation(xWindowPeer);
                                        VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation(xWindowPeer);

                                        if(pVCLXWindow)
                                        {
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 757cd19..938dcc65 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -266,7 +266,7 @@
    Reference< XForm > xForm = m_xDatMan->createDatabaseForm( aBibDesc );

    Reference< awt::XWindow >  aWindow = rFrame->getContainerWindow();
    VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(aWindow);
    VCLXWindow* pParentComponent = VCLXWindow::getImplementation(aWindow);
    assert(pParentComponent);

    VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( aWindow );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index ca78d76..21bd8dd 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -359,7 +359,7 @@
        // Maybe it is intended to only announce the frame to the controller, and the instance doing this
        // announcement is responsible for calling setComponent, too.
        Reference< XWindow > xContainerWindow = m_xFrame->getContainerWindow();
        VCLXWindow* pContainerWindow = VCLXWindow::GetImplementation(xContainerWindow);
        VCLXWindow* pContainerWindow = VCLXWindow::getImplementation(xContainerWindow);
        VclPtr<vcl::Window> pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : VclPtr<vcl::Window>();
        if (!pParentWin)
            throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this);
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 7cc7ed0..aa3afe7 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -174,7 +174,7 @@
            vcl::Window* pParentWin = nullptr;
            if ( _rParentPeer.is() )
            {
                VCLXWindow* pParentXWin = VCLXWindow::GetImplementation( _rParentPeer );
                VCLXWindow* pParentXWin = VCLXWindow::getImplementation( _rParentPeer );
                if ( pParentXWin )
                    pParentWin = pParentXWin->GetWindow().get();
                DBG_ASSERT( pParentWin, "ORichTextControl::createPeer: could not obtain the VCL-level parent window!" );
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 725fe6e..8d50352 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -123,7 +123,7 @@
            vcl::Window* pParentWin = nullptr;
            if ( _rParentPeer.is() )
            {
                VCLXWindow* pParentXWin = VCLXWindow::GetImplementation( _rParentPeer );
                VCLXWindow* pParentXWin = VCLXWindow::getImplementation( _rParentPeer );
                if ( pParentXWin )
                    pParentWin = pParentXWin->GetWindow().get();
                DBG_ASSERT( pParentWin, "ONavigationBarControl::createPeer: could not obtain the VCL-level parent window!" );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 274c595..608ecb7 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -194,7 +194,7 @@

                if ( xMenuBar.is() )
                {
                    VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar );
                    VCLXMenu* pAwtMenuBar = VCLXMenu::getImplementation( xMenuBar );
                    if ( pAwtMenuBar )
                    {
                        MenuBar* pMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu());
@@ -246,7 +246,7 @@
                    }
                }

                VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar );
                VCLXMenu* pAwtMenuBar = VCLXMenu::getImplementation( xMenuBar );
                if ( pAwtMenuBar )
                    pSetMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu());
            }
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index c4f8a8b..22c2510 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -193,7 +193,7 @@
// private function
void ControlMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu*                                     pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu*                                     pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*                                         pVCLPopupMenu     = nullptr;

    SolarMutexGuard aSolarMutexGuard;
@@ -244,7 +244,7 @@

    if (!sIdent.isEmpty() && m_xResPopupMenu)
    {
        pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( m_xPopupMenu ));
        pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( m_xPopupMenu ));
        nMenuId = m_xResPopupMenu->GetItemId(sIdent);
    }

@@ -299,7 +299,7 @@
        {
            m_bShowMenuImages   = bShowMenuImages;

            VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( m_xPopupMenu ));
            VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( m_xPopupMenu ));
            if ( pPopupMenu )
            {
                PopupMenu* pVCLPopupMenu = static_cast<PopupMenu *>(pPopupMenu->GetMenu());
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 20a8ec9..20c8387 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -76,7 +76,7 @@
void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    const OUString*    pFontNameArray = rFontNameSeq.getConstArray();
    VCLXPopupMenu*     pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu*     pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*         pVCLPopupMenu = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 8b6b0b1..d84bfdd 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -124,7 +124,7 @@
// private function
void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu*          pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu*          pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*              pVCLPopupMenu = nullptr;

    resetPopupMenu( rPopupMenu );
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index e5d70ff..b7354d3 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -73,7 +73,7 @@
// private function
void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& rModel, Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu*       pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu*       pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*           pVCLPopupMenu     = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 5708dbc..721e061 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -156,7 +156,7 @@

void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu , const Mode eMode )
{
    VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*     pPopupMenu    = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 4f2b2625..e8be467 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -64,7 +64,7 @@
// private function
void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*     pPopupMenu    = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index e3e2ebd..138042a 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -302,7 +302,7 @@
// private function
void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu* pPopupMenu    = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu* pPopupMenu    = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*     pVCLPopupMenu = nullptr;

    SolarMutexGuard aSolarMutexGuard;
@@ -400,7 +400,7 @@

    if ( xPopupMenu.is() )
    {
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( xPopupMenu ));
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( xPopupMenu ));
        if ( pPopupMenu )
        {
            OUString aURL;
@@ -430,7 +430,7 @@
    SolarMutexGuard aSolarMutexGuard;
    if ( m_xFrame.is() && m_xPopupMenu.is() )
    {
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( m_xPopupMenu ));
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( m_xPopupMenu ));
        if ( pPopupMenu )
        {
            const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index d868d33..ad4ff3c 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -89,7 +89,7 @@
void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescriptor >& rVerbCommandSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    const css::embed::VerbDescriptor* pVerbCommandArray = rVerbCommandSeq.getConstArray();
    VCLXPopupMenu*                    pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu*                    pPopupMenu        = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*                        pVCLPopupMenu     = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 6d325ff..43333b9 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -329,7 +329,7 @@

    if ( m_bReplaceWithLast && !rEvent.IsEnabled && m_xPopupMenu.is() )
    {
        Menu* pVclMenu = VCLXMenu::GetImplementation( m_xPopupMenu )->GetMenu();
        Menu* pVclMenu = VCLXMenu::getImplementation( m_xPopupMenu )->GetMenu();

        ToolBox* pToolBox = nullptr;
        sal_uInt16 nId = 0;
@@ -663,7 +663,7 @@
        // TODO investigate how to wrap Get/SetUserValue in css::awt::XMenu
        MenuAttributes* pMenuAttributes( nullptr );
        VCLXPopupMenu*  pTkPopupMenu =
            static_cast<VCLXPopupMenu *>( VCLXMenu::GetImplementation( m_xPopupMenu ) );
            static_cast<VCLXPopupMenu *>( VCLXMenu::getImplementation( m_xPopupMenu ) );

        SolarMutexGuard aSolarMutexGuard;
        PopupMenu* pVCLPopupMenu = pTkPopupMenu ?
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 04042fa..67d5d93 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -118,7 +118,7 @@
// private function
void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
    VCLXPopupMenu* pPopupMenu    = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu* pPopupMenu    = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( rPopupMenu ));
    PopupMenu*     pVCLPopupMenu = nullptr;

    SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/resourcemenucontroller.cxx b/framework/source/uielement/resourcemenucontroller.cxx
index bc5fd7a..887dbc5 100644
--- a/framework/source/uielement/resourcemenucontroller.cxx
+++ b/framework/source/uielement/resourcemenucontroller.cxx
@@ -205,7 +205,7 @@

    // Now fill the menu with the configuration data.
    css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY );
    framework::MenuBarManager::FillMenu( m_nNewMenuId, VCLXMenu::GetImplementation( m_xPopupMenu )->GetMenu(), m_aModuleName, m_xMenuContainer, xDispatchProvider );
    framework::MenuBarManager::FillMenu( m_nNewMenuId, VCLXMenu::getImplementation( m_xPopupMenu )->GetMenu(), m_aModuleName, m_xMenuContainer, xDispatchProvider );

    // For context menus, add object verbs.
    if ( m_bContextMenu )
@@ -238,7 +238,7 @@
        xStorable.set( xController->getModel(), css::uno::UNO_QUERY );

    bool bReadOnly = xStorable.is() && xStorable->isReadonly();
    VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
    VCLXMenu* pAwtMenu = VCLXMenu::getImplementation( m_xPopupMenu );
    Menu* pVCLMenu = pAwtMenu->GetMenu();

    for ( const auto& rVerb : rVerbs )
@@ -258,7 +258,7 @@
    // Must initialize MenuBarManager here, because we want to let the app do context menu interception before.
    if ( !m_xMenuBarManager.is() )
    {
        VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
        VCLXMenu* pAwtMenu = VCLXMenu::getImplementation( m_xPopupMenu );
        css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY );
        m_xMenuBarManager.set( new framework::MenuBarManager(
            m_xContext, m_xFrame, m_xURLTransformer, xDispatchProvider, m_aModuleName, pAwtMenu->GetMenu(), false, !m_bContextMenu && !m_bInToolbar ) );
@@ -360,7 +360,7 @@

void SaveAsMenuController::impl_setPopupMenu()
{
    VCLXMenu* pPopupMenu    = VCLXMenu::GetImplementation( m_xPopupMenu );
    VCLXMenu* pPopupMenu    = VCLXMenu::getImplementation( m_xPopupMenu );
    Menu*     pVCLPopupMenu = nullptr;

    SolarMutexGuard aGuard;
diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx
index b1c1a87..16478b5 100644
--- a/framework/source/uielement/thesaurusmenucontroller.cxx
+++ b/framework/source/uielement/thesaurusmenucontroller.cxx
@@ -77,7 +77,7 @@
    css::lang::Locale aLocale = LanguageTag::convertToLocale( aIsoLang );
    getMeanings( aSynonyms, aText, aLocale, 7 /*max number of synonyms to retrieve*/ );

    VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
    VCLXMenu* pAwtMenu = VCLXMenu::getImplementation( m_xPopupMenu );
    Menu* pVCLMenu = pAwtMenu->GetMenu();
    pVCLMenu->SetMenuFlags( MenuFlags::NoAutoMnemonics );
    if ( !aSynonyms.empty() )
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index 9a683d5..dca4cad 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -177,7 +177,7 @@
    if ( xPopupMenu.is() )
    {
        SolarMutexGuard aGuard;
        VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( xPopupMenu ));
        VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( xPopupMenu ));
        PopupMenu*     pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr;

        SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu");
@@ -232,7 +232,7 @@

    if ( xPopupMenu.is() )
    {
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( xPopupMenu ));
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( xPopupMenu ));
        if ( pPopupMenu )
        {
            SolarMutexGuard aSolarMutexGuard;
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 4d066d5..945df54 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -170,7 +170,7 @@
    if ( rSettings.GetUseImagesInMenus() )
        aImage = vcl::CommandInfoProvider::GetImageForCommand(rCommandURL, m_xFrame);

    VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( rPopupMenu ));
    VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( rPopupMenu ));
    if ( pPopupMenu )
    {
        PopupMenu* pVCLPopupMenu = static_cast<PopupMenu *>(pPopupMenu->GetMenu());
@@ -385,7 +385,7 @@

            {
                SolarMutexGuard aGuard;
                VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( m_xPopupMenu ));
                VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( m_xPopupMenu ));
                PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr;
                assert(pVCLPopupMenu);
                if (pVCLPopupMenu)
@@ -493,7 +493,7 @@
    if ( xPopupMenu.is() )
    {
        SolarMutexGuard aGuard;
        VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::GetImplementation( xPopupMenu ));
        VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(VCLXMenu::getImplementation( xPopupMenu ));
        PopupMenu*     pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr;

        SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu");
@@ -552,7 +552,7 @@

    if ( xPopupMenu.is() )
    {
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( xPopupMenu ));
        VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::getImplementation( xPopupMenu ));
        if ( pPopupMenu )
        {
            SolarMutexGuard aSolarMutexGuard;
diff --git a/include/toolkit/awt/vclxbitmap.hxx b/include/toolkit/awt/vclxbitmap.hxx
index cc83653..22b339f 100644
--- a/include/toolkit/awt/vclxbitmap.hxx
+++ b/include/toolkit/awt/vclxbitmap.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XDisplayBitmap.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
#include <vcl/bitmapex.hxx>
@@ -55,9 +56,7 @@
    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXBitmap*                                          GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXBitmap)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxdevice.hxx b/include/toolkit/awt/vclxdevice.hxx
index 18dbcbd..b99b5bc 100644
--- a/include/toolkit/awt/vclxdevice.hxx
+++ b/include/toolkit/awt/vclxdevice.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/virdev.hxx>
#include <vcl/vclptr.hxx>
@@ -57,9 +58,7 @@
    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXDevice*                                          GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXDevice)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxfont.hxx b/include/toolkit/awt/vclxfont.hxx
index e7cd07b..921da59 100644
--- a/include/toolkit/awt/vclxfont.hxx
+++ b/include/toolkit/awt/vclxfont.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/awt/XFont2.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
#include <vcl/font.hxx>
@@ -64,9 +65,7 @@
    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXFont*                                            GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXFont)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx
index 3fc82fa..1482bad 100644
--- a/include/toolkit/awt/vclxgraphics.hxx
+++ b/include/toolkit/awt/vclxgraphics.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XGraphics2.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>

#include <vcl/font.hxx>
@@ -89,9 +90,7 @@
    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXGraphics*                                        GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXGraphics)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 97b2843..61f5b73 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>

#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>

@@ -87,9 +88,7 @@
    void SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXMenu* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXMenu)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxpointer.hxx b/include/toolkit/awt/vclxpointer.hxx
index f986077..ab210d2 100644
--- a/include/toolkit/awt/vclxpointer.hxx
+++ b/include/toolkit/awt/vclxpointer.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XPointer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>

@@ -48,9 +49,7 @@
    PointerStyle GetPointer() const { return maPointer; }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXPointer*                                         GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXPointer)

    // css::awt::XPointer
    void SAL_CALL setType( sal_Int32 nType ) override;
diff --git a/include/toolkit/awt/vclxregion.hxx b/include/toolkit/awt/vclxregion.hxx
index 82ec095..b91e40f 100644
--- a/include/toolkit/awt/vclxregion.hxx
+++ b/include/toolkit/awt/vclxregion.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XRegion.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>

@@ -55,9 +56,7 @@
    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXRegion*                                          GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXRegion)

    // css::lang::XTypeProvider
    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 651594b4..fa76b5f 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>

#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>

#include <tools/gen.hxx>
@@ -134,9 +135,7 @@
    void    notifyWindowRemoved( vcl::Window const & _rWindow );

    // css::lang::XUnoTunnel
    static const css::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
    static VCLXWindow*                                          GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
    sal_Int64                                                   SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
    UNO3_GETIMPLEMENTATION_DECL(VCLXWindow)

    // css::lang::XEventListener
    virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index cf50d53..13d1063 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -22,33 +22,6 @@

#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <comphelper/servicehelper.hxx>

#define IMPL_XUNOTUNNEL_MINIMAL( ClassName ) \
sal_Int64 ClassName::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) \
{ \
    if( ( rIdentifier.getLength() == 16 ) && ( memcmp( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) == 0 ) ) \
    { \
        return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); \
    } \
    return 0; \
} \
namespace \
{ \
    class the##ClassName##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##ClassName##UnoTunnelId> {}; \
} \
const css::uno::Sequence< sal_Int8 >& ClassName::GetUnoTunnelId() throw() \
{ \
    return the##ClassName##UnoTunnelId::get().getSeq(); \
}

#define IMPL_XUNOTUNNEL( ClassName ) \
IMPL_XUNOTUNNEL_MINIMAL( ClassName ) \
ClassName* ClassName::GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) \
{ \
    css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY ); \
    return xUT.is() ? reinterpret_cast<ClassName*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( ClassName::GetUnoTunnelId() ))) : nullptr; \
}

#define IMPL_IMPLEMENTATION_ID( ClassName ) \
css::uno::Sequence< sal_Int8 > ClassName::getImplementationId() \
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 7443bf3..9989eb8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1370,7 +1370,7 @@
            uno::Reference<awt::XDevice> xRenderDevice(rProp.Value, uno::UNO_QUERY);
            if ( xRenderDevice.is() )
            {
                VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
                VCLXDevice* pDevice = VCLXDevice::getImplementation( xRenderDevice );
                if ( pDevice )
                {
                    pRet = pDevice->GetOutputDevice().get();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 10941c6..237dab1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1906,7 +1906,7 @@
    if( !(xRenderDevice.is() && nPageNumber && ( nPageNumber <= mpDoc->GetSdPageCount( ePageKind ) )) )
        return;

    VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
    VCLXDevice* pDevice = VCLXDevice::getImplementation( xRenderDevice );
    VclPtr< OutputDevice> pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >();

    if( !pOut )
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 3750db7..682c921 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1188,7 +1188,7 @@

        if (aDev >>= xRenderDevice)
        {
            VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
            VCLXDevice* pDevice = VCLXDevice::getImplementation(xRenderDevice);
            VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice()
                                                  : VclPtr< OutputDevice >();
            mpPrinter = dynamic_cast<Printer*>(pOut.get());
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 702e606..d2fe1b3 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1836,7 +1836,7 @@
    aEvent.ExecutePosition.Y = aPos.Y();

    xPopupController->setPopupMenu( xPopupMenu );
    VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( xPopupMenu );
    VCLXMenu* pAwtMenu = VCLXMenu::getImplementation( xPopupMenu );
    PopupMenu* pVCLMenu = static_cast< PopupMenu* >( pAwtMenu->GetMenu() );
    if (comphelper::LibreOfficeKit::isActive())
    {
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 9be232c..72f85f2 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1829,7 +1829,7 @@
        uno::Reference<awt::XWindow> xWindow = GetModelXWindow(xModel);
        if ( xWindow.is() )
        {
            VCLXWindow* pVCLWindow = VCLXWindow::GetImplementation( xWindow );
            VCLXWindow* pVCLWindow = VCLXWindow::getImplementation( xWindow );
            if ( pVCLWindow )
                pWin = pVCLWindow->GetWindow();
        }
diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
index eb9eaa4..1f3dd09 100644
--- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx
+++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
@@ -345,7 +345,7 @@
        return;

    xPopupController->setPopupMenu(xPopupMenu);
    VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation(xPopupMenu);
    VCLXMenu* pAwtMenu = VCLXMenu::getImplementation(xPopupMenu);
    PopupMenu* pVCLMenu = static_cast<PopupMenu*>(pAwtMenu->GetMenu());
    Point aPos(pNotebookbar->GetSizePixel().getWidth(), NotebookbarTabControl::GetHeaderHeight() - ICON_SIZE + 10);
    pVCLMenu->Execute(pNotebookbar, tools::Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose);
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index eb1d6d5..58f3814 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -991,7 +991,7 @@
    if (!xRenderDevice.is())
        return;

    VCLXDevice*   pDevice = VCLXDevice::GetImplementation( xRenderDevice );
    VCLXDevice*   pDevice = VCLXDevice::getImplementation( xRenderDevice );
    VclPtr< OutputDevice> pOut = pDevice ? pDevice->GetOutputDevice()
                                         : VclPtr< OutputDevice >();
    if (!pOut)
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index c2b9216..90cbb95 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -48,7 +48,7 @@
    SolarMutexGuard aGuard;

    VclPtr<vcl::Window> pParent;
    VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
    VCLXWindow* pParentComponent = VCLXWindow::getImplementation( xParent );

    if ( pParentComponent )
        pParent = pParentComponent->GetWindow();
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 6863595..ca56f80 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -473,7 +473,7 @@
        vcl::Window* pParentWin = nullptr;
        if (rParentPeer.is())
        {
            VCLXWindow* pParent = VCLXWindow::GetImplementation(rParentPeer);
            VCLXWindow* pParent = VCLXWindow::getImplementation(rParentPeer);
            if (pParent)
                pParentWin = pParent->GetWindow().get();
        }
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index 72187d9..36b1e13 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -107,7 +107,7 @@
    sal_uInt16 nMenuId = 1;
    sal_uInt16 nSubMenuId = MN_ST_INSERT_START;

    VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
    VCLXMenu* pAwtMenu = VCLXMenu::getImplementation( m_xPopupMenu );
    PopupMenu* pVCLMenu = static_cast< PopupMenu* >( pAwtMenu->GetMenu() );

    const css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& rActionComponentsSequence = m_pSmartTagItem->GetActionComponentsSequence();
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 44f34d1..9970cd6 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -443,7 +443,7 @@
    VclPtr< OutputDevice > pOut;
    if (xRenderDevice.is())
    {
        VCLXDevice*     pDevice = VCLXDevice::GetImplementation( xRenderDevice );
        VCLXDevice*     pDevice = VCLXDevice::getImplementation( xRenderDevice );
        if (pDevice)
            pOut = pDevice->GetOutputDevice();
    }
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 2885188..a950744 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2331,7 +2331,7 @@
    aAny >>= xRenderDevice;
    if (xRenderDevice.is())
    {
        VCLXDevice*     pDevice = VCLXDevice::GetImplementation( xRenderDevice );
        VCLXDevice*     pDevice = VCLXDevice::getImplementation( xRenderDevice );
        pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >();
    }

diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index c5cd50b..b04bc46 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -42,7 +42,7 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXBitmap )
UNO3_GETIMPLEMENTATION_IMPL( VCLXBitmap );

IMPL_IMPLEMENTATION_ID( VCLXBitmap )

diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx
index 8eb7522..afa2e34 100644
--- a/toolkit/source/awt/vclxdevice.cxx
+++ b/toolkit/source/awt/vclxdevice.cxx
@@ -66,7 +66,7 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXDevice )
UNO3_GETIMPLEMENTATION_IMPL( VCLXDevice );

IMPL_IMPLEMENTATION_ID( VCLXDevice )

diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 5cddc38..2ef43db 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -82,7 +82,7 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXFont )
UNO3_GETIMPLEMENTATION_IMPL( VCLXFont );

IMPL_IMPLEMENTATION_ID( VCLXFont )

diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index d1a53aa..d4e1588 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -52,7 +52,7 @@
}

// lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXGraphics )
UNO3_GETIMPLEMENTATION_IMPL( VCLXGraphics );

IMPL_IMPLEMENTATION_ID( VCLXGraphics )

@@ -286,7 +286,7 @@

    if ( mpOutputDevice )
    {
        VCLXDevice* pFromDev = VCLXDevice::GetImplementation( rxSource );
        VCLXDevice* pFromDev = VCLXDevice::getImplementation( 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 716eec4..a757b0a 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -19,7 +19,6 @@

#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/helper/convert.hxx>
#include <toolkit/helper/macros.hxx>
#include <toolkit/helper/servicenames.hxx>
#include <toolkit/helper/vclunohelper.hxx>

@@ -231,7 +230,7 @@
}


IMPL_XUNOTUNNEL( VCLXMenu )
UNO3_GETIMPLEMENTATION_IMPL( VCLXMenu );

css::uno::Sequence< css::uno::Type > VCLXMenu::getTypes()
{
@@ -388,7 +387,7 @@
    SolarMutexGuard aSolarGuard;
    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );

    VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu );
    VCLXMenu* pVCLMenu = VCLXMenu::getImplementation( rxPopupMenu );
    DBG_ASSERT( pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu(), "setPopupMenu: Invalid Menu!" );

    if ( mpMenu && pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu() )
diff --git a/toolkit/source/awt/vclxpointer.cxx b/toolkit/source/awt/vclxpointer.cxx
index d47380e..7ddc4ac 100644
--- a/toolkit/source/awt/vclxpointer.cxx
+++ b/toolkit/source/awt/vclxpointer.cxx
@@ -19,7 +19,6 @@

#include <com/sun/star/uno/XComponentContext.hpp>
#include <toolkit/awt/vclxpointer.hxx>
#include <toolkit/helper/macros.hxx>
#include <cppuhelper/supportsservice.hxx>

VCLXPointer::VCLXPointer() : maPointer(PointerStyle::Arrow)
@@ -31,7 +30,7 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXPointer )
UNO3_GETIMPLEMENTATION_IMPL( VCLXPointer );

void VCLXPointer::setType( sal_Int32 nType )
{
diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx
index 1acbcde..18ef02f 100644
--- a/toolkit/source/awt/vclxregion.cxx
+++ b/toolkit/source/awt/vclxregion.cxx
@@ -48,7 +48,7 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL( VCLXRegion )
UNO3_GETIMPLEMENTATION_IMPL( VCLXRegion );

IMPL_IMPLEMENTATION_ID( VCLXRegion )

diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 69567b33..5b70b8e 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1519,7 +1519,7 @@
    VclPtr<vcl::Window> pParent;
    if ( rDescriptor.Parent.is() )
    {
        VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( rDescriptor.Parent );
        VCLXWindow* pParentComponent = VCLXWindow::getImplementation( 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 fd78b54..bd53b72 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -154,7 +154,7 @@
        pSystemWindow->SetMenuBar( nullptr );
        if ( rxMenu.is() )
        {
            VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu );
            VCLXMenu* pMenu = VCLXMenu::getImplementation( 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 27d06f5..b1e2fc5 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -924,27 +924,7 @@


// css::lang::XUnoTunnel
sal_Int64 VCLXWindow::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
{
    if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( VCLXWindow::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) )
    {
        return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this));
    }
    return VCLXDevice::getSomething( rIdentifier );
}
namespace
{
    class theVCLXWindowUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theVCLXWindowUnoTunnelId> {};
}
const css::uno::Sequence< sal_Int8 >& VCLXWindow::GetUnoTunnelId() throw()
{
    return theVCLXWindowUnoTunnelId::get().getSeq();
}
VCLXWindow* VCLXWindow::GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace )
{
    css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY );
    return xUT.is() ? reinterpret_cast<VCLXWindow*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( VCLXWindow::GetUnoTunnelId() ))) : nullptr;
}
UNO3_GETIMPLEMENTATION2_IMPL(VCLXWindow, VCLXDevice);


// css::lang::Component
@@ -1163,7 +1143,7 @@
{
    SolarMutexGuard aGuard;

    VCLXPointer* pPointer = VCLXPointer::GetImplementation( rxPointer );
    VCLXPointer* pPointer = VCLXPointer::getImplementation( rxPointer );
    if ( pPointer && GetWindow() )
        GetWindow()->SetPointer( pPointer->GetPointer() );
}
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index d94ffd0..bdcee66 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -150,7 +150,7 @@
            Reference< XWindowPeer >  xCP = pControls[nCtrl]->getPeer();
            if ( xCP.is() )
            {
                VCLXWindow* pC = VCLXWindow::GetImplementation( xCP );
                VCLXWindow* pC = VCLXWindow::getImplementation( xCP );
                if ( pC && pC->GetWindow() && ( pC->GetWindow()->GetStyle() & WB_TABSTOP ) )
                {
                    pC->GetWindow()->GrabFocus();
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index b2ac375..fa27371 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -30,7 +30,6 @@
#include <com/sun/star/io/XMarkableStream.hpp>
#include <com/sun/star/i18n/Currency2.hpp>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/helper/macros.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <rtl/uuid.h>
@@ -46,6 +45,7 @@
#include <unotools/configmgr.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/unohelp.hxx>
#include <uno/data.h>
@@ -426,7 +426,23 @@
}

// css::lang::XUnoTunnel
IMPL_XUNOTUNNEL_MINIMAL( UnoControlModel )
namespace
{
    class theUnoControlModelUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theUnoControlModelUnoTunnelId> {};
}

const css::uno::Sequence< sal_Int8 >& UnoControlModel::GetUnoTunnelId() throw()
{
    return theUnoControlModelUnoTunnelId::get().getSeq();
}

sal_Int64 UnoControlModel::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
{
    if( ( rIdentifier.getLength() == 16 ) && ( memcmp( UnoControlModel::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) == 0 ) )
        return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this));

    return 0;
}

// XInterface
IMPLEMENT_FORWARD_REFCOUNT( UnoControlModel, UnoControlModel_Base )
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 46bd223..1d7ace5 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -170,7 +170,7 @@

void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer> xIFace )
{
    VCLXWindow* pVCLXWindow = VCLXWindow::GetImplementation( xIFace );
    VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( xIFace );

    DBG_ASSERT( pVCLXWindow, "SetComponentInterface - unsupported type" );
    if ( pVCLXWindow )
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 8d25f51..c3e05cb 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -79,7 +79,7 @@
    }
    else if ( rxBitmap.is() )
    {
        VCLXBitmap* pVCLBitmap = VCLXBitmap::GetImplementation( rxBitmap );
        VCLXBitmap* pVCLBitmap = VCLXBitmap::getImplementation( rxBitmap );
        if ( pVCLBitmap )
            aBmp = pVCLBitmap->GetBitmap();
        else
@@ -110,26 +110,26 @@

VclPtr< vcl::Window > VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow )
{
    VCLXWindow* pVCLXWindow = VCLXWindow::GetImplementation( rxWindow );
    VCLXWindow* pVCLXWindow = VCLXWindow::getImplementation( 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 = VCLXWindow::getImplementation( 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 = VCLXWindow::getImplementation( 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 = VCLXRegion::getImplementation( rxRegion );
    if ( pVCLRegion )
        aRegion = pVCLRegion->GetRegion();
    else
@@ -156,7 +156,7 @@
OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XDevice>& rxDevice )
{
    VclPtr<OutputDevice> pOutDev;
    VCLXDevice* pDev = VCLXDevice::GetImplementation( rxDevice );
    VCLXDevice* pDev = VCLXDevice::getImplementation( rxDevice );
    if ( pDev )
        pOutDev = pDev->GetOutputDevice();
    return pOutDev;
@@ -165,7 +165,7 @@
OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XGraphics>& rxGraphics )
{
    OutputDevice* pOutDev = nullptr;
    VCLXGraphics* pGrf = VCLXGraphics::GetImplementation( rxGraphics );
    VCLXGraphics* pGrf = VCLXGraphics::getImplementation( rxGraphics );
    if ( pGrf )
        pOutDev = pGrf->GetOutputDevice();
    return pOutDev;
@@ -258,7 +258,7 @@
vcl::Font VCLUnoHelper::CreateFont( const css::uno::Reference< css::awt::XFont >& rxFont )
{
    vcl::Font aFont;
    VCLXFont* pVCLXFont = VCLXFont::GetImplementation( rxFont );
    VCLXFont* pVCLXFont = VCLXFont::getImplementation( rxFont );
    if ( pVCLXFont )
        aFont = pVCLXFont->GetFont();
    return aFont;