fdo#46808, Convert some more XMultiServiceFactory
Change-Id: Ib96976e0a40c025d1b6408aeadfc70d7885c11d4
This commit is contained in:
@@ -28,8 +28,7 @@
|
||||
// - PDFInteractionHandler -
|
||||
// -------------
|
||||
|
||||
PDFInteractionHandler::PDFInteractionHandler( const Reference< XMultiServiceFactory > &rxMSF ) :
|
||||
mxMSF( rxMSF )
|
||||
PDFInteractionHandler::PDFInteractionHandler()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
class PDFInteractionHandler : public cppu::WeakImplHelper2 < task::XInteractionHandler2,
|
||||
XServiceInfo >
|
||||
{
|
||||
private:
|
||||
|
||||
Reference< XMultiServiceFactory > mxMSF;
|
||||
|
||||
protected:
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
|
||||
@@ -54,7 +50,7 @@ protected:
|
||||
virtual sal_Bool SAL_CALL handleInteractionRequest( const Reference< task::XInteractionRequest >& ) throw(RuntimeException);
|
||||
public:
|
||||
|
||||
PDFInteractionHandler( const Reference< XMultiServiceFactory >& rxMSF );
|
||||
PDFInteractionHandler();
|
||||
virtual ~PDFInteractionHandler();
|
||||
};
|
||||
|
||||
|
@@ -255,7 +255,7 @@ sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::s
|
||||
// An XML import service: what we push sax messages to..
|
||||
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);
|
||||
if (xImporter.is())
|
||||
xImporter->setTargetDocument(mxDoc);
|
||||
@@ -307,7 +307,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
|
||||
{
|
||||
try
|
||||
{
|
||||
::ucbhelper::Content aContent(sURL, xEnv, comphelper::getComponentContext(mxMSF));
|
||||
::ucbhelper::Content aContent(sURL, xEnv, mxContext);
|
||||
xInputStream = aContent.openStream();
|
||||
}
|
||||
catch ( Exception& )
|
||||
@@ -377,7 +377,7 @@ Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames(
|
||||
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
|
||||
throw( Exception )
|
||||
{
|
||||
return (cppu::OWeakObject*) new LotusWordProImportFilter( rSMgr );
|
||||
return (cppu::OWeakObject*) new LotusWordProImportFilter( comphelper::getComponentContext(rSMgr) );
|
||||
}
|
||||
|
||||
// XServiceInfo
|
||||
|
@@ -50,7 +50,7 @@ private:
|
||||
|
||||
protected:
|
||||
// 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;
|
||||
OUString msFilterName;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
|
||||
@@ -61,8 +61,8 @@ protected:
|
||||
throw (::com::sun::star::uno::RuntimeException);
|
||||
|
||||
public:
|
||||
LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
|
||||
: mxMSF( rxMSF ) {}
|
||||
LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
|
||||
: mxContext( rxContext ) {}
|
||||
virtual ~LotusWordProImportFilter() {}
|
||||
|
||||
// XFilter
|
||||
|
Reference in New Issue
Block a user