diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-21 12:57:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-21 15:56:44 +0100 |
commit | 373734a1e2699b10cbe02a2fe41c2b92ac77bc9d (patch) | |
tree | cbe199b782a21e46f45dba135ca85d1586bb2ddc /i18npool/source/localedata | |
parent | 34135e330b24d45b48f06a048b00e14dbc016d10 (diff) |
Adapt i18npool saxparser to defaultBootstrap_InitialComponentContext
...instead of deprecated cppu::createRegistryServiceFactory.
Change-Id: I64431f3d404e24267953de3fb94e3e5241db30a8
Diffstat (limited to 'i18npool/source/localedata')
-rw-r--r-- | i18npool/source/localedata/saxparser.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
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 |