From 9e2973dbb90b5d9ce004cbf333f5000e4d50dc18 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 Dec 2015 11:52:53 +0200 Subject: fix SwClient crash in SwXNumberingRules/SwXTableRows/SwXTableColumns was generated a crash when running 'make check' on my Linux box. These classes need to hold the SolarMutex when destructing their SwClient base class. Change-Id: I448ea00978d003aa37d8663d37b4edf9e54a6a56 Reviewed-on: https://gerrit.libreoffice.org/20391 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- sw/inc/unotbl.hxx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'sw/inc/unotbl.hxx') diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 96323c274809..5de9902516be 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -547,11 +547,12 @@ class SwXTableRows final : public cppu::WeakImplHelper < css::table::XTableRows, css::lang::XServiceInfo ->, - public SwClient - +> { - SwFrameFormat* GetFrameFormat() { return static_cast(GetRegisteredIn()); } +private: + class Impl; + ::sw::UnoImplPtr m_pImpl; + SwFrameFormat* GetFrameFormat(); const SwFrameFormat* GetFrameFormat() const { return const_cast(this)->GetFrameFormat(); } protected: virtual ~SwXTableRows(); @@ -579,20 +580,18 @@ public: virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; }; class SwXTableColumns : public cppu::WeakImplHelper < css::table::XTableColumns, css::lang::XServiceInfo ->, - public SwClient - +> { - SwFrameFormat* GetFrameFormat() const { return const_cast(static_cast(GetRegisteredIn())); } +private: + class Impl; + ::sw::UnoImplPtr m_pImpl; + SwFrameFormat* GetFrameFormat() const; protected: virtual ~SwXTableColumns(); public: @@ -619,9 +618,6 @@ public: virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; }; int sw_CompareCellRanges( -- cgit v1.2.3