diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 21beb6965bf9..62eab11b16cc 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2146,11 +2146,16 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > const& // (and so if that happens, it may be better to fix Writer). // Create the redlines here from lowest (formats) to highest (inserts/removals) priority, since the last one is // what Writer presents graphically, so this will show deletes as deleted text and not as just formatted text being there. - if( GetTopContextOfType(CONTEXT_PARAGRAPH) ) + bool bUsedRange = m_aRedlines.top().size() > 0 || (GetTopContextOfType(CONTEXT_CHARACTER) && + GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().size() > 0); + + // only export ParagraphFormat, when there is no other redline in the same text portion to avoid missing redline compression + if( !bUsedRange && GetTopContextOfType(CONTEXT_PARAGRAPH) ) { std::vector<RedlineParamsPtr>& avRedLines = GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines(); for( const auto& rRedline : avRedLines ) CreateRedline( xRange, rRedline ); + return; } if( GetTopContextOfType(CONTEXT_CHARACTER) ) { |