[Libreoffice-commits] core.git: vcl/source

Yong Lin Ma mayongl at apache.org
Mon Jul 1 04:34:59 PDT 2013


 vcl/source/window/dialog.cxx |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

New commits:
commit ba8bcc2681d8e9788ae2d6fef11308d5f0fcae05
Author: Yong Lin Ma <mayongl at apache.org>
Date:   Tue Jul 10 02:29:03 2012 +0000

    Resolves: #i119994# Range picker dialog is changed to modal mode wrongly
    
    Patch by: Peng YunQuan
    Review by: mayongl
    Reported by: Yan Ji
    
    (cherry picked from commit 94c8978a16536738bbad7a52cdfb9f37a4d19ed0)
    
    Change-Id: I66bb91bf07a5c52b2a5e2b2a91187ac9580fbb0a

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index aca80f1b..0a63d25 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1083,8 +1083,21 @@ void Dialog::SetModalInputMode( sal_Bool bModal )
             mpPrevExecuteDlg->EnableInput( sal_True, sal_True, sal_True, this );
             // ensure continued modality of prev dialog
             // do not change modality counter
-            mpPrevExecuteDlg->SetModalInputMode( sal_False );
-            mpPrevExecuteDlg->SetModalInputMode( sal_True );
+
+
+            // #i119994# need find the last modal dialog before reactive it
+            Dialog * pPrevModalDlg = mpPrevExecuteDlg;
+
+            while( pPrevModalDlg && !pPrevModalDlg->IsModalInputMode() )
+                pPrevModalDlg = pPrevModalDlg->mpPrevExecuteDlg;
+
+            if( pPrevModalDlg &&
+            ( pPrevModalDlg == mpPrevExecuteDlg
+                || !pPrevModalDlg->IsWindowOrChild( this, sal_True ) ) )
+            {
+                mpPrevExecuteDlg->SetModalInputMode( sal_False );
+                mpPrevExecuteDlg->SetModalInputMode( sal_True );
+            }
         }
     }
 }


More information about the Libreoffice-commits mailing list