[Libreoffice-commits] core.git: 2 commits - sw/qa writerfilter/documentation writerfilter/source
Michael Stahl
mstahl at redhat.com
Wed Jan 14 14:14:30 PST 2015
sw/qa/extras/ooxmlimport/data/rhbz1180114.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 +++++
writerfilter/documentation/ooxml/model.rng | 2 ++
writerfilter/source/dmapper/DomainMapper.cxx | 6 ++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3 ++-
writerfilter/source/ooxml/model.xml | 16 ++++++++++++++++
6 files changed, 31 insertions(+), 1 deletion(-)
New commits:
commit f22964e0e622af1168e241f933e5cf98e093ec2b
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 14 23:01:41 2015 +0100
rhbz#1180114: writerfilter: don't crash on w:customXmlDelRangeStart etc.
We can't do anything sensible with these CustomXML elements but now we
have to handle them because.
(regression from 9dbf817fe5c5253fba0831aefa17575ae0ba3af1)
Change-Id: If4247890ff9961a77434587802670d28608a7922
diff --git a/sw/qa/extras/ooxmlimport/data/rhbz1180114.docx b/sw/qa/extras/ooxmlimport/data/rhbz1180114.docx
new file mode 100644
index 0000000..23009eb
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/rhbz1180114.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 5bec69c..7e8c62d 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -757,6 +757,11 @@ DECLARE_OOXMLIMPORT_TEST(testN779834, "n779834.docx")
// This document simply crashed the importer.
}
+DECLARE_OOXMLIMPORT_TEST(testRHBZ1180114, "rhbz1180114.docx")
+{
+ // This document simply crashed the importer.
+}
+
DECLARE_OOXMLIMPORT_TEST(testN779627, "n779627.docx")
{
/*
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index cb45bb4..461c138 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2213,6 +2213,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_PPr_pPrChange:
case NS_ooxml::LN_trackchange:
case NS_ooxml::LN_EG_RPrContent_rPrChange:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlDelRangeStart:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlDelRangeEnd:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlMoveFromRangeStart:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlMoveFromRangeEnd:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlMoveToRangeStart:
+ case NS_ooxml::LN_EG_RangeMarkupElements_customXmlMoveToRangeEnd:
{
HandleRedline( rSprm );
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 57f491f..e97c133 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4836,9 +4836,10 @@ void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
{
// This should be an assert, but somebody had the smart idea to reuse this function also for comments and whatnot,
// and in some cases the id is actually not handled, which may be in fact a bug.
- SAL_WARN( "writerfilter", !m_currentRedline.get());
if( m_currentRedline.get())
m_currentRedline->m_nId = sId;
+ else
+ SAL_INFO("writerfilter.dmapper", "no current redline");
}
}
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index fc671af..f1c721f 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -17281,6 +17281,22 @@
<resource name="CT_TrackChange" resource="Properties">
<attribute name="author" tokenid="ooxml:CT_TrackChange_author"/>
<attribute name="date" tokenid="ooxml:CT_TrackChange_date"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeStart" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeStart"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeStart" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeEnd" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeEnd"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeEnd" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeStart" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeStart"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeStart" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeEnd" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeEnd"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeEnd" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeStart" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeStart"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeStart" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeEnd" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeEnd"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeEnd" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart" action="clearProps"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd"/>
+ <action name="end" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd" action="clearProps"/>
</resource>
<resource name="CT_CellMergeTrackChange" resource="Properties">
<attribute name="vMerge" tokenid="ooxml:CT_CellMergeTrackChange_vMerge"/>
commit 06291ac5635a2d3e2f12611671bd3a355e43c2ca
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 14 22:43:30 2015 +0100
writerfilter: document action tokenid
Change-Id: I5c8118682cdb2c6fb5b86c9eafa30dbfd4b67f1f
diff --git a/writerfilter/documentation/ooxml/model.rng b/writerfilter/documentation/ooxml/model.rng
index 33e7b4e..cdd678e 100644
--- a/writerfilter/documentation/ooxml/model.rng
+++ b/writerfilter/documentation/ooxml/model.rng
@@ -387,6 +387,8 @@ documentation for that file. The schema has two parts:
- end of the element
- character data of the element
+ The tokenid attribute restricts the action to a particular element.
+
Example:
<resource name="CT_TxbxContent" resource="Stream">
More information about the Libreoffice-commits
mailing list