[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at suse.cz
Wed Jul 17 09:20:36 PDT 2013
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(-)
New commits:
commit ed187fcbd457d01be6ac382d61b493039a5af7d5
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Jul 17 16:56:14 2013 +0200
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
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 632f35b..4fda96b 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 4eb2392..64126ce 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22090,7 +22090,9 @@
<action name="start" action="tokenproperty"/>
<action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:trackchange"/>
<action name="start" action="clearProps"/>
- <action name="end" action="mark" sendtokenid="ooxml:endtrackchange"/>
+ <action name="end" action="tokenproperty"/>
+ <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/>
+ <action name="end" action="clearProps"/>
</resource>
<resource name="EG_RangeMarkupElements" resource="Properties" tag="redlines">
<element name="bookmarkStart" tokenid="ooxml:EG_RangeMarkupElements_bookmarkStart"/>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 1f09135..bd6971b 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<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(aTCAttributes));
+ aTCSprms.set(NS_ooxml::LN_endtrackchange, pValue);
+ writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(RTFSprms(), aTCSprms));
Mapper().props(pProperties);
}
More information about the Libreoffice-commits
mailing list