From 10a6a58e8d55f5d6c1ce7b6cba38f710b6edab6f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 9 Jan 2013 15:29:29 +0100 Subject: fdo#58933 RTF import: avoid fake pars / cells when having graphic inside cells Regression from 8063e36115a11ddf3db05928db9287947beee74d. (cherry picked from commit 555bc780c83114220012e198b5471a0d7452fb32) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ied422751783a00983bd137d6151e0d58217ef76d Reviewed-on: https://gerrit.libreoffice.org/1618 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 5529703cba29..a7677d1f3a50 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -785,15 +785,16 @@ int RTFDocumentImpl::resolvePict(bool bInline) writerfilter::Reference::Pointer_t const pProperties(new RTFReferenceProperties(aAttributes, aSprms)); checkFirstRun(); if (!m_pCurrentBuffer) + { Mapper().props(pProperties); + // Make sure we don't loose these properties with a too early reset. + m_bHadPicture = true; + } else { RTFValue::Pointer_t pValue(new RTFValue(aAttributes, aSprms)); m_pCurrentBuffer->push_back(make_pair(BUFFER_PROPS, pValue)); } - - // Make sure we don't loose these properties with a too early reset. - m_bHadPicture = true; return 0; } -- cgit v1.2.1