diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-12-16 21:59:25 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-12-17 18:32:43 +0100 |
commit | 77378cde59bd9eb986f1ac8b071a5e853bc6805c (patch) | |
tree | 0170ab66a816f8b50759af9cfc6aefe2864119fb /svx | |
parent | ebb6c4407da2f8e913f1520b61a36ca3a4b54a7e (diff) |
SvxTextEditSourceImpl::Notify(): attempt to fix chart2_unoapi crash
Apparently SvxTextEditSourceImpl::mpView is not properly invalidated
when the instance it points to is deleted; the SvxTextEditSourceImpl
is registered as listener so try to handle this in Notify(); not sure
if there isn't something that ought to have cleaned this up...
Crash running with SAL_FORCE_IACCESSIBLE2=1:
svxcorelo.dll!SdrPaintView::FindPaintWindow(const OutputDevice & rOut) Line 70
svxcorelo.dll!SvxTextEditSourceImpl::GetVisArea() Line 923
svxcorelo.dll!SvxTextEditSource::GetVisArea() Line 1113
svxlo.dll!accessibility::AccessibleTextHelper_Impl::UpdateVisibleChildren(bool bBroadcastEvents) Line 868
svxlo.dll!accessibility::AccessibleTextHelper_Impl::ProcessQueue() Line 1376
svxlo.dll!accessibility::AccessibleTextHelper_Impl::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 1530
svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 48
svxcorelo.dll!SvxTextEditSourceImpl::NotifyHdl(EENotify * aNotify) Line 1021
svxcorelo.dll!SvxTextEditSourceImpl::LinkStubNotifyHdl(void * pThis, void * pCaller) Line 1013
tllo.dll!Link::Call(void * pCaller) Line 123
editenglo.dll!Outliner::ImplBlockInsertionCallbacks(unsigned char b) Line 2098
editenglo.dll!Outliner::Clear() Line 2036
svxcorelo.dll!SdrOutlinerCache::disposeOutliner(SdrOutliner * pOutliner) Line 91
svxcorelo.dll!SdrModel::disposeOutliner(SdrOutliner * pOutliner) Line 1960
svxcorelo.dll!SvxTextEditSourceImpl::dispose() Line 489
svxcorelo.dll!SvxTextEditSourceImpl::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 458
svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 48
svxcorelo.dll!SdrModel::~SdrModel() Line 270
chartcorelo.dll!chart::DrawModelWrapper::~DrawModelWrapper() Line 191
chartcorelo.dll!chart::DrawModelWrapper::`vector deleting destructor'(unsigned int)
chartcorelo.dll!boost::checked_delete<chart::DrawModelWrapper>(chart::DrawModelWrapper * x) Line 34
chartcorelo.dll!boost::detail::sp_counted_impl_p<chart::DrawModelWrapper>::dispose() Line 78
chartcorelo.dll!boost::detail::sp_counted_base::release() Line 104
chartcorelo.dll!boost::detail::shared_count::~shared_count() Line 381
chartcorelo.dll!boost::shared_ptr<chart::DrawModelWrapper>::~shared_ptr<chart::DrawModelWrapper>()
chartcorelo.dll!boost::shared_ptr<chart::DrawModelWrapper>::reset() Line 626
chartcorelo.dll!chart::ChartView::~ChartView() Line 202
chartcorelo.dll!chart::ChartView::`scalar deleting destructor'(unsigned int)
cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 204
chartcorelo.dll!cppu::WeakImplHelper10<com::sun::star::lang::XInitialization,com::sun::star::lang::XServiceInfo,com::sun::star::datatransfer::XTransferable,com::sun::star::lang::XUnoTunnel,com::sun::star::util::XModifyListener,com::sun::star::util::XModeChangeBroadcaster,com::sun::star::util::XUpdatable,com::sun::star::beans::XPropertySet,com::sun::star::lang::XMultiServiceFactory,com::sun::star::qa::XDumper>::release() Line 115
chartcorelo.dll!com::sun::star::uno::Reference<com::sun::star::uno::XInterface>::~Reference<com::sun::star::uno::XInterface>() Line 106
chartcorelo.dll!chart::ChartModel::~ChartModel() Line 188
chartcorelo.dll!chart::ChartModel::`vector deleting destructor'(unsigned int)
cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 204
Change-Id: Ife6d6275eae74750858a7a7f57153c76a1a228a4
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index da2a4810fde7..30d364fdd93e 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -333,15 +333,31 @@ void SvxTextEditSourceImpl::ChangeModel( SdrModel* pNewModel ) //------------------------------------------------------------------------ -void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) +void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { // #i105988 keep reference to this object rtl::Reference< SvxTextEditSourceImpl > xThis( this ); const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint ); const SvxViewHint* pViewHint = PTR_CAST( SvxViewHint, &rHint ); + const SfxSimpleHint* pSimpleHint = PTR_CAST( SfxSimpleHint, &rHint ); - if( pViewHint ) + if (pSimpleHint) + { + if (SFX_HINT_DYING == pSimpleHint->GetId()) + { + if (&rBC == mpView) + { + mpView = 0; + if (mpViewForwarder) + { + delete mpViewForwarder; + mpViewForwarder = 0; + } + } + } + } + else if( pViewHint ) { switch( pViewHint->GetHintType() ) { |