diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-06-09 19:55:17 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-07-15 11:01:29 +0200 |
commit | 83535a28c57ffb59f795dd35332d6b3426071e32 (patch) | |
tree | a35406c5ed8c7971681385cbb081aad325e1cf54 /svtools/source/graphic/grfcache.cxx | |
parent | 79f5cb620984c4d04d53a497e698472b2192d2bb (diff) |
emfplus: create a wmf/emf/emf+ primitive based importer
First steps to organize an importer that can read/interpret
wmf/emf/emf+ and deliver a primitive representation for
the content by parsing it. Use the same mechanisms as
already applied for Svg, so to reuse abilities to keep
original binary data to allow save again and embedding in
files and have an implemented replacement bitmap based
representation. For this, unify the used helper classes
to handle more than just Svg. For 1st try, add test code
and static bool switches
Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
Diffstat (limited to 'svtools/source/graphic/grfcache.cxx')
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 4fbc04362a5c..6945de277d98 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -70,15 +70,15 @@ GraphicID::GraphicID( const GraphicObject& rObj ) { case GraphicType::Bitmap: { - if(rGraphic.getSvgData().get()) + if(rGraphic.getVectorGraphicData().get()) { - const SvgDataPtr& rSvgDataPtr = rGraphic.getSvgData(); - const basegfx::B2DRange& rRange = rSvgDataPtr->getRange(); + const VectorGraphicDataPtr& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData(); + const basegfx::B2DRange& rRange = rVectorGraphicDataPtr->getRange(); - mnID1 |= rSvgDataPtr->getSvgDataArrayLength(); + mnID1 |= rVectorGraphicDataPtr->getVectorGraphicDataArrayLength(); mnID2 = basegfx::fround(rRange.getWidth()); mnID3 = basegfx::fround(rRange.getHeight()); - mnID4 = vcl_get_checksum(0, rSvgDataPtr->getSvgDataArray().getConstArray(), rSvgDataPtr->getSvgDataArrayLength()); + mnID4 = vcl_get_checksum(0, rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()); } else if( rGraphic.IsAnimated() ) { @@ -145,15 +145,15 @@ private: std::vector< GraphicObject* > maGraphicObjectList; - GraphicID maID; - GfxLink maGfxLink; - BitmapEx* mpBmpEx; - GDIMetaFile* mpMtf; - Animation* mpAnimation; - bool mbSwappedAll; + GraphicID maID; + GfxLink maGfxLink; + BitmapEx* mpBmpEx; + GDIMetaFile* mpMtf; + Animation* mpAnimation; + bool mbSwappedAll; - // SvgData support - SvgDataPtr maSvgData; + // VectorGraphicData support + VectorGraphicDataPtr maVectorGraphicData; uno::Sequence<sal_Int8> maPdfData; bool ImplInit( const GraphicObject& rObj ); @@ -229,9 +229,9 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) { case GraphicType::Bitmap: { - if(rGraphic.getSvgData().get()) + if(rGraphic.getVectorGraphicData().get()) { - maSvgData = rGraphic.getSvgData(); + maVectorGraphicData = rGraphic.getVectorGraphicData(); } else if( rGraphic.IsAnimated() ) { @@ -280,9 +280,9 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) if( rSubstitute.IsLink() && ( GfxLinkType::NONE == maGfxLink.GetType() ) ) maGfxLink = rSubstitute.GetLink(); - if(maSvgData.get()) + if(maVectorGraphicData.get()) { - rSubstitute = maSvgData; + rSubstitute = maVectorGraphicData; } else if( mpBmpEx ) { @@ -381,8 +381,8 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut() delete mpAnimation; mpAnimation = nullptr; - // #119176# also reset SvgData - maSvgData.reset(); + // #119176# also reset VectorGraphicData + maVectorGraphicData.reset(); maPdfData = uno::Sequence<sal_Int8>(); } } |