framework/inc/uielement/menubarmanager.hxx | 3 + framework/inc/uifactory/configurationaccessfactorymanager.hxx | 6 +++ framework/inc/uifactory/factoryconfiguration.hxx | 5 ++- framework/inc/xml/imagesdocumenthandler.hxx | 4 +- framework/inc/xml/menudocumenthandler.hxx | 3 + framework/inc/xml/statusbardocumenthandler.hxx | 4 +- framework/inc/xml/toolboxdocumenthandler.hxx | 4 +- framework/source/accelerators/globalacceleratorconfiguration.cxx | 2 - framework/source/accelerators/moduleacceleratorconfiguration.cxx | 2 - framework/source/fwe/xml/menudocumenthandler.cxx | 1 framework/source/fwe/xml/statusbardocumenthandler.cxx | 1 framework/source/fwe/xml/toolboxdocumenthandler.cxx | 1 framework/source/jobs/jobexecutor.cxx | 2 - framework/source/services/desktop.cxx | 11 +----- framework/source/services/frame.cxx | 16 +++++----- framework/source/services/pathsettings.cxx | 2 - framework/source/uiconfiguration/uicategorydescription.cxx | 3 + framework/source/uiconfiguration/windowstateconfiguration.cxx | 3 + framework/source/uielement/uicommanddescription.cxx | 5 +-- framework/source/xml/imagesdocumenthandler.cxx | 2 - include/framework/desktop.hxx | 11 +++++- toolkit/inc/awt/vclxgraphics.hxx | 3 + toolkit/inc/awt/vclxprinter.hxx | 5 +-- toolkit/inc/controls/controlmodelcontainerbase.hxx | 2 - toolkit/inc/controls/geometrycontrolmodel.hxx | 4 +- toolkit/source/awt/vclxprinter.cxx | 2 - 26 files changed, 60 insertions(+), 47 deletions(-)
New commits: commit ca8c59c7e645a072352b775cc32ea1af06b53413 Author: Noel Grandin <[email protected]> AuthorDate: Wed Sep 11 09:02:48 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Sep 11 16:14:54 2024 +0200 use more concrete UNO type in framework Change-Id: I3ee54f3967339ab52c04f48a047bc29fc5161680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173159 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 1beb2961e690..986ed951f9ea 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -45,6 +45,7 @@ #include <comphelper/compbase.hxx> #include <cppuhelper/weakref.hxx> #include <framework/addonsoptions.hxx> +#include <toolkit/awt/vclxmenu.hxx> namespace framework { @@ -146,7 +147,7 @@ class MenuBarManager final : rtl::Reference< MenuBarManager > xSubMenuManager; css::uno::Reference< css::frame::XDispatch > xMenuItemDispatch; css::uno::Reference< css::frame::XPopupMenuController > xPopupMenuController; - css::uno::Reference< css::awt::XPopupMenu > xPopupMenu; + rtl::Reference< VCLXPopupMenu > xPopupMenu; vcl::KeyCode aKeyCode; }; diff --git a/framework/inc/uifactory/configurationaccessfactorymanager.hxx b/framework/inc/uifactory/configurationaccessfactorymanager.hxx index af0345b496e9..2272aabc355c 100644 --- a/framework/inc/uifactory/configurationaccessfactorymanager.hxx +++ b/framework/inc/uifactory/configurationaccessfactorymanager.hxx @@ -28,14 +28,18 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <mutex> #include <string_view> #include <unordered_map> + namespace framework { +class WeakContainerListener; + class ConfigurationAccess_FactoryManager final : public ::cppu::WeakImplHelper< css::container::XContainerListener> { public: @@ -74,7 +78,7 @@ class ConfigurationAccess_FactoryManager final : public ::cppu::WeakImplHelper< FactoryManagerMap m_aFactoryManagerMap; css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider; css::uno::Reference< css::container::XNameAccess > m_xConfigAccess; - css::uno::Reference< css::container::XContainerListener > m_xConfigListener; + rtl::Reference< WeakContainerListener > m_xConfigListener; bool m_bConfigAccessInitialized; }; diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx index 4e5ea6c4b052..4d6b80d7943b 100644 --- a/framework/inc/uifactory/factoryconfiguration.hxx +++ b/framework/inc/uifactory/factoryconfiguration.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <mutex> @@ -37,6 +38,8 @@ namespace framework { +class WeakContainerListener; + // Configuration access class for PopupMenuControllerFactory implementation class ConfigurationAccess_ControllerFactory final : // interfaces @@ -87,7 +90,7 @@ private: MenuControllerMap m_aMenuControllerMap; css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider; css::uno::Reference< css::container::XNameAccess > m_xConfigAccess; - css::uno::Reference< css::container::XContainerListener > m_xConfigAccessListener; + rtl::Reference< WeakContainerListener > m_xConfigAccessListener; bool m_bConfigAccessInitialized; }; diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index ccdbe0e5b4cf..727d33a77478 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -22,7 +22,9 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <xml/imagesconfiguration.hxx> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> +#include <comphelper/attributelist.hxx> #include <cppuhelper/implbase.hxx> #include <unordered_map> @@ -121,7 +123,7 @@ class OWriteImagesDocumentHandler final const ImageItemDescriptorList& m_rImageItemList; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler; - css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList; + rtl::Reference< ::comphelper::AttributeList > m_xEmptyList; OUString m_aXMLImageNS; OUString m_aAttributeXlinkType; OUString m_aAttributeValueSimple; diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx index db72eb9171c2..35db63718459 100644 --- a/framework/inc/xml/menudocumenthandler.hxx +++ b/framework/inc/xml/menudocumenthandler.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <rtl/ustring.hxx> +#include <comphelper/attributelist.hxx> #include <cppuhelper/implbase.hxx> namespace framework{ @@ -212,7 +213,7 @@ class OWriteMenuDocumentHandler final css::uno::Reference< css::container::XIndexAccess > m_xMenuBarContainer; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler; - css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList; + rtl::Reference< ::comphelper::AttributeList > m_xEmptyList; bool m_bIsMenuBar; }; diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx index ba1ef7c364f8..04e74f376010 100644 --- a/framework/inc/xml/statusbardocumenthandler.hxx +++ b/framework/inc/xml/statusbardocumenthandler.hxx @@ -24,6 +24,8 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <rtl/ustring.hxx> +#include <rtl/ref.hxx> +#include <comphelper/attributelist.hxx> #include <cppuhelper/implbase.hxx> #include <unordered_map> @@ -122,7 +124,7 @@ class OWriteStatusBarDocumentHandler final css::uno::Reference< css::container::XIndexAccess > m_aStatusBarItems; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler; - css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList; + rtl::Reference< comphelper::AttributeList > m_xEmptyList; OUString m_aXMLStatusBarNS; OUString m_aXMLXlinkNS; OUString m_aAttributeURL; diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx index f134054267ae..3e13b948a063 100644 --- a/framework/inc/xml/toolboxdocumenthandler.hxx +++ b/framework/inc/xml/toolboxdocumenthandler.hxx @@ -24,6 +24,8 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <rtl/ustring.hxx> +#include <rtl/ref.hxx> +#include <comphelper/attributelist.hxx> #include <cppuhelper/implbase.hxx> #include <unordered_map> @@ -137,7 +139,7 @@ class OWriteToolBoxDocumentHandler final void WriteToolBoxSeparator(); css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler; - css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList; + rtl::Reference< ::comphelper::AttributeList > m_xEmptyList; css::uno::Reference< css::container::XIndexAccess > m_rItemAccess; OUString m_aXMLToolbarNS; OUString m_aXMLXlinkNS; diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx index ca913649070b..dabef0a12019 100644 --- a/framework/source/accelerators/globalacceleratorconfiguration.cxx +++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx @@ -71,7 +71,7 @@ public: private: /** helper to listen for configuration changes without ownership cycle problems */ - css::uno::Reference< css::util::XChangesListener > m_xCfgListener; + rtl::Reference< WeakChangesListener > m_xCfgListener; }; GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext) diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx index 0bd11b0463b0..ab516b3d2416 100644 --- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx +++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx @@ -80,7 +80,7 @@ public: private: /** helper to listen for configuration changes without ownership cycle problems */ - css::uno::Reference< css::util::XChangesListener > m_xCfgListener; + rtl::Reference< WeakChangesListener > m_xCfgListener; }; ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration( diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 59c5271c530a..87e4a7fb2e81 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -32,7 +32,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> -#include <comphelper/attributelist.hxx> #ifdef ATTRIBUTE_HELPID #undef ATTRIBUTE_HELPID diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 27653fa3b2fd..46e734e34f64 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -29,7 +29,6 @@ #include <vcl/status.hxx> -#include <comphelper/attributelist.hxx> #include <comphelper/propertyvalue.hxx> using namespace ::com::sun::star::uno; diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index b274e866ec57..48e30561531e 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -34,7 +34,6 @@ #include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -#include <comphelper/attributelist.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/propertyvalue.hxx> diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index ccddd85fc47f..71589a3fc651 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -70,7 +70,7 @@ private: ConfigAccess m_aConfig; /** helper to allow us listen to the configuration without a cyclic dependency */ - css::uno::Reference<css::container::XContainerListener> m_xConfigListener; + rtl::Reference<WeakContainerListener> m_xConfigListener; virtual void disposing(std::unique_lock<std::mutex>& rGuard) final override; diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 2c7dd89e9581..608da2216a5c 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -712,16 +712,14 @@ void SAL_CALL Desktop::registerDispatchProviderInterceptor( const css::uno::Refe { TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); - css::uno::Reference< css::frame::XDispatchProviderInterception > xInterceptionHelper( m_xDispatchHelper, css::uno::UNO_QUERY ); - xInterceptionHelper->registerDispatchProviderInterceptor( xInterceptor ); + m_xDispatchHelper->registerDispatchProviderInterceptor( xInterceptor ); } void SAL_CALL Desktop::releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) { TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); - css::uno::Reference< css::frame::XDispatchProviderInterception > xInterceptionHelper( m_xDispatchHelper, css::uno::UNO_QUERY ); - xInterceptionHelper->releaseDispatchProviderInterceptor( xInterceptor ); + m_xDispatchHelper->releaseDispatchProviderInterceptor( xInterceptor ); } /*-************************************************************************************************************ @@ -1070,11 +1068,6 @@ void SAL_CALL Desktop::disposing() // New opened frames will have a problem now .-) m_aChildTaskContainer.clear(); - // Dispose our helper too. - css::uno::Reference< css::lang::XEventListener > xFramesHelper( m_xFramesHelper, css::uno::UNO_QUERY ); - if( xFramesHelper.is() ) - xFramesHelper->disposing( aEvent ); - // At least clean up other member references. m_xDispatchHelper.clear(); m_xFramesHelper.clear(); diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 569cb962a8a7..c0f2dca96d0e 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -376,9 +376,9 @@ private: /// points to an external set progress, which should be used instead of the internal one. css::uno::WeakReference< css::task::XStatusIndicator > m_xIndicatorInterception; /// helper for XDispatch/Provider and interception interfaces - rtl::Reference< InterceptionHelper > m_xDispatchHelper; + rtl::Reference< InterceptionHelper > m_xDispatchHelper; /// helper for XFrames, XIndexAccess and XElementAccess interfaces - css::uno::Reference< css::frame::XFrames > m_xFramesHelper; + rtl::Reference< OFrames > m_xFramesHelper; /// container for ALL Listener comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer; /// parent of this frame @@ -390,7 +390,7 @@ private: /// controller of the actual frame css::uno::Reference< css::frame::XController > m_xController; /// listen to drag & drop - css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > m_xDropTargetListener; + rtl::Reference< OpenFileDropTargetListener > m_xDropTargetListener; /// state, if I am a member of active path in tree or I have the focus or... EActiveState m_eActiveState; /// name of this frame @@ -412,8 +412,8 @@ private: bool m_bDocHidden = false; /// is used to layout the child windows of the frame. css::uno::Reference< css::frame::XLayoutManager2 > m_xLayoutManager; - css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper; - css::uno::Reference< css::frame::XTitle > m_xTitleHelper; + rtl::Reference< DispatchInformationProvider > m_xDispatchInfoHelper; + rtl::Reference< TitleHelper > m_xTitleHelper; std::unique_ptr<WindowCommandDispatch> m_pWindowCommandDispatch; @@ -1794,7 +1794,7 @@ void SAL_CALL XFrameImpl::addTitleChangeListener( const css::uno::Reference< css // SAFE -> SolarMutexClearableGuard aReadLock; - css::uno::Reference< css::frame::XTitleChangeBroadcaster > xTitle(m_xTitleHelper, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XTitleChangeBroadcaster > xTitle(m_xTitleHelper); aReadLock.clear(); // <- SAFE @@ -1807,7 +1807,7 @@ void SAL_CALL XFrameImpl::removeTitleChangeListener( const css::uno::Reference< // SAFE -> SolarMutexClearableGuard aReadLock; - css::uno::Reference< css::frame::XTitleChangeBroadcaster > xTitle(m_xTitleHelper, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XTitleChangeBroadcaster > xTitle(m_xTitleHelper); aReadLock.clear(); // <- SAFE @@ -2036,7 +2036,7 @@ void XFrameImpl::implts_forgetSubFrames() { // SAFE -> SolarMutexClearableGuard aReadLock; - css::uno::Reference< css::container::XIndexAccess > xContainer(m_xFramesHelper, css::uno::UNO_QUERY_THROW); + rtl::Reference< OFrames > xContainer(m_xFramesHelper); aReadLock.clear(); // <- SAFE diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index d1f1cff83803..38171ab974ab 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -156,7 +156,7 @@ private: css::uno::Reference< css::container::XNameAccess > m_xCfgNew; /** helper to listen for configuration changes without ownership cycle problems */ - css::uno::Reference< css::util::XChangesListener > m_xCfgNewListener; + rtl::Reference< WeakChangesListener > m_xCfgNewListener; std::unique_ptr<::cppu::OPropertyArrayHelper> m_pPropHelp; diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index d3c2c565631e..9b3a3b5ccca1 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <sal/log.hxx> +#include <rtl/ref.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <unotools/syslocale.hxx> @@ -88,7 +89,7 @@ class ConfigurationAccess_UICategory : public ::cppu::WeakImplHelper<XNameAccess Reference< XNameAccess > m_xGenericUICategories; Reference< XMultiServiceFactory > m_xConfigProvider; Reference< XNameAccess > m_xConfigAccess; - Reference< XContainerListener > m_xConfigListener; + rtl::Reference< WeakContainerListener > m_xConfigListener; bool m_bConfigAccessInitialized; bool m_bCacheFilled; IdToInfoCache m_aIdCache; diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 6049fdec814b..ac470c6f4d58 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -42,6 +42,7 @@ #include <cppuhelper/supportsservice.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/sequence.hxx> +#include <rtl/ref.hxx> #include <sal/log.hxx> #include <o3tl/string_view.hxx> @@ -208,7 +209,7 @@ class ConfigurationAccess_WindowState : public ::cppu::WeakImplHelper< XNameCon OUString m_aConfigWindowAccess; Reference< XMultiServiceFactory > m_xConfigProvider; Reference< XNameAccess > m_xConfigAccess; - Reference< XContainerListener > m_xConfigListener; + rtl::Reference< WeakContainerListener > m_xConfigListener; ResourceURLToInfoCache m_aResourceURLToInfoCache; bool m_bConfigAccessInitialized : 1, m_bModified : 1; diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index ddbe692233c3..47786a31fce2 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -42,6 +42,7 @@ #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include <comphelper/string.hxx> +#include <rtl/ref.hxx> using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -141,9 +142,9 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa Reference< XNameAccess > m_xGenericUICommands; Reference< XMultiServiceFactory > m_xConfigProvider; Reference< XNameAccess > m_xConfigAccess; - Reference< XContainerListener > m_xConfigListener; + rtl::Reference< WeakContainerListener > m_xConfigListener; Reference< XNameAccess > m_xConfigAccessPopups; - Reference< XContainerListener > m_xConfigAccessListener; + rtl::Reference< WeakContainerListener > m_xConfigAccessListener; Sequence< OUString > m_aCommandImageList; Sequence< OUString > m_aCommandRotateImageList; Sequence< OUString > m_aCommandMirrorImageList; diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index ff5799f5c775..6f0d41ce3e7c 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -25,8 +25,6 @@ #include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -#include <comphelper/attributelist.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; diff --git a/include/framework/desktop.hxx b/include/framework/desktop.hxx index 3d525eb54938..908459863f59 100644 --- a/include/framework/desktop.hxx +++ b/include/framework/desktop.hxx @@ -53,8 +53,13 @@ #include <rtl/ref.hxx> #include <unotools/cmdoptions.hxx> +namespace comphelper { class NumberedCollection; } + namespace framework{ +class InterceptionHelper; +class OFrames; + enum ELoadState { E_NOTSET , @@ -396,8 +401,8 @@ class FWK_DLLPUBLIC Desktop final : private cppu::BaseMutex, css::uno::Reference< css::uno::XComponentContext > m_xContext; /// reference to factory, which has create this instance FrameContainer m_aChildTaskContainer; /// array of child tasks (children of desktop are tasks; and tasks are also frames - But pure frames are not accepted!) comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer; /// container for ALL Listener - css::uno::Reference< css::frame::XFrames > m_xFramesHelper; /// helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer! - css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchHelper; /// helper to dispatch something for new tasks, created by "_blank"! + rtl::Reference< OFrames > m_xFramesHelper; /// helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer! + rtl::Reference< InterceptionHelper > m_xDispatchHelper; /// helper to dispatch something for new tasks, created by "_blank"! ELoadState m_eLoadState; /// hold information about state of asynchron loading of component for loadComponentFromURL()! bool m_bSuspendQuickstartVeto; /// don't ask quickstart for a veto std::unique_ptr<SvtCommandOptions> m_xCommandOptions; /// ref counted class to support disabling commands defined by configuration file @@ -441,7 +446,7 @@ class FWK_DLLPUBLIC Desktop final : private cppu::BaseMutex, */ css::uno::Reference< css::frame::XTerminateListener > m_xSfxTerminator; - css::uno::Reference< css::frame::XUntitledNumbers > m_xTitleNumberGenerator; + rtl::Reference< ::comphelper::NumberedCollection > m_xTitleNumberGenerator; std::vector<css::uno::Reference<css::frame::XTerminateListener>> m_xComponentDllListeners; commit 4f86862b8adc25b2979b2afa2811bd9390a6ca8c Author: Noel Grandin <[email protected]> AuthorDate: Wed Sep 11 09:02:23 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Sep 11 16:14:47 2024 +0200 use more concrete UNO type in toolkit Change-Id: I3527b51948e6b23cc9448a2c98dbe2765cef48b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173158 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/toolkit/inc/awt/vclxgraphics.hxx b/toolkit/inc/awt/vclxgraphics.hxx index acf03dd17874..93db3bc8e31b 100644 --- a/toolkit/inc/awt/vclxgraphics.hxx +++ b/toolkit/inc/awt/vclxgraphics.hxx @@ -32,6 +32,7 @@ #include <memory> class OutputDevice; +class VCLXDevice; namespace vcl { class Region; } namespace com::sun::star::graphic { class XGraphic; } @@ -55,7 +56,7 @@ class VCLXGraphics final : public cppu::WeakImplHelper< { private: // used to return same reference on each call to getDevice() - css::uno::Reference< css::awt::XDevice> mxDevice; + rtl::Reference<VCLXDevice> mxDevice; VclPtr<OutputDevice> mpOutputDevice; vcl::Font maFont; diff --git a/toolkit/inc/awt/vclxprinter.hxx b/toolkit/inc/awt/vclxprinter.hxx index e5440f38aac4..610bc519a275 100644 --- a/toolkit/inc/awt/vclxprinter.hxx +++ b/toolkit/inc/awt/vclxprinter.hxx @@ -37,6 +37,7 @@ namespace com::sun::star::awt { class XPrinter; } namespace vcl { class OldStylePrintAdaptor; } class Printer; +class VCLXDevice; // relevant properties for the printer: /* @@ -58,7 +59,7 @@ class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base { protected: VclPtr<Printer> mxPrinter; - css::uno::Reference< css::awt::XDevice > mxPrnDevice; + rtl::Reference< VCLXDevice > mxPrnDevice; sal_Int16 mnOrientation; bool mbHorizontal; @@ -67,7 +68,7 @@ public: virtual ~VCLXPrinterPropertySet() override; Printer* GetPrinter() const { return mxPrinter.get(); } - css::uno::Reference< css::awt::XDevice > const & GetDevice(); + rtl::Reference< VCLXDevice > const & GetDevice(); // css::uno::XInterface DECLARE_XINTERFACE(); diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx b/toolkit/inc/controls/controlmodelcontainerbase.hxx index 31dcc3707525..57c923e90ee9 100644 --- a/toolkit/inc/controls/controlmodelcontainerbase.hxx +++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx @@ -223,7 +223,7 @@ protected: bool mbSizeModified; bool mbPosModified; rtl::Reference< StdTabController > mxTabController; - css::uno::Reference< css::util::XModifyListener > mxListener; + rtl::Reference< ResourceListener > mxListener; void ImplInsertControl( css::uno::Reference< css::awt::XControlModel > const & rxModel, const OUString& rName ); void ImplRemoveControl( css::uno::Reference< css::awt::XControlModel > const & rxModel ); diff --git a/toolkit/inc/controls/geometrycontrolmodel.hxx b/toolkit/inc/controls/geometrycontrolmodel.hxx index c2dc13b49f3f..a2ffeba12fa1 100644 --- a/toolkit/inc/controls/geometrycontrolmodel.hxx +++ b/toolkit/inc/controls/geometrycontrolmodel.hxx @@ -36,7 +36,7 @@ namespace com::sun::star { class XComponentContext; } } - +namespace toolkit { class ScriptEventContainer; } // namespace toolkit // { @@ -56,7 +56,7 @@ namespace com::sun::star { protected: css::uno::Reference< css::uno::XAggregation > m_xAggregate; - css::uno::Reference< css::container::XNameContainer > + rtl::Reference< toolkit::ScriptEventContainer > mxEventContainer; // <properties> diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index 51a098bbcd8e..892873048931 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -62,7 +62,7 @@ VCLXPrinterPropertySet::~VCLXPrinterPropertySet() mxPrinter.reset(); } -css::uno::Reference< css::awt::XDevice > const & VCLXPrinterPropertySet::GetDevice() +rtl::Reference< VCLXDevice > const & VCLXPrinterPropertySet::GetDevice() { if ( !mxPrnDevice.is() ) {
