diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-05-17 18:45:21 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-05-20 05:18:37 +0200 |
commit | 486d340423f28c94348efb807e3364bc94b18105 (patch) | |
tree | e478423cc19eaf331942d952d72be99fc641a922 /vcl/source/filter/graphicfilter.cxx | |
parent | 027b5a14830c0013ce79877eab66dcf309366ecc (diff) |
tdf#117502 fix graphical bullets for OOXML and RTF
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 <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/filter/graphicfilter.cxx')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 6c10f95e7094..6e37dd6d3ff1 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1655,8 +1655,14 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream) if( nStatus == ERRCODE_NONE ) { + bool bAnimated = false; + if (eLinkType == GfxLinkType::NativeGif) + { + SvMemoryStream aMemoryStream(pGraphicContent.get(), nGraphicContentSize, StreamMode::READ); + bAnimated = IsGIFAnimated(aMemoryStream); + } aGraphic.SetGfxLink(GfxLink(std::move(pGraphicContent), nGraphicContentSize, eLinkType)); - aGraphic.ImplGetImpGraphic()->ImplSetPrepared(); + aGraphic.ImplGetImpGraphic()->ImplSetPrepared(bAnimated); } } |