diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-04 13:20:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:43 +0200 |
commit | a6a8a8707b6ae111f94bac094d3c2909f523ca6f (patch) | |
tree | 402b668480b3106df0d3055cff037c8a768a419c /xmloff/source/draw | |
parent | f1204419af34b1d2f0ecaa69ceeb1f8c8a7d87df (diff) |
fdo#46808, convert xmloff module code to use XComponentContext
with lots of repurcussions in other modules
Change-Id: I6982671eecc701b06cf85d93533e1fe618044fea
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp_impl.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 32eeae9baa1c..24a8565779a2 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1282,7 +1282,7 @@ private: }; AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxContext ) -: SvXMLImport( Reference<XMultiServiceFactory>(rxContext->getServiceManager(), UNO_QUERY_THROW) , true ) +: SvXMLImport( rxContext , true ) { // add namespaces GetNamespaceMap().Add( diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 38cc4c0ac9df..6797c739f4ea 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -19,6 +19,7 @@ #include <osl/thread.h> +#include <comphelper/processfactory.hxx> #include <xmloff/xmlscripti.hxx> #include "sdxmlimp_impl.hxx" @@ -295,7 +296,7 @@ OUString SAL_CALL classname##_getImplementationName() throw()\ }\ uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )\ {\ - return (cppu::OWeakObject*)new SdXMLImport( rSMgr, draw, flags );\ + return (cppu::OWeakObject*)new SdXMLImport( comphelper::getComponentContext(rSMgr), draw, flags );\ } SERVICE( XMLImpressImportOasis, "com.sun.star.comp.Impress.XMLOasisImporter", "XMLImpressImportOasis", sal_False, IMPORT_ALL ) @@ -317,9 +318,9 @@ SERVICE( XMLDrawSettingsImportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsImp // #110680# SdXMLImport::SdXMLImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext, sal_Bool bIsDraw, sal_uInt16 nImportFlags ) -: SvXMLImport( xServiceFactory, nImportFlags ), +: SvXMLImport( xContext, nImportFlags ), mpMasterStylesContext(0L), mpDocElemTokenMap(0L), mpBodyElemTokenMap(0L), diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 1bdb3acdccf5..dbede52ec884 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -227,9 +227,8 @@ protected: com::sun::star::xml::sax::XAttributeList>& xAttrList); public: - // #110680# SdXMLImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext, sal_Bool bIsDraw, sal_uInt16 nImportFlags = IMPORT_ALL ); ~SdXMLImport() throw (); diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 94ca2f7615d3..73a1d637a4e9 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1001,9 +1001,9 @@ SdXMLStylesContext::SdXMLStylesContext( : SvXMLStylesContext(rImport, nPrfx, rLName, xAttrList), mbIsAutoStyle(bIsAutoStyle) { - Reference< lang::XMultiServiceFactory > xMSF = rImport.getServiceFactory(); - mpNumFormatter = new SvNumberFormatter( comphelper::getComponentContext(xMSF), LANGUAGE_SYSTEM ); - mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter, comphelper::getComponentContext(xMSF) ); + Reference< uno::XComponentContext > xContext = rImport.GetComponentContext(); + mpNumFormatter = new SvNumberFormatter( xContext, LANGUAGE_SYSTEM ); + mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter, xContext ); } ////////////////////////////////////////////////////////////////////////////// |