summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/inc/xmloff/xmlexp.hxx3
-rw-r--r--xmloff/source/core/RDFaExportHelper.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx17
3 files changed, 4 insertions, 20 deletions
diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx
index a9ec4448825a..7482971c1614 100644
--- a/xmloff/inc/xmloff/xmlexp.hxx
+++ b/xmloff/inc/xmloff/xmlexp.hxx
@@ -526,9 +526,6 @@ public:
// #110680#
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceFactory();
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- GetComponentContext() const;
-
// Shapes in Writer cannot be named via context menu (#i51726#)
SvtModuleOptions::EFactory GetModelType() const
{
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index 052c76c82ecf..2b278b242ac0 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -27,6 +27,7 @@
#include <comphelper/stlunosequence.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
@@ -86,8 +87,7 @@ getRelativeReference(SvXMLExport const& rExport, ::rtl::OUString const& rURI)
rExport.GetModel(), uno::UNO_QUERY_THROW );
::rtl::OUString const baseURI( xModelURI->getStringValue() );
- uno::Reference<uno::XComponentContext> const xContext(
- rExport.GetComponentContext());
+ uno::Reference<uno::XComponentContext> xContext( comphelper::getProcessComponentContext() );
uno::Reference<uri::XUriReferenceFactory> const xUriFactory =
uri::UriReferenceFactory::create( xContext );
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index b51e8968f550..1ac34542f76c 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -265,8 +265,6 @@ public:
/// relative path of stream in package, e.g. "someobject/content.xml"
::rtl::OUString mStreamPath;
- const uno::Reference< uno::XComponentContext > mxComponentContext;
-
/// name of stream in package, e.g., "content.xml"
::rtl::OUString mStreamName;
@@ -293,7 +291,6 @@ SvXMLExport_Impl::SvXMLExport_Impl()
// Written OpenDocument file format doesn't fit to the created text document (#i69627#)
: mbOutlineStyleAsNormalListStyle( false )
,mbSaveBackwardCompatibleODF( sal_True )
- ,mxComponentContext( ::comphelper::getProcessComponentContext() )
,mStreamName()
,mNamespaceMaps()
,mDepth(0)
@@ -301,10 +298,7 @@ SvXMLExport_Impl::SvXMLExport_Impl()
,mbExportTextNumberElement( sal_False )
,mbNullDateInitialized( sal_False )
{
- OSL_ENSURE(mxComponentContext.is(), "SvXMLExport: no ComponentContext");
- if (!mxComponentContext.is()) throw uno::RuntimeException();
- mxUriReferenceFactory = uri::UriReferenceFactory::create(
- mxComponentContext );
+ mxUriReferenceFactory = uri::UriReferenceFactory::create( comphelper::getProcessComponentContext() );
}
//==============================================================================
@@ -430,8 +424,7 @@ void SvXMLExport::_InitCtor()
{
mpImpl->mbSaveBackwardCompatibleODF =
officecfg::Office::Common::Save::Document::
- SaveBackwardCompatibleODF::get(
- mpImpl->mxComponentContext);
+ SaveBackwardCompatibleODF::get( comphelper::getProcessComponentContext() );
}
}
@@ -2377,12 +2370,6 @@ void SvXMLExport::DisposingModel()
return mxServiceFactory;
}
-uno::Reference< uno::XComponentContext >
-SvXMLExport::GetComponentContext() const
-{
- return mpImpl->mxComponentContext;
-}
-
::comphelper::UnoInterfaceToUniqueIdentifierMapper& SvXMLExport::getInterfaceToIdentifierMapper()
{
return mpImpl->maInterfaceToIdentifierMapper;