Kaydet (Commit) 6b6eb1ab authored tarafından Michael Stahl's avatar Michael Stahl

sc: add some assertions on ScAccessibleEditLineTextData

JunitTest_sc_unoapi crashed when accessing a disposed ScTextWnd from
~ScAccessibleEditLineTextData(), but the ScTextWnd::dispose() would also
call ScAccessibleEditLineTextData::Dispose() and clear mpWindow, so it
seems impossible to observe a disposed ScTextWnd in the dtor?

Change-Id: If571ee61d9a29601acb1de552ec1b9cc36d0d51e
üst 21a9bc87
......@@ -1066,7 +1066,10 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
ScTextWnd* pTxtWnd = dynamic_cast< ScTextWnd* >(mpWindow.get());
if (pTxtWnd)
{
assert(!pTxtWnd->IsDisposed());
pTxtWnd->RemoveAccessibleTextData( *this );
}
if (mbEditEngineCreated && mpEditEngine)
{
......@@ -1087,7 +1090,10 @@ void ScAccessibleEditLineTextData::Dispose()
ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (pTxtWnd)
{
assert(!pTxtWnd->IsDisposed());
pTxtWnd->RemoveAccessibleTextData( *this );
}
ResetEditMode();
mpWindow = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment