[Libreoffice-commits] .: patches/dev300

Michael Meeks michael at kemper.freedesktop.org
Thu Mar 24 09:23:44 PDT 2011


 patches/dev300/apply                 |    9 
 patches/dev300/size-sal-textenc.diff |  765 -----------------------------------
 2 files changed, 1 insertion(+), 773 deletions(-)

New commits:
commit ca28d3eab8a5fcf379d4763a3b87532a63821a49
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Thu Mar 24 16:22:42 2011 +0000

    merge and flatten size-sal-textenc

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 61702e3..0462ba3 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -49,8 +49,7 @@ Localize : LocalizeFixes
 
 # Novell
 NovellBase : LinuxCommon, NovellOnly, NovellOnlyUnix, \
-	     NotDebian, Split, Shrink, \
-	     CustomUserConfig
+	     NotDebian, Split, CustomUserConfig
 SUSE-9.1  : NovellBase, DisableGCJ
 SUSE-9.2  : NovellBase, DisableGCJ
 SUSE-9.3  : NovellBase, DisableGCJ
@@ -1450,12 +1449,6 @@ oooXXXX.partial-revert-ooo95118.diff
 [ DebianBaseOnly ]
 soffice-opengl-and-locking-config.diff, mklose
 
-[ Shrink ]
-SectionOwner => michael
-
-# kill >1Mb of bloat in sal
-size-sal-textenc.diff, i#70166
-
 [ NovellOnlyUnix ]
 # search also gij32, ..., so the 32-bit package works on 64-bit
 jvmfwk-gij32.diff, n#222708, pmladek
diff --git a/patches/dev300/size-sal-textenc.diff b/patches/dev300/size-sal-textenc.diff
deleted file mode 100644
index 2e4bde3..0000000
--- a/patches/dev300/size-sal-textenc.diff
+++ /dev/null
@@ -1,765 +0,0 @@
----
- sal/inc/osl/module.h    |    6 +
- sal/osl/unx/module.c    |   12 +--
- sal/osl/unx/nlsupport.c |    1 -
- sal/osl/w32/module.cxx  |   32 ++++++
- sal/prj/d.lst           |    2 +
- sal/textenc/makefile.mk |   48 ++++++++--
- sal/textenc/tables.cxx  |  240 +++++++++++++++++++++++++++++++++++++++++++++++
- sal/textenc/textenc.cxx |  188 ++++++++++++-------------------------
- sal/util/makefile.mk    |    9 ++
- sal/util/sal.map        |    1 +
- sal/util/saltextenc.map |    6 +
- scp2/source/ooo/ure.scp |    7 ++
- 12 files changed, 406 insertions(+), 146 deletions(-)
- create mode 100644 sal/textenc/tables.cxx
- create mode 100644 sal/util/saltextenc.map
-
-diff --git sal/inc/osl/module.h sal/inc/osl/module.h
-index e5dbabb..c5bccce 100644
---- sal/inc/osl/module.h
-+++ sal/inc/osl/module.h
-@@ -74,6 +74,12 @@ typedef void ( SAL_CALL *oslGenericFunction )( void );
- */
- oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode);
- 
-+/** Load a shared library or module.
-+    @param pModuleName denotes the name of the module to be loaded.
-+    @return NULL if the module could not be loaded, otherwise a handle to the module.
-+*/
-+oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nRtldMode);
-+
- /** Load a module located relative to some other module.
- 
-     @param baseModule
-diff --git sal/osl/unx/module.c sal/osl/unx/module.c
-index ba859ec..f39926c 100644
---- sal/osl/unx/module.c
-+++ sal/osl/unx/module.c
-@@ -41,8 +41,6 @@
- /* implemented in file.c */
- extern int UnicodeToText(char *, size_t, const sal_Unicode *, sal_Int32);
- 
--oslModule SAL_CALL osl_psz_loadModule(const sal_Char *pszModuleName, sal_Int32 nRtldMode);
--
- /*****************************************************************************/
- /* osl_loadModule */
- /*****************************************************************************/
-@@ -63,7 +61,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
-         char buffer[PATH_MAX];
- 
-         if (UnicodeToText(buffer, PATH_MAX, ustrTmp->buffer, ustrTmp->length))
--            pModule = osl_psz_loadModule(buffer, nRtldMode);
-+            pModule = osl_loadModuleAscii(buffer, nRtldMode);
-         rtl_uString_release(ustrTmp);
-     }
- 
-@@ -71,21 +69,21 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
- }
- 
- /*****************************************************************************/
--/* osl_psz_loadModule */
-+/* osl_loadModuleAscii */
- /*****************************************************************************/
- 
--oslModule SAL_CALL osl_psz_loadModule(const sal_Char *pszModuleName, sal_Int32 nRtldMode)
-+oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nRtldMode)
- {
-     OSL_ASSERT(
-         (nRtldMode & SAL_LOADMODULE_LAZY) == 0 ||
-         (nRtldMode & SAL_LOADMODULE_NOW) == 0); /* only either LAZY or NOW */
--    if (pszModuleName)
-+    if (pModuleName)
-     {
- #ifndef NO_DL_FUNCTIONS
-         int rtld_mode =
-             ((nRtldMode & SAL_LOADMODULE_NOW) ? RTLD_NOW : RTLD_LAZY) |
-             ((nRtldMode & SAL_LOADMODULE_GLOBAL) ? RTLD_GLOBAL : RTLD_LOCAL);
--        void* pLib = dlopen(pszModuleName, rtld_mode);
-+        void* pLib = dlopen(pModuleName, rtld_mode);
- 
- #if OSL_DEBUG_LEVEL > 1
-         if (pLib == 0)
-diff --git sal/osl/unx/nlsupport.c sal/osl/unx/nlsupport.c
-index f6d0b4a..0a61de9 100644
---- sal/osl/unx/nlsupport.c
-+++ sal/osl/unx/nlsupport.c
-@@ -821,7 +821,6 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
- /* OS X locale discovery function */
- int (*pGetOSXLocale)( char *, sal_uInt32 );
- 
--oslModule SAL_CALL osl_psz_loadModule(const sal_Char *pszModuleName, sal_Int32 nRtldMode);
- /*****************************************************************************
-  return the current process locale
-  *****************************************************************************/
-diff --git sal/osl/w32/module.cxx sal/osl/w32/module.cxx
-index be5a5b4..08cde46 100644
---- sal/osl/w32/module.cxx
-+++ sal/osl/w32/module.cxx
-@@ -82,6 +82,38 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod
- }
- 
- /*****************************************************************************/
-+/* osl_loadModuleAscii */
-+/*****************************************************************************/
-+oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nRtldMode )
-+{
-+    (void) nRtldMode; /* avoid warnings */
-+
-+    HINSTANCE hInstance;
-+    UINT errorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
-+    oslModule ret = 0;
-+    oslFileError	nError;
-+
-+    RTL_LOGFILE_TRACE1( "{ osl_loadModule start: %s", pModuleName );
-+
-+    OSL_ASSERT(pModuleName);
-+
-+    hInstance = LoadLibrary(pModuleName);
-+    if (hInstance == NULL)
-+        hInstance = LoadLibraryEx(pModuleName, NULL,
-+                                  LOAD_WITH_ALTERED_SEARCH_PATH);
-+
-+    if (hInstance <= (HINSTANCE)HINSTANCE_ERROR)
-+        hInstance = 0;
-+
-+    ret = (oslModule) hInstance;
-+    SetErrorMode(errorMode);
-+
-+    RTL_LOGFILE_TRACE1( "} osl_loadModule end: %s", pModuleName );
-+
-+    return ret;
-+}
-+
-+/*****************************************************************************/
- /* osl_getModuleHandle */
- /*****************************************************************************/
- 
-diff --git sal/prj/d.lst sal/prj/d.lst
-index 3ce270b..e53be6b 100644
---- sal/prj/d.lst
-+++ sal/prj/d.lst
-@@ -20,6 +20,8 @@ symlink: %_DEST%\lib%_EXT%\libsalalloc_malloc.so.3 %_DEST%\lib%_EXT%\libsalalloc
- symlink: %_DEST%\lib%_EXT%\libuno_sal.so.3 %_DEST%\lib%_EXT%\libuno_sal.so
- ..\%__SRC%\lib\libuno_sal.dylib.3 %_DEST%\lib%_EXT%\libuno_sal.dylib.3
- symlink: %_DEST%\lib%_EXT%\libuno_sal.dylib.3 %_DEST%\lib%_EXT%\libuno_sal.dylib
-+..\%__SRC%\lib\libuno_sal_textenc.so.3 %_DEST%\lib%_EXT%\libuno_sal_textenc.so.3
-+symlink: %_DEST%\lib%_EXT%\libuno_sal_textenc.so.3 %_DEST%\lib%_EXT%\libuno_sal_textenc.so
- ..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
- ..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
- 
-diff --git sal/textenc/makefile.mk sal/textenc/makefile.mk
-index 2605593..e6834b0 100644
---- sal/textenc/makefile.mk
-+++ sal/textenc/makefile.mk
-@@ -28,13 +28,19 @@
- PRJ = ..
- PRJNAME = sal
- TARGET = textenc
-+LIBTARGET=NO
- 
- .INCLUDE: settings.mk
- 
- CFLAGS+= $(LFS_CFLAGS)
- CXXFLAGS+= $(LFS_CFLAGS)
- 
--SLOFILES = \
-+SAL_OBJECTS = \
-+    $(SLO)$/tencinfo.obj \
-+    $(SLO)$/textcvt.obj \
-+    $(SLO)$/textenc.obj
-+
-+SAL_COMMON_OBJECTS = \
-     $(SLO)$/context.obj \
-     $(SLO)$/convertbig5hkscs.obj \
-     $(SLO)$/converter.obj \
-@@ -49,12 +55,19 @@ SLOFILES = \
-     $(SLO)$/tcvtutf7.obj \
-     $(SLO)$/tcvtutf8.obj \
-     $(SLO)$/tenchelp.obj \
--    $(SLO)$/tencinfo.obj \
--    $(SLO)$/textcvt.obj \
--    $(SLO)$/textenc.obj \
-     $(SLO)$/unichars.obj
- 
--OBJFILES = \
-+SAL_TABLES_OBJECTS = \
-+    $(SLO)$/tables.obj
-+
-+SLOFILES = $(SAL_OBJECTS) $(SAL_COMMON_OBJECTS) $(SAL_TABLES_OBJECTS)
-+
-+SAL_OBJFILES = \
-+    $(OBJ)$/tencinfo.obj \
-+    $(OBJ)$/textcvt.obj \
-+    $(OBJ)$/textenc.obj
-+
-+SAL_COMMON_OBJFILES = \
-     $(OBJ)$/context.obj \
-     $(OBJ)$/convertbig5hkscs.obj \
-     $(OBJ)$/converter.obj \
-@@ -69,19 +82,36 @@ OBJFILES = \
-     $(OBJ)$/tcvtutf7.obj \
-     $(OBJ)$/tcvtutf8.obj \
-     $(OBJ)$/tenchelp.obj \
--    $(OBJ)$/tencinfo.obj \
--    $(OBJ)$/textcvt.obj \
--    $(OBJ)$/textenc.obj \
-     $(OBJ)$/unichars.obj
- 
-+SAL_TABLES_OBJFILES = \
-+    $(OBJ)$/tables.obj
-+
-+OBJFILES = $(SAL_OBJFILES) $(SAL_COMMON_OBJFILES) $(SAL_TABLES_OBJFILES)
-+
- # Optimization off on Solaris Intel due to internal compiler error; to be
- # reevaluated after compiler upgrade:
- .IF "$(OS)$(CPU)" == "SOLARISI"
- 
- NOOPTFILES = \
-     $(OBJ)$/textenc.obj \
--    $(SLO)$/textenc.obj
-+    $(SLO)$/textenc.obj \
-+    $(OBJ)$/tables.obj \
-+    $(SLO)$/tables.obj
- 
- .ENDIF # OS, CPU, SOLARISI
- 
-+LIB1TARGET= $(SLB)$/$(TARGET).lib
-+LIB1OBJFILES= $(SAL_OBJECTS) $(SAL_COMMON_OBJECTS)
-+OBJTARGET=$(LB)$/$(TARGET).lib
-+
-+# be nicer to avoid DLLPRE
-+.IF "$(GUI)" == "WNT"
-+CDEFS+=-DPLUGIN_NAME=$(DLLPRE)uno_sal_textenc$(UDK_MAJOR)$(DLLPOST)
-+.ELSE
-+CDEFS+=-DPLUGIN_NAME=$(DLLPRE)uno_sal_textenc$(DLLPOST).$(UDK_MAJOR)
-+.ENDIF
-+LIB2TARGET= $(SLB)$/textenc_tables.lib
-+LIB2OBJFILES= $(SAL_TABLES_OBJECTS) $(SAL_COMMON_OBJECTS)
-+
- .INCLUDE: target.mk
-diff --git sal/textenc/tables.cxx sal/textenc/tables.cxx
-new file mode 100644
-index 0000000..ce6ed84
---- /dev/null
-+++ sal/textenc/tables.cxx
-@@ -0,0 +1,240 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile$
-+ *
-+ *  $Revision$
-+ *
-+ *  last change: $Author$ $Date$
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2005 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+
-+/* TODO! This file should not be called textenc.c, because it is not the
-+   implementation of rtl/textenc.h.  Rather, it should be called
-+   gettextencodingdata.c. */
-+
-+#ifndef INCLUDED_RTL_TEXTENC_GETTEXTENCODINGDATA_H
-+#include "gettextencodingdata.h"
-+#endif
-+
-+#ifndef INCLUDED_RTL_TEXTENC_TENCHELP_H
-+#include "tenchelp.h"
-+#endif
-+
-+#ifndef _RTL_TEXTENC_H
-+#include "rtl/textenc.h"
-+#endif
-+
-+#ifndef INCLUDED_STDDEF_H
-+#include <stddef.h>
-+#define INCLUDED_STDDEF_H
-+#endif
-+
-+#define NOTABUNI_START 0xFF
-+#define NOTABUNI_END 0x00
-+
-+#define NOTABCHAR_START 0xFFFF
-+#define NOTABCHAR_END 0x0000
-+
-+#define SAME8090UNI_START 0x80
-+#define SAME8090UNI_END 0x9F
-+static sal_uInt16 const aImpl8090SameToUniTab[SAME8090UNI_END
-+                                                  - SAME8090UNI_START
-+                                                  + 1]
-+= { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, /* 0x80 */
-+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, /* 0x90 */
-+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F };
-+
-+#define SAME8090CHAR_START 0x0080
-+#define SAME8090CHAR_END 0x009F
-+static sal_uChar const aImpl8090SameToCharTab[SAME8090CHAR_END
-+                                                  - SAME8090CHAR_START
-+                                                  + 1]
-+    = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x0080 */
-+        0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
-+        0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x0090 */
-+        0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F };
-+
-+#define SAMEA0FFCHAR_START 0x00A0
-+#define SAMEA0FFCHAR_END 0x00FF
-+static sal_uChar const aImplA0FFSameToCharTab[SAMEA0FFCHAR_END
-+                                                  - SAMEA0FFCHAR_START
-+                                                  + 1]
-+    = { 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, /* 0x00A0 */
-+        0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
-+        0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, /* 0x00B0 */
-+        0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
-+        0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 0x00C0 */
-+        0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
-+        0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, /* 0x00D0 */
-+        0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
-+        0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, /* 0x00E0 */
-+        0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
-+        0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 0x00F0 */
-+        0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF };
-+
-+static sal_uInt16 const aImplDoubleByteIdentifierTab[1] = { 0 };
-+
-+#include "tcvtarb1.tab"
-+#include "tcvteas1.tab"
-+#include "tcvtest1.tab"
-+#include "tcvtjp1.tab"
-+#include "tcvtjp2.tab"
-+#include "tcvtjp3.tab"
-+#include "tcvtjp4.tab"
-+#include "tcvtjp5.tab"
-+#include "tcvtjp6.tab"
-+#include "tcvtkr1.tab"
-+#include "tcvtkr2.tab"
-+#include "tcvtkr4.tab"
-+#include "tcvtkr5.tab"
-+#include "tcvtkr6.tab"
-+#include "tcvtlat1.tab"
-+#include "tcvtscn1.tab"
-+#include "tcvtscn2.tab"
-+#include "tcvtscn3.tab"
-+#include "tcvtscn4.tab"
-+#include "tcvtscn5.tab"
-+#include "tcvtscn6.tab"
-+#include "tcvtsym1.tab"
-+#include "tcvttcn1.tab"
-+#include "tcvttcn2.tab"
-+#include "tcvttcn6.tab"
-+#include "tcvtuni1.tab"
-+#include "convertiscii.tab"
-+
-+#include "convertbig5hkscs.tab"
-+#include "converteuctw.tab"
-+#include "convertgb18030.tab"
-+#include "convertiso2022cn.tab"
-+#include "convertiso2022jp.tab"
-+#include "convertiso2022kr.tab"
-+#include "convertadobe.tab"
-+
-+ImplTextEncodingData const *
-+Impl_getTextEncodingData(rtl_TextEncoding nEncoding)
-+{
-+    static ImplTextEncodingData const * const aData[]
-+        = { NULL, /* DONTKNOW */
-+            &aImplMS1252TextEncodingData, /* MS_1252 */
-+            &aImplAPPLEROMANTextEncodingData, /* APPLE_ROMAN */
-+            &aImplIBM437TextEncodingData, /* IBM_437 */
-+            &aImplIBM850TextEncodingData, /* IBM_850 */
-+            &aImplIBM860TextEncodingData, /* IBM_860 */
-+            &aImplIBM861TextEncodingData, /* IBM_861 */
-+            &aImplIBM863TextEncodingData, /* IBM_863 */
-+            &aImplIBM865TextEncodingData, /* IBM_865 */
-+            NULL, /* reserved (SYSTEM) */
-+            &aImplSYMBOLTextEncodingData, /* SYMBOL */
-+            &aImplUSASCIITextEncodingData, /* ASCII_US */
-+            &aImplISO88591TextEncodingData, /* ISO_8859_1 */
-+            &aImplISO88592TextEncodingData, /* ISO_8859_2 */
-+            &aImplISO88593TextEncodingData, /* ISO_8859_3 */
-+            &aImplISO88594TextEncodingData, /* ISO_8859_4 */
-+            &aImplISO88595TextEncodingData, /* ISO_8859_5 */
-+            &aImplISO88596TextEncodingData, /* ISO_8859_6 */
-+            &aImplISO88597TextEncodingData, /* ISO_8859_7 */
-+            &aImplISO88598TextEncodingData, /* ISO_8859_8 */
-+            &aImplISO88599TextEncodingData, /* ISO_8859_9 */
-+            &aImplISO885914TextEncodingData, /* ISO_8859_14 */
-+            &aImplISO885915TextEncodingData, /* ISO_8859_15 */
-+            &aImplIBM737TextEncodingData, /* IBM_737 */
-+            &aImplIBM775TextEncodingData, /* IBM_775 */
-+            &aImplIBM852TextEncodingData, /* IBM_852 */
-+            &aImplIBM855TextEncodingData, /* IBM_855 */
-+            &aImplIBM857TextEncodingData, /* IBM_857 */
-+            &aImplIBM862TextEncodingData, /* IBM_862 */
-+            &aImplIBM864TextEncodingData, /* IBM_864 */
-+            &aImplIBM866TextEncodingData, /* IBM_866 */
-+            &aImplIBM869TextEncodingData, /* IBM_869 */
-+            &aImplMS874TextEncodingData, /* MS_874 */
-+            &aImplMS1250TextEncodingData, /* MS_1250 */
-+            &aImplMS1251TextEncodingData, /* MS_1251 */
-+            &aImplMS1253TextEncodingData, /* MS_1253 */
-+            &aImplMS1254TextEncodingData, /* MS_1254 */
-+            &aImplMS1255TextEncodingData, /* MS_1255 */
-+            &aImplMS1256TextEncodingData, /* MS_1256 */
-+            &aImplMS1257TextEncodingData, /* MS_1257 */
-+            &aImplMS1258TextEncodingData, /* MS_1258 */
-+            NULL, /* TODO! APPLE_ARABIC */
-+            &aImplAPPLECENTEUROTextEncodingData, /* APPLE_CENTEURO */
-+            &aImplAPPLECROATIANTextEncodingData, /* APPLE_CROATIAN */
-+            &aImplAPPLECYRILLICTextEncodingData, /* APPLE_CYRILLIC */
-+            NULL, /* TODO! APPLE_DEVANAGARI */
-+            NULL, /* TODO! APPLE_FARSI */
-+            &aImplAPPLEGREEKTextEncodingData, /* APPLE_GREEK */
-+            NULL, /* TODO! APPLE_GUJARATI */
-+            NULL, /* TODO! APPLE_GURMUKHI */
-+            NULL, /* TODO! APPLE_HEBREW */
-+            &aImplAPPLEICELANDTextEncodingData, /* APPLE_ICELAND */
-+            &aImplAPPLEROMANIANTextEncodingData, /* APPLE_ROMANIAN */
-+            NULL, /* TODO! APPLE_THAI */
-+            &aImplAPPLETURKISHTextEncodingData, /* APPLE_TURKISH */
-+            &aImplAPPLEUKRAINIANTextEncodingData, /* APPLE_UKRAINIAN */
-+            &aImplAPPLECHINSIMPTextEncodingData, /* APPLE_CHINSIMP */
-+            &aImplAPPLECHINTRADTextEncodingData, /* APPLE_CHINTRAD */
-+            &aImplAPPLEJAPANESETextEncodingData, /* APPLE_JAPANESE */
-+            &aImplAPPLEKOREANTextEncodingData, /* APPLE_KOREAN */
-+            &aImplMS932TextEncodingData, /* MS_932 */
-+            &aImplMS936TextEncodingData, /* MS_936 */
-+            &aImplMS949TextEncodingData, /* MS_949 */
-+            &aImplMS950TextEncodingData, /* MS_950 */
-+            &aImplSJISTextEncodingData, /* SHIFT_JIS */
-+            &aImplGB2312TextEncodingData, /* GB_2312 */
-+            &aImplGBT12345TextEncodingData, /* GBT_12345 */
-+            &aImplGBKTextEncodingData, /* GBK */
-+            &aImplBIG5TextEncodingData, /* BIG5 */
-+            &aImplEUCJPTextEncodingData, /* EUC_JP */
-+            &aImplEUCCNTextEncodingData, /* EUC_CN */
-+            &aImplEucTwTextEncodingData, /* EUC_TW */
-+            &aImplIso2022JpTextEncodingData, /* ISO_2022_JP */
-+            &aImplIso2022CnTextEncodingData, /* ISO_2022_CN */
-+            &aImplKOI8RTextEncodingData, /* KOI8_R */
-+            &aImplUTF7TextEncodingData, /* UTF7 */
-+            &aImplUTF8TextEncodingData, /* UTF8 */
-+            &aImplISO885910TextEncodingData, /* ISO_8859_10 */
-+            &aImplISO885913TextEncodingData, /* ISO_8859_13 */
-+            &aImplEUCKRTextEncodingData, /* EUC_KR */
-+            &aImplIso2022KrTextEncodingData, /* ISO_2022_KR */
-+            &aImplJISX0201TextEncodingData, /* JIS_X_0201 */
-+            &aImplJISX0208TextEncodingData, /* JIS_X_0208 */
-+            &aImplJISX0212TextEncodingData, /* JIS_X_0212 */
-+            &aImplMS1361TextEncodingData, /* MS_1361 */
-+            &aImplGb18030TextEncodingData, /* GB_18030 */
-+            &aImplBig5HkscsTextEncodingData, /* BIG5_HKSCS */
-+            &aImplTis620TextEncodingData, /* TIS_620 */
-+            &aImplKoi8UTextEncodingData, /* KOI8_U */
-+            &aImplIsciiDevanagariTextEncodingData, /* ISCII_DEVANAGARI */
-+            &aImplJavaUtf8TextEncodingData, /* JAVA_UTF8 */
-+            &adobeStandardEncodingData, /* ADOBE_STANDARD */
-+            &adobeSymbolEncodingData, /* ADOBE_SYMBOL */
-+            &aImplPT154TextEncodingData }; /* PT154 */
-+    return
-+        nEncoding < SAL_N_ELEMENTS(aData) ? aData[nEncoding] : NULL;
-+    return NULL;
-+}
-diff --git sal/textenc/textenc.cxx sal/textenc/textenc.cxx
-index 91f472e..553c75f 100644
---- sal/textenc/textenc.cxx
-+++ sal/textenc/textenc.cxx
-@@ -34,6 +34,8 @@
- #include "tenchelp.h"
- #include "rtl/textenc.h"
- #include <sal/macros.h>
-+#include "rtl/ustring.hxx"
-+#include "osl/module.h"
- 
- #ifndef INCLUDED_STDDEF_H
- #include <stddef.h>
-@@ -86,143 +88,71 @@ static sal_uChar const aImplA0FFSameToCharTab[SAMEA0FFCHAR_END
- 
- static sal_uInt16 const aImplDoubleByteIdentifierTab[1] = { 0 };
- 
--#include "tcvtarb1.tab"
--#include "tcvteas1.tab"
- #include "tcvtest1.tab"
--#include "tcvtjp1.tab"
--#include "tcvtjp2.tab"
--#include "tcvtjp3.tab"
--#include "tcvtjp4.tab"
--#include "tcvtjp5.tab"
--#include "tcvtjp6.tab"
--#include "tcvtkr1.tab"
--#include "tcvtkr2.tab"
--#include "tcvtkr4.tab"
--#include "tcvtkr5.tab"
--#include "tcvtkr6.tab"
- #include "tcvtlat1.tab"
--#include "tcvtscn1.tab"
--#include "tcvtscn2.tab"
--#include "tcvtscn3.tab"
--#include "tcvtscn4.tab"
--#include "tcvtscn5.tab"
--#include "tcvtscn6.tab"
--#include "tcvtsym1.tab"
--#include "tcvttcn1.tab"
--#include "tcvttcn2.tab"
--#include "tcvttcn6.tab"
- #include "tcvtuni1.tab"
--#include "convertiscii.tab"
- 
--#include "convertbig5hkscs.tab"
--#include "converteuctw.tab"
--#include "convertgb18030.tab"
--#include "convertiso2022cn.tab"
--#include "convertiso2022jp.tab"
--#include "convertiso2022kr.tab"
--#include "convertadobe.tab"
-+extern "C" {
-+        typedef ImplTextEncodingData const *(*TextEncodingFunction) (rtl_TextEncoding nEncoding);
-+};
-+
-+// Yes - we should use the unpleasant to use templatized
-+// sal:: doublecheckfoo thing here.
-+static TextEncodingFunction pTables;
-+
-+#define DOSTRING( x )  #x
-+#define STRING( x )    DOSTRING( x )
- 
- ImplTextEncodingData const *
- Impl_getTextEncodingData(rtl_TextEncoding nEncoding) SAL_THROW_EXTERN_C()
- {
--    static ImplTextEncodingData const * const aData[]
--        = { NULL, /* DONTKNOW */
--            &aImplMS1252TextEncodingData, /* MS_1252 */
--            &aImplAPPLEROMANTextEncodingData, /* APPLE_ROMAN */
--            &aImplIBM437TextEncodingData, /* IBM_437 */
--            &aImplIBM850TextEncodingData, /* IBM_850 */
--            &aImplIBM860TextEncodingData, /* IBM_860 */
--            &aImplIBM861TextEncodingData, /* IBM_861 */
--            &aImplIBM863TextEncodingData, /* IBM_863 */
--            &aImplIBM865TextEncodingData, /* IBM_865 */
--            NULL, /* reserved (SYSTEM) */
--            &aImplSYMBOLTextEncodingData, /* SYMBOL */
--            &aImplUSASCIITextEncodingData, /* ASCII_US */
--            &aImplISO88591TextEncodingData, /* ISO_8859_1 */
--            &aImplISO88592TextEncodingData, /* ISO_8859_2 */
--            &aImplISO88593TextEncodingData, /* ISO_8859_3 */
--            &aImplISO88594TextEncodingData, /* ISO_8859_4 */
--            &aImplISO88595TextEncodingData, /* ISO_8859_5 */
--            &aImplISO88596TextEncodingData, /* ISO_8859_6 */
--            &aImplISO88597TextEncodingData, /* ISO_8859_7 */
--            &aImplISO88598TextEncodingData, /* ISO_8859_8 */
--            &aImplISO88599TextEncodingData, /* ISO_8859_9 */
--            &aImplISO885914TextEncodingData, /* ISO_8859_14 */
--            &aImplISO885915TextEncodingData, /* ISO_8859_15 */
--            &aImplIBM737TextEncodingData, /* IBM_737 */
--            &aImplIBM775TextEncodingData, /* IBM_775 */
--            &aImplIBM852TextEncodingData, /* IBM_852 */
--            &aImplIBM855TextEncodingData, /* IBM_855 */
--            &aImplIBM857TextEncodingData, /* IBM_857 */
--            &aImplIBM862TextEncodingData, /* IBM_862 */
--            &aImplIBM864TextEncodingData, /* IBM_864 */
--            &aImplIBM866TextEncodingData, /* IBM_866 */
--            &aImplIBM869TextEncodingData, /* IBM_869 */
--            &aImplMS874TextEncodingData, /* MS_874 */
--            &aImplMS1250TextEncodingData, /* MS_1250 */
--            &aImplMS1251TextEncodingData, /* MS_1251 */
--            &aImplMS1253TextEncodingData, /* MS_1253 */
--            &aImplMS1254TextEncodingData, /* MS_1254 */
--            &aImplMS1255TextEncodingData, /* MS_1255 */
--            &aImplMS1256TextEncodingData, /* MS_1256 */
--            &aImplMS1257TextEncodingData, /* MS_1257 */
--            &aImplMS1258TextEncodingData, /* MS_1258 */
--            NULL, /* TODO! APPLE_ARABIC */
--            &aImplAPPLECENTEUROTextEncodingData, /* APPLE_CENTEURO */
--            &aImplAPPLECROATIANTextEncodingData, /* APPLE_CROATIAN */
--            &aImplAPPLECYRILLICTextEncodingData, /* APPLE_CYRILLIC */
--            NULL, /* TODO! APPLE_DEVANAGARI */
--            NULL, /* TODO! APPLE_FARSI */
--            &aImplAPPLEGREEKTextEncodingData, /* APPLE_GREEK */
--            NULL, /* TODO! APPLE_GUJARATI */
--            NULL, /* TODO! APPLE_GURMUKHI */
--            NULL, /* TODO! APPLE_HEBREW */
--            &aImplAPPLEICELANDTextEncodingData, /* APPLE_ICELAND */
--            &aImplAPPLEROMANIANTextEncodingData, /* APPLE_ROMANIAN */
--            NULL, /* TODO! APPLE_THAI */
--            &aImplAPPLETURKISHTextEncodingData, /* APPLE_TURKISH */
--            &aImplAPPLEUKRAINIANTextEncodingData, /* APPLE_UKRAINIAN */
--            &aImplAPPLECHINSIMPTextEncodingData, /* APPLE_CHINSIMP */
--            &aImplAPPLECHINTRADTextEncodingData, /* APPLE_CHINTRAD */
--            &aImplAPPLEJAPANESETextEncodingData, /* APPLE_JAPANESE */
--            &aImplAPPLEKOREANTextEncodingData, /* APPLE_KOREAN */
--            &aImplMS932TextEncodingData, /* MS_932 */
--            &aImplMS936TextEncodingData, /* MS_936 */
--            &aImplMS949TextEncodingData, /* MS_949 */
--            &aImplMS950TextEncodingData, /* MS_950 */
--            &aImplSJISTextEncodingData, /* SHIFT_JIS */
--            &aImplGB2312TextEncodingData, /* GB_2312 */
--            &aImplGBT12345TextEncodingData, /* GBT_12345 */
--            &aImplGBKTextEncodingData, /* GBK */
--            &aImplBIG5TextEncodingData, /* BIG5 */
--            &aImplEUCJPTextEncodingData, /* EUC_JP */
--            &aImplEUCCNTextEncodingData, /* EUC_CN */
--            &aImplEucTwTextEncodingData, /* EUC_TW */
--            &aImplIso2022JpTextEncodingData, /* ISO_2022_JP */
--            &aImplIso2022CnTextEncodingData, /* ISO_2022_CN */
--            &aImplKOI8RTextEncodingData, /* KOI8_R */
--            &aImplUTF7TextEncodingData, /* UTF7 */
--            &aImplUTF8TextEncodingData, /* UTF8 */
--            &aImplISO885910TextEncodingData, /* ISO_8859_10 */
--            &aImplISO885913TextEncodingData, /* ISO_8859_13 */
--            &aImplEUCKRTextEncodingData, /* EUC_KR */
--            &aImplIso2022KrTextEncodingData, /* ISO_2022_KR */
--            &aImplJISX0201TextEncodingData, /* JIS_X_0201 */
--            &aImplJISX0208TextEncodingData, /* JIS_X_0208 */
--            &aImplJISX0212TextEncodingData, /* JIS_X_0212 */
--            &aImplMS1361TextEncodingData, /* MS_1361 */
--            &aImplGb18030TextEncodingData, /* GB_18030 */
--            &aImplBig5HkscsTextEncodingData, /* BIG5_HKSCS */
--            &aImplTis620TextEncodingData, /* TIS_620 */
--            &aImplKoi8UTextEncodingData, /* KOI8_U */
--            &aImplIsciiDevanagariTextEncodingData, /* ISCII_DEVANAGARI */
--            &aImplJavaUtf8TextEncodingData, /* JAVA_UTF8 */
--            &adobeStandardEncodingData, /* ADOBE_STANDARD */
--            &adobeSymbolEncodingData, /* ADOBE_SYMBOL */
--            &aImplPT154TextEncodingData, /* PT154 */
--            &adobeDingbatsEncodingData }; /* ADOBE_DINGBATS */
--    return
--        nEncoding < SAL_N_ELEMENTS(aData) ? aData[nEncoding] : NULL;
-+    switch(nEncoding)
-+    {
-+        case RTL_TEXTENCODING_ASCII_US:
-+            return &aImplUSASCIITextEncodingData; break;
-+        case RTL_TEXTENCODING_MS_1252:
-+            return &aImplMS1252TextEncodingData; break;
-+        case RTL_TEXTENCODING_UTF8:
-+            return &aImplUTF8TextEncodingData; break;
-+        case RTL_TEXTENCODING_ISO_8859_1:
-+            return &aImplISO88591TextEncodingData; break;
-+
-+#ifndef TOOLS_STRING_MISSUSE
-+// ----------------------------------------------
-+// These are here temporarily since they are used in error
-+// all over the place
-+// ----------------------------------------------
-+        case RTL_TEXTENCODING_IBM_850:
-+            return &aImplIBM850TextEncodingData; break;
-+        case RTL_TEXTENCODING_IBM_857:
-+            return &aImplIBM857TextEncodingData; break;
-+        case RTL_TEXTENCODING_IBM_860:
-+            return &aImplIBM860TextEncodingData; break;
-+        case RTL_TEXTENCODING_IBM_861:
-+            return &aImplIBM861TextEncodingData; break;
-+        case RTL_TEXTENCODING_IBM_863:
-+            return &aImplIBM863TextEncodingData; break;
-+// ----------------------------------------------
-+#endif
-+        default:
-+            if (!pTables)
-+            {
-+                static char const pName[] = STRING(PLUGIN_NAME);
-+                oslModule aModule = osl_loadModuleAscii(pName, SAL_LOADMODULE_DEFAULT);
-+
-+                if(aModule)
-+                {
-+                    static char const pSymbol[] = "Impl_getTextEncodingData";
-+                    pTables = (TextEncodingFunction)osl_getAsciiFunctionSymbol(aModule, pSymbol);
-+                }
-+            }
-+            if (pTables)
-+                return pTables(nEncoding);
-+//			else
-+//				fprintf (stderr, "missing text encoding library for %d\n", nEncoding);
-+            break;
-+    }
-+    return NULL;
- }
- 
- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-diff --git sal/util/makefile.mk sal/util/makefile.mk
-index 82ebbc8..faaa5ba 100644
---- sal/util/makefile.mk
-+++ sal/util/makefile.mk
-@@ -219,6 +219,15 @@ SHL1STDLIBS+=-lgcc
- .ENDIF
- .ENDIF
- 
-+SHL4DEPN+=$(SHL1TARGETN)
-+SHL4LIBS=$(SLB)$/textenc_tables.lib
-+SHL4TARGET=uno_sal_textenc
-+SHL4STDLIBS=$(SALLIB)
-+SHL4VERSIONMAP=saltextenc.map
-+
-+SHL4DEF=$(MISC)$/$(SHL4TARGET).def
-+DEF4NAME=$(SHL4TARGET)
-+
- # --- Targets ------------------------------------------------------
- 
- .ENDIF # $(header) != ""
-diff --git sal/util/sal.map sal/util/sal.map
-index d5faa56..b180310 100755
---- sal/util/sal.map
-+++ sal/util/sal.map
-@@ -553,6 +553,7 @@ UDK_3.5 {
- 
- UDK_3.6 { # OOo 2.3
-     global:
-+        osl_loadModuleAscii;
-         osl_getAsciiFunctionSymbol;
-         osl_getModuleHandle;
-         rtl_uString_intern;
-diff --git sal/util/saltextenc.map sal/util/saltextenc.map
-new file mode 100644
-index 0000000..e88a0af
---- /dev/null
-+++ sal/util/saltextenc.map
-@@ -0,0 +1,6 @@
-+UDK_3_0_0 {
-+    global:
-+    Impl_getTextEncodingData;
-+    local:
-+        *;
-+};
-diff --git scp2/source/ooo/ure.scp scp2/source/ooo/ure.scp
-index 0db7e2b..c4c285a 100755
---- scp2/source/ooo/ure.scp
-+++ scp2/source/ooo/ure.scp
-@@ -270,6 +270,13 @@ File gid_File_Dl_Sal
- End
- #endif
- 
-+File gid_File_Dl_Sal_TextEnc
-+    TXT_FILE_BODY;
-+    Dir = SCP2_URE_DL_DIR;
-+    Name = SCP2_URE_DL_UNO_VER("sal_textenc", "3");
-+    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-+End
-+
- File gid_File_Dl_Salhelper
-     TXT_FILE_BODY;
-     Dir = SCP2_URE_DL_DIR;
--- 
-1.7.0.1
-


More information about the Libreoffice-commits mailing list