sw XHTML import: support OLE2-in-RTF objects

Desktop / LibreOffice - Miklos Vajna [collabora.co.uk] - 23 March 2018 13:52 EDT

If you like layering things on top of each other, then this commit message is for you. So it's possible to have a PPTX file in the following wrappers:

- wrap PPTX in a binary OLE2 container- wrap that in an OLE1 container- wrap that in an RTF fragment- wrap that in an XHTML fragment (in a ReqIF file)

Turns out that only the RTF and OLE1 unwrapping was missing, the rest worked already, so implement the missing piece in a new SwReqIfReader namespace.

Finally extend OleEmbeddedObject to be able to read its native data stream when the object is opened, reading it from the storage would fail, as the object already opened the storage stream.

Change-Id: I2934c9fb7474e981ff6bb2f7eb253a3a86cfd98b Reviewed-on: https://gerrit.libreoffice.org/51772

781c1181718c sw XHTML import: support OLE2-in-RTF objects
embeddedobj/source/inc/oleembobj.hxx | 7 +-
embeddedobj/source/msole/olemisc.cxx | 10 +
sw/Library_sw.mk | 1 +
sw/qa/extras/htmlimport/data/ole2.ole | 1014 +++++++++++++++++++++++++
sw/qa/extras/htmlimport/data/ole2.png | Bin 0 -> 766 bytes
sw/qa/extras/htmlimport/data/reqif-ole2.xhtml | 5 +
sw/qa/extras/htmlimport/htmlimport.cxx | 19 +
sw/source/filter/html/htmlplug.cxx | 26 +-
sw/source/filter/html/htmlreqifreader.cxx | 146 ++++
sw/source/filter/html/htmlreqifreader.hxx | 22 +
10 files changed, 1248 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org


  • Share