From 783269e91e2166357a9fb095e64a1d48e6f0601a Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 16 Jun 2017 17:16:22 +0200 Subject: emfplus: completed isolation/migration of Emf/Wmf Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a --- oox/source/drawingml/shape.cxx | 2 +- oox/source/helper/graphichelper.cxx | 6 +++--- oox/source/vml/vmlshape.cxx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a01fd47075d0..3368cd0c315a 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1288,7 +1288,7 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe if( !aGraphicPath.isEmpty() ) { // Transfer shape's width and height to graphicsfilter (can be used by WMF/EMF) - WMF_EXTERNALHEADER aExtHeader; + WmfExternal aExtHeader; aExtHeader.mapMode = 8; // MM_ANISOTROPIC aExtHeader.xExt = rShapeRect.Width; aExtHeader.yExt = rShapeRect.Height; diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index fb114290f25b..abd58b2a065e 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -233,7 +233,7 @@ awt::Size GraphicHelper::convertHmmToAppFont( const awt::Size& rHmm ) const // Graphics and graphic objects ---------------------------------------------- Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStream >& rxInStrm, - const WMF_EXTERNALHEADER* pExtHeader ) const + const WmfExternal* pExtHeader ) const { Reference< XGraphic > xGraphic; if( rxInStrm.is() && mxGraphicProvider.is() ) try @@ -330,7 +330,7 @@ void GraphicHelper::importEmbeddedGraphics(const std::vector& rStreamN } } -Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStreamName, const WMF_EXTERNALHEADER* pExtHeader ) const +Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStreamName, const WmfExternal* pExtHeader ) const { Reference< XGraphic > xGraphic; OSL_ENSURE( !rStreamName.isEmpty(), "GraphicHelper::importEmbeddedGraphic - empty stream name" ); @@ -366,7 +366,7 @@ OUString GraphicHelper::createGraphicObject( const Reference< XGraphic >& rxGrap } OUString GraphicHelper::importGraphicObject( const Reference< XInputStream >& rxInStrm, - const WMF_EXTERNALHEADER* pExtHeader ) const + const WmfExternal* pExtHeader ) const { return createGraphicObject( importGraphic( rxInStrm, pExtHeader ) ); } diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index f091326e0c1e..b0dda2a6a134 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -1163,7 +1163,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes // set the replacement graphic if( !aGraphicPath.isEmpty() ) { - WMF_EXTERNALHEADER aExtHeader; + WmfExternal aExtHeader; aExtHeader.mapMode = 8; aExtHeader.xExt = rShapeRect.Width; aExtHeader.yExt = rShapeRect.Height; -- cgit