[Libreoffice-commits] .: 3 commits - sal/osl solenv/gbuild xmloff/source

Michael Stahl mst at kemper.freedesktop.org
Fri Aug 3 14:30:04 PDT 2012


 sal/osl/unx/diagnose.c                             |    4 
 sal/osl/w32/diagnose.c                             |    6 +
 solenv/gbuild/CppunitTest.mk                       |    1 
 solenv/gbuild/JunitTest.mk                         |    3 
 xmloff/source/style/PageMasterImportPropMapper.cxx |  103 ++++++++++-----------
 5 files changed, 61 insertions(+), 56 deletions(-)

New commits:
commit 8d35d24f7991e77814838bb6edbfae051a063a6c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 3 23:24:23 2012 +0200

    gbuild: run JunitTests and CppunitTests with DISABLE_SAL_DBGBOX
    
    DBGSV_ERROR_OUT=shell already disables GUI message boxes on assertions,
    but it does not take effect during early startup and late shutdown,
    when the tools redirection hooks are not installed; setting
    DISABLE_SAL_DBGBOX disables these on Windows in osl_assertFailedLine.
    
    Change-Id: Ibb62054741e85dc966a36cb20515c3af8e0d9c11

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index ab33bd9..a3e91de 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -87,6 +87,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTTARGET)
 		$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
 		$(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
 		$(if $(DBGSV_ERROR_OUT),DBGSV_ERROR_OUT=$(DBGSV_ERROR_OUT)) \
+		DISABLE_SAL_DBGBOX=t \
 		$(if $(SAL_DIAGNOSE_ABORT),SAL_DIAGNOSE_ABORT=$(SAL_DIAGNOSE_ABORT)) \
 		STAR_RESOURCEPATH=$(dir $(call gb_ResTarget_get_outdir_target,example)) \
 		$(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTTARGET) \
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index cd2e4ac..b49337e 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -46,7 +46,8 @@ $(call gb_JunitTest_get_target,%) :
 	$(call gb_Helper_abbreviate_dirs,\
         rm -rf $(call gb_JunitTest_get_userdir,$*) && \
 		mkdir -p $(call gb_JunitTest_get_userdir,$*) && \
-        (DBGSV_ERROR_OUT=shell $(gb_JunitTest_JAVACOMMAND) \
+        (DBGSV_ERROR_OUT=shell DISABLE_SAL_DBGBOX=t \
+		    $(gb_JunitTest_JAVACOMMAND) \
             -cp "$(T_CP)" \
             $(DEFS) \
             org.junit.runner.JUnitCore \
commit dae7245c1ab1e7f09634d32b139cf9997b37fb99
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 3 23:23:13 2012 +0200

    sal: let DISABLE_SAL_DBGBOX only disable GUI message boxes
    
    If DISABLE_SAL_DBGBOX is set, fall back to printing on stderr.
    
    Change-Id: Id525b4012291b6b29cca7abcaad7483bc6bfba3b

diff --git a/sal/osl/unx/diagnose.c b/sal/osl/unx/diagnose.c
index 5b46a61..38f11e0 100644
--- a/sal/osl/unx/diagnose.c
+++ b/sal/osl/unx/diagnose.c
@@ -230,10 +230,6 @@ sal_Bool SAL_CALL osl_assertFailedLine (
         return sal_False;
     }
 
-    /* if SAL assertions are disabled in general, stop here */
-    if ( getenv("DISABLE_SAL_DBGBOX") )
-        return doAbort;
-
     /* format message into buffer */
     if (pszMessage != 0)
     {
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index ee39a20..3c6b0c9 100644
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -28,6 +28,8 @@
 
 #include "system.h"
 
+#include <stdio.h>
+
 #include <osl/diagnose.h>
 
 static pfunc_osl_printDebugMessage  _pPrintDebugMessage = NULL;
@@ -119,6 +121,10 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
             if (nCode == IDCANCEL)
                 return sal_True;    /* will cause oslDebugBreak */
         }
+        else
+        {
+            fputs(szMessage, stderr); // fall back
+        }
         return ( ( env != NULL ) && ( *env != '\0' ) );
     }
 
commit 9e74e9f3c0931f34fb5421056851a06b83501ce9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 3 21:09:34 2012 +0200

    fdo#38056: fix XMLTextImportPropertyMapper regression:
    
    The invalidation introduced in 7f9928bfa561ccb6ed4e2baacc7d6960bc1ce231
    is unfortunately in the wrong place; the pAllFoo actually point at
    vector elements, and so they must not be dereferenced after new elements
    are added to the vector, so move the invalidation up a bit.
    
    Change-Id: I244d1d5cfd40469ff6d2c081e057355460d34cf4

diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx
index 005c732..0cacf02 100644
--- a/xmloff/source/style/PageMasterImportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterImportPropMapper.cxx
@@ -353,6 +353,58 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
         aAny.setValue( &bValue, ::getBooleanCppuType() );
         pFooterDynamic = new XMLPropertyState(pFooterMinHeight->mnIndex + 1, aAny);
     }
+
+    // fdo#38056: nerf the various AllFoo properties so they do not override
+    // the individual Foo properties later on
+    if (pAllPaddingProperty)
+    {
+        pAllPaddingProperty->mnIndex = -1;
+    }
+    if (pAllBorderProperty)
+    {
+        pAllBorderProperty->mnIndex = -1;
+    }
+    if (pAllBorderWidthProperty)
+    {
+        pAllBorderWidthProperty->mnIndex = -1;
+    }
+    if (pAllHeaderPaddingProperty)
+    {
+        pAllHeaderPaddingProperty->mnIndex = -1;
+    }
+    if (pAllHeaderBorderProperty)
+    {
+        pAllHeaderBorderProperty->mnIndex = -1;
+    }
+    if (pAllHeaderBorderWidthProperty)
+    {
+        pAllHeaderBorderWidthProperty->mnIndex = -1;
+    }
+    if (pAllFooterPaddingProperty)
+    {
+        pAllFooterPaddingProperty->mnIndex = -1;
+    }
+    if (pAllFooterBorderProperty)
+    {
+        pAllFooterBorderProperty->mnIndex = -1;
+    }
+    if (pAllFooterBorderWidthProperty)
+    {
+        pAllFooterBorderWidthProperty->mnIndex = -1;
+    }
+    if (pAllMarginProperty)
+    {
+        pAllMarginProperty->mnIndex = -1;
+    }
+    if (pAllHeaderMarginProperty)
+    {
+        pAllHeaderMarginProperty->mnIndex = -1;
+    }
+    if (pAllFooterMarginProperty)
+    {
+        pAllFooterMarginProperty->mnIndex = -1;
+    }
+
     for (sal_uInt16 i = 0; i < 4; i++)
     {
         if (pNewMargins[i].get())
@@ -408,57 +460,6 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
         rProperties.push_back(*pFooterDynamic);
         delete pFooterDynamic;
     }
-
-    // fdo#38056: nerf the various AllFoo properties so they do not override
-    // the individual Foo properties later on
-    if (pAllPaddingProperty)
-    {
-        pAllPaddingProperty->mnIndex = -1;
-    }
-    if (pAllBorderProperty)
-    {
-        pAllBorderProperty->mnIndex = -1;
-    }
-    if (pAllBorderWidthProperty)
-    {
-        pAllBorderWidthProperty->mnIndex = -1;
-    }
-    if (pAllHeaderPaddingProperty)
-    {
-        pAllHeaderPaddingProperty->mnIndex = -1;
-    }
-    if (pAllHeaderBorderProperty)
-    {
-        pAllHeaderBorderProperty->mnIndex = -1;
-    }
-    if (pAllHeaderBorderWidthProperty)
-    {
-        pAllHeaderBorderWidthProperty->mnIndex = -1;
-    }
-    if (pAllFooterPaddingProperty)
-    {
-        pAllFooterPaddingProperty->mnIndex = -1;
-    }
-    if (pAllFooterBorderProperty)
-    {
-        pAllFooterBorderProperty->mnIndex = -1;
-    }
-    if (pAllFooterBorderWidthProperty)
-    {
-        pAllFooterBorderWidthProperty->mnIndex = -1;
-    }
-    if (pAllMarginProperty)
-    {
-        pAllMarginProperty->mnIndex = -1;
-    }
-    if (pAllHeaderMarginProperty)
-    {
-        pAllHeaderMarginProperty->mnIndex = -1;
-    }
-    if (pAllFooterMarginProperty)
-    {
-        pAllFooterMarginProperty->mnIndex = -1;
-    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list