Kaydet (Commit) 7f69b4a5 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Don't (indirectly) call virtual funcs in ctor.

We're not fully constructed at that point.

Change-Id: Ie80874c57000481c4eaa8d71118c8be6f0059164
üst d32ee009
......@@ -368,10 +368,22 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
pDescriptor->mpViewShell->Init(bIsCenterPane);
mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get());
Reference<awt::XWindow> xWindow(rxPane->getWindow());
pDescriptor->mpWrapper = new ViewShellWrapper(
pDescriptor->mpViewShell,
rxViewId,
rxPane->getWindow());
xWindow);
// register ViewShellWrapper on pane window
if (xWindow.is())
{
xWindow->addWindowListener(pDescriptor->mpWrapper);
if (pDescriptor->mpViewShell != NULL)
{
pDescriptor->mpViewShell->Resize();
}
}
pDescriptor->mxView.set( pDescriptor->mpWrapper->queryInterface( XResource::static_type() ), UNO_QUERY_THROW );
}
......
......@@ -67,14 +67,6 @@ ViewShellWrapper::ViewShellWrapper (
mxViewId(rxViewId),
mxWindow(rxWindow)
{
if (rxWindow.is())
{
rxWindow->addWindowListener(this);
if (pViewShell != NULL)
{
pViewShell->Resize();
}
}
}
......
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