summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/MetaImportComponent.hxx2
-rw-r--r--xmloff/inc/SchXMLImport.hxx2
-rw-r--r--xmloff/inc/xmloff/xmlimp.hxx9
-rw-r--r--xmloff/inc/xmlversion.hxx3
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx12
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx7
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx6
-rw-r--r--xmloff/source/core/xmlimp.cxx25
-rw-r--r--xmloff/source/draw/animationimport.cxx2
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx7
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx3
-rw-r--r--xmloff/source/draw/ximpstyl.cxx6
-rw-r--r--xmloff/source/forms/elementimport.cxx3
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx7
-rw-r--r--xmloff/source/meta/xmlmetai.cxx2
-rw-r--r--xmloff/source/meta/xmlversion.cxx13
-rw-r--r--xmloff/source/script/xmlbasici.cxx4
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx9
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.hxx4
19 files changed, 53 insertions, 73 deletions
diff --git a/xmloff/inc/MetaImportComponent.hxx b/xmloff/inc/MetaImportComponent.hxx
index 95934af06c3a..27568e9cf19f 100644
--- a/xmloff/inc/MetaImportComponent.hxx
+++ b/xmloff/inc/MetaImportComponent.hxx
@@ -36,7 +36,7 @@ public:
// #110680#
// XMLMetaImportComponent() throw();
XMLMetaImportComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext
) throw();
virtual ~XMLMetaImportComponent() throw();
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index f7ec314d2337..ad9efe967d27 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -165,7 +165,7 @@ protected:
public:
// #110680#
SchXMLImport(
- 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_uInt16 nImportFlags = IMPORT_ALL );
virtual ~SchXMLImport() throw ();
diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx
index 7e6381a867ad..24f1f9799c11 100644
--- a/xmloff/inc/xmloff/xmlimp.hxx
+++ b/xmloff/inc/xmloff/xmlimp.hxx
@@ -39,6 +39,7 @@
#include <com/sun/star/document/XGraphicObjectResolver.hpp>
#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/weak.hxx>
#include <xmloff/txtimp.hxx>
#include <xmloff/shapeimport.hxx>
@@ -50,7 +51,6 @@
#include <com/sun/star/beans/NamedValue.hpp>
namespace com { namespace sun { namespace star {
- namespace uno { class XComponentContext; }
namespace frame { class XModel; }
namespace io { class XOutputStream; }
namespace rdf { class XMetadatable; }
@@ -140,8 +140,6 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper6<
sal_uInt16 mnErrorFlags;
protected:
- // #110680#
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
::com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
sal_Bool mbIsFormsSupported;
@@ -184,7 +182,7 @@ public:
// #110680#
// SvXMLImport( sal_uInt16 nImportFlags = IMPORT_ALL ) throw();
SvXMLImport(
- 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_uInt16 nImportFlags = IMPORT_ALL ) throw();
virtual ~SvXMLImport() throw();
@@ -372,9 +370,6 @@ public:
::comphelper::UnoInterfaceToUniqueIdentifierMapper& getInterfaceToIdentifierMapper();
- // #110680#
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceFactory();
-
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
GetComponentContext() const;
diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 6c116edd4a8a..1d7595e89e62 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -68,9 +68,8 @@ protected:
public:
- // #110897#
XMLVersionListImport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions );
~XMLVersionListImport() throw();
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index f7002fdb26c8..234d43bb4a7c 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -537,9 +537,9 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
// #110680#
SchXMLImport::SchXMLImport(
- const Reference< lang::XMultiServiceFactory >& xServiceFactory,
+ const Reference< uno::XComponentContext >& xContext,
sal_uInt16 nImportFlags ) :
- SvXMLImport( xServiceFactory, nImportFlags )
+ SvXMLImport( xContext, nImportFlags )
{
GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
@@ -709,7 +709,7 @@ OUString SAL_CALL SchXMLImport_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport(rSMgr);
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr));
}
// ============================================================
@@ -731,7 +731,7 @@ OUString SAL_CALL SchXMLImport_Styles_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_STYLES );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_STYLES );
}
// ------------------------------------------------------------
@@ -751,7 +751,7 @@ OUString SAL_CALL SchXMLImport_Content_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS );
}
// ------------------------------------------------------------
@@ -771,7 +771,7 @@ OUString SAL_CALL SchXMLImport_Meta_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_META );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_META );
}
// XServiceInfo
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index c0dc4ce7e135..6379a13c4284 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -461,8 +461,7 @@ XMLConfigBaseContext::XMLConfigBaseContext(SvXMLImport& rImport, sal_uInt16 nPrf
const rtl::OUString& rLName, com::sun::star::uno::Any& rTempAny,
XMLConfigBaseContext* pTempBaseContext)
: SvXMLImportContext( rImport, nPrfx, rLName ),
- // #110680#
- maProps( comphelper::getComponentContext(rImport.getServiceFactory())),
+ maProps( rImport.GetComponentContext() ),
maProp(),
mrAny(rTempAny),
mpBaseContext(pTempBaseContext)
@@ -679,9 +678,9 @@ void XMLConfigItemContext::ManipulateConfigItem()
else if( (mrItemName == "ColorTableURL") || (mrItemName == "LineEndTableURL") || (mrItemName == "HatchTableURL")
|| (mrItemName == "DashTableURL") || (mrItemName == "GradientTableURL") || (mrItemName == "BitmapTableURL") )
{
- if( GetImport().getServiceFactory().is() ) try
+ try
{
- uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(GetImport().getServiceFactory()) );
+ uno::Reference< uno::XComponentContext > xContext( GetImport().GetComponentContext() );
uno::Reference< util::XStringSubstitution > xStringSubsitution( util::PathSubstitution::create(xContext) );
rtl::OUString aURL;
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 402c8a884538..fa5a264ebf78 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -150,11 +150,11 @@ sal_Bool XMLEmbeddedObjectImportContext::SetComponent(
Sequence<Any> aArgs( 0 );
- Reference< XMultiServiceFactory > xServiceFactory = GetImport().getServiceFactory();
+ Reference< XComponentContext > xContext( GetImport().GetComponentContext() );
xHandler = Reference < XDocumentHandler >(
- xServiceFactory->createInstanceWithArguments( sFilterService, aArgs),
- UNO_QUERY);
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext(sFilterService, aArgs, xContext),
+ UNO_QUERY);
if( !xHandler.is() )
return sal_False;
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index bfa39220bee9..6cc7330bedcc 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -289,7 +289,7 @@ public:
std::auto_ptr< DocumentInfo > mpDocumentInfo;
- SvXMLImport_Impl()
+ SvXMLImport_Impl( const uno::Reference< uno::XComponentContext >& rxContext)
: hBatsFontConv( 0 )
, hMathFontConv( 0 )
, mbOwnGraphicResolver( false )
@@ -298,7 +298,7 @@ public:
// Convert drawing object positions from OOo file format to OASIS (#i28749#)
, mbShapePositionInHoriL2R( sal_False )
, mbTextDocInOOoFileFormat( sal_False )
- , mxComponentContext( ::comphelper::getProcessComponentContext() )
+ , mxComponentContext( rxContext )
, mpRDFaHelper() // lazy
, mpDocumentInfo() // lazy
{
@@ -381,7 +381,7 @@ void SvXMLImport::_InitCtor()
msPackageProtocol = "vnd.sun.star.Package:";
if (mxNumberFormatsSupplier.is())
- mpNumImport = new SvXMLNumFmtHelper(mxNumberFormatsSupplier, comphelper::getComponentContext(getServiceFactory()));
+ mpNumImport = new SvXMLNumFmtHelper(mxNumberFormatsSupplier, GetComponentContext());
if (mxModel.is() && !mxEventListener.is())
{
@@ -393,14 +393,13 @@ void SvXMLImport::_InitCtor()
}
-// #110680#
SvXMLImport::SvXMLImport(
- 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_uInt16 nImportFlags ) throw ()
-: mpImpl( new SvXMLImport_Impl() ),
+: mpImpl( new SvXMLImport_Impl(xContext) ),
mpNamespaceMap( new SvXMLNamespaceMap ),
- mpUnitConv( new SvXMLUnitConverter( comphelper::getComponentContext(xServiceFactory),
+ mpUnitConv( new SvXMLUnitConverter( xContext,
util::MeasureUnit::MM_100TH, util::MeasureUnit::MM_100TH) ),
mpContexts( new SvXMLImportContexts_Impl ),
@@ -411,13 +410,11 @@ SvXMLImport::SvXMLImport(
mpStyleMap(0),
mnImportFlags( nImportFlags ),
mnErrorFlags(0),
- // #110680#
- mxServiceFactory(xServiceFactory),
mbIsFormsSupported( sal_True ),
mbIsTableShapeSupported( false ),
mbIsGraphicLoadOnDemandSupported( true )
{
- DBG_ASSERT( mxServiceFactory.is(), "got no service manager" );
+ DBG_ASSERT( xContext.is(), "got no service manager" );
_InitCtor();
}
@@ -1649,7 +1646,7 @@ void SvXMLImport::_CreateDataStylesImport()
uno::Reference<util::XNumberFormatsSupplier> xNum =
GetNumberFormatsSupplier();
if ( xNum.is() )
- mpNumImport = new SvXMLNumFmtHelper(xNum, comphelper::getComponentContext(getServiceFactory()));
+ mpNumImport = new SvXMLNumFmtHelper(xNum, GetComponentContext() );
}
@@ -1772,12 +1769,6 @@ void SvXMLImport::DisposingModel()
return mpImpl->maInterfaceToIdentifierMapper;
}
-::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SvXMLImport::getServiceFactory()
-{
- // #110680#
- return mxServiceFactory;
-}
-
uno::Reference< uno::XComponentContext >
SvXMLImport::GetComponentContext() const
{
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 );
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 907390f5fe6a..a52fbb21f013 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -642,7 +642,8 @@ namespace xmloff
Reference< XPropertySet > xReturn;
if (!m_sServiceName.isEmpty())
{
- Reference< XInterface > xPure = m_rFormImport.getGlobalContext().getServiceFactory()->createInstance(m_sServiceName);
+ Reference< XComponentContext > xContext = m_rFormImport.getGlobalContext().GetComponentContext();
+ Reference< XInterface > xPure = xContext->getServiceManager()->createInstanceWithContext(m_sServiceName, xContext);
OSL_ENSURE(xPure.is(),
::rtl::OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: ").append(rtl::OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr());
xReturn = Reference< XPropertySet >(xPure, UNO_QUERY);
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index f7de080a5b00..d1e7a8fa3648 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -24,6 +24,7 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlmetai.hxx>
#include <xmloff/nmspmap.hxx>
+#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -33,8 +34,8 @@ using namespace ::xmloff::token;
// #110680#
XMLMetaImportComponent::XMLMetaImportComponent(
- const uno::Reference< lang::XMultiServiceFactory >& xServiceFactory) throw()
- : SvXMLImport(xServiceFactory), mxDocProps()
+ const uno::Reference< uno::XComponentContext >& xContext) throw()
+ : SvXMLImport(xContext), mxDocProps()
{
}
@@ -96,7 +97,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaImportComponent_createInstance
throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new XMLMetaImportComponent(rSMgr);
+ return (cppu::OWeakObject*)new XMLMetaImportComponent( comphelper::getComponentContext(rSMgr));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index bf9956298dde..f7be45771743 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -152,7 +152,7 @@ lcl_initGenerator(SvXMLImport & rImport,
uno::UNO_SET_THROW);
try {
uno::Reference< xml::xpath::XXPathAPI > const xPath = xml::xpath::XPathAPI::create(
- comphelper::getComponentContext(rImport.getServiceFactory()) );
+ rImport.GetComponentContext() );
xPath->registerNS(GetXMLToken(XML_NP_OFFICE),GetXMLToken(XML_N_OFFICE));
xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META));
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 39c74cb17df2..3b13701cbb21 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -106,11 +106,10 @@ sal_uInt32 XMLVersionListExport::exportDoc( enum ::xmloff::token::XMLTokenEnum )
}
// ------------------------------------------------------------------------
-// #110897#
XMLVersionListImport::XMLVersionListImport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions )
-: SvXMLImport(xServiceFactory),
+: SvXMLImport(xContext),
maVersions( rVersions )
{
GetNamespaceMap().AddAtIndex( XML_NAMESPACE_FRAMEWORK_IDX, xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST),
@@ -396,9 +395,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
try {
if ( xRootNames.is() && xRootNames->hasByName( sDocName ) && xRoot->isStreamElement( sDocName ) )
{
- Reference< lang::XMultiServiceFactory > xServiceFactory =
- comphelper::getProcessServiceFactory();
- DBG_ASSERT( xServiceFactory.is(), "XMLReader::Read: got no service manager" );
+ Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
InputSource aParserInput;
@@ -426,10 +423,10 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
throw uno::RuntimeException();
// get filter
- Reference< XDocumentHandler > xFilter = new XMLVersionListImport( xServiceFactory, aVersions );
+ Reference< XDocumentHandler > xFilter = new XMLVersionListImport( xContext, aVersions );
// connect parser and filter
- Reference< XParser > xParser = xml::sax::Parser::create(comphelper::getComponentContext(xServiceFactory));
+ Reference< XParser > xParser = xml::sax::Parser::create(xContext);
xParser->setDocumentHandler( xFilter );
// parse
diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx
index 188608a19c85..b67b56fe8955 100644
--- a/xmloff/source/script/xmlbasici.cxx
+++ b/xmloff/source/script/xmlbasici.cxx
@@ -37,8 +37,8 @@ XMLBasicImportContext::XMLBasicImportContext( SvXMLImport& rImport, sal_uInt16 n
:SvXMLImportContext( rImport, nPrfx, rLName )
,m_xModel( rxModel )
{
- Reference< lang::XMultiServiceFactory > xMSF = GetImport().getServiceFactory();
- m_xHandler = document::XMLOasisBasicImporter::create( comphelper::getComponentContext(xMSF) );
+ Reference< uno::XComponentContext > xContext = GetImport().GetComponentContext();
+ m_xHandler = document::XMLOasisBasicImporter::create( xContext );
Reference< lang::XComponent > xComp( m_xModel, UNO_QUERY );
m_xHandler->setTargetDocument( xComp );
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index c313accca867..875b29a6eb25 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -27,6 +27,7 @@
#include "xmloff/xmlnmspe.hxx"
#include <xmloff/xmltoken.hxx>
#include <tools/debug.hxx>
+#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star;
@@ -50,8 +51,8 @@ const sal_Char sAPI_AutoText[] = "com.sun.star.text.AutoTextContainer";
// #110680#
XMLAutoTextEventImport::XMLAutoTextEventImport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory) throw()
-: SvXMLImport(xServiceFactory)
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext) throw()
+: SvXMLImport(xContext)
{
}
@@ -126,9 +127,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventImport_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new XMLAutoTextEventImport;
- return (cppu::OWeakObject*)new XMLAutoTextEventImport(rSMgr);
+ return (cppu::OWeakObject*)new XMLAutoTextEventImport( comphelper::getComponentContext(rSMgr) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLAutoTextEventImport.hxx b/xmloff/source/text/XMLAutoTextEventImport.hxx
index a18501ccf6a1..ec4de83c9d2b 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.hxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.hxx
@@ -45,10 +45,8 @@ class XMLAutoTextEventImport : public SvXMLImport
::com::sun::star::container::XNameReplace> xEvents;
public:
- // #110680#
- // XMLAutoTextEventImport() throw();
XMLAutoTextEventImport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext
) throw();
~XMLAutoTextEventImport() throw();