writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit e02c37866b7fd6984efbeeccafe2b04bcb34c1c4 Author: Michael Stahl <mst...@redhat.com> Date: Thu Oct 2 21:38:22 2014 +0200 writerfilter: that fallback appears necessary after all... Change-Id: Id4bc638c81d695745fc44bde16252e3040f0a03c diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index c8d8ae9..c31b7fa 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -810,9 +810,12 @@ int RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XSh uno::Reference<lang::XServiceInfo> xSI(xShape, uno::UNO_QUERY_THROW); if (!xSI->supportsService("com.sun.star.drawing.GraphicObjectShape")) { - //fdo37691-1.rtf - SAL_WARN("writerfilter.rtf", "cannot set graphic on existing shape, creating a new GraphicObjectShape"); - xShape.set(NULL); + // it's sometimes an error to get here - but it's possible to have + // a \pict inside the \shptxt of a \shp of shapeType 202 "TextBox" + // and in that case xShape is the text frame; we actually need a + // new GraphicObject then (example: fdo37691-1.rtf) + SAL_INFO("writerfilter.rtf", "cannot set graphic on existing shape, creating a new GraphicObjectShape"); + xShape.clear(); } } if (!xShape.is()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits