[Libreoffice-commits] core.git: Branch 'private/hcvcastro/preinit' - vcl/source

Henry Castro hcastro at collabora.com
Mon Sep 7 14:34:42 PDT 2015


 vcl/source/app/svmain.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 03ba843ee64c0520ae5850ca1ce2afde3c6f6731
Author: Henry Castro <hcastro at collabora.com>
Date:   Mon Sep 7 17:33:09 2015 -0400

    vcl: add isInitVCL()
    
    InitVCL() is initialized in preinit stage, so when
    lo_startmain thread starts it is not necessary to InitVCL again.
    
    Change-Id: I819cf0125afe7760c3f4d91c420d36a3a383902c

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index b24714d..3d39dbf 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -91,6 +91,8 @@
 
 using namespace ::com::sun::star;
 
+bool isInitVCL();
+
 oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo)
 {
     static bool bIn = false;
@@ -160,7 +162,7 @@ int ImplSVMain()
 
     int nReturn = EXIT_FAILURE;
 
-    bool bInit = InitVCL();
+    bool bInit = (!isInitVCL() ? InitVCL() : true);
 
     if( bInit )
     {
@@ -243,6 +245,14 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam
     return retVal;
 }
 
+bool isInitVCL()
+{
+    ImplSVData* pSVData = ImplGetSVData();
+    return  pExceptionHandler != NULL &&
+            pSVData->mpApp &&
+            pSVData->mpDefInst;
+}
+
 bool InitVCL()
 {
     if( pExceptionHandler != NULL )


More information about the Libreoffice-commits mailing list