Revert "clang-tidy bugprone-parent-virtual-call in sfx2"

This reverts commit 0f3b36bd27.

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.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2023-08-13 14:03:44 +02:00
parent 5463f2a985
commit e9b5b299a5
11 changed files with 50 additions and 7 deletions
+21
View File
@@ -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
+3
View File
@@ -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
+2
View File
@@ -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();
@@ -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 )
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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();
}
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+12
View File
@@ -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 )
{