[Libreoffice-commits] .: 5 commits - cppuhelper/source i18npool/CustomTarget_breakiterator.mk i18npool/CustomTarget_collator.mk i18npool/inc i18npool/Library_i18npool.mk i18npool/source ios/qa sc/source vcl/source

Tor Lillqvist tml at kemper.freedesktop.org
Tue Apr 17 15:25:46 PDT 2012


 cppuhelper/source/shlib.cxx                             |    6 
 i18npool/CustomTarget_breakiterator.mk                  |    4 
 i18npool/CustomTarget_collator.mk                       |    4 
 i18npool/Library_i18npool.mk                            |   11 +
 i18npool/inc/indexentrysupplier_asian.hxx               |    2 
 i18npool/inc/textToPronounce_zh.hxx                     |    6 
 i18npool/inc/xdictionary.hxx                            |    2 
 i18npool/source/breakiterator/gendict.cxx               |   26 ++-
 i18npool/source/breakiterator/xdictionary.cxx           |   52 ++++++
 i18npool/source/collator/collator_unicode.cxx           |  111 +++++++++++++-
 i18npool/source/collator/gencoll_rule.cxx               |    7 
 i18npool/source/indexentry/indexentrysupplier_asian.cxx |  123 +++++++++++-----
 i18npool/source/localedata/localedata.cxx               |   57 +++++++
 i18npool/source/textconversion/textconversion.cxx       |   12 +
 i18npool/source/textconversion/textconversion_ko.cxx    |   16 ++
 i18npool/source/textconversion/textconversion_zh.cxx    |   55 +++++++
 i18npool/source/transliteration/textToPronounce_zh.cxx  |   39 ++++-
 ios/qa/sc/Makefile                                      |    4 
 sc/source/ui/docshell/impex.cxx                         |   15 +
 vcl/source/app/svapp.cxx                                |   12 +
 20 files changed, 503 insertions(+), 61 deletions(-)

New commits:
commit 66974653c0635e9e13a277e22da33e7f2062e674
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 18 01:22:00 2012 +0300

    More libs

diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index bc9d5f5..a554da8 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -39,7 +39,7 @@ SRCS = filters-test.m
 
 CFLAGS = $(SOLARINC)
 
-LIBS = -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a $(foreach LIB, bin/cppunit/cppunittester lib/bootstrap.uno lib/configmgr.uno lib/expwrap.uno lib/i18npool.uno lib/introspection.uno lib/reflection.uno lib/stocservices.uno lib/unobootstrapprotector lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lanalysislo -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldatelo -ldrawinglayerlo -leditenglo -lexpat_xmlparse -lexpat_xmltok -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -ljpeg -ljvmfwk -llnglo -lmsfilterlo -looxlo -lpackage2 -lreg -lsal_textenc -lsalcpprt -lsaxlo -lscfiltlo -lsclo -lsfxlo -lsotlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -lunoxmllo -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -l
 xolo -lxstor -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
+LIBS = -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a $(foreach LIB, bin/cppunit/cppunittester lib/bootstrap.uno lib/configmgr.uno lib/expwrap.uno lib/fastsax.uno lib/i18npool.uno lib/introspection.uno lib/reflection.uno lib/stocservices.uno lib/unobootstrapprotector lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lanalysislo -lavmedialo -lbasegfxlo -lcanvastoolslo -lcollator_data -lcomphelpgcc3 -lcppcanvaslo -lcppunit -lcrypto -ldatelo -ldict_ja -ldict_zh -ldrawinglayerlo -leditenglo -lexpat_xmlparse -lexpat_xmltok -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -lindex_data -ljpeg -ljvmfwk -llnglo -llocaledata_en -llocaledata_es -llocaledata_euro -llocaledata_others -lmsfilterlo -looxlo -lpackage2 -lreg -lsal_textenc -lsalcpprt -lsaxlo -lscfiltlo -lsclo -lsfxlo -lsotlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -ltest -ltextconv_dict -ltklo -l
 tllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -lunoxmllo -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxcrlo -lxml2 -lxmlreader -lxolo -lxstor -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
 
 all: $(APPDIR)/$(APP) stuff
 
@@ -87,7 +87,7 @@ stuff:
 	done
 #
 # Test documents for filters_test
-	(cd $(SRC_ROOT) && tar cf - sc/qa/unit/data) | (cd $(APPDIR) && tar xvf -)
+	(cd $(SRC_ROOT) && tar cf - sc/qa/unit/data) | (cd $(APPDIR) && tar xf -)
 
 
 clean:
commit f06e6513a805d810d3ef8fc9ccf90d1b7cf48c3d
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 18 01:21:31 2012 +0300

    Use static linking when DISABLE_DYNLOADING (iOS)

diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk
index 4ba03d5..54f5a4b 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -37,9 +37,7 @@ $(IPBI)/dict_%.cxx : $(SRCDIR)/i18npool/source/breakiterator/data/%.dic \
 		$(call gb_Executable_get_target_for_build,gendict) | $(IPBI)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),DIC,1)
 	$(call gb_Helper_abbreviate_dirs_native,\
-		$(call gb_Helper_execute,gendict) $< $@.tmp && \
-		sed 's/\tconst/\tSAL_DLLPUBLIC_EXPORT const/' $@.tmp > $@  && \
-		rm $@.tmp)
+		$(call gb_Helper_execute,gendict) $< $@ $(patsubst $(IPBI)/dict_%.cxx,%,$@))
 
 ifeq ($(SYSTEM_GENBRK),)
 GENBRKTARGET := $(call gb_Executable_get_target_for_build,genbrk)
diff --git a/i18npool/CustomTarget_collator.mk b/i18npool/CustomTarget_collator.mk
index 9be28e0..951a2ca 100644
--- a/i18npool/CustomTarget_collator.mk
+++ b/i18npool/CustomTarget_collator.mk
@@ -39,9 +39,7 @@ $(IPCO)/collator_%.cxx : $(SRCDIR)/i18npool/source/collator/data/%.txt \
 		$(call gb_Executable_get_target_for_build,gencoll_rule) | $(IPCO)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CLR,1)
 	$(call gb_Helper_abbreviate_dirs_native, \
-		$(call gb_Helper_execute,gencoll_rule) $< $@.tmp $* && \
-		sed 's/\(^.*get_\)/SAL_DLLPUBLIC_EXPORT \1/' $@.tmp > $@ && \
-		rm $@.tmp)
+		$(call gb_Helper_execute,gencoll_rule) $< $@ $*)
 
 $(IPCO)/lrl_include.hxx : $(SRCDIR)/i18npool/source/collator/data | $(IPCO)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index 96ac0c8..c2738de 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -136,6 +136,17 @@ $(eval $(call gb_Library_add_exception_objects,i18npool,\
 	i18npool/source/transliteration/transliteration_OneToOne \
 ))
 
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata): $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx
+
+$(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx : $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl
+	$(PERL) $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl $(patsubst $(SRCDIR)/i18npool/source/localedata/data/%.xml,%,$(shell echo $(SRCDIR)/i18npool/source/localedata/data/*.xml)) >$@
+
+$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata) : \
+	INCLUDE += -I$(call gb_CustomTarget_get_workdir,i18npool/localedata)
+
+endif
+
 # collator_unicode.cxx includes generated lrl_include.hxx
 $(call gb_CxxObject_get_target,i18npool/source/collator/collator_unicode) : \
 	INCLUDE += -I$(call gb_CustomTarget_get_workdir,i18npool/collator)
diff --git a/i18npool/inc/indexentrysupplier_asian.hxx b/i18npool/inc/indexentrysupplier_asian.hxx
index db6e174..642d1c9 100644
--- a/i18npool/inc/indexentrysupplier_asian.hxx
+++ b/i18npool/inc/indexentrysupplier_asian.hxx
@@ -58,8 +58,10 @@ public:
     rtl::OUString SAL_CALL getPhoneticCandidate( const rtl::OUString& rIndexEntry,
             const com::sun::star::lang::Locale& rLocale )
             throw (com::sun::star::uno::RuntimeException);
+#ifndef DISABLE_DYNLOADING
 private:
     oslModule hModule;
+#endif
 };
 
 } } } }
diff --git a/i18npool/inc/textToPronounce_zh.hxx b/i18npool/inc/textToPronounce_zh.hxx
index 9543b26..45c5c3c 100644
--- a/i18npool/inc/textToPronounce_zh.hxx
+++ b/i18npool/inc/textToPronounce_zh.hxx
@@ -36,12 +36,18 @@ namespace com { namespace sun { namespace star { namespace i18n {
 class TextToPronounce_zh : public transliteration_Ignore
 {
 protected:
+#ifndef DISABLE_DYNLOADING
         oslModule hModule;
+#endif
         sal_uInt16 **idx;
         const sal_Unicode* SAL_CALL getPronounce(const sal_Unicode ch);
 
 public:
+#ifndef DISABLE_DYNLOADING
         TextToPronounce_zh(const sal_Char* func_name);
+#else
+        TextToPronounce_zh(sal_uInt16 ** (*function)());
+#endif
         ~TextToPronounce_zh();
 
         rtl::OUString SAL_CALL
diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index 8ac9314..d7b187d 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -57,7 +57,9 @@ private:
     const sal_Int32 * index2;
     const sal_Int32 * lenArray;
     const sal_Unicode* dataArea;
+#ifndef DISABLE_DYNLOADING
     oslModule hModule;
+#endif
     Boundary boundary;
     sal_Bool japaneseWordBreak;
 
diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx
index ce9137d..960dae6 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -73,13 +73,21 @@ static inline void printIncludes(FILE* source_fp)
     fputs("#include <sal/types.h>\n\n", source_fp);
 }
 
-static inline void printFunctions(FILE* source_fp)
+static inline void printFunctions(FILE* source_fp, const char *lang)
 {
-    fputs ("\tconst sal_uInt8* getExistMark() { return existMark; }\n", source_fp);
-    fputs ("\tconst sal_Int16* getIndex1() { return index1; }\n", source_fp);
-    fputs ("\tconst sal_Int32* getIndex2() { return index2; }\n", source_fp);
-    fputs ("\tconst sal_Int32* getLenArray() { return lenArray; }\n", source_fp);
-    fputs ("\tconst sal_Unicode* getDataArea() { return dataArea; }\n", source_fp);
+    fputs ("#ifndef DISABLE_DYNLOADING\n", source_fp);
+    fputs ("SAL_DLLPUBLIC_EXPORT const sal_uInt8* getExistMark() { return existMark; }\n", source_fp);
+    fputs ("SAL_DLLPUBLIC_EXPORT const sal_Int16* getIndex1() { return index1; }\n", source_fp);
+    fputs ("SAL_DLLPUBLIC_EXPORT const sal_Int32* getIndex2() { return index2; }\n", source_fp);
+    fputs ("SAL_DLLPUBLIC_EXPORT const sal_Int32* getLenArray() { return lenArray; }\n", source_fp);
+    fputs ("SAL_DLLPUBLIC_EXPORT const sal_Unicode* getDataArea() { return dataArea; }\n", source_fp);
+    fputs ("#else\n", source_fp);
+    fprintf (source_fp, "SAL_DLLPUBLIC_EXPORT const sal_uInt8* getExistMark_%s() { return existMark; }\n", lang);
+    fprintf (source_fp, "SAL_DLLPUBLIC_EXPORT const sal_Int16* getIndex1_%s() { return index1; }\n", lang);
+    fprintf (source_fp, "SAL_DLLPUBLIC_EXPORT const sal_Int32* getIndex2_%s() { return index2; }\n", lang);
+    fprintf (source_fp, "SAL_DLLPUBLIC_EXPORT const sal_Int32* getLenArray_%s() { return lenArray; }\n", lang);
+    fprintf (source_fp, "SAL_DLLPUBLIC_EXPORT const sal_Unicode* getDataArea_%s() { return dataArea; }\n", lang);
+    fputs ("#endif\n", source_fp);
 }
 
 static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray)
@@ -199,9 +207,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
     FILE *dictionary_fp, *source_fp;
 
-    if (argc == 1 || argc > 3)
+    if (argc == 1 || argc > 4)
     {
-        fputs("2 arguments required: dictionary_file_name source_file_name", stderr);
+        fputs("3 arguments required: dictionary_file_name source_file_name language_code", stderr);
         exit(-1);
     }
 
@@ -235,7 +243,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         printIndex1(source_fp, set);
         printIndex2(source_fp, set);
         printExistsMask(source_fp);
-        printFunctions(source_fp);
+        printFunctions(source_fp, argv[3]);
     fputs("}\n", source_fp);
 
     fclose(dictionary_fp);
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 955cff4..540bce8 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -49,19 +49,44 @@ using ::rtl::OUStringBuffer;
 
 namespace com { namespace sun { namespace star { namespace i18n {
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#else
+
+extern "C" {
+
+sal_uInt8* getExistMark_ja();
+sal_Int16* getIndex1_ja();
+sal_Int32* getIndex2_ja();
+sal_Int32* getLenArray_ja();
+sal_Unicode* getDataArea_ja();
+
+sal_uInt8* getExistMark_zh();
+sal_Int16* getIndex1_zh();
+sal_Int32* getIndex2_zh();
+sal_Int32* getLenArray_zh();
+sal_Unicode* getDataArea_zh();
+
+}
+
+#endif
+
 xdictionary::xdictionary(const sal_Char *lang) :
     existMark( NULL ),
     index1( NULL ),
     index2( NULL ),
     lenArray( NULL ),
     dataArea( NULL ),
+#ifndef DISABLE_DYNLOADING
     hModule( NULL ),
+#endif
     boundary(),
     japaneseWordBreak( sal_False )
 {
     index1 = 0;
+#ifndef DISABLE_DYNLOADING
 #ifdef SAL_DLLPREFIX
     OUStringBuffer aBuf( strlen(lang) + 7 + 6 );    // mostly "lib*.so" (with * == dict_zh)
     aBuf.appendAscii( SAL_DLLPREFIX );
@@ -92,6 +117,31 @@ xdictionary::xdictionary(const sal_Char *lang) :
             dataArea = NULL;
         }
 
+#else
+        if( strcmp( lang, "ja" ) == 0 ) {
+            existMark = getExistMark_ja();
+            index1 = getIndex1_ja();
+            index2 = getIndex2_ja();
+            lenArray = getLenArray_ja();
+            dataArea = getDataArea_ja();
+        }
+        else if( strcmp( lang, "zh" ) == 0 ) {
+            existMark = getExistMark_zh();
+            index1 = getIndex1_zh();
+            index2 = getIndex2_zh();
+            lenArray = getLenArray_zh();
+            dataArea = getDataArea_zh();
+        }
+        else
+        {
+            existMark = NULL;
+            index1 = NULL;
+            index2 = NULL;
+            lenArray = NULL;
+            dataArea = NULL;
+        }
+#endif
+
         for (sal_Int32 i = 0; i < CACHE_MAX; i++)
             cache[i].size = 0;
 
@@ -99,7 +149,9 @@ xdictionary::xdictionary(const sal_Char *lang) :
 }
 
 xdictionary::~xdictionary() {
+#ifndef DISABLE_DYNLOADING
         osl_unloadModule(hModule);
+#endif
         for (sal_Int32 i = 0; i < CACHE_MAX; i++) {
             if (cache[i].size > 0) {
                 delete [] cache[i].contents;
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index f574cdf..7cbb598 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -47,16 +47,53 @@ Collator_Unicode::Collator_Unicode()
     implementationName = "com.sun.star.i18n.Collator_Unicode";
     collator = NULL;
     uca_base = NULL;
+#ifndef DISABLE_DYNLOADING
     hModule = NULL;
+#endif
 }
 
 Collator_Unicode::~Collator_Unicode()
 {
     if (collator) delete collator;
     if (uca_base) delete uca_base;
+#ifndef DISABLE_DYNLOADING
     if (hModule) osl_unloadModule(hModule);
+#endif
 }
 
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+
+// For DISABLE_DYNLOADING the generated functions have names that
+// start with get_collator_data_ to avoid clashing with a few
+// functions in the generated libindex_data that are called just
+// get_zh_pinyin for instance.
+
+const sal_uInt8* get_collator_data_ca_charset();
+const sal_uInt8* get_collator_data_dz_charset();
+const sal_uInt8* get_collator_data_hu_charset();
+const sal_uInt8* get_collator_data_ja_charset();
+const sal_uInt8* get_collator_data_ja_phonetic_alphanumeric_first();
+const sal_uInt8* get_collator_data_ja_phonetic_alphanumeric_last();
+const sal_uInt8* get_collator_data_ko_charset();
+const sal_uInt8* get_collator_data_ku_alphanumeric();
+const sal_uInt8* get_collator_data_ln_charset();
+const sal_uInt8* get_collator_data_my_dictionary();
+const sal_uInt8* get_collator_data_ne_charset();
+const sal_uInt8* get_collator_data_zh_TW_charset();
+const sal_uInt8* get_collator_data_zh_TW_radical();
+const sal_uInt8* get_collator_data_zh_TW_stroke();
+const sal_uInt8* get_collator_data_zh_charset();
+const sal_uInt8* get_collator_data_zh_pinyin();
+const sal_uInt8* get_collator_data_zh_radical();
+const sal_uInt8* get_collator_data_zh_stroke();
+const sal_uInt8* get_collator_data_zh_zhuyin();
+
+}
+
+#endif
+
 sal_Int32 SAL_CALL
 Collator_Unicode::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1,
     const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException)
@@ -70,8 +107,12 @@ Collator_Unicode::compareString( const OUString& str1, const OUString& str2) thr
     return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr()));   // UChar != sal_Unicode in MinGW
 }
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 sal_Int32 SAL_CALL
 Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::Locale& rLocale, sal_Int32 options)
     throw(RuntimeException)
@@ -84,6 +125,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
             if (! U_SUCCESS(status)) throw RuntimeException();
         }
         if (!collator && OUString::createFromAscii(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
+            const sal_uInt8* (*func)() = NULL;
+
+#ifndef DISABLE_DYNLOADING
             OUStringBuffer aBuf;
 #ifdef SAL_DLLPREFIX
             aBuf.appendAscii(SAL_DLLPREFIX);
@@ -91,7 +135,6 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
             aBuf.appendAscii( "collator_data" ).appendAscii( SAL_DLLEXTENSION );
             hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT );
             if (hModule) {
-                const sal_uInt8* (*func)() = NULL;
                 aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_");
                 if ( rLocale.Language == "zh" ) {
                     OUString func_base = aBuf.makeStringAndClear();
@@ -114,13 +157,65 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
                     }
                     func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, aBuf.makeStringAndClear().pData);
                 }
-                if (func) {
-                    const sal_uInt8* ruleImage=func();
-                    uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
-                    if (! U_SUCCESS(status)) throw RuntimeException();
-                    collator = new RuleBasedCollator(reinterpret_cast<const uint8_t*>(ruleImage), -1, uca_base, status);
-                    if (! U_SUCCESS(status)) throw RuntimeException();
-                }
+            }
+#else
+            if ( rLocale.Language == "ca" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_ca_charset;
+            } else if ( rLocale.Language == "dz" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_dz_charset;
+            } else if ( rLocale.Language == "hu" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_hu_charset;
+            } else if ( rLocale.Language == "ja" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_hu_charset;
+                else if ( rAlgorithm == "phonetic (alphanumeric first)" )
+                    func = get_collator_data_ja_phonetic_alphanumeric_first;
+                else if ( rAlgorithm == "phonetic (alphanumeric last)" )
+                    func = get_collator_data_ja_phonetic_alphanumeric_last;
+            } else if ( rLocale.Language == "ko" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_ko_charset;
+            } else if ( rLocale.Language == "ku" ) {
+                if ( rAlgorithm == "alphanumeric" )
+                    func = get_collator_data_ku_alphanumeric;
+            } else if ( rLocale.Language == "ln" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_ln_charset;
+            } else if ( rLocale.Language == "my" ) {
+                if ( rAlgorithm == "dictionary" )
+                    func = get_collator_data_my_dictionary;
+            } else if ( rLocale.Language == "ne" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_ne_charset;
+            } else if ( rLocale.Language == "zh" && (rLocale.Country == "TW" || rLocale.Country == "HK" || rLocale.Country == "MO") ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_zh_TW_charset;
+                else if ( rAlgorithm == "radical" )
+                    func = get_collator_data_zh_TW_radical;
+                else if ( rAlgorithm == "stroke" )
+                    func = get_collator_data_zh_TW_stroke;
+            } else if ( rLocale.Language == "zh" ) {
+                if ( rAlgorithm == "charset" )
+                    func = get_collator_data_zh_charset;
+                else if ( rAlgorithm == "pinyin" )
+                    func = get_collator_data_zh_pinyin;
+                else if ( rAlgorithm == "radical" )
+                    func = get_collator_data_zh_radical;
+                else if ( rAlgorithm == "stroke" )
+                    func = get_collator_data_zh_stroke;
+                else if ( rAlgorithm == "zhuyin" )
+                    func = get_collator_data_zh_zhuyin;
+            }
+#endif
+            if (func) {
+                const sal_uInt8* ruleImage=func();
+                uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
+                if (! U_SUCCESS(status)) throw RuntimeException();
+                collator = new RuleBasedCollator(reinterpret_cast<const uint8_t*>(ruleImage), -1, uca_base, status);
+                if (! U_SUCCESS(status)) throw RuntimeException();
             }
         }
         if (!collator) {
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 61911f7..921eade 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -72,7 +72,12 @@ void data_write(char* file, char* name, sal_uInt8 *data, sal_Int32 len)
     }
     fprintf(fp, "\n};\n\n");
 
-    fprintf(fp, "const sal_uInt8* get_%s() { return %s; }\n\n", name, name);
+    fprintf(fp, "#ifndef DISABLE_DYNLOADING\n");
+    fprintf(fp, "SAL_DLLPUBLIC_EXPORT const sal_uInt8* get_%s() { return %s; }\n", name, name);
+    fprintf(fp, "#else\n");
+    fprintf(fp, "SAL_DLLPUBLIC_EXPORT const sal_uInt8* get_collator_data_%s() { return %s; }\n", name, name);
+    fprintf(fp, "#endif\n");
+    fprintf(fp, "\n");
     fprintf (fp, "}\n");
 
     fclose(fp);
diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
index ae8c32b..f661fbb 100644
--- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
@@ -37,12 +37,17 @@ using namespace ::rtl;
 
 namespace com { namespace sun { namespace star { namespace i18n {
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 IndexEntrySupplier_asian::IndexEntrySupplier_asian(
     const Reference < XMultiServiceFactory >& rxMSF ) : IndexEntrySupplier_Common(rxMSF)
 {
     implementationName = "com.sun.star.i18n.IndexEntrySupplier_asian";
+#ifndef DISABLE_DYNLOADING
 #ifdef SAL_DLLPREFIX
     OUString lib(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX"index_data" SAL_DLLEXTENSION));
 #else
@@ -50,38 +55,86 @@ IndexEntrySupplier_asian::IndexEntrySupplier_asian(
 #endif
     hModule = osl_loadModuleRelative(
         &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT );
+#endif
 }
 
 IndexEntrySupplier_asian::~IndexEntrySupplier_asian()
 {
+#ifndef DISABLE_DYNLOADING
     if (hModule) osl_unloadModule(hModule);
+#endif
 }
 
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+
+sal_uInt16** get_indexdata_ko_dict(sal_Int16*);
+sal_uInt16** get_indexdata_zh_TW_radical(sal_Int16*);
+sal_uInt16** get_indexdata_zh_TW_stroke(sal_Int16*);
+sal_uInt16** get_indexdata_zh_pinyin(sal_Int16*);
+sal_uInt16** get_indexdata_zh_radical(sal_Int16*);
+sal_uInt16** get_indexdata_zh_stroke(sal_Int16*);
+sal_uInt16** get_indexdata_zh_zhuyin(sal_Int16*);
+
+sal_uInt16** get_ko_phonetic(sal_Int16*);
+sal_uInt16** get_zh_pinyin(sal_Int16*);
+sal_uInt16** get_zh_zhuyin(sal_Int16*);
+
+}
+
+#endif
+
 OUString SAL_CALL
 IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry,
     const Locale& rLocale, const OUString& rAlgorithm ) throw (RuntimeException)
 {
     sal_Int32 i=0;
     sal_uInt32 ch = rIndexEntry.iterateCodePoints(&i, 0);
+
+    sal_uInt16** (*func)(sal_Int16*)=NULL;
+#ifndef DISABLE_DYNLOADING
     if (hModule) {
         OUString get(RTL_CONSTASCII_USTRINGPARAM("get_indexdata_"));
-        sal_uInt16** (*func)(sal_Int16*)=NULL;
         if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 )
             func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString(RTL_CONSTASCII_USTRINGPARAM("_TW_"))+rAlgorithm).pData);
         if (!func)
             func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString('_')+rAlgorithm).pData);
-        if (func) {
-            sal_Int16 max_index;
-            sal_uInt16** idx=func(&max_index);
-            if (((sal_Int16)(ch >> 8)) <= max_index) {
-                sal_uInt16 address=idx[0][ch >> 8];
-                if (address != 0xFFFF) {
-                    address=idx[1][address+(ch & 0xFF)];
-                    return idx[2] ? OUString(&idx[2][address]) : OUString(address);
-                }
+    }
+#else
+    if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) {
+        if ( rAlgorithm == "radical" )
+            func = get_indexdata_zh_TW_radical;
+        else if ( rAlgorithm == "stroke" )
+            func = get_indexdata_zh_TW_stroke;
+    }
+    if (!func) {
+        if ( rLocale.Language == "ko" ) {
+            if ( rAlgorithm == "dict" )
+                func = get_indexdata_ko_dict;
+        } else if ( rLocale.Language == "zh" )
+            if ( rAlgorithm == "pinyin" )
+                func = get_indexdata_zh_pinyin;
+            else if ( rAlgorithm == "radical" )
+                func = get_indexdata_zh_radical;
+            else if ( rAlgorithm == "stroke" )
+                func = get_indexdata_zh_stroke;
+            else if ( rAlgorithm == "zhuyin" )
+                func = get_indexdata_zh_zhuyin;
+    }
+#endif
+    if (func) {
+        sal_Int16 max_index;
+        sal_uInt16** idx=func(&max_index);
+        if (((sal_Int16)(ch >> 8)) <= max_index) {
+            sal_uInt16 address=idx[0][ch >> 8];
+            if (address != 0xFFFF) {
+                address=idx[1][address+(ch & 0xFF)];
+                return idx[2] ? OUString(&idx[2][address]) : OUString(address);
             }
         }
     }
+
     // using alphanumeric index for non-define stirng
     return OUString(&idxStr[(ch & 0xFFFFFF00) ? 0 : ch], 1);
 }
@@ -115,8 +168,9 @@ OUString SAL_CALL
 IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
         const Locale& rLocale ) throw (RuntimeException)
 {
+    sal_uInt16 **(*func)(sal_Int16*)=NULL;
+#ifndef DISABLE_DYNLOADING
     if (hModule) {
-        sal_uInt16 **(*func)(sal_Int16*)=NULL;
         const sal_Char *func_name=NULL;
         if ( rLocale.Language == "zh" )
             func_name=(OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) ?  "get_zh_zhuyin" : "get_zh_pinyin";
@@ -124,29 +178,36 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
             func_name="get_ko_phonetic";
         if (func_name)
             func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData);
-        if (func) {
-            OUStringBuffer candidate;
-            sal_Int16 max_index;
-            sal_uInt16** idx=func(&max_index);
-            OUString aIndexEntry=rIndexEntry;
-            for (sal_Int32 i=0,j=0; i < rIndexEntry.getLength(); i=j) {
-                sal_uInt32 ch = rIndexEntry.iterateCodePoints(&j, 1);
-                if (((sal_Int16)(ch>>8)) <= max_index) {
-                    sal_uInt16 address = idx[0][ch>>8];
-                    if (address != 0xFFFF) {
-                        address = idx[1][address + (ch & 0xFF)];
-                        if ( i > 0 && rLocale.Language == "zh" )
-                            candidate.appendAscii(" ");
-                        if (idx[2])
-                            candidate.append(&idx[2][address]);
-                        else
-                            candidate.append(address);
-                    } else
+    }
+#else
+    if ( rLocale.Language == "zh" )
+        func = (OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) ?  get_zh_zhuyin : get_zh_pinyin;
+    else if ( rLocale.Language == "ko" )
+        func = get_ko_phonetic;
+
+#endif
+    if (func) {
+        OUStringBuffer candidate;
+        sal_Int16 max_index;
+        sal_uInt16** idx=func(&max_index);
+        OUString aIndexEntry=rIndexEntry;
+        for (sal_Int32 i=0,j=0; i < rIndexEntry.getLength(); i=j) {
+            sal_uInt32 ch = rIndexEntry.iterateCodePoints(&j, 1);
+            if (((sal_Int16)(ch>>8)) <= max_index) {
+                sal_uInt16 address = idx[0][ch>>8];
+                if (address != 0xFFFF) {
+                    address = idx[1][address + (ch & 0xFF)];
+                    if ( i > 0 && rLocale.Language == "zh" )
                         candidate.appendAscii(" ");
-                }
+                    if (idx[2])
+                        candidate.append(&idx[2][address]);
+                    else
+                        candidate.append(address);
+                } else
+                    candidate.appendAscii(" ");
             }
-            return candidate.makeStringAndClear();
         }
+        return candidate.makeStringAndClear();
     }
     return OUString();
 }
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index a7d76fd..f2d7aaf 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -50,11 +50,17 @@ typedef sal_Unicode***  (SAL_CALL * MyFunc_Type2)( sal_Int16&, sal_Int16& );
 typedef sal_Unicode**** (SAL_CALL * MyFunc_Type3)( sal_Int16&, sal_Int16&, sal_Int16& );
 typedef sal_Unicode const * const * (SAL_CALL * MyFunc_FormatCode)( sal_Int16&, sal_Unicode const *&, sal_Unicode const *& );
 
+#ifndef DISABLE_DYNLOADING
+
 static const char *lcl_DATA_EN = "localedata_en";
 static const char *lcl_DATA_ES = "localedata_es";
 static const char *lcl_DATA_EURO = "localedata_euro";
 static const char *lcl_DATA_OTHERS = "localedata_others";
 
+#endif
+
+#ifndef DISABLE_DYNLOADING
+
 static const struct {
     const char* pLocale;
     const char* pLib;
@@ -261,6 +267,12 @@ static const struct {
     { "pjt_AU", lcl_DATA_OTHERS }
 };
 
+#else
+
+#include "localedata_static.hxx"
+
+#endif
+
 static const sal_Unicode under = sal_Unicode('_');
 
 static const sal_Int16 nbOfLocales = SAL_N_ELEMENTS(aLibTable);
@@ -358,8 +370,12 @@ LocaleData::getLocaleItem( const Locale& rLocale ) throw(RuntimeException)
     }
 }
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 namespace
 {
 
@@ -432,6 +448,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
         if (localeName.equalsAscii(aLibTable[i].pLocale) ||
                 (bFallback && localeName == aFallback))
         {
+#ifndef DISABLE_DYNLOADING
             LocaleDataLookupTableItem* pCurrent = 0;
             OUStringBuffer aBuf(strlen(aLibTable[i].pLocale) + 1 + strlen(pFunction));
             {
@@ -482,6 +499,46 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
             }
             else
                 delete module;
+#else
+            (void) pOutCachedItem;
+
+            if( strcmp(pFunction, "getAllCalendars") == 0 )
+                return aLibTable[i].getAllCalendars;
+            else if( strcmp(pFunction, "getAllCurrencies") == 0 )
+                return aLibTable[i].getAllCurrencies;
+            else if( strcmp(pFunction, "getAllFormats0") == 0 )
+                return aLibTable[i].getAllFormats0;
+            else if( strcmp(pFunction, "getBreakIteratorRules") == 0 )
+                return aLibTable[i].getBreakIteratorRules;
+            else if( strcmp(pFunction, "getCollationOptions") == 0 )
+                return aLibTable[i].getCollationOptions;
+            else if( strcmp(pFunction, "getCollatorImplementation") == 0 )
+                return aLibTable[i].getCollatorImplementation;
+            else if( strcmp(pFunction, "getContinuousNumberingLevels") == 0 )
+                return aLibTable[i].getContinuousNumberingLevels;
+            else if( strcmp(pFunction, "getDateAcceptancePatterns") == 0 )
+                return aLibTable[i].getDateAcceptancePatterns;
+            else if( strcmp(pFunction, "getFollowPageWords") == 0 )
+                return aLibTable[i].getFollowPageWords;
+            else if( strcmp(pFunction, "getForbiddenCharacters") == 0 )
+                return aLibTable[i].getForbiddenCharacters;
+            else if( strcmp(pFunction, "getIndexAlgorithm") == 0 )
+                return aLibTable[i].getIndexAlgorithm;
+            else if( strcmp(pFunction, "getLCInfo") == 0 )
+                return aLibTable[i].getLCInfo;
+            else if( strcmp(pFunction, "getLocaleItem") == 0 )
+                return aLibTable[i].getLocaleItem;
+            else if( strcmp(pFunction, "getOutlineNumberingLevels") == 0 )
+                return aLibTable[i].getOutlineNumberingLevels;
+            else if( strcmp(pFunction, "getReservedWords") == 0 )
+                return aLibTable[i].getReservedWords;
+            else if( strcmp(pFunction, "getSearchOptions") == 0 )
+                return aLibTable[i].getSearchOptions;
+            else if( strcmp(pFunction, "getTransliterations") == 0 )
+                return aLibTable[i].getTransliterations;
+            else if( strcmp(pFunction, "getUnicodeScripts") == 0 )
+                return aLibTable[i].getUnicodeScripts;
+#endif
         }
     }
     return NULL;
diff --git a/i18npool/source/textconversion/textconversion.cxx b/i18npool/source/textconversion/textconversion.cxx
index a737ec7..30b7fef 100644
--- a/i18npool/source/textconversion/textconversion.cxx
+++ b/i18npool/source/textconversion/textconversion.cxx
@@ -36,10 +36,15 @@ using ::rtl::OUString;
 
 namespace com { namespace sun { namespace star { namespace i18n {
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 TextConversion::TextConversion()
 {
+#ifndef DISABLE_DYNLOADING
 #ifdef SAL_DLLPREFIX
     OUString lib(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX"textconv_dict" SAL_DLLEXTENSION));
 #else
@@ -47,13 +52,18 @@ TextConversion::TextConversion()
 #endif
     hModule = osl_loadModuleRelative(
         &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT );
+#endif
 }
 
 TextConversion::~TextConversion()
 {
+#ifndef DISABLE_DYNLOADING
     if (hModule) osl_unloadModule(hModule);
+#endif
 }
 
+#ifndef DISABLE_DYNLOADING
+
 static void* nullFunc()
 {
     return NULL;
@@ -68,6 +78,8 @@ TextConversion::getFunctionBySymbol(const sal_Char* func)
         return reinterpret_cast< oslGenericFunction >(nullFunc);
 }
 
+#endif
+
 OUString SAL_CALL
 TextConversion::getImplementationName() throw( RuntimeException )
 {
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index e6bd90e..2d12354 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -123,16 +123,32 @@ sal_Int16 SAL_CALL checkScriptType(sal_Unicode c)
     return (i < scriptListCount && block >= scriptList[i].from) ? scriptList[i].script : SCRIPT_OTHERS;
 }
 
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+
+const sal_Unicode* getHangul2HanjaData();
+const Hangul_Index* getHangul2HanjaIndex();
+sal_Int16 getHangul2HanjaIndexCount();
+const sal_uInt16* getHanja2HangulIndex();
+const sal_Unicode* getHanja2HangulData();
+
+}
+
+#endif
+
 Sequence< OUString > SAL_CALL
 TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toHanja)
 {
     sal_Unicode ch;
     Sequence< OUString > output;
+#ifndef DISABLE_DYNLOADING
     const sal_Unicode* (*getHangul2HanjaData)() = (const sal_Unicode* (*)())getFunctionBySymbol("getHangul2HanjaData");
     const Hangul_Index* (*getHangul2HanjaIndex)() = (const Hangul_Index* (*)()) getFunctionBySymbol("getHangul2HanjaIndex");
     sal_Int16 (*getHangul2HanjaIndexCount)() = (sal_Int16 (*)()) getFunctionBySymbol("getHangul2HanjaIndexCount");
     const sal_uInt16* (*getHanja2HangulIndex)() = (const sal_uInt16* (*)()) getFunctionBySymbol("getHanja2HangulIndex");
     const sal_Unicode* (*getHanja2HangulData)() = (const sal_Unicode* (*)()) getFunctionBySymbol("getHanja2HangulData");
+#endif
     if (toHanja && getHangul2HanjaIndex && getHangul2HanjaIndexCount && getHangul2HanjaData) {
         ch = aText[nStartPos];
         const Hangul_Index *Hangul_ko = getHangul2HanjaIndex();
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index 2d72b80..0438558 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -67,12 +67,35 @@ sal_Unicode SAL_CALL getOneCharConversion(sal_Unicode ch, const sal_Unicode* Dat
     }
 }
 
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+
+const sal_Unicode* getSTC_CharData_T2S();
+const sal_uInt16* getSTC_CharIndex_T2S();
+const sal_Unicode* getSTC_CharData_S2V();
+const sal_uInt16* getSTC_CharIndex_S2V();
+const sal_Unicode* getSTC_CharData_S2T();
+const sal_uInt16* getSTC_CharIndex_S2T();
+
+const sal_Unicode *getSTC_WordData(sal_Int32&);
+
+const sal_uInt16 *getSTC_WordIndex_T2S(sal_Int32&);
+const sal_uInt16 *getSTC_WordEntry_T2S();
+const sal_uInt16 *getSTC_WordIndex_S2T(sal_Int32&);
+const sal_uInt16 *getSTC_WordEntry_S2T();
+
+}
+
+#endif
+
 OUString SAL_CALL
 TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toSChinese, sal_Int32 nConversionOptions)
 {
     const sal_Unicode *Data;
     const sal_uInt16 *Index;
 
+#ifndef DISABLE_DYNLOADING
     if (toSChinese) {
         Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_T2S"))();
         Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_T2S"))();
@@ -83,6 +106,18 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos,
         Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_S2T"))();
         Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2T"))();
     }
+#else
+    if (toSChinese) {
+        Data = getSTC_CharData_T2S();
+        Index = getSTC_CharIndex_T2S();
+    } else if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
+        Data = getSTC_CharData_S2V();
+        Index = getSTC_CharIndex_S2V();
+    } else {
+        Data = getSTC_CharData_S2T();
+        Index = getSTC_CharIndex_S2T();
+    }
+#endif
 
     rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nLength);
     for (sal_Int32 i = 0; i < nLength; i++)
@@ -102,6 +137,7 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
     const sal_uInt16 *charIndex;
     sal_Bool one2one=sal_True;
 
+#ifndef DISABLE_DYNLOADING
     const sal_Unicode *wordData = ((const sal_Unicode* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordData"))(dictLen);
     if (toSChinese) {
         index = ((const sal_uInt16* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordIndex_T2S"))(maxLen);
@@ -119,6 +155,25 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
             charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_S2T"))();
         }
     }
+#else
+    const sal_Unicode *wordData = getSTC_WordData(dictLen);
+    if (toSChinese) {
+        index = getSTC_WordIndex_T2S(maxLen);
+        entry = getSTC_WordEntry_T2S();
+        charData = getSTC_CharData_T2S();
+        charIndex = getSTC_CharIndex_T2S();
+    } else {
+        index = getSTC_WordIndex_S2T(maxLen);
+        entry = getSTC_WordEntry_S2T();
+        if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
+            charData = getSTC_CharData_S2V();
+            charIndex = getSTC_CharIndex_S2V();
+        } else {
+            charData = getSTC_CharData_S2T();
+            charIndex = getSTC_CharIndex_S2T();
+        }
+    }
+#endif
 
     if ((!wordData || !index || !entry) && !xCDL.is()) // no word mapping defined, do char2char conversion.
         return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions);
diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx
index e05f753..7e94b07 100644
--- a/i18npool/source/transliteration/textToPronounce_zh.cxx
+++ b/i18npool/source/transliteration/textToPronounce_zh.cxx
@@ -132,18 +132,41 @@ TextToPronounce_zh::equals( const OUString & str1, sal_Int32 pos1, sal_Int32 nCo
     return (nCount1 == nCount2);
 }
 
-TextToPinyin_zh_CN::TextToPinyin_zh_CN() : TextToPronounce_zh("get_zh_pinyin")
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+
+sal_uInt16** get_zh_zhuyin();
+sal_uInt16** get_zh_pinyin();
+
+}
+
+#endif
+
+TextToPinyin_zh_CN::TextToPinyin_zh_CN() :
+#ifndef DISABLE_DYNLOADING
+    TextToPronounce_zh("get_zh_pinyin")
+#else
+    TextToPronounce_zh(get_zh_pinyin)
+#endif
 {
         transliterationName = "ChineseCharacterToPinyin";
         implementationName = "com.sun.star.i18n.Transliteration.TextToPinyin_zh_CN";
 }
 
-TextToChuyin_zh_TW::TextToChuyin_zh_TW() : TextToPronounce_zh("get_zh_zhuyin")
+TextToChuyin_zh_TW::TextToChuyin_zh_TW() :
+#ifndef DISABLE_DYNLOADING
+    TextToPronounce_zh("get_zh_zhuyin")
+#else
+    TextToPronounce_zh(get_zh_zhuyin)
+#endif
 {
         transliterationName = "ChineseCharacterToChuyin";
         implementationName = "com.sun.star.i18n.Transliteration.TextToChuyin_zh_TW";
 }
 
+#ifndef DISABLE_DYNLOADING
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
 TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name)
@@ -162,9 +185,21 @@ TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name)
             idx=function();
     }
 }
+
+#else
+
+TextToPronounce_zh::TextToPronounce_zh(sal_uInt16 ** (*function)())
+{
+    idx = function();
+}
+
+#endif
+
 TextToPronounce_zh::~TextToPronounce_zh()
 {
+#ifndef DISABLE_DYNLOADING
     if (hModule) osl_unloadModule(hModule);
+#endif
 }
 } } } }
 
commit 4048a810a0c00af2bf94d24243ff02a832f63de3
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 18 01:03:15 2012 +0300

    Just link statically to ScFilterCreate() in the DISABLE_DYNLOADING case

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index f9d00ab..e98c67b 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2227,6 +2227,8 @@ bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
     return bOk;
 }
 
+#ifndef DISABLE_DYNLOADING
+
 #define RETURN_ERROR { return eERR_INTERN; }
 class ScFormatFilterMissing : public ScFormatFilterPlugin {
   public:
@@ -2260,6 +2262,15 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
 };
 
 extern "C" { static void SAL_CALL thisModule() {} }
+
+#else
+
+extern "C" {
+ScFormatFilterPlugin* ScFilterCreate();
+}
+
+#endif
+
 typedef ScFormatFilterPlugin * (*FilterFn)(void);
 ScFormatFilterPlugin &ScFormatFilter::Get()
 {
@@ -2268,6 +2279,7 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
     if (plugin != NULL)
         return *plugin;
 
+#ifndef DISABLE_DYNLOADING
     ::rtl::OUString sFilterLib(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("scfilt")));
     static ::osl::Module aModule;
     bool bLoaded = aModule.loadRelative(&thisModule, sFilterLib);
@@ -2281,6 +2293,9 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
     }
     if (plugin == NULL)
         plugin = new ScFormatFilterMissing();
+#else
+    plugin = ScFilterCreate();
+#endif
 
     return *plugin;
 }
commit b0105caa7f1445e3b1e4abac6d8f82445a4eba68
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 18 01:01:36 2012 +0300

    Add static mapping of the fastsax component

diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 04e9bf2..6a5ace5 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -467,6 +467,7 @@ extern "C"
     extern void * configmgr_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * comphelp_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * expwrap_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fastsax_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * filterconfig1_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * fwk_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * introspection_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
@@ -542,6 +543,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
         { "bootstrap.uno" SAL_DLLEXTENSION, bootstrap_component_getFactory },
         { "configmgr.uno.a", configmgr_component_getFactory },
         { "expwrap.uno.a", expwrap_component_getFactory },
+        { "fastsax.uno.a", fastsax_component_getFactory },
         { "introspection.uno.a", introspection_component_getFactory },
         { "i18npool.uno.a", i18npool_component_getFactory },
         { "libcomphelp" CPPU_STRINGIFY(CPPU_ENV) ".a", comphelp_component_getFactory },
@@ -572,13 +574,13 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
             if ( rLibName.equalsAscii( map[i].lib ) )
                 pSym = (oslGenericFunction) map[i].component_getFactory_function;
         }
-#if OSL_DEBUG_LEVEL > 1
         if ( pSym == NULL )
         {
+#if OSL_DEBUG_LEVEL > 1
             fprintf( stderr, "attempting to load unknown library %s\n", OUStringToOString( rLibName, RTL_TEXTENCODING_ASCII_US ).getStr() );
+#endif
             assert( !"Attempt to load unknown library" );
         }
-#endif
     }
 #else
 
commit dff5dd906f1fe6fe949af78d3c46721236c32555
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 17 23:53:34 2012 +0300

    Just link statically to CreateUnoWrapper() in the DISABLE_DYNLOADING case

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0f2c8f4..43eb6d8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1536,14 +1536,23 @@ sal_uInt16 Application::GetSystemWindowMode()
 
 // -----------------------------------------------------------------------
 
+#ifdef DISABLE_DYNLOADING
+
+extern "C" { UnoWrapperBase* CreateUnoWrapper(); }
+
+#else
+
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist )
 {
     ImplSVData* pSVData = ImplGetSVData();
     static sal_Bool bAlreadyTriedToCreate = sal_False;
     if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
     {
+#ifndef DISABLE_DYNLOADING
         ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName(
 #ifdef LIBO_MERGELIBS
                                                                        "merged",
@@ -1563,6 +1572,9 @@ UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist )
             }
         }
         DBG_ASSERT( pSVData->mpUnoWrapper, "UnoWrapper could not be created!" );
+#else
+        pSVData->mpUnoWrapper = CreateUnoWrapper();
+#endif
         bAlreadyTriedToCreate = sal_True;
     }
     return pSVData->mpUnoWrapper;


More information about the Libreoffice-commits mailing list