[Libreoffice-commits] .: 4 commits - cppuhelper/source ios/qa sal/cppunittester sal/inc
Tor Lillqvist
tml at kemper.freedesktop.org
Sun Apr 15 16:47:06 PDT 2012
cppuhelper/source/shlib.cxx | 2 ++
ios/qa/sc/Makefile | 2 +-
ios/qa/sc/filters-test.m | 13 +++++++++----
sal/cppunittester/cppunittester.cxx | 17 +++++++++++------
sal/inc/cppunittester/protectorfactory.hxx | 1 +
5 files changed, 24 insertions(+), 11 deletions(-)
New commits:
commit 8dd4fa9a102c705496aef7aca97de0818fea47db
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Apr 16 01:40:26 2012 +0200
Link with libpackage2
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index ea3440f..3747e38 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/i18npool.uno lib/stocservices.uno lib/unobootstrapprotector lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -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/i18npool.uno lib/stocservices.uno lib/unobootstrapprotector lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -ljpeg -ljvmfwk -llnglo -lpackage2 -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lxstor -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
all: $(APPDIR)/$(APP) stuff
commit 2aadb6f9f4197f247373e4b54cab1461bc673981
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Apr 16 01:40:02 2012 +0200
Add the package2 component
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index b336100..ba8ea8d 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -468,6 +468,7 @@ extern "C"
extern void * comphelp_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 * package2_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sfx_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * stocservices_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * i18npool_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
@@ -540,6 +541,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
{ "libcomphelp" CPPU_STRINGIFY(CPPU_ENV) ".a", comphelp_component_getFactory },
{ "libfilterconfiglo.a", filterconfig1_component_getFactory },
{ "libfwklo.a", fwk_component_getFactory },
+ { "libpackage2.a", package2_component_getFactory },
{ "libsfxlo.a", sfx_component_getFactory },
{ "libucb1.a", ucb_component_getFactory },
{ "libucpfile1.a", ucpfile_component_getFactory },
commit b20a10d5f845d0e4a4f21f360afd126c2cdacc4c
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Apr 16 01:35:30 2012 +0200
We need also unobootstrapprotector now
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index d674098..ea3440f 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/i18npool.uno lib/stocservices.uno lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -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/i18npool.uno lib/stocservices.uno lib/unobootstrapprotector lib/unoexceptionprotector, -Wl,$(OUTDIR)/$(LIB).a) $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lfilterconfiglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licudata -licui18n -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -lucpfile1 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lxstor -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
all: $(APPDIR)/$(APP) stuff
diff --git a/ios/qa/sc/filters-test.m b/ios/qa/sc/filters-test.m
index 42b0816..be32924 100644
--- a/ios/qa/sc/filters-test.m
+++ b/ios/qa/sc/filters-test.m
@@ -108,11 +108,16 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
"--headless",
"--protector",
"dummy-libunoexceptionprotector",
- "dummy-unoexceptionprotector",
+ "unoexceptionprotector",
+ "--protector",
+ "dummy-libunobootstrapprotector",
+ "unobootstrapprotector",
"placeholder-uno-types",
"placeholder-uno-services"
};
+ const int argc = sizeof(argv)/sizeof(*argv);
+
NSString *app_root_escaped = [[[NSBundle mainBundle] bundlePath] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSString *uno_types = @"-env:UNO_TYPES=";
@@ -125,7 +130,7 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
uno_types = [uno_types stringByAppendingString: @"file://"];
uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"types.rdb"]];
- argv[6] = [uno_types UTF8String];
+ argv[argc-2] = [uno_types UTF8String];
NSString *uno_services = @"-env:UNO_SERVICES=";
@@ -170,9 +175,9 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
uno_services = [uno_services stringByAppendingString: @" "];
}
- argv[7] = [uno_services UTF8String];
+ argv[argc-1] = [uno_services UTF8String];
- lo_main(sizeof(argv)/sizeof(*argv), argv);
+ lo_main(argc, argv);
[self.window makeKeyAndVisible];
return YES;
commit ae3f7ccaabefe3b2682706cecfa3b4b144d9cc04
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Apr 16 01:35:00 2012 +0200
Recognize unoexceptionprotector and unobootstrapprotector
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 6cae612..9ec61c1 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -214,17 +214,22 @@ SAL_IMPLEMENT_MAIN() {
if (rtl_getAppCommandArgCount() - index < 3) {
usageFailure();
}
-#ifndef DISABLE_DYNLOADING
rtl::OUString lib(getArgument(index + 1));
rtl::OUString sym(getArgument(index + 2));
+#ifndef DISABLE_DYNLOADING
modules.push_back(new osl::Module(lib, SAL_LOADMODULE_GLOBAL));
oslGenericFunction fn = modules.back().getFunctionSymbol(sym);
#else
- // The only "protector" we ever use is the unoexceptionprotector...
- // Oh the joys of over-engineering.
- rtl::OUString lib(RTL_CONSTASCII_USTRINGPARAM("<static>"));
- rtl::OUString sym(RTL_CONSTASCII_USTRINGPARAM("unoexceptionprotector"));
- oslGenericFunction fn = (oslGenericFunction) unoexceptionprotector;
+ oslGenericFunction fn;
+ if (sym == "unoexceptionprotector")
+ fn = (oslGenericFunction) unoexceptionprotector;
+ else if (sym == "unobootstrapprotector")
+ fn = (oslGenericFunction) unobootstrapprotector;
+ else
+ {
+ fprintf(stderr, "Only unoexceptionprotector or unobootstrapprotector protectors allowed\n");
+ assert(!"unrecognized protector");
+ }
#endif
CppUnit::Protector *protector = fn == 0
? 0
diff --git a/sal/inc/cppunittester/protectorfactory.hxx b/sal/inc/cppunittester/protectorfactory.hxx
index b666412..e12afe7 100644
--- a/sal/inc/cppunittester/protectorfactory.hxx
+++ b/sal/inc/cppunittester/protectorfactory.hxx
@@ -45,6 +45,7 @@ namespace cppunittester
#ifdef DISABLE_DYNLOADING
extern "C" CppUnit::Protector *unoexceptionprotector();
+extern "C" CppUnit::Protector *unobootstrapprotector();
#endif
#endif
More information about the Libreoffice-commits
mailing list