[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - basegfx/source sal/inc sal/osl

Armin Le Grand alg at apache.org
Mon Oct 28 05:07:59 PDT 2013


 basegfx/source/polygon/b2dsvgpolypolygon.cxx |   10 ++
 sal/inc/sal/main.h                           |   18 +++++
 sal/osl/os2/salinit.cxx                      |   92 +++------------------------
 sal/osl/os2/thread.c                         |   12 +++
 4 files changed, 49 insertions(+), 83 deletions(-)

New commits:
commit 697d89b1dda760a39cd8e7e28f386dbec1aaff61
Author: Armin Le Grand <alg at apache.org>
Date:   Mon Oct 28 11:31:11 2013 +0000

    i123465 no longer correct svg:d imports

diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 1ac1258..5af90b7 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -320,7 +320,10 @@ namespace basegfx
                                 // add current polygon
                                 if(bIsClosed)
                                 {
-                                    closeWithGeometryChange(aCurrPoly);
+                                    // #123465# no need to do the old closeWithGeometryChange
+                                    // corerection on SVG polygons; this even may lead to wrong
+                                    // results e.g. for marker processing
+                                    aCurrPoly.setClosed(true);
                                 }
 
                                 o_rPolyPolygon.append(aCurrPoly);
@@ -841,7 +844,10 @@ namespace basegfx
                 // end-process last poly
                 if(bIsClosed)
                 {
-                    closeWithGeometryChange(aCurrPoly);
+                    // #123465# no need to do the old closeWithGeometryChange
+                    // corerection on SVG polygons; this even may lead to wrong
+                    // results e.g. for marker processing
+                    aCurrPoly.setClosed(true);
                 }
 
                 o_rPolyPolygon.append(aCurrPoly);
commit 89ded41db1f9884eec75097206a64df1b1c7f72a
Author: Yuri Dario <ydario at apache.org>
Date:   Mon Oct 28 11:07:01 2013 +0000

    i118923 - OS/2 port: make use of system ExceptQ exception handler.

diff --git a/sal/inc/sal/main.h b/sal/inc/sal/main.h
index c695a04..51ceea5 100644
--- a/sal/inc/sal/main.h
+++ b/sal/inc/sal/main.h
@@ -33,6 +33,24 @@ extern "C" {
 void SAL_CALL sal_detail_initialize(int argc, char ** argv);
 void SAL_CALL sal_detail_deinitialize();
 
+#ifdef SAL_OS2
+#include <string.h>
+
+#define INCL_DOSPROCESS
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSMODULEMGR
+#include <os2.h>
+#define INCL_LOADEXCEPTQ
+#include <exceptq.h>
+
+#define sal_detail_initialize(a,b) \
+    EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; \
+    LoadExceptq(&exRegRec, NULL, NULL); \
+    osl_setCommandArgs(argc, argv);
+#define sal_detail_deinitialize() \
+    UninstallExceptq(&exRegRec);
+#endif // SAL_OS2
+
 #define SAL_MAIN_WITH_ARGS_IMPL \
 int SAL_CALL main(int argc, char ** argv) \
 { \
diff --git a/sal/osl/os2/salinit.cxx b/sal/osl/os2/salinit.cxx
index 0412f93..ebafddb 100644
--- a/sal/osl/os2/salinit.cxx
+++ b/sal/osl/os2/salinit.cxx
@@ -19,99 +19,29 @@
  *
  *************************************************************/
 
+#include <stdio.h>
 
-
-#define INCL_DOS
-#include <os2.h>
-
-#include "precompiled_sal.hxx"
-#include "sal/config.h"
-
-#include "osl/process.h"
-#include "sal/main.h"
 #include "sal/types.h"
 
-// for exception logging
-#include <stdio.h>
-#include <string.h>
-#include <setjmp.h>
-
+#ifdef __cplusplus
 extern "C" {
+#endif
 
 /*----------------------------------------------------------------------------*/
 
-static CHAR        szOOoExe[CCHMAXPATH];
-
-static FILE* APIENTRY _oslExceptOpenLogFile(VOID)
-{
-   FILE        *file;
-   DATETIME    DT;
-   PPIB        pib;
-   PSZ         slash;
-
-   // get executable fullpath
-   DosGetInfoBlocks(NULL, &pib);
-   DosQueryModuleName(pib->pib_hmte, sizeof(szOOoExe), szOOoExe);
-   // truncate to exe name
-   slash = (PSZ)strrchr( szOOoExe, '.');
-   *slash = '\0';
-   // make log path
-   strcat( szOOoExe, ".log");
-
-   file = fopen( szOOoExe, "a");
-   if (!file) { // e.g. readonly drive
-      // try again, usually C exist and is writable
-      file = fopen( "c:\\OOo.log", "a");
-   }
-   if (file) {
-        DosGetDateTime(&DT);
-        fprintf(file, "\nTrap message -- Date: %04d-%02d-%02d, Time: %02d:%02d:%02d\n",
-            DT.year, DT.month, DT.day,
-            DT.hours, DT.minutes, DT.seconds);
-        fprintf(file, "-------------------------------------------------------\n"
-                      "\nAn internal error occurred (Built " __DATE__ "-" __TIME__ ").\n");
-
-   }
-
-   // ok, return handle
-   return (file);
-}
-
-/*----------------------------------------------------------------------------*/
-
-#if 0 // until exceptions restored OSL_DEBUG_LEVEL == 0
-static EXCEPTSTRUCT     g_excptstruct = {0};
-#endif
-
+// replaced by macros in sal/main.h
 void SAL_CALL sal_detail_initialize(int argc, char ** argv)
 {
-    APIRET rc = -1;
-
-#if 0 // until exceptions restored OSL_DEBUG_LEVEL == 0
-    excRegisterHooks(_oslExceptOpenLogFile, NULL, NULL, FALSE);
-
-    g_excptstruct.RegRec2.pfnHandler = (PFN)excHandlerLoud;
-    g_excptstruct.arc = DosSetExceptionHandler(
-               (PEXCEPTIONREGISTRATIONRECORD)&(g_excptstruct.RegRec2));
-
-    if (g_excptstruct.arc)
-        if (G_pfnExcHookError)
-            G_pfnExcHookError(__FILE__, __LINE__, __FUNCTION__, g_excptstruct.arc);
-        else
-            DosBeep(1000, 1000);
-    g_excptstruct.ulExcpt = setjmp(g_excptstruct.RegRec2.jmpThread);
-#endif
-
-    osl_setCommandArgs(argc, argv);
+    printf("Dead code\n");
+    exit(1);
 }
 
 void SAL_CALL sal_detail_deinitialize()
 {
-    APIRET rc = -1;
-
-#if 0 // until exceptions restored OSL_DEBUG_LEVEL == 0
-    rc = DosUnsetExceptionHandler((PEXCEPTIONREGISTRATIONRECORD)&(g_excptstruct.RegRec2));
-#endif
+    printf("Dead code\n");
+    exit(1);
 }
 
-}
+#ifdef __cplusplus
+}   // extern "C"
+#endif
diff --git a/sal/osl/os2/thread.c b/sal/osl/os2/thread.c
index 717458b..818f9db 100644
--- a/sal/osl/os2/thread.c
+++ b/sal/osl/os2/thread.c
@@ -30,6 +30,13 @@
 #include <rtl/alloc.h>
 #include <rtl/tencinfo.h>
 
+#define INCL_DOSPROCESS
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSMODULEMGR
+#include <os2.h>
+#define INCL_LOADEXCEPTQ
+#include <exceptq.h>
+
 /*
     Thread-data structure hidden behind oslThread:
 */
@@ -93,6 +100,8 @@ static void oslWorkerWrapperFunction(void* pData)
 {
     BOOL rc;
     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData;
+    EXCEPTIONREGISTRATIONRECORD exRegRec = {0};
+    LoadExceptq(&exRegRec, NULL, NULL);
 
 #if OSL_DEBUG_LEVEL>0
 printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
@@ -122,6 +131,9 @@ printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_Th
     rc = WinTerminate( pThreadImpl->m_hab );
 #if OSL_DEBUG_LEVEL>0
 printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
+
+    UninstallExceptq(&exRegRec);
+
 #endif
 }
 


More information about the Libreoffice-commits mailing list