canvas/source/cairo/cairo_canvas.hxx | 22 ++++------------------ canvas/source/cairo/cairo_canvasbitmap.hxx | 22 ++++------------------ canvas/source/cairo/cairo_canvascustomsprite.hxx | 22 ++++------------------ canvas/source/cairo/cairo_spritecanvas.hxx | 22 ++++------------------ canvas/source/opengl/ogl_spritecanvas.hxx | 22 ++++------------------ canvas/source/vcl/canvas.hxx | 22 ++++------------------ canvas/source/vcl/canvascustomsprite.hxx | 22 ++++------------------ canvas/source/vcl/spritecanvas.hxx | 22 ++++------------------ include/sfx2/sfxbasemodel.hxx | 21 +++++++++++++++++++++ include/sfx2/stbitem.hxx | 3 +++ include/vcl/toolbox.hxx | 1 + sfx2/inc/templatedefaultview.hxx | 2 ++ sfx2/source/control/templatedefaultview.cxx | 5 +++++ sfx2/source/control/templatedlglocalview.cxx | 2 +- sfx2/source/doc/SfxDocumentMetaData.cxx | 2 +- sfx2/source/doc/docundomanager.cxx | 4 ++-- sfx2/source/doc/templatedlg.cxx | 2 +- sfx2/source/doc/zoomitem.cxx | 2 +- sfx2/source/sidebar/SidebarToolBox.cxx | 2 +- sfx2/source/statbar/stbitem.cxx | 12 ++++++++++++ vcl/source/app/idle.cxx | 2 +- vcl/source/app/salvtables.cxx | 8 ++++---- vcl/source/control/PriorityMergedHBox.cxx | 10 +++++----- vcl/source/control/combobox.cxx | 8 ++++---- vcl/source/control/imp_listbox.cxx | 2 +- vcl/source/control/spinfld.cxx | 2 +- vcl/source/edit/vclmedit.cxx | 4 ++-- vcl/source/uitest/uiobject.cxx | 6 +++--- vcl/source/window/menubarwindow.cxx | 2 +- vcl/source/window/toolbox.cxx | 5 +++++ vcl/unx/gtk3/gtkinst.cxx | 2 +- 31 files changed, 111 insertions(+), 174 deletions(-)
New commits: commit c6f6349a679c4aeed906115f62edf7a66d200240 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Aug 13 12:06:33 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 13 14:03:51 2023 +0200 Revert "clang-tidy bugprone-parent-virtual-call in vcl" This reverts commit 69972719542cd686687ddd91f2b5284483513608. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: If5316654c16a697a2aff5eccdffaa5b2a6e0052d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index aa24a6d5c2c4..6cf448a30b1d 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -291,6 +291,7 @@ public: virtual void Resizing( Size& rSize ) override; virtual Size GetOptimalSize() const override; virtual void doDeferredInit(WinBits nBits) override; + virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override; /// Insert a command (like '.uno:Save'). virtual void InsertItem( const OUString& rCommand, diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx index 0aed942beb79..7e5756537164 100644 --- a/vcl/source/app/idle.cxx +++ b/vcl/source/app/idle.cxx @@ -33,7 +33,7 @@ Idle::Idle( const char *pDebugName ) void Idle::Start(const bool bStartTimer) { - Timer::Start(false); + Task::Start(false); sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs; if (Scheduler::GetDeterministicMode()) diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 1ce6cf936316..80772536adeb 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6227,22 +6227,22 @@ void SalInstanceDrawingArea::queue_draw_area(int x, int y, int width, int height void SalInstanceDrawingArea::connect_size_allocate(const Link<const Size&, void>& rLink) { - SalInstanceWidget::connect_size_allocate(rLink); + weld::Widget::connect_size_allocate(rLink); } void SalInstanceDrawingArea::connect_key_press(const Link<const KeyEvent&, bool>& rLink) { - SalInstanceWidget::connect_key_press(rLink); + weld::Widget::connect_key_press(rLink); } void SalInstanceDrawingArea::connect_key_release(const Link<const KeyEvent&, bool>& rLink) { - SalInstanceWidget::connect_key_release(rLink); + weld::Widget::connect_key_release(rLink); } void SalInstanceDrawingArea::connect_style_updated(const Link<Widget&, void>& rLink) { - SalInstanceWidget::connect_style_updated(rLink); + weld::Widget::connect_style_updated(rLink); } void SalInstanceDrawingArea::set_cursor(PointerStyle ePointerStyle) diff --git a/vcl/source/control/PriorityMergedHBox.cxx b/vcl/source/control/PriorityMergedHBox.cxx index 5d5e6249ed16..fd5aa5814dac 100644 --- a/vcl/source/control/PriorityMergedHBox.cxx +++ b/vcl/source/control/PriorityMergedHBox.cxx @@ -46,18 +46,18 @@ PriorityMergedHBox::PriorityMergedHBox(vcl::Window* pParent) void PriorityMergedHBox::Resize() { if (comphelper::LibreOfficeKit::isActive()) - return PriorityHBox::Resize(); + return VclHBox::Resize(); if (!m_bInitialized) Initialize(); if (!m_bInitialized) { - return PriorityHBox::Resize(); + return VclHBox::Resize(); } tools::Long nWidth = GetSizePixel().Width(); - tools::Long nCurrentWidth = PriorityHBox::calculateRequisition().getWidth() + BUTTON_WIDTH; + tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + BUTTON_WIDTH; // Hide lower priority controls for (int i = GetChildCount() - 1; i >= 0; i--) @@ -104,7 +104,7 @@ void PriorityMergedHBox::Resize() } } - PriorityHBox::Resize(); + VclHBox::Resize(); if (GetHiddenCount()) m_pButton->Show(); @@ -138,7 +138,7 @@ Size PriorityMergedHBox::calculateRequisition() const { if (!m_bInitialized) { - return PriorityHBox::calculateRequisition(); + return VclHBox::calculateRequisition(); } sal_uInt16 nVisibleChildren = 0; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index ac817ce2a426..05b7a50006b9 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -575,7 +575,7 @@ void ComboBox::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWid void ComboBox::Resize() { - Edit::Resize(); + Control::Resize(); if (m_pImpl->m_pSubEdit) { @@ -693,7 +693,7 @@ void ComboBox::StateChanged( StateChangedType nType ) void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) { - Edit::DataChanged( rDCEvt ); + Control::DataChanged( rDCEvt ); if ( !((rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || @@ -1570,7 +1570,7 @@ bool ComboBox::set_property(const OUString &rKey, const OUString &rValue) else if (rKey == "placeholder-text") SetPlaceholderText(rValue); else - return Edit::set_property(rKey, rValue); + return Control::set_property(rKey, rValue); return true; } @@ -1581,7 +1581,7 @@ FactoryFunction ComboBox::GetUITestFactory() const void ComboBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) { - Edit::DumpAsPropertyTree(rJsonWriter); + Control::DumpAsPropertyTree(rJsonWriter); { auto entriesNode = rJsonWriter.startArray("entries"); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 780105b32ea3..1b18498c68fc 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2399,7 +2399,7 @@ bool ImplListBox::EventNotify( NotifyEvent& rNEvt ) } } - return bDone || Control::EventNotify( rNEvt ); + return bDone || Window::EventNotify( rNEvt ); } const Wallpaper& ImplListBox::GetDisplayBackground() const diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 15229b53af3d..973825a3a977 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -718,7 +718,7 @@ void SpinField::Resize() if (!mbSpin) return; - Edit::Resize(); + Control::Resize(); Size aSize = GetOutputSizePixel(); bool bSubEditPositioned = false; diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 3048b535c031..541d6bfc20c8 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1252,7 +1252,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) } } - Edit::StateChanged( nType ); + Control::StateChanged( nType ); } void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) @@ -1265,7 +1265,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } else - Edit::DataChanged( rDCEvt ); + Control::DataChanged( rDCEvt ); } void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags ) diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index e4f2c63a73c9..623591e7e218 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -1379,7 +1379,7 @@ OUString SpinFieldUIObject::get_action(VclEventId nEvent) const "' from " + get_top_parent(mxSpinField)->get_id(); } else - return EditUIObject::get_action(nEvent); + return WindowUIObject::get_action(nEvent); } OUString SpinFieldUIObject::get_name() const @@ -1422,7 +1422,7 @@ void MetricFieldUIObject::execute(const OUString& rAction, StringMap MetricFieldUIObject::get_state() { - StringMap aMap = SpinFieldUIObject::get_state(); + StringMap aMap = EditUIObject::get_state(); aMap["Value"] = mxMetricField->GetValueString(); return aMap; @@ -1467,7 +1467,7 @@ void FormattedFieldUIObject::execute(const OUString& rAction, StringMap FormattedFieldUIObject::get_state() { - StringMap aMap = SpinFieldUIObject::get_state(); + StringMap aMap = EditUIObject::get_state(); aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue()); return aMap; diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 85b1003363c9..89e6b9246148 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -47,7 +47,7 @@ DecoToolBox::DecoToolBox( vcl::Window* pParent ) : void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { - ToolBox::DataChanged( rDCEvt ); + Window::DataChanged( rDCEvt ); if ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) { diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ef12af602504..fc9effe58065 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1260,6 +1260,11 @@ void ToolBox::doDeferredInit(WinBits nBits) mbIsDeferredInit = false; } +void ToolBox::queue_resize(StateChangedType eReason) +{ + Window::queue_resize(eReason); +} + ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) : DockingWindow( WindowType::TOOLBOX, "vcl::ToolBox maLayoutIdle" ) { diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 9c3b008c4266..2cfd0d6b203a 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -6528,7 +6528,7 @@ public: { if (!m_nToplevelFocusChangedSignalId) m_nToplevelFocusChangedSignalId = g_signal_connect(m_pWindow, "notify::has-toplevel-focus", G_CALLBACK(signalToplevelFocusChanged), this); - GtkInstanceContainer::connect_container_focus_changed(rLink); + weld::Container::connect_container_focus_changed(rLink); } virtual void disable_notify_events() override commit e9b5b299a5efa03aaa752e30afe960ef25305d62 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Aug 13 12:06:16 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 13 14:03:44 2023 +0200 Revert "clang-tidy bugprone-parent-virtual-call in sfx2" This reverts commit 0f3b36bd2749f360df84d1594c01e619ba0f4930. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: Ifa383ee7ed2db4f81e2b0ac593e652288a07514f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155596 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx index b134b8ac7ea7..2602387fad59 100644 --- a/include/sfx2/sfxbasemodel.hxx +++ b/include/sfx2/sfxbasemodel.hxx @@ -184,6 +184,27 @@ public: virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override ; + /**___________________________________________________________________________________________________ + @short increment refcount + @seealso XInterface + @seealso release() + @onerror A RuntimeException is thrown. + */ + + virtual void SAL_CALL acquire() noexcept override + { OWeakObject::acquire(); } + + /**___________________________________________________________________________________________________ + @short decrement refcount + @seealso XInterface + @seealso acquire() + @onerror A RuntimeException is thrown. + */ + + virtual void SAL_CALL release() noexcept override + { OWeakObject::release(); } + + // XTypeProvider diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx index 7325ca0959d8..67c88c68710d 100644 --- a/include/sfx2/stbitem.hxx +++ b/include/sfx2/stbitem.hxx @@ -63,6 +63,9 @@ class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController public: // new controller API + // XInterface + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; protected: // XEventListener diff --git a/sfx2/inc/templatedefaultview.hxx b/sfx2/inc/templatedefaultview.hxx index 07cd3d126639..1771ad3d8759 100644 --- a/sfx2/inc/templatedefaultview.hxx +++ b/sfx2/inc/templatedefaultview.hxx @@ -19,6 +19,8 @@ public: virtual void showAllTemplates() override; + virtual bool KeyInput(const KeyEvent& rKEvt) override; + virtual bool MouseButtonDown(const MouseEvent& rMEvt) override; void createContextMenu(); diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx index b7e7c0edc4a6..17ad2ba7cbda 100644 --- a/sfx2/source/control/templatedefaultview.cxx +++ b/sfx2/source/control/templatedefaultview.cxx @@ -47,6 +47,11 @@ void TemplateDefaultView::showAllTemplates() insertItems(maAllTemplates, false); } +bool TemplateDefaultView::KeyInput( const KeyEvent& rKEvt ) +{ + return ThumbnailView::KeyInput(rKEvt); +} + bool TemplateDefaultView::MouseButtonDown( const MouseEvent& rMEvt ) { if( rMEvt.IsLeft() && rMEvt.GetClicks() == 1 ) diff --git a/sfx2/source/control/templatedlglocalview.cxx b/sfx2/source/control/templatedlglocalview.cxx index a4cac457cd0e..52a12b4ef965 100644 --- a/sfx2/source/control/templatedlglocalview.cxx +++ b/sfx2/source/control/templatedlglocalview.cxx @@ -401,7 +401,7 @@ bool TemplateDlgLocalView::KeyInput(const KeyEvent& rKEvt) reload(); } - return TemplateLocalView::KeyInput(rKEvt); + return ThumbnailView::KeyInput(rKEvt); } IMPL_LINK(TemplateDlgLocalView, KeyPressHdl, const KeyEvent&, rKEvt, bool) diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 56c47315ab54..7d1f16c01fd9 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1345,7 +1345,7 @@ void SAL_CALL SfxDocumentMetaData::dispose() if (!m_isInitialized) { return; } - PartialWeakComponentImplHelper::dispose(); // superclass + WeakComponentImplHelperBase::dispose(); // superclass m_NotifyListeners.disposeAndClear(css::lang::EventObject( getXWeak())); m_isInitialized = false; diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx index 2370397e267c..94f416c2d786 100644 --- a/sfx2/source/doc/docundomanager.cxx +++ b/sfx2/source/doc/docundomanager.cxx @@ -224,7 +224,7 @@ namespace sfx2 void SAL_CALL DocumentUndoManager::acquire() noexcept { - WeakImplHelper::acquire(); + OWeakObject::acquire(); SfxModelSubComponent::acquireModel(); } @@ -232,7 +232,7 @@ namespace sfx2 void SAL_CALL DocumentUndoManager::release() noexcept { SfxModelSubComponent::releaseModel(); - WeakImplHelper::release(); + OWeakObject::release(); } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 2e2c0e2d7ade..dec37dd0c406 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1367,7 +1367,7 @@ short SfxTemplateSelectionDlg::run() maIdle.Start(); setTemplateViewMode(TemplateViewMode::eThumbnailView); - return SfxTemplateManagerDlg::run(); + return weld::GenericDialogController::run(); } IMPL_LINK_NOARG(SfxTemplateSelectionDlg, TimeOut, Timer*, void) diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index e049180c937d..a1c407aa6d72 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -54,7 +54,7 @@ SvxZoomItem* SvxZoomItem::Clone( SfxItemPool * /*pPool*/ ) const bool SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const { - assert(SfxPoolItem::operator==(rAttr)); // NOLINT(bugprone-parent-virtual-call) + assert(SfxPoolItem::operator==(rAttr)); const SvxZoomItem& rItem = static_cast<const SvxZoomItem&>(rAttr); diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index a941593a2c47..349e5bef1497 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -147,7 +147,7 @@ bool SidebarToolBox::EventNotify (NotifyEvent& rEvent) // Special handling for transferring handling of KEY_TAB // that becomes necessary because of our parent that is // not the dialog but a background control. - return DockingWindow::EventNotify(rEvent); // NOLINT(bugprone-parent-virtual-call) + return DockingWindow::EventNotify(rEvent); } } return ToolBox::EventNotify(rEvent); diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 5de5b69a59b4..e9d8512fa832 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -156,6 +156,18 @@ SfxStatusBarControl::~SfxStatusBarControl() {} +// XInterface +void SAL_CALL SfxStatusBarControl::acquire() noexcept +{ + OWeakObject::acquire(); +} + +void SAL_CALL SfxStatusBarControl::release() noexcept +{ + OWeakObject::release(); +} + + // XStatusListener void SAL_CALL SfxStatusBarControl::statusChanged( const frame::FeatureStateEvent& rEvent ) { commit 5463f2a985937562a21c2b7c706fa004748ee5f4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Aug 13 12:06:23 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 13 14:03:38 2023 +0200 Revert "clang-tidy bugprone-parent-virtual-call in canvas" This reverts commit eb6110aae0af9e27f71dac95274b8f3879090deb. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: I3856b878cfaa6fd1b282a473965b2ec68779a616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx index 5d0b8e348caf..0c41a8a5c0d3 100644 --- a/canvas/source/cairo/cairo_canvas.hxx +++ b/canvas/source/cairo/cairo_canvas.hxx @@ -109,24 +109,10 @@ namespace cairocanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { GraphicDeviceBase_Base::acquire(); } \ - virtual void SAL_CALL release() noexcept override { GraphicDeviceBase_Base::release(); } \ - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return GraphicDeviceBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - CanvasBaseSurfaceProvider_Base::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBaseSurfaceProvider_Base::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBaseSurfaceProvider_Base::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase ) // XServiceName virtual OUString SAL_CALL getServiceName( ) override; diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index 9e6d1d8a28cd..f2371821023f 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -78,24 +78,10 @@ namespace cairocanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { CanvasBitmapBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { CanvasBitmapBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return CanvasBitmapBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - CanvasBitmapSpriteSurface_Base::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBitmapSpriteSurface_Base::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBitmapSpriteSurface_Base::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasBitmap, CanvasBitmapBase_Base, ::cppu::WeakComponentImplHelperBase ) // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) override; diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx index 6a392b13c6f1..ffe766ab0966 100644 --- a/canvas/source/cairo/cairo_canvascustomsprite.hxx +++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx @@ -103,24 +103,10 @@ namespace cairocanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { CanvasCustomSpriteBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { CanvasCustomSpriteBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return CanvasCustomSpriteBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - CanvasCustomSpriteBase_Base::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasCustomSpriteBase_Base::removeEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasCustomSpriteBase_Base::removeEventListener(xListener); - } + // Classname Base doing refcount Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase ) // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx index 3468dc0674d8..7790e68904b0 100644 --- a/canvas/source/cairo/cairo_spritecanvas.hxx +++ b/canvas/source/cairo/cairo_spritecanvas.hxx @@ -110,24 +110,10 @@ namespace cairocanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { WindowGraphicDeviceBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { WindowGraphicDeviceBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return WindowGraphicDeviceBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - PartialWeakComponentImplHelper::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase ) // XBufferController (partial) virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) override; diff --git a/canvas/source/opengl/ogl_spritecanvas.hxx b/canvas/source/opengl/ogl_spritecanvas.hxx index bdc849bd3708..33948b2d0cd2 100644 --- a/canvas/source/opengl/ogl_spritecanvas.hxx +++ b/canvas/source/opengl/ogl_spritecanvas.hxx @@ -78,24 +78,10 @@ namespace oglcanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { WindowGraphicDeviceBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { WindowGraphicDeviceBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return WindowGraphicDeviceBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - SpriteCanvasBaseT::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - SpriteCanvasBaseT::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - SpriteCanvasBaseT::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase ) // XBufferController (partial) virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) override; diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx index ead9411475a2..8bcbc1f49894 100644 --- a/canvas/source/vcl/canvas.hxx +++ b/canvas/source/vcl/canvas.hxx @@ -90,24 +90,10 @@ namespace vclcanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { GraphicDeviceBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { GraphicDeviceBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return GraphicDeviceBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - CanvasBaseT::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBaseT::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - CanvasBaseT::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase ) // XServiceName virtual OUString SAL_CALL getServiceName( ) override; diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx index 1c220f38860a..1a7d3ccfb69e 100644 --- a/canvas/source/vcl/canvascustomsprite.hxx +++ b/canvas/source/vcl/canvascustomsprite.hxx @@ -86,24 +86,10 @@ namespace vclcanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { CanvasCustomSpriteBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { CanvasCustomSpriteBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return CanvasCustomSpriteBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - PartialWeakComponentImplHelper::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::removeEventListener(xListener); - } + // Classname Base doing refcount Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase ) // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx index 1f4d1c502184..8f7c76880f51 100644 --- a/canvas/source/vcl/spritecanvas.hxx +++ b/canvas/source/vcl/spritecanvas.hxx @@ -118,24 +118,10 @@ namespace vclcanvas // Forwarding the XComponent implementation to the // cppu::ImplHelper templated base - virtual void SAL_CALL acquire() noexcept override { WindowGraphicDeviceBase_Base::acquire(); } - virtual void SAL_CALL release() noexcept override { WindowGraphicDeviceBase_Base::release(); } - virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override - { return WindowGraphicDeviceBase_Base::queryInterface(_rType); } - virtual void SAL_CALL dispose() override - { - WeakComponentImplHelper::dispose(); - } - virtual void SAL_CALL addEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::addEventListener(xListener); - } - virtual void SAL_CALL removeEventListener( - css::uno::Reference< css::lang::XEventListener > const & xListener ) override - { - WeakComponentImplHelper::removeEventListener(xListener); - } + // Classname Base doing refcounting Base implementing the XComponent interface + // | | | + // V V V + DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase ) // XBufferController (partial) virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) override;