summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2001-01-29 14:48:32 +0000
committerStephan Schäfer <ssa@openoffice.org>2001-01-29 14:48:32 +0000
commit7eee94167626b7c3f2514df7938e9b4f9adbda6b (patch)
tree81ca41fa4e69804f00c60b741d135b0588511e46
parent83cf986d8c5ad3b3c3a5bd892687ca27d57d0514 (diff)
#82987# EndAllDialogs revised
-rw-r--r--vcl/source/window/dialog.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 0f72b204e9fe..081729cfecff 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dialog.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: ssa $ $Date: 2001-01-29 13:48:40 $
+ * last change: $Author: ssa $ $Date: 2001-01-29 15:48:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -720,7 +720,7 @@ void Dialog::EndDialog( long nResult )
// -----------------------------------------------------------------------
-void Dialog::EndAllDialogs(Window* pParent)
+void Dialog::EndAllDialogs( Window* pParent )
{
ImplSVData* pSVData = ImplGetSVData();
Dialog* pTempModDialog;
@@ -728,14 +728,7 @@ void Dialog::EndAllDialogs(Window* pParent)
while ( pModDialog )
{
pTempModDialog = pModDialog->mpPrevExecuteDlg;
-
- Window *dlgParent = pModDialog->GetParent();
- while ( dlgParent != pParent )
- {
- if ( dlgParent ) dlgParent = dlgParent->GetParent();
- else break;
- }
- if ( dlgParent == pParent )
+ if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, TRUE ) ) )
{
pModDialog->EndDialog( FALSE );
pModDialog->PostUserEvent( Link() );