summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-16 17:12:47 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:11 +0200
commite5fdaec54a54e42b487c37e6b01493bcdfc30b4c (patch)
tree26421d24cee78af24feb748fc52845f279dd299e /xmloff/source/draw
parentc4d051c5dbee532264e1bfc2ccdb337c6dcf83ed (diff)
fdo#46808, Adapt document::XML*BasicExporter UNO services to new style
The services are document::XMLBasicExporter document::XMLOasisBasicExporter Change-Id: Ifd93e5735cae94d34904d79769cdb3edf587fe43
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx7
-rw-r--r--xmloff/source/draw/sdxmlexp_impl.hxx3
-rw-r--r--xmloff/source/draw/shapeexport4.cxx6
3 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 237f670c45f0..d33db725215f 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -64,6 +64,7 @@
#include <cppuhelper/implbase1.hxx>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include "PropertySetMerger.hxx"
#include "layerexp.hxx"
@@ -396,9 +397,9 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
// #110680#
SdXMLExport::SdXMLExport(
- 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 nExportFlags )
-: SvXMLExport( util::MeasureUnit::CM, xServiceFactory,
+: SvXMLExport( util::MeasureUnit::CM, xContext,
(bIsDraw) ? XML_GRAPHICS : XML_PRESENTATION, nExportFlags ),
mnDocMasterPageCount(0L),
mnDocDrawPageCount(0L),
@@ -2802,7 +2803,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 SdXMLExport( rSMgr, draw, flags );\
+ return (cppu::OWeakObject*)new SdXMLExport( comphelper::getComponentContext(rSMgr), draw, flags );\
}
SERVICE( XMLImpressExportOasis, "com.sun.star.comp.Impress.XMLOasisExporter", "XMLImpressExportOasis", sal_False, EXPORT_OASIS|EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS|EXPORT_FONTDECLS|EXPORT_EMBEDDED );
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index 3e3f1e445833..166f57328e17 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -176,9 +176,8 @@ protected:
virtual void GetConfigurationSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
public:
- // #110680#
SdXMLExport(
- 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 nExportFlags = EXPORT_ALL );
virtual ~SdXMLExport();
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index ce504fe2b793..58b895e24f4e 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -1234,7 +1234,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue( OUString( "ReplacementGraphic" ) ), uno::UNO_QUERY );
if( xGraphic.is() ) try
{
- Reference< lang::XMultiServiceFactory > xSM( GetExport().getServiceFactory(), UNO_QUERY_THROW );
+ Reference< uno::XComponentContext > xContext = GetExport().getComponentContext();
uno::Reference< embed::XStorage > xPictureStorage;
uno::Reference< embed::XStorage > xStorage;
@@ -1243,7 +1243,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
OUString sPictureName;
if( bExportEmbedded )
{
- xPictureStream.set( xSM->createInstance( OUString( "com.sun.star.comp.MemoryStream" ) ), UNO_QUERY_THROW );
+ xPictureStream.set( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.comp.MemoryStream", xContext), UNO_QUERY_THROW );
}
else
{
@@ -1265,7 +1265,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
xPictureStream.set( xPictureStorage->openStreamElement( sPictureName, ::embed::ElementModes::READWRITE ), UNO_QUERY_THROW );
}
- Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(comphelper::getComponentContext(xSM)) );
+ Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) );
Sequence< beans::PropertyValue > aArgs( 2 );
aArgs[ 0 ].Name = OUString( "MimeType" );
aArgs[ 0 ].Value <<= OUString( "image/x-vclgraphic" );