From ec83990d247433feaba2e89b61430732d377b363 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 29 Nov 2012 20:56:12 +0100 Subject: DomainMapper_Impl::finishParagraph: also handle insert of multi-para frames Change-Id: Id2e761ab1c9fc9c5fd0837d1801af95674d0f99a --- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c5b04ad6d08d..9381f73d4ba3 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1012,7 +1012,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) else if(*rAppendContext.pLastParagraphProperties == *pParaContext ) { //handles (7) - rAppendContext.pLastParagraphProperties->SetEndingRange(xTextAppend->getEnd()); + rAppendContext.pLastParagraphProperties->SetEndingRange(rAppendContext.xInsertPosition.is() ? rAppendContext.xInsertPosition : xTextAppend->getEnd()); bKeepLastParagraphProperties = true; } else @@ -1058,6 +1058,8 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) { xTextRange = xTextAppend->finishParagraphInsert( aProperties, rAppendContext.xInsertPosition ); rAppendContext.xCursor->gotoNextParagraph(false); + if (rAppendContext.pLastParagraphProperties.get()) + rAppendContext.pLastParagraphProperties->SetEndingRange(xTextRange->getEnd()); } else xTextRange = xTextAppend->finishParagraph( aProperties ); -- cgit