From 32eeb405d7fd6788aaa34e1bf8a04388d7a3958f Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Tue, 4 Jun 2019 02:29:43 +0300 Subject: 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 --- basctl/source/basicide/basicrenderable.cxx | 2 +- .../controller/dialogs/dlg_CreationWizard_UNO.cxx | 2 +- chart2/source/controller/main/ChartController.cxx | 2 +- .../controller/main/ChartController_Window.cxx | 2 +- dbaccess/source/ui/browser/genericcontroller.cxx | 2 +- dbaccess/source/ui/uno/ColumnControl.cxx | 2 +- .../source/primitive2d/controlprimitive2d.cxx | 2 +- extensions/source/bibliography/bibload.cxx | 2 +- extensions/source/propctrlr/propcontroller.cxx | 2 +- forms/source/richtext/richtextcontrol.cxx | 2 +- forms/source/solar/component/navbarcontrol.cxx | 2 +- framework/source/layoutmanager/layoutmanager.cxx | 4 ++-- .../source/uielement/controlmenucontroller.cxx | 6 ++--- framework/source/uielement/fontmenucontroller.cxx | 2 +- .../source/uielement/fontsizemenucontroller.cxx | 2 +- .../source/uielement/headermenucontroller.cxx | 2 +- .../uielement/langselectionmenucontroller.cxx | 2 +- .../source/uielement/macrosmenucontroller.cxx | 2 +- framework/source/uielement/newmenucontroller.cxx | 6 ++--- .../source/uielement/objectmenucontroller.cxx | 2 +- .../source/uielement/popuptoolbarcontroller.cxx | 4 ++-- .../source/uielement/recentfilesmenucontroller.cxx | 2 +- .../source/uielement/resourcemenucontroller.cxx | 8 +++---- .../source/uielement/thesaurusmenucontroller.cxx | 2 +- .../source/uielement/toolbarmodemenucontroller.cxx | 4 ++-- .../source/uielement/toolbarsmenucontroller.cxx | 8 +++---- include/toolkit/awt/vclxbitmap.hxx | 5 ++-- include/toolkit/awt/vclxdevice.hxx | 5 ++-- include/toolkit/awt/vclxfont.hxx | 5 ++-- include/toolkit/awt/vclxgraphics.hxx | 5 ++-- include/toolkit/awt/vclxmenu.hxx | 5 ++-- include/toolkit/awt/vclxpointer.hxx | 5 ++-- include/toolkit/awt/vclxregion.hxx | 5 ++-- include/toolkit/awt/vclxwindow.hxx | 5 ++-- include/toolkit/helper/macros.hxx | 27 ---------------------- sc/source/ui/unoobj/docuno.cxx | 2 +- sd/source/ui/unoidl/unomodel.cxx | 2 +- sd/source/ui/view/DocumentRenderer.cxx | 2 +- sfx2/source/control/dispatch.cxx | 2 +- sfx2/source/doc/guisaveas.cxx | 2 +- sfx2/source/notebookbar/NotebookbarTabControl.cxx | 2 +- starmath/source/unomodel.cxx | 2 +- svtools/source/hatchwindow/hatchwindow.cxx | 2 +- svx/source/fmcomp/fmgridif.cxx | 2 +- svx/source/mnuctrls/smarttagmenu.cxx | 2 +- sw/source/core/view/printdata.cxx | 2 +- sw/source/uibase/uno/unotxdoc.cxx | 2 +- toolkit/source/awt/vclxbitmap.cxx | 2 +- toolkit/source/awt/vclxdevice.cxx | 2 +- toolkit/source/awt/vclxfont.cxx | 2 +- toolkit/source/awt/vclxgraphics.cxx | 4 ++-- toolkit/source/awt/vclxmenu.cxx | 5 ++-- toolkit/source/awt/vclxpointer.cxx | 3 +-- toolkit/source/awt/vclxregion.cxx | 2 +- toolkit/source/awt/vclxtoolkit.cxx | 2 +- toolkit/source/awt/vclxtopwindow.cxx | 2 +- toolkit/source/awt/vclxwindow.cxx | 24 ++----------------- toolkit/source/controls/stdtabcontroller.cxx | 2 +- toolkit/source/controls/unocontrolmodel.cxx | 20 ++++++++++++++-- toolkit/source/helper/unowrapper.cxx | 2 +- toolkit/source/helper/vclunohelper.cxx | 16 ++++++------- 61 files changed, 108 insertions(+), 149 deletions(-) diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index 3537e91e0c65..cdaa36a13093 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -83,7 +83,7 @@ VclPtr< Printer > Renderable::getPrinter() if( aValue >>= xRenderDevice ) { - VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice); + VCLXDevice* pDevice = VCLXDevice::getImplementation(xRenderDevice); VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); pPrinter = dynamic_cast(pOut.get()); } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 6c3be3da57c2..cd972a3119d7 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -167,7 +167,7 @@ void CreationWizardUnoDlg::createDialogOnDemand() } 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 6b8746603797..6c2e671a416d 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -430,7 +430,7 @@ void SAL_CALL ChartController::attachFrame( 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 8907ed5ca203..90e441b68a19 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1269,7 +1269,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if (comphelper::LibreOfficeKit::isActive()) { - PopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation(xPopupMenu)->GetMenu()); + PopupMenu* pPopupMenu = static_cast(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 2ab76905c458..73a97288dee8 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -251,7 +251,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen 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 859b100579f7..f8fa6d7ec836 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -68,7 +68,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit 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 4030539980ac..343c99c3a81b 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -150,7 +150,7 @@ namespace drawinglayer 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 757cd195f61b..938dcc65a391 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -266,7 +266,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, 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 pParent = VCLUnoHelper::GetWindow( aWindow ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index ca78d761124e..21bd8ddbca69 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -359,7 +359,7 @@ namespace pcr // 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 pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : VclPtr(); 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 7cc7ed037a39..aa3afe77fd29 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -174,7 +174,7 @@ namespace frm 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 725fe6edc44a..8d50352baa02 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -123,7 +123,7 @@ namespace frm 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 274c595ce42c..608ecb710f01 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -194,7 +194,7 @@ void LayoutManager::implts_createMenuBar(const OUString& rMenuBarName) if ( xMenuBar.is() ) { - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + VCLXMenu* pAwtMenuBar = VCLXMenu::getImplementation( xMenuBar ); if ( pAwtMenuBar ) { MenuBar* pMenuBar = static_cast(pAwtMenuBar->GetMenu()); @@ -246,7 +246,7 @@ void LayoutManager::impl_clearUpMenuBar() } } - VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar ); + VCLXMenu* pAwtMenuBar = VCLXMenu::getImplementation( xMenuBar ); if ( pAwtMenuBar ) pSetMenuBar = static_cast(pAwtMenuBar->GetMenu()); } diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index c4f8a8b33877..22c25105d5de 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -193,7 +193,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu ) // private function void ControlMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; @@ -244,7 +244,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve if (!sIdent.isEmpty() && m_xResPopupMenu) { - pPopupMenu = static_cast(VCLXMenu::GetImplementation( m_xPopupMenu )); + pPopupMenu = static_cast(VCLXMenu::getImplementation( m_xPopupMenu )); nMenuId = m_xResPopupMenu->GetItemId(sIdent); } @@ -299,7 +299,7 @@ void SAL_CALL ControlMenuController::itemActivated( const css::awt::MenuEvent& ) { m_bShowMenuImages = bShowMenuImages; - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( m_xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::getImplementation( m_xPopupMenu )); if ( pPopupMenu ) { PopupMenu* pVCLPopupMenu = static_cast(pPopupMenu->GetMenu()); diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 20a8ec928f94..20c8387bb968 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -76,7 +76,7 @@ FontMenuController::~FontMenuController() void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu ) { const OUString* pFontNameArray = rFontNameSeq.getConstArray(); - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 8b6b0b1ec952..d84bfdd3d911 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -124,7 +124,7 @@ void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XP // private function void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; resetPopupMenu( rPopupMenu ); diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index e5d70fffa188..b7354d37027d 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -73,7 +73,7 @@ HeaderMenuController::~HeaderMenuController() // private function void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& rModel, Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 5708dbc04108..721e061bdf15 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -156,7 +156,7 @@ void LanguageSelectionMenuController::impl_setPopupMenu() void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu , const Mode eMode ) { - VCLXPopupMenu* pVCLPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pVCLPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 4f2b2625ba00..e8be467d0a59 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -64,7 +64,7 @@ MacrosMenuController::~MacrosMenuController() // private function void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pVCLPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pVCLPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index e3e2ebd71d90..138042ad614a 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -302,7 +302,7 @@ NewMenuController::~NewMenuController() // private function void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; @@ -400,7 +400,7 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent if ( xPopupMenu.is() ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::getImplementation( xPopupMenu )); if ( pPopupMenu ) { OUString aURL; @@ -430,7 +430,7 @@ void SAL_CALL NewMenuController::itemActivated( const css::awt::MenuEvent& ) SolarMutexGuard aSolarMutexGuard; if ( m_xFrame.is() && m_xPopupMenu.is() ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( m_xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(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 d868d33aa138..ad4ff3cb4885 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -89,7 +89,7 @@ ObjectMenuController::ObjectMenuController( const css::uno::Reference< css::uno: 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(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 6d325ff4f452..43333b925831 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -329,7 +329,7 @@ void GenericPopupToolbarController::statusChanged( const css::frame::FeatureStat 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 @@ void SAL_CALL NewToolbarController::execute( sal_Int16 /*KeyModifier*/ ) // TODO investigate how to wrap Get/SetUserValue in css::awt::XMenu MenuAttributes* pMenuAttributes( nullptr ); VCLXPopupMenu* pTkPopupMenu = - static_cast( VCLXMenu::GetImplementation( m_xPopupMenu ) ); + static_cast( VCLXMenu::getImplementation( m_xPopupMenu ) ); SolarMutexGuard aSolarMutexGuard; PopupMenu* pVCLPopupMenu = pTkPopupMenu ? diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 04042fa70f80..67d5d931c161 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -118,7 +118,7 @@ RecentFilesMenuController::RecentFilesMenuController( const uno::Reference< uno: // private function void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXMenu::getImplementation( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/resourcemenucontroller.cxx b/framework/source/uielement/resourcemenucontroller.cxx index bc5fd7a842a1..887dbc5dec2b 100644 --- a/framework/source/uielement/resourcemenucontroller.cxx +++ b/framework/source/uielement/resourcemenucontroller.cxx @@ -205,7 +205,7 @@ void ResourceMenuController::updatePopupMenu() // 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 @@ void ResourceMenuController::addVerbs( const css::uno::Sequence< css::embed::Ver 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 @@ void ResourceMenuController::itemActivated( const css::awt::MenuEvent& /*rEvent* // 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 @@ SaveAsMenuController::SaveAsMenuController( const css::uno::Reference< css::uno: 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 b1c1a873198f..16478b50ddd4 100644 --- a/framework/source/uielement/thesaurusmenucontroller.cxx +++ b/framework/source/uielement/thesaurusmenucontroller.cxx @@ -77,7 +77,7 @@ void ThesaurusMenuController::fillPopupMenu() 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 9a683d5ba95a..dca4cadd2e15 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -177,7 +177,7 @@ void SAL_CALL ToolbarModeMenuController::statusChanged( const FeatureStateEvent& if ( xPopupMenu.is() ) { SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::GetImplementation( xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::getImplementation( xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast(pXPopupMenu->GetMenu()) : nullptr; SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu"); @@ -232,7 +232,7 @@ void SAL_CALL ToolbarModeMenuController::itemSelected( const css::awt::MenuEvent if ( xPopupMenu.is() ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::getImplementation( xPopupMenu )); if ( pPopupMenu ) { SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 4d066d5e5426..945df54659c0 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -170,7 +170,7 @@ void ToolbarsMenuController::addCommand( if ( rSettings.GetUseImagesInMenus() ) aImage = vcl::CommandInfoProvider::GetImageForCommand(rCommandURL, m_xFrame); - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::getImplementation( rPopupMenu )); if ( pPopupMenu ) { PopupMenu* pVCLPopupMenu = static_cast(pPopupMenu->GetMenu()); @@ -385,7 +385,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co { SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::GetImplementation( m_xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::getImplementation( m_xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast(pXPopupMenu->GetMenu()) : nullptr; assert(pVCLPopupMenu); if (pVCLPopupMenu) @@ -493,7 +493,7 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev if ( xPopupMenu.is() ) { SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::GetImplementation( xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast(VCLXMenu::getImplementation( xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast(pXPopupMenu->GetMenu()) : nullptr; SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu"); @@ -552,7 +552,7 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r if ( xPopupMenu.is() ) { - VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::GetImplementation( xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast(VCLXPopupMenu::getImplementation( xPopupMenu )); if ( pPopupMenu ) { SolarMutexGuard aSolarMutexGuard; diff --git a/include/toolkit/awt/vclxbitmap.hxx b/include/toolkit/awt/vclxbitmap.hxx index cc83653e751a..22b339f96194 100644 --- a/include/toolkit/awt/vclxbitmap.hxx +++ b/include/toolkit/awt/vclxbitmap.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -55,9 +56,7 @@ public: 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 18dbcbd3b4f3..b99b5bce6b7f 100644 --- a/include/toolkit/awt/vclxdevice.hxx +++ b/include/toolkit/awt/vclxdevice.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -57,9 +58,7 @@ public: 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 e7cd07b13443..921da596009e 100644 --- a/include/toolkit/awt/vclxfont.hxx +++ b/include/toolkit/awt/vclxfont.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -64,9 +65,7 @@ public: 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 3fc82faef25d..1482bad16b3e 100644 --- a/include/toolkit/awt/vclxgraphics.hxx +++ b/include/toolkit/awt/vclxgraphics.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -89,9 +90,7 @@ public: 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 97b28432a74b..61f5b7385604 100644 --- a/include/toolkit/awt/vclxmenu.hxx +++ b/include/toolkit/awt/vclxmenu.hxx @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -87,9 +88,7 @@ public: 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 f986077e76cd..ab210d2b545b 100644 --- a/include/toolkit/awt/vclxpointer.hxx +++ b/include/toolkit/awt/vclxpointer.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -48,9 +49,7 @@ public: 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 82ec095be43a..b91e40fd70b1 100644 --- a/include/toolkit/awt/vclxregion.hxx +++ b/include/toolkit/awt/vclxregion.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -55,9 +56,7 @@ public: 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 651594b46e66..fa76b5f253b5 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -134,9 +135,7 @@ public: 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 cf50d53c15be..13d106391820 100644 --- a/include/toolkit/helper/macros.hxx +++ b/include/toolkit/helper/macros.hxx @@ -22,33 +22,6 @@ #include #include -#include - -#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(sal::static_int_cast(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 7443bf3ba018..9989eb821c01 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1370,7 +1370,7 @@ static OutputDevice* lcl_GetRenderDevice( const uno::Sequence 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 10941c629d07..237dab1bace1 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1906,7 +1906,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r 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 3750db72e59d..682c92115360 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1188,7 +1188,7 @@ public: if (aDev >>= xRenderDevice) { - VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice); + VCLXDevice* pDevice = VCLXDevice::getImplementation(xRenderDevice); VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); mpPrinter = dynamic_cast(pOut.get()); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 702e6064f157..d2fe1b30ecbb 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1836,7 +1836,7 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin, c 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 9be232c8d6f5..72f85f225ddb 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1829,7 +1829,7 @@ vcl::Window* SfxStoringHelper::GetModelWindow( const uno::Reference< frame::XMod uno::Reference 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 eb9eaa425f0b..1f3dd0965409 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -345,7 +345,7 @@ IMPL_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebo return; xPopupController->setPopupMenu(xPopupMenu); - VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation(xPopupMenu); + VCLXMenu* pAwtMenu = VCLXMenu::getImplementation(xPopupMenu); PopupMenu* pVCLMenu = static_cast(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 eb1d6d569a96..58f3814bedc9 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -991,7 +991,7 @@ void SAL_CALL SmModel::render( 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 c2b9216a2863..90cbb959be88 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -48,7 +48,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > SolarMutexGuard aGuard; VclPtr 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 6863595afb0b..ca56f80ae9e6 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -473,7 +473,7 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< css::awt::XToolkit >& 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 72187d9273ec..36b1e135af60 100644 --- a/svx/source/mnuctrls/smarttagmenu.cxx +++ b/svx/source/mnuctrls/smarttagmenu.cxx @@ -107,7 +107,7 @@ void SmartTagMenuController::FillMenu() 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 44f34d1e2a5f..9970cd602ff4 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -443,7 +443,7 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea 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 28851886ded5..a950744b40e8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2331,7 +2331,7 @@ static VclPtr< OutputDevice > lcl_GetOutputDevice( const SwPrintUIOptions &rPrin 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 c5cd50b9ac1b..b04bc46aa8aa 100644 --- a/toolkit/source/awt/vclxbitmap.cxx +++ b/toolkit/source/awt/vclxbitmap.cxx @@ -42,7 +42,7 @@ css::uno::Any VCLXBitmap::queryInterface( const css::uno::Type & rType ) } // 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 8eb75223c9bb..afa2e3483717 100644 --- a/toolkit/source/awt/vclxdevice.cxx +++ b/toolkit/source/awt/vclxdevice.cxx @@ -66,7 +66,7 @@ css::uno::Any VCLXDevice::queryInterface( const css::uno::Type & rType ) } // 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 5cddc38fd7e6..2ef43db70a15 100644 --- a/toolkit/source/awt/vclxfont.cxx +++ b/toolkit/source/awt/vclxfont.cxx @@ -82,7 +82,7 @@ css::uno::Any VCLXFont::queryInterface( const css::uno::Type & rType ) } // 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 d1a53aa3300b..d4e158838923 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -52,7 +52,7 @@ uno::Any VCLXGraphics::queryInterface( const uno::Type & rType ) } // lang::XUnoTunnel -IMPL_XUNOTUNNEL( VCLXGraphics ) +UNO3_GETIMPLEMENTATION_IMPL( VCLXGraphics ); IMPL_IMPLEMENTATION_ID( VCLXGraphics ) @@ -286,7 +286,7 @@ void VCLXGraphics::copy( const uno::Reference< awt::XDevice >& rxSource, sal_Int 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 716eec4a0105..a757b0a7647e 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -231,7 +230,7 @@ css::uno::Any VCLXMenu::queryInterface( } -IMPL_XUNOTUNNEL( VCLXMenu ) +UNO3_GETIMPLEMENTATION_IMPL( VCLXMenu ); css::uno::Sequence< css::uno::Type > VCLXMenu::getTypes() { @@ -388,7 +387,7 @@ void VCLXMenu::setPopupMenu( 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 d47380eeb434..7ddc4ac5796c 100644 --- a/toolkit/source/awt/vclxpointer.cxx +++ b/toolkit/source/awt/vclxpointer.cxx @@ -19,7 +19,6 @@ #include #include -#include #include VCLXPointer::VCLXPointer() : maPointer(PointerStyle::Arrow) @@ -31,7 +30,7 @@ VCLXPointer::~VCLXPointer() } // 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 1acbcde82f6e..18ef02fb48de 100644 --- a/toolkit/source/awt/vclxregion.cxx +++ b/toolkit/source/awt/vclxregion.cxx @@ -48,7 +48,7 @@ css::uno::Any VCLXRegion::queryInterface( const css::uno::Type & rType ) } // 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 69567b33c17b..5b70b8eb56bb 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 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 fd78b543768f..bd53b7238c92 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 = VCLXMenu::getImplementation( rxMenu ); if ( pMenu && !pMenu->IsPopupMenu() ) pSystemWindow->SetMenuBar( static_cast( pMenu->GetMenu() )); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 27d06f564c34..b1e2fc5cf536 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -924,27 +924,7 @@ Size VCLXWindow::ImplCalcWindowSize( const Size& rOutSz ) const // 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(sal::static_int_cast(xUT->getSomething( VCLXWindow::GetUnoTunnelId() ))) : nullptr; -} +UNO3_GETIMPLEMENTATION2_IMPL(VCLXWindow, VCLXDevice); // css::lang::Component @@ -1163,7 +1143,7 @@ void VCLXWindow::setPointer( const css::uno::Reference< css::awt::XPointer >& rx { 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 d94ffd006c81..bdcee66c9ede 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 = 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 b2ac375acba8..fa27371cc914 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -426,7 +426,23 @@ css::uno::Any UnoControlModel::queryAggregation( const css::uno::Type & rType ) } // 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 46bd22300cd8..1d7ace5837ee 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -170,7 +170,7 @@ VclPtr UnoWrapper::GetWindow(const css::uno::Reference 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 8d25f51e3832..c3e05cb2e6ac 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 = VCLXBitmap::getImplementation( 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 = 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 @@ css::uno::Reference< css::awt::XWindow> VCLUnoHelper::GetInterface( vcl::Window* OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XDevice>& rxDevice ) { VclPtr 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 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::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 = VCLXFont::getImplementation( rxFont ); if ( pVCLXFont ) aFont = pVCLXFont->GetFont(); return aFont; -- cgit