Kaydet (Commit) 73e68672 authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert some more XMultiServiceFactory

Change-Id: Ib96976e0a40c025d1b6408aeadfc70d7885c11d4
üst 4bd502a5
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
// - PDFInteractionHandler - // - PDFInteractionHandler -
// ------------- // -------------
PDFInteractionHandler::PDFInteractionHandler( const Reference< XMultiServiceFactory > &rxMSF ) : PDFInteractionHandler::PDFInteractionHandler()
mxMSF( rxMSF )
{ {
} }
...@@ -98,9 +97,9 @@ Sequence< OUString > SAL_CALL PDFInteractionHandler_getSupportedServiceNames( ) ...@@ -98,9 +97,9 @@ Sequence< OUString > SAL_CALL PDFInteractionHandler_getSupportedServiceNames( )
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL PDFInteractionHandler_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw( Exception ) Reference< XInterface > SAL_CALL PDFInteractionHandler_createInstance( const Reference< XMultiServiceFactory > & ) throw( Exception )
{ {
return (cppu::OWeakObject*) new PDFInteractionHandler( rSMgr ); return (cppu::OWeakObject*) new PDFInteractionHandler;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -37,10 +37,6 @@ using namespace ::com::sun::star::lang; ...@@ -37,10 +37,6 @@ using namespace ::com::sun::star::lang;
class PDFInteractionHandler : public cppu::WeakImplHelper2 < task::XInteractionHandler2, class PDFInteractionHandler : public cppu::WeakImplHelper2 < task::XInteractionHandler2,
XServiceInfo > XServiceInfo >
{ {
private:
Reference< XMultiServiceFactory > mxMSF;
protected: protected:
// XServiceInfo // XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(RuntimeException); virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
...@@ -54,7 +50,7 @@ protected: ...@@ -54,7 +50,7 @@ protected:
virtual sal_Bool SAL_CALL handleInteractionRequest( const Reference< task::XInteractionRequest >& ) throw(RuntimeException); virtual sal_Bool SAL_CALL handleInteractionRequest( const Reference< task::XInteractionRequest >& ) throw(RuntimeException);
public: public:
PDFInteractionHandler( const Reference< XMultiServiceFactory >& rxMSF ); PDFInteractionHandler();
virtual ~PDFInteractionHandler(); virtual ~PDFInteractionHandler();
}; };
......
...@@ -255,7 +255,7 @@ sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::s ...@@ -255,7 +255,7 @@ sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::s
// An XML import service: what we push sax messages to.. // An XML import service: what we push sax messages to..
OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" ); OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" );
uno::Reference< XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY ); uno::Reference< XDocumentHandler > xInternalHandler( mxContext->getServiceManager()->createInstanceWithContext( sXMLImportService, mxContext ), UNO_QUERY );
uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY); uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
if (xImporter.is()) if (xImporter.is())
xImporter->setTargetDocument(mxDoc); xImporter->setTargetDocument(mxDoc);
...@@ -307,7 +307,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc ...@@ -307,7 +307,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
{ {
try try
{ {
::ucbhelper::Content aContent(sURL, xEnv, comphelper::getComponentContext(mxMSF)); ::ucbhelper::Content aContent(sURL, xEnv, mxContext);
xInputStream = aContent.openStream(); xInputStream = aContent.openStream();
} }
catch ( Exception& ) catch ( Exception& )
...@@ -377,7 +377,7 @@ Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( ...@@ -377,7 +377,7 @@ Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames(
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr) uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
throw( Exception ) throw( Exception )
{ {
return (cppu::OWeakObject*) new LotusWordProImportFilter( rSMgr ); return (cppu::OWeakObject*) new LotusWordProImportFilter( comphelper::getComponentContext(rSMgr) );
} }
// XServiceInfo // XServiceInfo
......
...@@ -50,7 +50,7 @@ private: ...@@ -50,7 +50,7 @@ private:
protected: protected:
// oo.org declares // oo.org declares
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
OUString msFilterName; OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler; ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
...@@ -61,8 +61,8 @@ protected: ...@@ -61,8 +61,8 @@ protected:
throw (::com::sun::star::uno::RuntimeException); throw (::com::sun::star::uno::RuntimeException);
public: public:
LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF) LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
: mxMSF( rxMSF ) {} : mxContext( rxContext ) {}
virtual ~LotusWordProImportFilter() {} virtual ~LotusWordProImportFilter() {}
// XFilter // XFilter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment