diff options
Diffstat (limited to 'sax/source/expatwrap')
-rw-r--r-- | sax/source/expatwrap/expwrap.component | 3 | ||||
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/sax/source/expatwrap/expwrap.component b/sax/source/expatwrap/expwrap.component index cc822665b942..e3e474bfd5ec 100644 --- a/sax/source/expatwrap/expwrap.component +++ b/sax/source/expatwrap/expwrap.component @@ -25,4 +25,7 @@ <implementation name="com.sun.star.extensions.xml.sax.Writer"> <service name="com.sun.star.xml.sax.Writer"/> </implementation> + <implementation name="com.sun.star.comp.extensions.xml.sax.FastParser"> + <service name="com.sun.star.xml.sax.FastParser"/> + </implementation> </component> diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index e58f75aae97c..8e066e85ee46 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -37,7 +37,6 @@ #include <expat.h> -using namespace ::rtl; using namespace ::std; using namespace ::osl; using namespace ::cppu; @@ -50,6 +49,9 @@ using namespace ::com::sun::star::io; #include "factory.hxx" #include "attrlistimpl.hxx" #include "xml2utf.hxx" +#include <sax/fastparser.hxx> + +#define PARSER_IMPLEMENTATION_NAME "com.sun.star.comp.extensions.xml.sax.FastParser" namespace sax_expatwrap { @@ -195,7 +197,13 @@ Reference< XInterface > SAL_CALL SaxExpatParser_CreateInstance( return Reference< XInterface > ( (OWeakObject * ) p ); } - +Reference< XInterface > SAL_CALL FastSaxParser_CreateInstance( + SAL_UNUSED_PARAMETER const Reference< XMultiServiceFactory > & ) + throw(Exception) +{ + ::sax_fastparser::FastSaxParser *p = new ::sax_fastparser::FastSaxParser; + return Reference< XInterface > ( (OWeakObject * ) p ); +} Sequence< OUString > SaxExpatParser::getSupportedServiceNames_Static(void) throw () { @@ -1084,6 +1092,12 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL expwrap_component_getFactory( SaxWriter_CreateInstance, SaxWriter_getSupportedServiceNames() ); } + else if ( aImplementationName == PARSER_IMPLEMENTATION_NAME) + { + xRet = createSingleFactory( xSMgr, aImplementationName, + FastSaxParser_CreateInstance, + sax_fastparser::FastSaxParser::getSupportedServiceNames_Static() ); + } if (xRet.is()) { |