summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-12-21 12:57:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-12-21 15:56:44 +0100
commit373734a1e2699b10cbe02a2fe41c2b92ac77bc9d (patch)
treecbe199b782a21e46f45dba135ca85d1586bb2ddc
parentFix in-build uno ini deps for cross-compiling (diff)
downloadcore-373734a1e2699b10cbe02a2fe41c2b92ac77bc9d.tar.gz
core-373734a1e2699b10cbe02a2fe41c2b92ac77bc9d.zip
Adapt i18npool saxparser to defaultBootstrap_InitialComponentContext
...instead of deprecated cppu::createRegistryServiceFactory. Change-Id: I64431f3d404e24267953de3fb94e3e5241db30a8
-rw-r--r--i18npool/CustomTarget_localedata.mk12
-rw-r--r--i18npool/Executable_saxparser.mk1
-rw-r--r--i18npool/source/localedata/saxparser.cxx18
3 files changed, 14 insertions, 17 deletions
diff --git a/i18npool/CustomTarget_localedata.mk b/i18npool/CustomTarget_localedata.mk
index f7dbcd2d7d4e..342dfa3bc622 100644
--- a/i18npool/CustomTarget_localedata.mk
+++ b/i18npool/CustomTarget_localedata.mk
@@ -34,20 +34,22 @@ $(call gb_CustomTarget_get_target,i18npool/localedata) : \
$(patsubst %.xml,$(i18npool_LDDIR)/localedata_%.cxx, \
$(notdir $(wildcard $(SRCDIR)/i18npool/source/localedata/data/*.xml)))
+# The dependencies on ure/services.rdb and ure/types.rdb are implicitly required
+# due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
$(i18npool_LDDIR)/localedata_%.cxx : \
$(SRCDIR)/i18npool/source/localedata/data/%.xml \
$(i18npool_LDDIR)/saxparser.rdb \
- $(OUTDIR_FOR_BUILD)/bin/types.rdb \
+ $(call gb_UnoApiMerge_get_target_for_build,ure/types) \
$(call gb_Executable_get_target_for_build,saxparser) \
- $(call gb_Rdb_get_outdir_target,ure/services) \
+ $(call gb_Rdb_get_outdir_target_for_build,ure/services) \
$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
- $(call gb_Package_get_target,cppuhelper_unorc)
+ $(call gb_Package_get_target_for_build,cppuhelper_unorc)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SAX,1)
$(call gb_Helper_abbreviate_dirs, \
$(call gb_Helper_execute,saxparser) $* $< $@.tmp \
$(call gb_Helper_make_url,$(i18npool_LDDIR)/saxparser.rdb) \
- $(call gb_Helper_make_url,$(OUTDIR_FOR_BUILD)/bin/types.rdb) \
- -env:LO_LIB_DIR=$(call gb_Helper_make_url,$(gb_Helper_OUTDIR_FOR_BUILDLIBDIR)) \
+ -env:LO_LIB_DIR=$(call gb_Helper_make_url,$(gb_Helper_OUTDIR_FOR_BUILDLIBDIR) \
+ -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(i18npool_LDDIR)/saxparser.rdb)) \
$(if $(findstring s,$(MAKEFLAGS)),> /dev/null 2>&1) && \
sed 's/\(^.*get[^;]*$$\)/SAL_DLLPUBLIC_EXPORT \1/' $@.tmp > $@ && \
rm $@.tmp)
diff --git a/i18npool/Executable_saxparser.mk b/i18npool/Executable_saxparser.mk
index ce47a701a9c8..ba0be63c5fc9 100644
--- a/i18npool/Executable_saxparser.mk
+++ b/i18npool/Executable_saxparser.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Executable_set_include,saxparser,\
$(eval $(call gb_Executable_use_sdk_api,saxparser))
$(eval $(call gb_Executable_use_libraries,saxparser,\
- comphelper \
cppu \
cppuhelper \
sal \
diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx
index 6908c6fefac3..c7cf61ebbd28 100644
--- a/i18npool/source/localedata/saxparser.cxx
+++ b/i18npool/source/localedata/saxparser.cxx
@@ -33,8 +33,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/servicefactory.hxx>
+#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
@@ -299,22 +298,19 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
- if( argc < 6) {
- printf( "usage : %s <locaLe> <XML inputfile> <destination file> <services.rdb location> <types.rdb location>\n", argv[0] );
+ if( argc < 4) {
+ printf( "usage : %s <locaLe> <XML inputfile> <destination file>\n", argv[0] );
exit( 1 );
}
- // create service manager
- Reference< XMultiServiceFactory > xSMgr;
+ Reference< XComponentContext > xContext;
try
{
- xSMgr = createRegistryServiceFactory(
- ::rtl::OUString::createFromAscii(argv[4]),
- ::rtl::OUString::createFromAscii(argv[5]), true );
+ xContext = defaultBootstrap_InitialComponentContext();
}
catch ( const Exception &e )
{
- printf( "Exception on createRegistryServiceFactory %s\n",
+ printf( "Exception bootstrapping UNO: %s\n",
OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() );
exit(1);
}
@@ -323,7 +319,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
// parser demo
// read xml from a file and count elements
//--------------------------------
- Reference< XParser > rParser = Parser::create(comphelper::getComponentContext(xSMgr));
+ Reference< XParser > rParser = Parser::create(xContext);
int nError = 0;
// create and connect the document handler to the parser