DOCX import: fix handling of embedded DOCX files

Desktop / LibreOffice - Miklos Vajna [collabora.co.uk] - 27 August 2014 08:34 UTC

The problem was that SwXTextEmbeddedObject::getEmbeddedObject() returned an empty reference for those embedded objects, so the HTML filter couldn't extract their content when it wanted to do so.

It turns out the reason for this was that the DOCX importer only handled the replacement image + raw native data for the object. Fix this by creating the embedded object with the correct CLSID and import the raw data into the empty embedded document model.

This is similar to what is done for XLSX-in-PPTX in oox::drawingml::ShapeExport::WriteOLE2Shape(), just for the import part.

41aa970 DOCX import: fix handling of embedded DOCX files
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 12 +++-
writerfilter/source/dmapper/OLEHandler.cxx | 69 ++++++++++++++++++++-
writerfilter/source/dmapper/OLEHandler.hxx | 16 ++++-
3 files changed, 93 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share