From 486d340423f28c94348efb807e3364bc94b18105 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 17 May 2018 18:45:21 +0900 Subject: tdf#117502 fix graphical bullets for OOXML and RTF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change has multiple parts: - Move "BulletAsImage" test from ODT only to globalfilter and run it on ODT, DOC, DOCX, RTF formats and extend checks of the XGraphic used for the bullets and the size. - Check if GIF is animated as we need to know this in unloaded graphic or bullets aren't rendered correctly if we assume they are animated. - Use "Graphic" property in writerfilter to get the graphic from a XShape and not the "Bitmap" property which returns a Graphic as a MetaFile and not the original Graphic. - Make sure "GraphicBitmap" is filled with XBitmap and not with XGraphic. - Change "testFDO74215" to use the expected bullet size as it is in the original document. Looks like the initial bug was just asserting the bullet size is set to a value (non-zero). Change-Id: I6b151c0bf9f426669e07522f0fc699fbb652046b Reviewed-on: https://gerrit.libreoffice.org/54477 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/source/gdi/impgraph.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vcl/source/gdi') diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 61e062a43467..c718f9673610 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -512,7 +512,7 @@ ImpSwapFile::~ImpSwapFile() } } -void ImpGraphic::ImplSetPrepared() +void ImpGraphic::ImplSetPrepared(bool bAnimated) { mbPrepared = true; mbSwapOut = true; @@ -545,11 +545,7 @@ void ImpGraphic::ImplSetPrepared() maSwapInfo.mbIsEPS = false; maSwapInfo.mbIsTransparent = false; maSwapInfo.mbIsAlpha = false; - - if (mpGfxLink->GetType() == GfxLinkType::NativeGif) - { - maSwapInfo.mbIsAnimated = true; - } + maSwapInfo.mbIsAnimated = bAnimated; } void ImpGraphic::ImplClear() -- cgit