[Libreoffice-commits] core.git: 2 commits - desktop/Pagein_common.mk icu/ExternalPackage_icu.mk icu/ExternalProject_icu.mk icu/icu4c.7601.Indic-ccmp.patch icu/icu4c.8198.revert.icu5431.patch icu/icu4c.9948.mlym-crash.patch icu/icu4c-build.patch icu/UnpackedTarball_icu.mk Library_merged.mk RepositoryExternal.mk RepositoryFixes.mk scp2/source vcl/generic vcl/inc vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk.mk vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk vcl/Library_vclplug_svp.mk vcl/Library_vclplug_tde.mk

Khaled Hosny khaledhosny at eglug.org
Sun Jun 16 13:18:46 PDT 2013


 Library_merged.mk                     |    1 
 RepositoryExternal.mk                 |   12 
 RepositoryFixes.mk                    |    2 
 desktop/Pagein_common.mk              |    1 
 icu/ExternalPackage_icu.mk            |    9 
 icu/ExternalProject_icu.mk            |    7 
 icu/UnpackedTarball_icu.mk            |    3 
 icu/icu4c-build.patch                 |   22 -
 icu/icu4c.7601.Indic-ccmp.patch       |   43 --
 icu/icu4c.8198.revert.icu5431.patch   |  127 ------
 icu/icu4c.9948.mlym-crash.patch       |   11 
 scp2/source/ooo/file_library_ooo.scp  |   15 
 scp2/source/ooo/module_hidden_ooo.scp |    1 
 scp2/source/ooo/shortcut_ooo.scp      |   11 
 vcl/Library_desktop_detector.mk       |    1 
 vcl/Library_vcl.mk                    |    1 
 vcl/Library_vclplug_gen.mk            |    1 
 vcl/Library_vclplug_gtk.mk            |    1 
 vcl/Library_vclplug_kde.mk            |    1 
 vcl/Library_vclplug_kde4.mk           |    1 
 vcl/Library_vclplug_svp.mk            |    1 
 vcl/Library_vclplug_tde.mk            |    1 
 vcl/generic/glyphs/gcach_layout.cxx   |  680 ----------------------------------
 vcl/inc/generic/glyphcache.hxx        |    2 
 24 files changed, 9 insertions(+), 946 deletions(-)

New commits:
commit 1733e4ad1c5bddfef8977e6b8bc738ab15f49490
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Mon May 13 19:52:39 2013 +0200

    Don't build icule library as we no longer use it
    
    Change-Id: I25401eee45988bf4d156c11d9a5848c783204c02

diff --git a/Library_merged.mk b/Library_merged.mk
index 6e404df..932d18b 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -44,7 +44,6 @@ $(eval $(call gb_Library_use_externals,merged,\
 	harfbuzz \
 	hunspell \
 	icui18n \
-	icule \
 	icuuc \
 	jpeg \
 	lcms2 \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 88724b4..81e1b71 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1063,10 +1063,6 @@ define gb_LinkTarget__use_icui18n
 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
 
 endef
-define gb_LinkTarget__use_icule
-$(call gb_LinkTarget_add_libs,$(1),-licule)
-
-endef
 define gb_LinkTarget__use_icutu
 $(call gb_LinkTarget_add_libs,$(1),-licutu)
 
@@ -1144,18 +1140,10 @@ endef
 endif
 
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
-	icule$(gb_ICU_suffix) \
 	icutu$(gb_ICU_suffix) \
 	icuuc$(gb_ICU_suffix) \
 ))
 
-define gb_LinkTarget__use_icule
-$(call gb_LinkTarget_use_package,$(1),icu)
-$(call gb_LinkTarget_use_libraries,$(1),\
-	icule$(gb_ICU_suffix) \
-)
-
-endef
 define gb_LinkTarget__use_icutu
 $(call gb_LinkTarget_use_package,$(1),icu)
 $(call gb_LinkTarget_use_libraries,$(1),\
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 3452f67..51d6924 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -102,7 +102,7 @@ gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
 
 
 gb_Library_NOILIBFILENAMES_D := \
-    icudt icuin icule icuuc \
+    icudt icuin icuuc \
     lcms2 \
 
 # change the names of all import libraries that don't have an "i" prefix as in our standard naming schema
diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk
index 669b85a..1ba1b94 100644
--- a/desktop/Pagein_common.mk
+++ b/desktop/Pagein_common.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_Pagein_add_objects,common,\
     i18nlangtag \
     $(if $(findstring YES,$(SYSTEM_ICU)),,\
         icui18n \
-        icule \
         icuuc \
     ) \
     lng \
diff --git a/icu/ExternalPackage_icu.mk b/icu/ExternalPackage_icu.mk
index 11ba2eb..cb2dc8c 100644
--- a/icu/ExternalPackage_icu.mk
+++ b/icu/ExternalPackage_icu.mk
@@ -18,13 +18,11 @@ ifeq ($(COM),GCC)
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicudata.dll.a,source/stubdata/icudt.lib))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc.dll.a,source/lib/icuuc.lib))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n.dll.a,source/lib/icuin.lib))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule.dll.a,source/lib/icule.lib))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu.dll.a,source/lib/icutu.lib))
 $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,bin,\
 	source/lib/icudt$(ICU_MAJOR).dll \
 	source/lib/icuuc$(ICU_MAJOR).dll \
 	source/lib/icuin$(ICU_MAJOR).dll \
-	source/lib/icule$(ICU_MAJOR).dll \
 	source/lib/icutu$(ICU_MAJOR).dll \
 ))
 $(eval $(call gb_ExternalPackage_add_files,icu,bin,\
@@ -38,14 +36,12 @@ $(eval $(call gb_ExternalPackage_add_files,icu,lib,\
 	source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
 	source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
 	source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
-	source/lib/icule$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
 	source/lib/icutu$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib\
 ))
 $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,bin,\
 	source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \
 	source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \
 	source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \
-	source/lib/icule$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \
 	source/lib/icutu$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(ICU_MAJOR).dll \
 ))
 $(eval $(call gb_ExternalPackage_add_files,icu,bin,\
@@ -60,7 +56,6 @@ $(eval $(call gb_ExternalPackage_add_files,icu,lib,\
 	source/lib/libicudata.a \
 	source/lib/libicuuc.a \
 	source/lib/libicui18n.a \
-	source/lib/libicule.a \
 	source/lib/libicutu.a \
 ))
 else ifeq ($(OS),ANDROID)
@@ -68,7 +63,6 @@ $(eval $(call gb_ExternalPackage_add_libraries_for_install,icu,lib,\
 	source/lib/libicudatalo.so \
 	source/lib/libicuuclo.so \
 	source/lib/libicui18nlo.so \
-	source/lib/libiculelo.so \
 	source/lib/libicutulo.so \
 ))
 else
@@ -81,9 +75,6 @@ $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicuuc$(gb_Library_DLLEXT),s
 $(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicui18n$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicui18n$(gb_Library_DLLEXT),source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION)))
-$(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
-$(eval $(call gb_ExternalPackage_add_library_for_install,icu,lib/libicule$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
-$(eval $(call gb_ExternalPackage_add_file,icu,lib/libicule$(gb_Library_DLLEXT),source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT).$(ICU_MAJOR),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
 $(eval $(call gb_ExternalPackage_add_file,icu,lib/libicutu$(gb_Library_DLLEXT),source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)))
diff --git a/icu/ExternalProject_icu.mk b/icu/ExternalProject_icu.mk
index 695c071..f5e1501 100644
--- a/icu/ExternalProject_icu.mk
+++ b/icu/ExternalProject_icu.mk
@@ -38,9 +38,9 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
 		./configure \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
 			--with-cross-build=$(subst $(INPATH),$(INPATH_FOR_BUILD),$(call gb_UnpackedTarball_get_dir,icu))/source) \
-			--enable-layout --disable-static --enable-shared --disable-samples \
+			--disable-layout --disable-static --enable-shared --disable-samples \
 		&& $(MAKE) \
-		&&  for lib in icudata icuin icuuc icule icutu; do \
+		&&  for lib in icudata icuin icuuc icutu; do \
 			touch $$lib; \
 			done \
 	,source)
@@ -70,7 +70,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
 		CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
 		CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \
 		./configure \
-			--enable-layout --disable-samples \
+			--disable-layout --disable-samples \
 			$(if $(filter IOS ANDROID,$(OS)),--disable-dyload) \
 			$(if $(filter ANDROID,$(OS)),--disable-strict) \
 			$(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
@@ -85,7 +85,6 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
 			$(gb_Package_SOURCEDIR_icu)/source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION) \
 			$(gb_Package_SOURCEDIR_icu)/source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION) \
 			$(gb_Package_SOURCEDIR_icu)/source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION) \
-			$(gb_Package_SOURCEDIR_icu)/source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION) \
 			$(gb_Package_SOURCEDIR_icu)/source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)) \
 	,source)
 
diff --git a/icu/UnpackedTarball_icu.mk b/icu/UnpackedTarball_icu.mk
index 3e084a9..ef56ce9 100644
--- a/icu/UnpackedTarball_icu.mk
+++ b/icu/UnpackedTarball_icu.mk
@@ -19,10 +19,7 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
 
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
 	icu/icu4c.10129.wintz.patch \
-	icu/icu4c.9948.mlym-crash.patch \
 	icu/icu4c-build.patch \
-	icu/icu4c.8198.revert.icu5431.patch \
-	icu/icu4c.7601.Indic-ccmp.patch \
 	icu/icu4c-aix.patch \
 	icu/icu4c-wchar_t.patch \
 	icu/icu4c-warnings.patch \
diff --git a/icu/icu4c-build.patch b/icu/icu4c-build.patch
index 30ba3ad..1e50511 100644
--- a/icu/icu4c-build.patch
+++ b/icu/icu4c-build.patch
@@ -87,25 +87,3 @@
  
  ## Remove shared library 's'
  STATIC_PREFIX_WHEN_USED = 
---- misc/icu/source/layout/ArabicShaping.cpp	2010-09-29 20:38:38.000000000 +0200
-+++ misc/build/icu/source/layout/ArabicShaping.cpp	2011-03-15 10:56:26.655056238 +0100
-@@ -79,7 +79,6 @@
- #define markFeatureMask 0x00040000UL
- #define mkmkFeatureMask 0x00020000UL
- 
--#define NO_FEATURES   0
- #define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
- 
- #define SHAPE_MASK 0xF0000000UL
-@@ -174,11 +173,7 @@
-         LEUnicode c = chars[in];
-         ShapeType t = getShapeType(c);
- 
--        if (t == ST_NOSHAPE_NONE) {
--            glyphStorage.setAuxData(out, NO_FEATURES, success);
--        } else {
-             glyphStorage.setAuxData(out, ISOL_FEATURES, success);
--        }
- 
-         if ((t & MASK_TRANSPARENT) != 0) {
-             continue;
diff --git a/icu/icu4c.7601.Indic-ccmp.patch b/icu/icu4c.7601.Indic-ccmp.patch
deleted file mode 100644
index 78e8bbe..0000000
--- a/icu/icu4c.7601.Indic-ccmp.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- misc/icu/source/layout/IndicReordering.cpp	2009-07-01 20:51:26.000000000 +0200
-+++ misc/build/icu/source/layout/IndicReordering.cpp	2011-01-08 11:12:49.950566538 +0100
-@@ -13,6 +13,7 @@
- 
- U_NAMESPACE_BEGIN
- 
-+#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
- #define loclFeatureTag LE_LOCL_FEATURE_TAG
- #define initFeatureTag LE_INIT_FEATURE_TAG
- #define nuktFeatureTag LE_NUKT_FEATURE_TAG
-@@ -35,6 +36,7 @@
- #define caltFeatureTag LE_CALT_FEATURE_TAG
- #define kernFeatureTag LE_KERN_FEATURE_TAG
- 
-+#define ccmpFeatureMask 0x00000001UL
- #define loclFeatureMask 0x80000000UL
- #define rphfFeatureMask 0x40000000UL
- #define blwfFeatureMask 0x20000000UL
-@@ -73,7 +75,7 @@
- 
- #define repositionedGlyphMask   0x00000002UL
- 
--#define basicShapingFormsMask ( loclFeatureMask | nuktFeatureMask | akhnFeatureMask | rkrfFeatureMask | blwfFeatureMask | halfFeatureMask | vatuFeatureMask | cjctFeatureMask )
-+#define basicShapingFormsMask ( ccmpFeatureMask | loclFeatureMask | nuktFeatureMask | akhnFeatureMask | rkrfFeatureMask | blwfFeatureMask | halfFeatureMask | vatuFeatureMask | cjctFeatureMask )
- #define positioningFormsMask ( kernFeatureMask | distFeatureMask | abvmFeatureMask | blwmFeatureMask )
- #define presentationFormsMask ( presFeatureMask | abvsFeatureMask | blwsFeatureMask | pstsFeatureMask | halnFeatureMask | caltFeatureMask )
- 
-@@ -480,6 +482,7 @@
- #define tagArray0 (rphfFeatureMask | tagArray1)
- 
- static const FeatureMap featureMap[] = {
-+    {ccmpFeatureTag, ccmpFeatureMask},
-     {loclFeatureTag, loclFeatureMask},
-     {initFeatureTag, initFeatureMask},
-     {nuktFeatureTag, nuktFeatureMask},
-@@ -502,6 +505,7 @@
- static const le_int32 featureCount = LE_ARRAY_SIZE(featureMap);
- 
- static const FeatureMap v2FeatureMap[] = {
-+    {ccmpFeatureTag, ccmpFeatureMask},
- 	{loclFeatureTag, loclFeatureMask},
-     {nuktFeatureTag, nuktFeatureMask},
-     {akhnFeatureTag, akhnFeatureMask},
diff --git a/icu/icu4c.8198.revert.icu5431.patch b/icu/icu4c.8198.revert.icu5431.patch
deleted file mode 100644
index 629bec0..0000000
--- a/icu/icu4c.8198.revert.icu5431.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- misc/icu/source/layout/IndicReordering.cpp	(revision 26090)
-+++ misc/build/icu/source/layout/IndicReordering.cpp	(revision 25772)
-@@ -126,8 +126,4 @@
-     FeatureMask fSMFeatures;
- 
--    LEUnicode   fPreBaseConsonant;
--    LEUnicode   fPreBaseVirama;
--    le_int32    fPBCIndex;
--    FeatureMask fPBCFeatures;
- 
-     void saveMatra(LEUnicode matra, le_int32 matraIndex, IndicClassTable::CharClass matraClass)
-@@ -176,6 +172,5 @@
-           fMatraFeatures(0), fMPreOutIndex(-1), fMPreFixups(mpreFixups),
-           fVMabove(0), fVMpost(0), fVMIndex(0), fVMFeatures(0),
-+          fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0)
--          fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0),
--          fPreBaseConsonant(0), fPreBaseVirama(0), fPBCIndex(0), fPBCFeatures(0)
-     {
-         // nothing else to do...
-@@ -196,6 +191,4 @@
-         fVMabove = fVMpost  = 0;
-         fSMabove = fSMbelow = 0;
--
--        fPreBaseConsonant = fPreBaseVirama = 0;
-     }
- 
-@@ -393,12 +386,4 @@
-     }
- 
--    void notePreBaseConsonant(le_uint32 index,LEUnicode PBConsonant, LEUnicode PBVirama, FeatureMask features)
--    {
--        fPBCIndex = index;
--        fPreBaseConsonant = PBConsonant;
--        fPreBaseVirama = PBVirama;
--        fPBCFeatures = features;
--    }
--
-     void noteBaseConsonant()
-     {
-@@ -480,20 +465,4 @@
-     }
-     
--    void writePreBaseConsonant()
--    {
--        // The TDIL spec says that consonant + virama + RRA should produce a rakar in Malayalam.  However,
--        // it seems that almost none of the fonts for Malayalam are set up to handle this.
--        // So, we're going to force the issue here by using the rakar as defined with RA in most fonts.
--
--        if (fPreBaseConsonant == 0x0d31) { // RRA
--            fPreBaseConsonant = 0x0d30; // RA
--        }
--        
--        if (fPreBaseConsonant != 0) {
--            writeChar(fPreBaseConsonant, fPBCIndex, fPBCFeatures);
--            writeChar(fPreBaseVirama,fPBCIndex-1,fPBCFeatures);
--        }
--    }
--
-     le_int32 getOutputIndex()
-     {
-@@ -754,5 +723,4 @@
-             }
- 
--            
-             IndicClassTable::CharClass charClass = CC_RESERVED;
-             IndicClassTable::CharClass nextClass = CC_RESERVED;
-@@ -762,9 +730,7 @@
-             le_bool  seenVattu = FALSE;
-             le_bool  seenBelowBaseForm = FALSE;
--            le_bool  seenPreBaseForm = FALSE;
-             le_bool  hasNukta = FALSE;
-             le_bool  hasBelowBaseForm = FALSE;
-             le_bool  hasPostBaseForm = FALSE;
--            le_bool  hasPreBaseForm = FALSE;
- 
-             if (postBase < markStart && classTable->isNukta(chars[postBase])) {
-@@ -780,20 +746,12 @@
-                 hasBelowBaseForm = IndicClassTable::hasBelowBaseForm(charClass) && !hasNukta;
-                 hasPostBaseForm  = IndicClassTable::hasPostBaseForm(charClass)  && !hasNukta;
--                hasPreBaseForm = IndicClassTable::hasPreBaseForm(charClass) && !hasNukta;
- 
-                 if (IndicClassTable::isConsonant(charClass)) {
-                     if (postBaseLimit == 0 || seenVattu ||
-                         (baseConsonant > baseLimit && !classTable->isVirama(chars[baseConsonant - 1])) ||
-+                        !(hasBelowBaseForm || hasPostBaseForm)) {
--                        !(hasBelowBaseForm || hasPostBaseForm || hasPreBaseForm)) {
-                         break;
-                     }
- 
--                    // Note any pre-base consonants
--                    if ( baseConsonant == lastConsonant && lastConsonant > 0 && 
--                         hasPreBaseForm && classTable->isVirama(chars[baseConsonant - 1])) {
--                        output.notePreBaseConsonant(lastConsonant,chars[lastConsonant],chars[lastConsonant-1],tagArray2);
--                        seenPreBaseForm = TRUE;
--   
--                    }
-                     // consonants with nuktas are never vattus
-                     seenVattu = IndicClassTable::isVattu(charClass) && !hasNukta;
-@@ -828,12 +786,10 @@
- 
-             // write any pre-base consonants
--            output.writePreBaseConsonant();
--
-             le_bool supressVattu = TRUE;
- 
-             for (i = baseLimit; i < baseConsonant; i += 1) {
-                 LEUnicode ch = chars[i];
-+                // Don't put 'blwf' on first consonant.
-+                FeatureMask features = (i == baseLimit? tagArray2 : tagArray1);
--                // Don't put 'pstf' or 'blwf' on anything before the base consonant.
--                FeatureMask features = tagArray1 & ~( pstfFeatureMask | blwfFeatureMask );
- 
-                 charClass = classTable->getCharClass(ch);
-@@ -886,5 +842,5 @@
- 
-             // write below-base consonants
-+            if (baseConsonant != lastConsonant) {
--            if (baseConsonant != lastConsonant && !seenPreBaseForm) {
-                 for (i = bcSpan + 1; i < postBase; i += 1) {
-                     output.writeChar(chars[i], i, tagArray1);
-@@ -916,5 +872,5 @@
-             // write post-base consonants
-             // FIXME: does this put the right tags on post-base consonants?
-+            if (baseConsonant != lastConsonant) {
--            if (baseConsonant != lastConsonant && !seenPreBaseForm) {
-                 if (postBase <= lastConsonant) {
-                     for (i = postBase; i <= lastConsonant; i += 1) {
diff --git a/icu/icu4c.9948.mlym-crash.patch b/icu/icu4c.9948.mlym-crash.patch
deleted file mode 100644
index 2a5d89c..0000000
--- a/icu/icu4c.9948.mlym-crash.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/build/icu/source/layout/IndicClassTables.cpp	2013-02-19 16:04:09.919412782 +0000
-+++ misc/icu/source/layout/IndicClassTables.cpp	2013-02-19 16:04:14.519351601 +0000
-@@ -273,7 +273,7 @@
- 
- static const IndicClassTable kndaClassTable = {0x0C80, 0x0CEF, 4, KNDA_SCRIPT_FLAGS, kndaCharClasses, kndaSplitTable};
- 
--static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
-+static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 4, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
- 
- static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
- 
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index cad2d7c..a710c7e 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -327,21 +327,6 @@ File gid_File_Lib_Icui18n
     Styles = (PACKED);
 End
 
-File gid_File_Lib_Icule
-    LIB_FILE_BODY;
-  #ifdef UNX
-    Name = STRING(CONCAT6(libicule,UNXSUFFIX,.,ICU_MAJOR,.,ICU_MINOR));
-  #else
-  #ifdef MSVC_PKG_DEBUG_RUNTIME
-    Name = STRING(CONCAT3(iculed,ICU_MAJOR,.dll));
-  #else
-    Name = STRING(CONCAT3(icule,ICU_MAJOR,.dll));
-  #endif // MSVC_PKG_DEBUG_RUNTIME
-  #endif
-    Dir = SCP2_OOO_BIN_DIR;
-    Styles = (PACKED);
-End
-
 File gid_File_Lib_Icuuc
     LIB_FILE_BODY;
   #ifdef UNX
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 7128021..b561a57 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -176,7 +176,6 @@ Module gid_Module_Root_Files_5
     gid_File_Lib_Macab_Drv_1,
 	gid_File_Lib_Icudata,
 	gid_File_Lib_Icui18n,
-	gid_File_Lib_Icule,
 	gid_File_Lib_Icuuc,
 	gid_File_Lib_Mork,
 	gid_File_Lib_Mozabdrv,
diff --git a/scp2/source/ooo/shortcut_ooo.scp b/scp2/source/ooo/shortcut_ooo.scp
index 79e9b62..963bf9c 100644
--- a/scp2/source/ooo/shortcut_ooo.scp
+++ b/scp2/source/ooo/shortcut_ooo.scp
@@ -43,17 +43,6 @@ Shortcut gid_Shortcut_Lib_Icui18n
     Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE);
 End
 
-Shortcut gid_Shortcut_Lib_Icule
-    FileID = gid_File_Lib_Icule;
-    Dir = SCP2_OOO_BIN_DIR;
-#ifndef AIX
-    Name = STRING(CONCAT4(libicule,UNXSUFFIX,.,ICU_MAJOR));
-#else
-    Name = "libicule.so";
-#endif
-    Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE);
-End
-
 Shortcut gid_Shortcut_Lib_Icuuc
     FileID = gid_File_Lib_Icuuc;
     Dir = SCP2_OOO_BIN_DIR;
diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk
index ce3ab04..1326151 100644
--- a/vcl/Library_desktop_detector.mk
+++ b/vcl/Library_desktop_detector.mk
@@ -49,7 +49,6 @@ $(eval $(call gb_Library_use_libraries,desktop_detector,\
 
 $(eval $(call gb_Library_use_externals,desktop_detector,\
 	boost_headers \
-	icule \
 	icuuc \
 ))
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 32a1266..c4f52de 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -94,7 +94,6 @@ $(eval $(call gb_Library_use_externals,vcl,\
 	boost_headers \
 	gio \
 	harfbuzz \
-	icule \
 	icuuc \
 	icu_headers \
 	lcms2 \
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 5aad457..c32b3f4 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -48,7 +48,6 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\
 	cairo \
 	graphite \
 	harfbuzz \
-	icule \
 	icuuc \
 	valgrind \
 	Xrender \
diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index 894d6d6..e870d06 100644
--- a/vcl/Library_vclplug_gtk.mk
+++ b/vcl/Library_vclplug_gtk.mk
@@ -67,7 +67,6 @@ $(eval $(call gb_Library_use_externals,vclplug_gtk,\
 	gio \
 	gtk \
 	gthread \
-	icule \
 	icuuc \
 ))
 
diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk
index 6d962dd..7ebfdc7 100644
--- a/vcl/Library_vclplug_kde.mk
+++ b/vcl/Library_vclplug_kde.mk
@@ -50,7 +50,6 @@ $(eval $(call gb_Library_use_libraries,vclplug_kde,\
 
 $(eval $(call gb_Library_use_externals,vclplug_kde,\
 	boost_headers \
-	icule \
 	icuuc \
 	kde \
 ))
diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk
index 45e1042..a192987 100644
--- a/vcl/Library_vclplug_kde4.mk
+++ b/vcl/Library_vclplug_kde4.mk
@@ -52,7 +52,6 @@ $(eval $(call gb_Library_use_libraries,vclplug_kde4,\
 
 $(eval $(call gb_Library_use_externals,vclplug_kde4,\
 	boost_headers \
-	icule \
 	icuuc \
 	kde4 \
 ))
diff --git a/vcl/Library_vclplug_svp.mk b/vcl/Library_vclplug_svp.mk
index e465c85..43a311d 100644
--- a/vcl/Library_vclplug_svp.mk
+++ b/vcl/Library_vclplug_svp.mk
@@ -51,7 +51,6 @@ $(eval $(call gb_Library_use_libraries,vclplug_svp,\
 $(eval $(call gb_Library_use_externals,vclplug_svp,\
 	boost_headers \
 	freetype_headers \
-	icule \
 	icuuc \
 ))
 
diff --git a/vcl/Library_vclplug_tde.mk b/vcl/Library_vclplug_tde.mk
index 931cdd3..0480978 100644
--- a/vcl/Library_vclplug_tde.mk
+++ b/vcl/Library_vclplug_tde.mk
@@ -57,7 +57,6 @@ $(eval $(call gb_Library_use_libraries,vclplug_tde,\
 
 $(eval $(call gb_Library_use_externals,vclplug_tde,\
 	boost_headers \
-	icule \
 	icuuc \
 ))
 
commit b6ecac9fb90c9caa684a10ca0f108da70e4d3245
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Mon May 13 19:38:04 2013 +0200

    Bye Bye ICU Layout Engine
    
    Change-Id: I0f887ba378f9dac45a3736e4d1789585651148d1

diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 3c3c6de..4826936 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -33,13 +33,7 @@
 #include <hb-icu.h>
 #include <hb-ot.h>
 
-#include <layout/LayoutEngine.h>
-#include <layout/LEFontInstance.h>
-#include <layout/LELanguages.h>
-#include <layout/LEScripts.h>
-
 #include <unicode/uscript.h>
-#include <unicode/ubidi.h>
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
@@ -51,9 +45,7 @@
 
 ServerFontLayout::ServerFontLayout( ServerFont& rFont )
 :   mrServerFont( rFont )
-{
-    bUseHarfBuzz = (getenv("SAL_USE_ICULE") == NULL);
-}
+{ }
 
 void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const
 {
@@ -64,7 +56,7 @@ void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const
 
 bool ServerFontLayout::LayoutText( ImplLayoutArgs& rArgs )
 {
-    ServerFontLayoutEngine* pLE = mrServerFont.GetLayoutEngine(bUseHarfBuzz);
+    ServerFontLayoutEngine* pLE = mrServerFont.GetLayoutEngine();
     assert(pLE);
     bool bRet = pLE ? pLE->layout(*this, rArgs) : false;
     return bRet;
@@ -502,676 +494,12 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
 }
 
 // =======================================================================
-// bridge to ICU LayoutEngine
-// =======================================================================
-
-using namespace U_ICU_NAMESPACE;
-
-static const LEGlyphID ICU_DELETED_GLYPH = 0xFFFF;
-static const LEGlyphID ICU_MARKED_GLYPH = 0xFFFE;
-
-// -----------------------------------------------------------------------
-
-class IcuFontFromServerFont
-: public LEFontInstance
-{
-private:
-    ServerFont&     mrServerFont;
-
-public:
-                            IcuFontFromServerFont( ServerFont& rFont )
-                            : mrServerFont( rFont )
-                            {}
-
-    virtual const void*     getFontTable(LETag tableTag, size_t &length) const;
-    virtual const void*     getFontTable(LETag tableTag) const;
-    virtual le_int32        getUnitsPerEM() const;
-    virtual float           getXPixelsPerEm() const;
-    virtual float           getYPixelsPerEm() const;
-    virtual float           getScaleFactorX() const;
-    virtual float           getScaleFactorY() const;
-
-    using LEFontInstance::mapCharToGlyph;
-    virtual LEGlyphID       mapCharToGlyph( LEUnicode32 ch ) const;
-    virtual LEGlyphID       mapCharToGlyph( LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth ) const;
-
-    virtual le_int32        getAscent() const;
-    virtual le_int32        getDescent() const;
-    virtual le_int32        getLeading() const;
-
-    virtual void            getGlyphAdvance( LEGlyphID glyph, LEPoint &advance ) const;
-    virtual le_bool         getGlyphPoint( LEGlyphID glyph, le_int32 pointNumber, LEPoint& point ) const;
-};
-
-// -----------------------------------------------------------------------
-
-const void* IcuFontFromServerFont::getFontTable( LETag nICUTableTag, size_t & rLength ) const
-{
-    char pTagName[5];
-    pTagName[0] = (char)(nICUTableTag >> 24);
-    pTagName[1] = (char)(nICUTableTag >> 16);
-    pTagName[2] = (char)(nICUTableTag >>  8);
-    pTagName[3] = (char)(nICUTableTag);
-    pTagName[4] = 0;
-
-    sal_uLong nLength = 0;
-    const unsigned char* pBuffer = mrServerFont.GetTable( pTagName, &nLength );
-    rLength = static_cast<size_t>(nLength);
-    SAL_INFO("vcl", "IcuGetTable(\"" << pTagName << "\") => " << pBuffer << ", len=" << rLength);
-    SAL_INFO(
-        "vcl",
-        "font( h=" << mrServerFont.GetFontSelData().mnHeight << ", \""
-        << mrServerFont.GetFontFileName()->getStr() << "\" )");
-    return pBuffer;
-}
-
-const void* IcuFontFromServerFont::getFontTable( LETag nICUTableTag ) const
-{
-    size_t nLength = 0;
-    return getFontTable( nICUTableTag, nLength);
-}
-
-// -----------------------------------------------------------------------
-
-le_int32 IcuFontFromServerFont::getUnitsPerEM() const
-{
-    return mrServerFont.GetEmUnits();
-}
-
-// -----------------------------------------------------------------------
-
-float IcuFontFromServerFont::getXPixelsPerEm() const
-{
-    const FontSelectPattern& r = mrServerFont.GetFontSelData();
-    float fX = r.mnWidth ? r.mnWidth : r.mnHeight;
-    return fX;
-}
-
-// -----------------------------------------------------------------------
-
-float IcuFontFromServerFont::getYPixelsPerEm() const
-{
-    float fY = mrServerFont.GetFontSelData().mnHeight;
-    return fY;
-}
-
-// -----------------------------------------------------------------------
-
-float IcuFontFromServerFont::getScaleFactorX() const
-{
-    return 1.0;
-}
-
-// -----------------------------------------------------------------------
-
-float IcuFontFromServerFont::getScaleFactorY() const
-{
-    return 1.0;
-}
-
-// -----------------------------------------------------------------------
-
-LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch ) const
-{
-    LEGlyphID nGlyphIndex = mrServerFont.GetRawGlyphIndex( ch );
-    return nGlyphIndex;
-}
-
-LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch, const LECharMapper *mapper, le_bool /*filterZeroWidth*/ ) const
-{
-    /*
-     fdo#31821, icu has...
-      >│93          if (filterZeroWidth && (mappedChar == 0x200C || mappedChar == 0x200D)) {                                            │
-       │94              return canDisplay(mappedChar) ? 0x0001 : 0xFFFF;                                                                 │
-       │95          }
-     so only the Indic layouts allow the joiners to get mapped to glyphs
-    */
-    return LEFontInstance::mapCharToGlyph( ch, mapper, false );
-}
-
-// -----------------------------------------------------------------------
-
-le_int32 IcuFontFromServerFont::getAscent() const
-{
-    const FT_Size_Metrics& rMetrics = mrServerFont.GetMetricsFT();
-    le_int32 nAscent = (+rMetrics.ascender + 32) >> 6;
-    return nAscent;
-}
-
-// -----------------------------------------------------------------------
-
-le_int32 IcuFontFromServerFont::getDescent() const
-{
-    const FT_Size_Metrics& rMetrics = mrServerFont.GetMetricsFT();
-    le_int32 nDescent = (-rMetrics.descender + 32) >> 6;
-    return nDescent;
-}
-
-// -----------------------------------------------------------------------
-
-le_int32 IcuFontFromServerFont::getLeading() const
-{
-    const FT_Size_Metrics& rMetrics = mrServerFont.GetMetricsFT();
-    le_int32 nLeading = ((rMetrics.height - rMetrics.ascender + rMetrics.descender) + 32) >> 6;
-    return nLeading;
-}
-
-// -----------------------------------------------------------------------
-
-void IcuFontFromServerFont::getGlyphAdvance( LEGlyphID nGlyphIndex,
-    LEPoint &advance ) const
-{
-    if( (nGlyphIndex == ICU_MARKED_GLYPH)
-    ||  (nGlyphIndex == ICU_DELETED_GLYPH) )
-    {
-        // deleted glyph or mark glyph has not advance
-        advance.fX = 0;
-    }
-    else
-    {
-        const GlyphMetric& rGM = mrServerFont.GetGlyphMetric( nGlyphIndex );
-        advance.fX = rGM.GetCharWidth();
-    }
-
-    advance.fY = 0;
-}
-
-// -----------------------------------------------------------------------
-
-le_bool IcuFontFromServerFont::getGlyphPoint( LEGlyphID,
-    le_int32 pointNumber, LEPoint& ) const
-{
-    //TODO: replace dummy implementation
-    SAL_INFO("vcl", "getGlyphPoint(" << pointNumber << ")");
-    return false;
-}
-
-// =======================================================================
-
-class IcuLayoutEngine : public ServerFontLayoutEngine
-{
-private:
-    IcuFontFromServerFont   maIcuFont;
-
-    LanguageCodes           meLanguageCode;
-    le_int32                meScriptCode;
-    le_int32                mnLayoutFlags;
-    LayoutEngine*           mpIcuLE;
-
-public:
-                            IcuLayoutEngine( ServerFont& );
-    virtual                 ~IcuLayoutEngine();
-
-    virtual bool            layout( ServerFontLayout&, ImplLayoutArgs& );
-};
-
-// -----------------------------------------------------------------------
-
-IcuLayoutEngine::IcuLayoutEngine( ServerFont& rServerFont )
-:   maIcuFont( rServerFont ),
-    meLanguageCode( nullLanguageCode ),
-    meScriptCode( USCRIPT_INVALID_CODE ),
-    mnLayoutFlags( 0 ),
-    mpIcuLE( NULL )
-{}
-
-// -----------------------------------------------------------------------
-
-IcuLayoutEngine::~IcuLayoutEngine()
-{
-    delete mpIcuLE;
-}
-
-// -----------------------------------------------------------------------
-
-namespace
-{
-    LanguageCodes mapLanguageTypetoICU(LanguageType eLangCode)
-    {
-        LanguageTag aLangTag(eLangCode);
-        OUString sLanguage = aLangTag.getLanguage();
-
-        if (sLanguage == "af") // Afrikaans
-            return afkLanguageCode;
-        else if (sLanguage == "ar") // Arabic
-            return araLanguageCode;
-        else if (sLanguage == "as") // Assamese
-            return asmLanguageCode;
-        else if (sLanguage == "be") // Belarussian
-            return belLanguageCode;
-        else if (sLanguage == "bn") // Bengali
-            return benLanguageCode;
-        else if (sLanguage == "bo") // Tibetan
-            return tibLanguageCode;
-        else if (sLanguage == "bu") // Bulgarian
-            return bgrLanguageCode;
-        else if (sLanguage == "ca") // Catalan
-            return catLanguageCode;
-        else if (sLanguage == "cs") // Czech
-            return csyLanguageCode;
-        else if (sLanguage == "ch") // Chechen
-            return cheLanguageCode;
-        else if (sLanguage == "co") // Coptic
-            return copLanguageCode;
-        else if (sLanguage == "cy") // Welsh
-            return welLanguageCode;
-        else if (sLanguage == "da") // Danish
-            return danLanguageCode;
-        else if (sLanguage == "de") // German
-            return deuLanguageCode;
-        else if (sLanguage == "dz") // Dzongkha
-            return dznLanguageCode;
-        else if (sLanguage == "el") // Greek
-            return ellLanguageCode;
-        else if (sLanguage == "en") // English
-            return engLanguageCode;
-        else if (sLanguage == "et") // Estonian
-            return etiLanguageCode;
-        else if (sLanguage == "eu") // Basque
-            return euqLanguageCode;
-        else if (sLanguage == "fa") // Farsi
-            return farLanguageCode;
-        else if (sLanguage == "fi") // Finnish
-            return finLanguageCode;
-        else if (sLanguage == "fr") // French
-            return fraLanguageCode;
-        else if (sLanguage == "ga") // Irish Gaelic
-            return gaeLanguageCode;
-        else if (sLanguage == "gu") // Gujarati
-            return gujLanguageCode;
-        else if (sLanguage == "ha") // Hausa
-            return hauLanguageCode;
-        else if (sLanguage == "he") // Hebrew
-            return iwrLanguageCode;
-        else if (sLanguage == "hi") // Hindi
-            return hinLanguageCode;
-        else if (sLanguage == "hr") // Croatian
-            return hrvLanguageCode;
-        else if (sLanguage == "hu") // Hungarian
-            return hunLanguageCode;
-        else if (sLanguage == "hy") // Armenian
-            return hyeLanguageCode;
-        else if (sLanguage == "id") // Indonesian
-            return indLanguageCode;
-        else if (sLanguage == "it") // Italian
-            return itaLanguageCode;
-        else if (sLanguage == "ja") // Japanese
-            return janLanguageCode;
-        else if (sLanguage == "kn") // Kannada
-            return kanLanguageCode;
-        else if (sLanguage == "ks") // Kashmiri
-            return kshLanguageCode;
-        else if (sLanguage == "kh") // Khmer
-            return khmLanguageCode;
-        else if (sLanguage == "kok") // Konkani
-            return kokLanguageCode;
-        else if (sLanguage == "ko") // Korean
-            return korLanguageCode;
-        else if (sLanguage == "ml") // Malayalam - Reformed (should there be some bcp47 tag for Traditional Malayalam)
-            return mlrLanguageCode;
-        else if (sLanguage == "mr") // Marathi
-            return marLanguageCode;
-        else if (sLanguage == "mt") // Maltese
-            return mtsLanguageCode;
-        else if (sLanguage == "mni") // Manipuri
-            return mniLanguageCode;
-        else if (sLanguage == "mn") // Mongolian
-            return mngLanguageCode;
-        else if (sLanguage == "ne") // Nepali
-            return nepLanguageCode;
-        else if (sLanguage == "or") // Oriya
-            return oriLanguageCode;
-        else if (sLanguage == "pl") // Polish
-            return plkLanguageCode;
-        else if (sLanguage == "po") // Portuguese
-            return ptgLanguageCode;
-        else if (sLanguage == "ps") // Pashto
-            return pasLanguageCode;
-        else if (sLanguage == "ro") // Romanian
-            return romLanguageCode;
-        else if (sLanguage == "ru") // Russian
-            return rusLanguageCode;
-        else if (sLanguage == "sa") // Sanskrit
-            return sanLanguageCode;
-        else if (sLanguage == "si") // Sinhalese
-            return snhLanguageCode;
-        else if (sLanguage == "sk") // Slovak
-            return skyLanguageCode;
-        else if (sLanguage == "sd") // Sindhi
-            return sndLanguageCode;
-        else if (sLanguage == "sl") // Slovenian
-            return slvLanguageCode;
-        else if (sLanguage == "es") // Spanish
-            return espLanguageCode;
-        else if (sLanguage == "sq") // Albanian
-            return sqiLanguageCode;
-        else if (sLanguage == "sr") // Serbian
-            return srbLanguageCode;
-        else if (sLanguage == "sv") // Swedish
-            return sveLanguageCode;
-        else if (sLanguage == "syr") // Syriac
-            return syrLanguageCode;
-        else if (sLanguage == "ta") // Tamil
-            return tamLanguageCode;
-        else if (sLanguage == "te") // Telugu
-            return telLanguageCode;
-        else if (sLanguage == "th") // Thai
-            return thaLanguageCode;
-        else if (sLanguage == "tu") // Turkish
-            return trkLanguageCode;
-        else if (sLanguage == "ur") // Urdu
-            return urdLanguageCode;
-        else if (sLanguage == "yi") // Yiddish
-            return jiiLanguageCode;
-        else if (sLanguage == "zh") // Chinese
-        {
-            OUString sScript = aLangTag.getScript();
-            if (sScript.isEmpty())
-            {
-                if (MsLangId::isTraditionalChinese(eLangCode))
-                    sScript = "Hant";
-                else
-                    sScript = "Hans";
-            }
-            if (sScript == "Latn")
-                return zhpLanguageCode;
-            else if (sScript == "Hans")
-                return zhsLanguageCode;
-            else if (sScript == "Hant")
-                return zhtLanguageCode;
-        }
-
-        //if there are new ones, please reexamine the mapping list for the new ones
-        BOOST_STATIC_ASSERT(languageCodeCount == 72);
-        return nullLanguageCode;
-    }
-}
-
-//See https://bugs.freedesktop.org/show_bug.cgi?id=31016
-#define ARABIC_BANDAID
-
-bool IcuLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
-{
-    le_int32 nLayoutFlags = 0;
-#if (U_ICU_VERSION_MAJOR_NUM > 4)
-    if (rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS)
-        nLayoutFlags |= LayoutEngine::kTypoFlagKern;
-    if (rArgs.mnFlags & SAL_LAYOUT_ENABLE_LIGATURES)
-        nLayoutFlags |= LayoutEngine::kTypoFlagLiga;
-#else
-    if (rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS)
-        nLayoutFlags |= 0x01;
-    if (rArgs.mnFlags & SAL_LAYOUT_ENABLE_LIGATURES)
-        nLayoutFlags |= 0x10;
-#endif
-
-    LEUnicode* pIcuChars;
-    if( sizeof(LEUnicode) == sizeof(*rArgs.mpStr) )
-        pIcuChars = (LEUnicode*)rArgs.mpStr;
-    else
-    {
-        // this conversion will only be needed when either
-        // ICU's or OOo's unicodes stop being unsigned shorts
-        // TODO: watch out for surrogates!
-        pIcuChars = (LEUnicode*)alloca( rArgs.mnLength * sizeof(LEUnicode) );
-        for( xub_StrLen ic = 0; ic < rArgs.mnLength; ++ic )
-            pIcuChars[ic] = static_cast<LEUnicode>( rArgs.mpStr[ic] );
-    }
-
-    // allocate temporary arrays, note: round to even
-    int nGlyphCapacity = (3 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos ) | 15) + 1;
-
-    rLayout.Reserve(nGlyphCapacity);
-
-    struct IcuPosition{ float fX, fY; };
-    const int nAllocSize = sizeof(LEGlyphID) + sizeof(le_int32) + sizeof(IcuPosition);
-    LEGlyphID* pIcuGlyphs = (LEGlyphID*)alloca( (nGlyphCapacity * nAllocSize) + sizeof(IcuPosition) );
-    le_int32* pCharIndices = (le_int32*)((char*)pIcuGlyphs + nGlyphCapacity * sizeof(LEGlyphID) );
-    IcuPosition* pGlyphPositions = (IcuPosition*)((char*)pCharIndices + nGlyphCapacity * sizeof(le_int32) );
-
-    ServerFont& rFont = rLayout.GetServerFont();
-
-    UErrorCode rcI18n = U_ZERO_ERROR;
-    LEErrorCode rcIcu = LE_NO_ERROR;
-    Point aNewPos( 0, 0 );
-    for( int nGlyphCount = 0;; )
-    {
-        int nMinRunPos, nEndRunPos;
-        bool bRightToLeft;
-        if( !rArgs.GetNextRun( &nMinRunPos, &nEndRunPos, &bRightToLeft ) )
-            break;
-
-        // find matching script
-        // TODO: split up bidi run into script runs
-        le_int32 eScriptCode = -1;
-        for( int i = nMinRunPos; i < nEndRunPos; ++i )
-        {
-            le_int32 eNextScriptCode = uscript_getScript( pIcuChars[i], &rcI18n );
-            if( (eNextScriptCode > USCRIPT_INHERITED) )
-            {
-                eScriptCode = eNextScriptCode;
-                if (eNextScriptCode != latnScriptCode)
-                    break;
-            }
-        }
-        if( eScriptCode < 0 )   // TODO: handle errors better
-            eScriptCode = latnScriptCode;
-
-        LanguageCodes eLanguageCode = mapLanguageTypetoICU(rArgs.meLanguage);
-
-        // get layout engine matching to this script and ligature/kerning combination
-        // no engine change necessary if script is latin
-        if ( !mpIcuLE ||
-             ((eScriptCode != meScriptCode) && (eScriptCode > USCRIPT_INHERITED)) ||
-             (mnLayoutFlags != nLayoutFlags) || (meLanguageCode != eLanguageCode) )
-        {
-            // TODO: cache multiple layout engines when multiple scripts are used
-            delete mpIcuLE;
-            meLanguageCode = eLanguageCode;
-            meScriptCode = eScriptCode;
-            mnLayoutFlags = nLayoutFlags;
-            mpIcuLE = LayoutEngine::layoutEngineFactory( &maIcuFont, eScriptCode, eLanguageCode, nLayoutFlags, rcIcu );
-            if( LE_FAILURE(rcIcu) )
-            {
-                delete mpIcuLE;
-                mpIcuLE = NULL;
-            }
-        }
-
-        // fall back to default layout if needed
-        if( !mpIcuLE )
-            break;
-
-        // run ICU layout engine
-        // TODO: get enough context, remove extra glyps below
-        int nRawRunGlyphCount = mpIcuLE->layoutChars( pIcuChars,
-            nMinRunPos, nEndRunPos - nMinRunPos, rArgs.mnLength,
-            bRightToLeft, aNewPos.X(), aNewPos.Y(), rcIcu );
-        if( LE_FAILURE(rcIcu) )
-            return false;
-
-        // import layout info from icu
-        mpIcuLE->getGlyphs( pIcuGlyphs, rcIcu );
-        mpIcuLE->getCharIndices( pCharIndices, rcIcu );
-        mpIcuLE->getGlyphPositions( &pGlyphPositions->fX, rcIcu );
-        if( LE_FAILURE(rcIcu) )
-            return false;
-
-        // layout bidi/script runs and export them to a ServerFontLayout
-        // convert results to GlyphItems
-        int nLastCharPos = -1;
-        int nClusterMinPos = -1;
-        int nClusterMaxPos = -1;
-        bool bClusterStart = true;
-        int nFilteredRunGlyphCount = 0;
-        const IcuPosition* pPos = pGlyphPositions;
-        for( int i = 0; i < nRawRunGlyphCount; ++i, ++pPos )
-        {
-            LEGlyphID nGlyphIndex = pIcuGlyphs[i];
-            // ignore glyphs which were marked or deleted by ICU
-            if( (nGlyphIndex == ICU_MARKED_GLYPH)
-            ||  (nGlyphIndex == ICU_DELETED_GLYPH) )
-                continue;
-
-            // adjust the relative char pos
-            int nCharPos = pCharIndices[i];
-            if( nCharPos >= 0 ) {
-                nCharPos += nMinRunPos;
-                // ICU seems to return bad pCharIndices
-                // for some combinations of ICU+font+text
-                // => better give up now than crash later
-                if( nCharPos >= nEndRunPos )
-                    continue;
-            }
-
-            // if needed request glyph fallback by updating LayoutArgs
-            if( !nGlyphIndex )
-            {
-                rLayout.setNeedFallback(rArgs, nCharPos, bRightToLeft);
-                if( SAL_LAYOUT_FOR_FALLBACK & rArgs.mnFlags )
-                    continue;
-            }
-
-
-            // apply vertical flags, etc.
-            bool bDiacritic = false;
-            if( nCharPos >= 0 )
-            {
-                sal_UCS4 aChar = rArgs.mpStr[ nCharPos ];
-                nGlyphIndex = rFont.FixupGlyphIndex( nGlyphIndex, aChar );
-
-                // i#99367# HACK: try to detect all diacritics
-                if( aChar>=0x0300 && aChar<0x2100 )
-                    bDiacritic = IsDiacritic( aChar );
-            }
-
-            // get glyph position and its metrics
-            aNewPos = Point( (int)(pPos->fX+0.5), (int)(pPos->fY+0.5) );
-            const GlyphMetric& rGM = rFont.GetGlyphMetric( nGlyphIndex );
-            int nGlyphWidth = rGM.GetCharWidth();
-            int nNewWidth = nGlyphWidth;
-            if( nGlyphWidth <= 0 )
-                bDiacritic |= true;
-            // i#99367# force all diacritics to zero width
-            // TODO: we need mnOrigWidth/mnLogicWidth/mnNewWidth
-            else if( bDiacritic )
-                nGlyphWidth = nNewWidth = 0;
-            else
-            {
-                // Hack, find next +ve width glyph and calculate current
-                // glyph width by substracting the two posituons
-                const IcuPosition* pNextPos = pPos+1;
-                for ( int j = i + 1; j <= nRawRunGlyphCount; ++j, ++pNextPos )
-                {
-                    if ( j == nRawRunGlyphCount )
-                    {
-                        nNewWidth = static_cast<int>(pNextPos->fX - pPos->fX);
-                        break;
-                    }
-
-                    LEGlyphID nNextGlyphIndex = pIcuGlyphs[j];
-                    if( (nNextGlyphIndex == ICU_MARKED_GLYPH)
-                    ||  (nNextGlyphIndex == ICU_DELETED_GLYPH) )
-                        continue;
-
-                    const GlyphMetric& rNextGM = rFont.GetGlyphMetric( nNextGlyphIndex );
-                    int nNextGlyphWidth = rNextGM.GetCharWidth();
-                    if ( nNextGlyphWidth > 0 )
-                    {
-                        nNewWidth = static_cast<int>(pNextPos->fX - pPos->fX);
-                        break;
-                    }
-                }
-            }
-
-            // heuristic to detect glyph clusters
-            bool bInCluster = true;
-            if( nLastCharPos == -1 )
-            {
-                nClusterMinPos = nClusterMaxPos = nCharPos;
-                bInCluster = false;
-            }
-            else if( !bRightToLeft )
-            {
-                // left-to-right case
-                if( nClusterMinPos > nCharPos )
-                    nClusterMinPos = nCharPos;      // extend cluster
-                else if( nCharPos <= nClusterMaxPos )
-                    /*NOTHING*/;                    // inside cluster
-                else if( bDiacritic )
-                    nClusterMaxPos = nCharPos;      // add diacritic to cluster
-                else {
-                    nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
-                    bInCluster = false;
-                }
-            }
-            else
-            {
-                // right-to-left case
-                if( nClusterMaxPos < nCharPos )
-                    nClusterMaxPos = nCharPos;      // extend cluster
-                else if( nCharPos >= nClusterMinPos )
-                    /*NOTHING*/;                    // inside cluster
-                else if( bDiacritic )
-                {
-                    nClusterMinPos = nCharPos;      // ICU often has [diacritic* baseglyph*]
-                    if( bClusterStart ) {
-                        nClusterMaxPos = nCharPos;
-                        bInCluster = false;
-                    }
-                }
-                else
-                {
-                    nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
-                    bInCluster = !bClusterStart;
-                }
-            }
-
-            long nGlyphFlags = 0;
-            if( bInCluster )
-                nGlyphFlags |= GlyphItem::IS_IN_CLUSTER;
-            if( bRightToLeft )
-                nGlyphFlags |= GlyphItem::IS_RTL_GLYPH;
-            if( bDiacritic )
-                nGlyphFlags |= GlyphItem::IS_DIACRITIC;
-
-            // add resulting glyph item to layout
-            GlyphItem aGI( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth );
-#ifdef ARABIC_BANDAID
-            aGI.mnNewWidth = nNewWidth;
-#endif
-
-            rLayout.AppendGlyph( aGI );
-            ++nFilteredRunGlyphCount;
-            nLastCharPos = nCharPos;
-            bClusterStart = !aGI.IsDiacritic(); // TODO: only needed in RTL-codepath
-        }
-        aNewPos = Point( (int)(pPos->fX+0.5), (int)(pPos->fY+0.5) );
-        nGlyphCount += nFilteredRunGlyphCount;
-    }
-
-    // sort glyphs in visual order
-    // and then in logical order (e.g. diacritics after cluster start)
-    rLayout.SortGlyphItems();
-
-    // determine need for kashida justification
-    if( (rArgs.mpDXArray || rArgs.mnLayoutWidth)
-    &&  ((meScriptCode == arabScriptCode) || (meScriptCode == syrcScriptCode)) )
-        rArgs.mnFlags |= SAL_LAYOUT_KASHIDA_JUSTIFICATON;
-
-    return true;
-}
-
-// =======================================================================
 
-ServerFontLayoutEngine* ServerFont::GetLayoutEngine(bool bUseHarfBuzz)
+ServerFontLayoutEngine* ServerFont::GetLayoutEngine()
 {
     // find best layout engine for font, platform, script and language
     if (!mpLayoutEngine) {
-        if (bUseHarfBuzz)
-            mpLayoutEngine = new HbLayoutEngine(*this);
-        else
-            mpLayoutEngine = new IcuLayoutEngine(*this);
+        mpLayoutEngine = new HbLayoutEngine(*this);
     }
     return mpLayoutEngine;
 }
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index d6cdee1..1457dd5 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -241,7 +241,7 @@ private:
     int                 ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_*, bool ) const;
     bool                ApplyGSUB( const FontSelectPattern& );
 
-    ServerFontLayoutEngine* GetLayoutEngine( bool );
+    ServerFontLayoutEngine* GetLayoutEngine();
 
     typedef ::boost::unordered_map<int,GlyphData> GlyphList;
     mutable GlyphList           maGlyphList;


More information about the Libreoffice-commits mailing list