diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-19 13:35:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-19 13:35:39 +0100 |
commit | 71eb27376a92f61c91567f2bfc2a74dba7192aab (patch) | |
tree | 5016e1ffb68d32f377226d8b2508076e946a09b6 /oox | |
parent | n#828390: Unit test for bullet's relative size. (diff) | |
download | core-71eb27376a92f61c91567f2bfc2a74dba7192aab.tar.gz core-71eb27376a92f61c91567f2bfc2a74dba7192aab.zip |
css.xml.sax service ctor clean-up
Change-Id: I556904861e93a145cfe65f61218926851e4e8eb0
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/fastparser.cxx | 6 | ||||
-rw-r--r-- | oox/source/crypto/DocumentDecryption.cxx | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx index 70e12a896098..af79760e0bfe 100644 --- a/oox/source/core/fastparser.cxx +++ b/oox/source/core/fastparser.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <com/sun/star/xml/sax/FastParser.hpp> #include "oox/core/fastparser.hxx" #include "oox/core/fasttokenhandler.hxx" @@ -72,8 +75,7 @@ FastParser::FastParser( const Reference< XComponentContext >& rxContext ) throw( mpParser(NULL) { // create a fast parser instance - Reference< XMultiComponentFactory > xFactory( rxContext->getServiceManager(), UNO_SET_THROW ); - mxParser.set( xFactory->createInstanceWithContext( "com.sun.star.xml.sax.FastParser", rxContext ), UNO_QUERY_THROW ); + mxParser = css::xml::sax::FastParser::create(rxContext); mpParser = dynamic_cast<sax_fastparser::FastSaxParser*>(mxParser.get()); // create the fast tokenhandler diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index 0e9013997d6e..6dee4de0adf2 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -18,6 +18,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/xml/sax/XFastParser.hpp> #include <com/sun/star/xml/sax/XFastTokenHandler.hpp> +#include <com/sun/star/xml/sax/FastParser.hpp> #include <com/sun/star/xml/sax/FastToken.hpp> namespace oox { @@ -221,15 +222,11 @@ bool DocumentDecryption::readAgileEncryptionInfo(Reference< XInputStream >& xInp mEngine.reset(engine); AgileEncryptionInfo& info = engine->getInfo(); - Reference<XMultiComponentFactory> xFactory( mxContext->getServiceManager(), UNO_SET_THROW ); Reference<XFastDocumentHandler> xFastDocumentHandler( new AgileDocumentHandler(info) ); Reference<XFastTokenHandler> xFastTokenHandler ( new AgileTokenHandler ); - Reference<XFastParser> xParser; - xParser.set( xFactory->createInstanceWithContext( "com.sun.star.xml.sax.FastParser", mxContext ), UNO_QUERY_THROW ); - - if (!xParser.is()) - return false; + Reference<XFastParser> xParser( + css::xml::sax::FastParser::create(mxContext)); xParser->setFastDocumentHandler( xFastDocumentHandler ); xParser->setTokenHandler( xFastTokenHandler ); |