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

Caolán McNamara caolanm at redhat.com
Thu May 7 08:31:22 PDT 2015


 vcl/source/window/dialog.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit d6e5c52cb20334721acd96b1e550ee6df0714e9e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 7 16:28:42 2015 +0100

    NoParent condition reversed
    
    regression from...
    
    commit 39078c247d31674544901f8449f5141185f79f7f
    Author: Noel Grandin <noel at peralex.com>
    Date:   Wed May 6 14:07:17 2015 +0200
    
        cleanup DIALOG_NO_PARENT, follow on to tdf#91090
    
        remove the DIALOG_NO_PARENT abomination and replace it with a flags
        parameter
    
    Change-Id: I1955531b41b01623ca94155c60794ae1771849ff

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index a2dbdac..6f4bb7e 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -364,8 +364,9 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
     // Now, all Dialogs are per default system windows !!!
     nStyle |= WB_SYSTEMWINDOW;
 
-    // parent is NULL: get the default Dialog parent
-    if ( !pParent )
+    if (eFlag == InitFlag::NoParent)
+        pParent = NULL;
+    else if (!pParent) // parent is NULL: get the default Dialog parent
     {
         pParent = Application::GetDefDialogParent();
         if ( !pParent && !(nStyle & WB_SYSTEMWINDOW) )
@@ -392,8 +393,6 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
             }
         }
     }
-    else if( eFlag == InitFlag::Default )
-        pParent = NULL;
 
     if ( !pParent || (nStyle & WB_SYSTEMWINDOW) ||
          (pParent->mpWindowImpl->mpFrameData->mbNeedSysWindow && !(nSysWinMode & SystemWindowFlags::NOAUTOMODE)) ||


More information about the Libreoffice-commits mailing list