summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-08-30 14:10:40 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-08-30 14:10:40 +0200
commit720f6380afde95bc764e431909b4fb8eeacbdb1b (patch)
tree2c826c070a7874f0bc24d66f9b85ae739cadb26f /toolkit
parentf677ac480835e92c90521a46b59a7d748f4566bf (diff)
parent9e685a7e47924f184d076c43acde64548cb5925d (diff)
dba33h: merge after pulling OOO330.m6
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindows.cxx10
-rw-r--r--toolkit/source/helper/unowrapper.cxx15
2 files changed, 19 insertions, 6 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 8b00cd450ab6..db34c840f8eb 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2363,15 +2363,23 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
Dialog* pDlg = (Dialog*) GetWindow();
Window* pParent = pDlg->GetWindow( WINDOW_PARENTOVERLAP );
Window* pOldParent = NULL;
+ Window* pSetParent = NULL;
if ( pParent && !pParent->IsReallyVisible() )
{
pOldParent = pDlg->GetParent();
Window* pFrame = pDlg->GetWindow( WINDOW_FRAME );
if( pFrame != pDlg )
+ {
pDlg->SetParent( pFrame );
+ pSetParent = pFrame;
+ }
}
+
nRet = pDlg->Execute();
- if ( pOldParent )
+
+ // set the parent back only in case no new parent was set from outside
+ // in other words, revert only own changes
+ if ( pOldParent && pDlg->GetParent() == pSetParent )
pDlg->SetParent( pOldParent );
}
return nRet;
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index d7cec7c17354..c36ae29d4531 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -318,12 +318,17 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
Window* pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD );
while ( pTopWindowChild )
{
- OSL_ENSURE( pTopWindowChild->GetParent() == pWindow, "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
+ OSL_ENSURE( pTopWindowChild->GetParent() == pWindow,
+ "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
- uno::Reference< lang::XComponent > xComp( pTopWindowChild->GetComponentInterface( FALSE ), uno::UNO_QUERY );
- pTopWindowChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
- if ( xComp.is() )
- xComp->dispose();
+ Window* pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
+
+ //the window still could be on the stack, so we have to
+ // use lazy delete ( it will automatically
+ // disconnect from the currently destroyed parent window )
+ pTopWindowChild->doLazyDelete();
+
+ pTopWindowChild = pNextTopChild;
}
}
}