summaryrefslogtreecommitdiff
path: root/editeng/source/xml
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-04 13:20:48 +0200
committerNoel Grandin <noel@peralex.com>2013-02-12 10:14:43 +0200
commita6a8a8707b6ae111f94bac094d3c2909f523ca6f (patch)
tree402b668480b3106df0d3055cff037c8a768a419c /editeng/source/xml
parentf1204419af34b1d2f0ecaa69ceeb1f8c8a7d87df (diff)
fdo#46808, convert xmloff module code to use XComponentContext
with lots of repurcussions in other modules Change-Id: I6982671eecc701b06cf85d93533e1fe618044fea
Diffstat (limited to 'editeng/source/xml')
-rw-r--r--editeng/source/xml/xmltxtimp.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index c70d389370a4..128e9b4316ef 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -109,7 +109,7 @@ class SvxXMLXTextImportComponent : public SvXMLImport
{
public:
SvxXMLXTextImportComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const uno::Reference< XText > & xText );
virtual ~SvxXMLXTextImportComponent() throw ();
@@ -125,9 +125,9 @@ private:
// --------------------------------------------------------------------
SvxXMLXTextImportComponent::SvxXMLXTextImportComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const uno::Reference< XText > & xText )
-: SvXMLImport(xServiceFactory),
+: SvXMLImport(xContext),
mxText( xText )
{
GetTextImport()->SetCursor( mxText->createTextCursor() );
@@ -160,13 +160,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
{
do
{
- uno::Reference<lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() );
uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- if( !xServiceFactory.is() )
- {
- OSL_FAIL( "SvxXMLXTableImport::load: got no service manager" );
- break;
- }
uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
@@ -206,7 +200,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
*/
// uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTextImportComponent( xText ) );
- uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTextImportComponent( xServiceFactory, xText ) );
+ uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTextImportComponent( xContext, xText ) );
xParser->setDocumentHandler( xHandler );