diff options
author | Noel Grandin <noel@peralex.com> | 2015-12-04 11:52:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-04 11:07:34 +0000 |
commit | 9e2973dbb90b5d9ce004cbf333f5000e4d50dc18 (patch) | |
tree | 039d1dba4fcd8fd0db8eb8e94be113201da128e6 /sw/inc | |
parent | b1ff7054a0d7c12e0961c7a78bb2626b33c7f0d1 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/unosett.hxx | 13 | ||||
-rw-r--r-- | sw/inc/unotbl.hxx | 24 |
2 files changed, 17 insertions, 20 deletions
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index d19f5f170885..7e10aca52564 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -32,6 +32,7 @@ #include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase5.hxx> #include <svl/itemprop.hxx> +#include <unobaseclass.hxx> class SwDoc; class SwFormatCol; @@ -136,9 +137,12 @@ class SwXNumberingRules : public cppu::WeakAggImplHelper5 css::beans::XPropertySet, css::container::XNamed, css::lang::XServiceInfo ->, - public SwClient +> { +private: + class Impl; + ::sw::UnoImplPtr<Impl> m_pImpl; + OUString m_sNewCharStyleNames[MAXLEVEL]; OUString m_sNewBulletFontNames[MAXLEVEL]; OUString m_sCreatedNumRuleName; //connects to a numbering in SwDoc @@ -146,13 +150,10 @@ class SwXNumberingRules : public cppu::WeakAggImplHelper5 SwDocShell* pDocShell; // Only if used as chapter numbering. SwNumRule* pNumRule; const SfxItemPropertySet* m_pPropertySet; - bool bOwnNumRuleCreated; + bool bOwnNumRuleCreated; protected: virtual ~SwXNumberingRules(); - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; - public: SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc = nullptr); // NumRule for paragraphs, numbering styles 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<SwFrameFormat*>(GetRegisteredIn()); } +private: + class Impl; + ::sw::UnoImplPtr<Impl> m_pImpl; + SwFrameFormat* GetFrameFormat(); const SwFrameFormat* GetFrameFormat() const { return const_cast<SwXTableRows*>(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<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); } +private: + class Impl; + ::sw::UnoImplPtr<Impl> 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( |