parent
4fb421c48b
commit
9fff4d34cb
@ -0,0 +1,167 @@
|
|||||||
|
From f22964e0e622af1168e241f933e5cf98e093ec2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Stahl <mstahl@redhat.com>
|
||||||
|
Date: Wed, 14 Jan 2015 23:01:41 +0100
|
||||||
|
Subject: [PATCH] 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
|
||||||
|
---
|
||||||
|
sw/qa/extras/ooxmlimport/data/rhbz1180114.docx | Bin 0 -> 3435 bytes
|
||||||
|
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 +++++
|
||||||
|
writerfilter/source/dmapper/DomainMapper.cxx | 6 ++++++
|
||||||
|
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3 ++-
|
||||||
|
writerfilter/source/ooxml/model.xml | 16 ++++++++++++++++
|
||||||
|
5 files changed, 29 insertions(+), 1 deletion(-)
|
||||||
|
create mode 100644 sw/qa/extras/ooxmlimport/data/rhbz1180114.docx
|
||||||
|
|
||||||
|
diff --git a/sw/qa/extras/ooxmlimport/data/rhbz1180114.docx b/sw/qa/extras/ooxmlimport/data/rhbz1180114.docx
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..23009ebbdc827c0d23fb9bac24b481548110f277
|
||||||
|
GIT binary patch
|
||||||
|
literal 3435
|
||||||
|
zcmZ`+c{o&UAD*#~eJiprgUK$6EZO%aLxapDSu?T^S+nmUJ41FQLKG7wQPz?rWM@Q*
|
||||||
|
zEEAG7eWR}TQr`DF=Q_{x&$*xL`Q7J!?%#c2hNNVy000#g0OB2_npN3OJp}*&v`7E|
|
||||||
|
z8sco_Y441dk~|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||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
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"/>
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
Loading…
Reference in new issue