From ed187fcbd457d01be6ac382d61b493039a5af7d5 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 17 Jul 2013 16:56:14 +0200 Subject: [PATCH] Related: fdo#65632 DOCX import: make start/end of trackchange both be an sprm The end is an attribute since 0211e8bc457a12570988f4aee7dea42c2fc6d56f, but this just confuses dmapper. With this, the DOCX version of the bugdoc can now be imported without getting an exception in DomainMapper_Impl::CreateRedline(). Change-Id: If820b43a267a62ecdc323eef49bf13d576165269 --- writerfilter/source/dmapper/DomainMapper.cxx | 6 +++--- writerfilter/source/ooxml/model.xml | 4 +++- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 632f35b73030..4fda96befec4 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1412,9 +1412,6 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) case NS_ooxml::LN_CT_Color_themeShade: //unsupported break; - case NS_ooxml::LN_endtrackchange: - m_pImpl->RemoveCurrentRedline( ); - break; case NS_ooxml::LN_CT_DocGrid_linePitch: { //see SwWW8ImplReader::SetDocumentGrid @@ -3298,6 +3295,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType m_pImpl->EndParaChange( ); } break; + case NS_ooxml::LN_endtrackchange: + m_pImpl->RemoveCurrentRedline( ); + break; case NS_ooxml::LN_CT_RPrChange_rPr: break; case NS_ooxml::LN_object: diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 4eb23928dd80..64126ce275cd 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -22090,7 +22090,9 @@ - + + + diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 1f09135873bd..bd6971b19857 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4432,10 +4432,10 @@ int RTFDocumentImpl::popState() RTFValue::Pointer_t pTrackchange = aState.aCharacterSprms.find(NS_ooxml::LN_trackchange); if (pTrackchange.get()) { - RTFSprms aTCAttributes; + RTFSprms aTCSprms; RTFValue::Pointer_t pValue(new RTFValue(0)); - aTCAttributes.set(NS_ooxml::LN_endtrackchange, pValue); - writerfilter::Reference::Pointer_t const pProperties(new RTFReferenceProperties(aTCAttributes)); + aTCSprms.set(NS_ooxml::LN_endtrackchange, pValue); + writerfilter::Reference::Pointer_t const pProperties(new RTFReferenceProperties(RTFSprms(), aTCSprms)); Mapper().props(pProperties); }