summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-03 13:30:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 16:29:53 +0200
commita20f9a410fdd3f776f870434bc39219d5fc64b40 (patch)
tree079278e5859c5782fbe9bfcc34302d09bd8dfadd /desktop
parentbd6b41bce491ac5a5f562652b7e32045cc22c35c (diff)
fdo#46808, Adapt xml::sax::XParser UNO service to new style
The xml.sax.Parser service already existed, it just did not have a new-style service to create it. Change-Id: I6f145a7504ff9e149c802f723991954a2801cbc9
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/dp_xml.cxx6
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx6
2 files changed, 4 insertions, 8 deletions
diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx
index d276818619ce..b45c4c0db5d5 100644
--- a/desktop/source/deployment/dp_xml.cxx
+++ b/desktop/source/deployment/dp_xml.cxx
@@ -31,7 +31,7 @@
#include "dp_xml.h"
#include "rtl/ustrbuf.hxx"
#include "ucbhelper/content.hxx"
-#include "com/sun/star/xml/sax/XParser.hpp"
+#include "com/sun/star/xml/sax/Parser.hpp"
using namespace ::com::sun::star;
@@ -48,9 +48,7 @@ void xml_parse(
Reference<XComponentContext> const & xContext )
{
// raise sax parser:
- Reference<xml::sax::XParser> xParser(
- xContext->getServiceManager()->createInstanceWithContext(
- OUSTR("com.sun.star.xml.sax.Parser"), xContext ), UNO_QUERY_THROW );
+ Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(xContext);
// error handler, entity resolver omitted
xParser->setDocumentHandler( xDocHandler );
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 5741ccc2bea2..f751f8b7c9d2 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -37,6 +37,7 @@
#include "svl/inettype.hxx"
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
#include <memory>
@@ -252,10 +253,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
Reference<XComponentContext>
xContext( getComponentContext() );
- Reference< xml::sax::XParser > xParser(
- xContext->getServiceManager()->createInstanceWithContext(
- OUSTR("com.sun.star.xml.sax.Parser"), xContext ),
- UNO_QUERY_THROW );
+ Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext);
xParser->setDocumentHandler( xDocHandler );
xml::sax::InputSource source;