Kaydet (Commit) 8a334eb2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

tdf#94687: Keep original ordering of overall initialization steps

...between ScGridWindow::CreateAccessible, ScAccessibleDocument ctor, and
ScAccessibleDocument::Init, by introducing ScAccessibleDocument::PreInit into
which the this-using parts of the ScAccessibleDocument ctor are offloaded now.

This is a follow-up to 6f1e77fc, "rhbz#1264753:
Avoid this being release()ed to 0 in ScAccessibleDocument ctor;" turns out my
fears that the slight re-ordering of initialization code coulb break something
were well-founded after all.

Change-Id: Ibf62983030d7abbe4b1ead9ee5add5f9627e7d60
üst 0fc0abb5
......@@ -1415,7 +1415,7 @@ ScAccessibleDocument::ScAccessibleDocument(
maVisArea = GetVisibleArea_Impl();
}
void ScAccessibleDocument::Init()
void ScAccessibleDocument::PreInit()
{
if (mpViewShell)
{
......@@ -1442,6 +1442,10 @@ void ScAccessibleDocument::Init()
AddChild(xAcc, false);
}
}
}
void ScAccessibleDocument::Init()
{
if(!mpChildrenShapes)
mpChildrenShapes = new ScChildrenShapes(this, mpViewShell, meSplitPos);
}
......
......@@ -63,6 +63,8 @@ public:
ScTabViewShell* pViewShell,
ScSplitPos eSplitPos);
void PreInit();
virtual void Init() SAL_OVERRIDE;
DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
......
......@@ -462,6 +462,7 @@ com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
ScAccessibleDocument* pAccessibleDocument =
new ScAccessibleDocument(GetAccessibleParentWindow()->GetAccessible(),
pViewData->GetViewShell(), eWhich);
pAccessibleDocument->PreInit();
xAcc = pAccessibleDocument;
SetAccessible(xAcc);
......
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