summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-07 21:05:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-08 09:22:46 +0100
commit467887d3c938b48d13f70e559e15ffd081de512d (patch)
treec4916d6672a01e392fee5784b7cf732e8f860a4f
parentefbe959732687d7a96041a3f7b90e817abbd8145 (diff)
Related: tdf#100713 fix more recent bug to try and see older bug...
at the moment AddonsOptions::Notify is called with a null this which crashes during adding an extension regression from... commit 3bdc5063f942b9ea3b6e39e707926fbc516c19f9 Date: Wed Jun 22 02:30:43 2016 +0200 tdf#89329: use shared_ptr for pImpl in addonsoptions Change-Id: Ic28951e56bb8beca2a01ef2a1864eadcf3864e5b
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx10
-rw-r--r--include/framework/addonsoptions.hxx9
2 files changed, 6 insertions, 13 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 12e7ca94e1af..9deffd4e5e4c 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -275,6 +275,8 @@ class AddonsOptions_Impl : public ConfigItem
Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const;
bool CreateImageFromSequence( Image& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
+ DECL_LINK_TYPED(NotifyEvent, void*, void);
+
virtual void ImplCommit() override;
// private member
@@ -409,7 +411,7 @@ void AddonsOptions_Impl::ReadConfigurationData()
void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ )
{
- Application::PostUserEvent( LINK( nullptr, AddonsOptions, Notify ) );
+ Application::PostUserEvent(LINK(this, AddonsOptions_Impl, NotifyEvent));
}
// public method
@@ -1613,10 +1615,10 @@ Mutex& AddonsOptions::GetOwnStaticMutex()
return *pMutex;
}
-IMPL_LINK_NOARG_TYPED( AddonsOptions, Notify, void*, void )
+IMPL_LINK_NOARG_TYPED(AddonsOptions_Impl, NotifyEvent, void*, void)
{
- MutexGuard aGuard( GetOwnStaticMutex() );
- m_pImpl->ReadConfigurationData();
+ MutexGuard aGuard(AddonsOptions::GetOwnStaticMutex());
+ ReadConfigurationData();
}
}
diff --git a/include/framework/addonsoptions.hxx b/include/framework/addonsoptions.hxx
index e0c40136edfe..30a46a9ff841 100644
--- a/include/framework/addonsoptions.hxx
+++ b/include/framework/addonsoptions.hxx
@@ -207,15 +207,6 @@ class FWE_DLLPUBLIC AddonsOptions
static ::osl::Mutex& GetOwnStaticMutex();
- /*-****************************************************************************************************
- @short return a reference to a static mutex
- @descr These class is partially threadsafe (for de-/initialization only).
- All access methods are'nt safe!
- We create a static mutex only for one ime and use at different times.
- @return A reference to a static mutex member.
- *//*-*****************************************************************************************************/
- DECL_LINK_TYPED( Notify, void*, void );
-
private:
std::shared_ptr<AddonsOptions_Impl> m_pImpl;
};