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:
committed by
Noel Grandin
parent
d951a05444
commit
d26d13f49c
@@ -24,8 +24,7 @@
|
|||||||
|
|
||||||
#include <sfx2/dllapi.h>
|
#include <sfx2/dllapi.h>
|
||||||
|
|
||||||
#include <cppuhelper/compbase.hxx>
|
#include <comphelper/compbase.hxx>
|
||||||
#include <cppuhelper/basemutex.hxx>
|
|
||||||
|
|
||||||
#include <com/sun/star/ui/XContextChangeEventListener.hpp>
|
#include <com/sun/star/ui/XContextChangeEventListener.hpp>
|
||||||
#include <com/sun/star/ui/XUIElement.hpp>
|
#include <com/sun/star/ui/XUIElement.hpp>
|
||||||
@@ -39,7 +38,7 @@ namespace sfx2::sidebar {
|
|||||||
|
|
||||||
class Panel;
|
class Panel;
|
||||||
|
|
||||||
typedef cppu::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
|
typedef comphelper::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
|
||||||
css::ui::XUIElement,
|
css::ui::XUIElement,
|
||||||
css::ui::XToolPanel,
|
css::ui::XToolPanel,
|
||||||
css::ui::XSidebarPanel,
|
css::ui::XSidebarPanel,
|
||||||
@@ -49,8 +48,7 @@ typedef cppu::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
|
|||||||
/** Base class for sidebar panels that provides some convenience
|
/** Base class for sidebar panels that provides some convenience
|
||||||
functionality.
|
functionality.
|
||||||
*/
|
*/
|
||||||
class SFX2_DLLPUBLIC SidebarPanelBase final : private ::cppu::BaseMutex,
|
class SFX2_DLLPUBLIC SidebarPanelBase final : public SidebarPanelBaseInterfaceBase
|
||||||
public SidebarPanelBaseInterfaceBase
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static css::uno::Reference<css::ui::XUIElement> Create(const OUString& rsResourceURL,
|
static css::uno::Reference<css::ui::XUIElement> Create(const OUString& rsResourceURL,
|
||||||
@@ -91,7 +89,7 @@ private:
|
|||||||
SidebarPanelBase(const SidebarPanelBase&) = delete;
|
SidebarPanelBase(const SidebarPanelBase&) = delete;
|
||||||
SidebarPanelBase& operator=( 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;
|
css::uno::Reference<css::frame::XFrame> mxFrame;
|
||||||
std::unique_ptr<PanelLayout> mxControl;
|
std::unique_ptr<PanelLayout> mxControl;
|
||||||
|
@@ -52,8 +52,7 @@ SidebarPanelBase::SidebarPanelBase (
|
|||||||
const css::uno::Reference<css::frame::XFrame>& rxFrame,
|
const css::uno::Reference<css::frame::XFrame>& rxFrame,
|
||||||
std::unique_ptr<PanelLayout> xControl,
|
std::unique_ptr<PanelLayout> xControl,
|
||||||
const css::ui::LayoutSize& rLayoutSize)
|
const css::ui::LayoutSize& rLayoutSize)
|
||||||
: SidebarPanelBaseInterfaceBase(m_aMutex),
|
: mxFrame(rxFrame),
|
||||||
mxFrame(rxFrame),
|
|
||||||
mxControl(std::move(xControl)),
|
mxControl(std::move(xControl)),
|
||||||
msResourceURL(rsResourceURL),
|
msResourceURL(rsResourceURL),
|
||||||
maLayoutSize(rLayoutSize)
|
maLayoutSize(rLayoutSize)
|
||||||
@@ -78,7 +77,7 @@ void SidebarPanelBase::SetParentPanel(sfx2::sidebar::Panel* pPanel)
|
|||||||
mxControl->SetPanel(pPanel);
|
mxControl->SetPanel(pPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SidebarPanelBase::disposing()
|
void SidebarPanelBase::disposing(std::unique_lock<std::mutex>&)
|
||||||
{
|
{
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user