use comphelper::WeakComponentImplHelper in SidebarPanelBase

Change-Id: I527098109916113e4dc25a3ae30cfe6325aa02d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-12-29 08:45:05 +02:00
committed by Noel Grandin
parent d951a05444
commit d26d13f49c
2 changed files with 6 additions and 9 deletions

View File

@@ -24,8 +24,7 @@
#include <sfx2/dllapi.h>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <comphelper/compbase.hxx>
#include <com/sun/star/ui/XContextChangeEventListener.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
@@ -39,7 +38,7 @@ namespace sfx2::sidebar {
class Panel;
typedef cppu::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
typedef comphelper::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
css::ui::XUIElement,
css::ui::XToolPanel,
css::ui::XSidebarPanel,
@@ -49,8 +48,7 @@ typedef cppu::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
/** Base class for sidebar panels that provides some convenience
functionality.
*/
class SFX2_DLLPUBLIC SidebarPanelBase final : private ::cppu::BaseMutex,
public SidebarPanelBaseInterfaceBase
class SFX2_DLLPUBLIC SidebarPanelBase final : public SidebarPanelBaseInterfaceBase
{
public:
static css::uno::Reference<css::ui::XUIElement> Create(const OUString& rsResourceURL,
@@ -91,7 +89,7 @@ private:
SidebarPanelBase(const SidebarPanelBase&) = delete;
SidebarPanelBase& operator=( const SidebarPanelBase& ) = delete;
virtual void SAL_CALL disposing() override;
virtual void disposing(std::unique_lock<std::mutex>&) override;
css::uno::Reference<css::frame::XFrame> mxFrame;
std::unique_ptr<PanelLayout> mxControl;

View File

@@ -52,8 +52,7 @@ SidebarPanelBase::SidebarPanelBase (
const css::uno::Reference<css::frame::XFrame>& rxFrame,
std::unique_ptr<PanelLayout> xControl,
const css::ui::LayoutSize& rLayoutSize)
: SidebarPanelBaseInterfaceBase(m_aMutex),
mxFrame(rxFrame),
: mxFrame(rxFrame),
mxControl(std::move(xControl)),
msResourceURL(rsResourceURL),
maLayoutSize(rLayoutSize)
@@ -78,7 +77,7 @@ void SidebarPanelBase::SetParentPanel(sfx2::sidebar::Panel* pPanel)
mxControl->SetPanel(pPanel);
}
void SAL_CALL SidebarPanelBase::disposing()
void SidebarPanelBase::disposing(std::unique_lock<std::mutex>&)
{
SolarMutexGuard aGuard;