diff options
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b0ef95e0a785..863526d814fd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1834,6 +1834,24 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con } } + // apply redlines for inline images + if (IsParaWithInlineObject()) + { + for (const auto& rAnchored : rAppendContext.m_aAnchoredObjects) + { + // process only inline objects with redlining + if (!rAnchored.m_xRedlineForInline) + continue; + + // select the inline image and set its redline + auto xAnchorRange = rAnchored.m_xAnchoredObject->getAnchor(); + uno::Reference< text::XTextCursor > xCursorOnImage = + xAnchorRange->getText()->createTextCursorByRange(xAnchorRange); + xCursorOnImage->goRight(1, true); + CreateRedline( xCursorOnImage, rAnchored.m_xRedlineForInline ); + } + } + xTextRange = xTextAppend->finishParagraph( comphelper::containerToSequence(aProperties) ); m_xPreviousParagraph.set(xTextRange, uno::UNO_QUERY); @@ -7060,7 +7078,21 @@ void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties m_aTextAppendStack.top().m_aAnchoredObjects.push_back(aInfo); } else if (eGraphicImportType == IMPORT_AS_DETECTED_INLINE) + { m_bParaWithInlineObject = true; + + // store inline images with track changes, because the anchor point + // to set redlining is not available yet + if (!m_aTextAppendStack.empty() && !m_aRedlines.top().empty() ) + { + // Remember this object is anchored to the current paragraph. + AnchoredObjectInfo aInfo; + aInfo.m_xAnchoredObject = xTextContent; + aInfo.m_xRedlineForInline = m_aRedlines.top().back(); + m_aTextAppendStack.top().m_aAnchoredObjects.push_back(aInfo); + } + + } } // Clear the reference, so in case the embedded object is inside a |