summaryrefslogtreecommitdiff
path: root/unoxml/source/service/services.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-06-05 12:54:39 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-06-05 12:54:39 +0000
commitf64ff39abb96e00bbc1bc1e6504988c6b8ebd4f5 (patch)
treeb81ed1f1ddd1f0a4d26a3320bbf33018afb70a03 /unoxml/source/service/services.cxx
parentf2b6a0b2e52de314aae26621f4e28f18bd32f0f9 (diff)
INTEGRATION: CWS namespacefixes (1.6.24); FILE MERGED
2007/05/31 10:11:05 cl 1.6.24.1: #i77982# addind fast sax parser
Diffstat (limited to 'unoxml/source/service/services.cxx')
-rw-r--r--unoxml/source/service/services.cxx32
1 files changed, 27 insertions, 5 deletions
diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx
index 3cf2672e4854..a56eb8d34bdb 100644
--- a/unoxml/source/service/services.cxx
+++ b/unoxml/source/service/services.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: services.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: hr $ $Date: 2006-06-20 00:49:41 $
+ * last change: $Author: ihi $ $Date: 2007-06-05 13:54:39 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -51,16 +51,24 @@
#include "../xpath/xpathapi.hxx"
#include "../events/testlistener.hxx"
-extern "C"
-{
using namespace ::DOM;
using namespace ::DOM::events;
using namespace ::XPath;
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
+namespace sax_fastparser
+{
+extern Reference< XInterface > SAL_CALL FastSaxParser_CreateInstance( const Reference< XMultiServiceFactory > & ) throw(Exception);
+extern Sequence< OUString > FastSaxParser_getSupportedServiceNames();
+extern OUString FastSaxParser_getImplementationName();
+}
+
+extern "C"
+{
+
void SAL_CALL
component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, uno_Environment ** /*ppEnvironment */)
{
@@ -102,6 +110,13 @@ component_writeInfo(void * /*pServiceManager*/, void* pRegistryKey )
xNewKey = xKey->createKey(aImpl);
xNewKey->createKey(CTestListener::_getSupportedServiceNames()[0]);
+ // register fast sax parser service
+ aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ aImpl += sax_fastparser::FastSaxParser_getImplementationName();
+ aImpl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ xNewKey = xKey->createKey(aImpl);
+ xNewKey->createKey(sax_fastparser::FastSaxParser_getSupportedServiceNames()[0]);
+
return sal_True;
}
@@ -145,6 +160,13 @@ component_getFactory(const sal_Char *pImplementationName, void *pServiceManager,
xServiceManager, CTestListener::_getImplementationName(),
CTestListener::_getInstance, CTestListener::_getSupportedServiceNames()));
}
+ else if (sax_fastparser::FastSaxParser_getImplementationName().compareToAscii( pImplementationName ) == 0 )
+ {
+ xFactory = Reference< XSingleServiceFactory >(
+ cppu::createSingleFactory(
+ xServiceManager, sax_fastparser::FastSaxParser_getImplementationName(),
+ sax_fastparser::FastSaxParser_CreateInstance, sax_fastparser::FastSaxParser_getSupportedServiceNames()));
+ }
// Factory is valid - service was found.
if ( xFactory.is() )