diff --git a/0001-rhbz-1180114-writerfilter-don-t-crash-on-w-customXml.patch b/0001-rhbz-1180114-writerfilter-don-t-crash-on-w-customXml.patch new file mode 100644 index 0000000..7806585 --- /dev/null +++ b/0001-rhbz-1180114-writerfilter-don-t-crash-on-w-customXml.patch @@ -0,0 +1,167 @@ +From f22964e0e622af1168e241f933e5cf98e093ec2b Mon Sep 17 00:00:00 2001 +From: Michael Stahl +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~|zMQ>F|^)oCLMd#swPxG^)vWt;wL6avO|u~sskBaeP-iF0)G(Q2|0yc}#KX>aPIF)W>) +z;>z?CGkV$8W)>!*$!c^zU`S>IHh8`fIWvp?aD7Z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OjD_D1*)3#K;Np>jfST~$oS!xYeH+sc-hpy-*veHLi@z6}%NUOx=z&$^c%DqkukYcupKj^vR!2s4D5}L)%-v$5m}rRB%t)Mx +z9tHDsb4N>AySpE%Dz{IDCS014e5R>cYR-fMIdd?)1{-X6#m()9;B&eaCq6j8HtqejxV}EB{_OZwd|018=+lxn{|Q$29nWiNZG +zZe)iXdG1d6lz&Tn?a7z)r`x}w04aY>OaKBksVWlQ5i9M86eMIL(5nT&HI +z>&%tQQ_PZ%Y+r!)7+l6$DQ~5(TuXEzz+-qr>7|FeEL_$q62~+fPtZh8|G56h)5n3wL+25Sg7|&@9YK%dk0-7pygspm{KEgA{B^hz +z59#j`{+(ple=S7Z0-!cjiKvqQ$Tj4@bIq|#b9{rxo7vF@?-C=^uVs%~+i~!5(>elw +zB=*MR7Iqwc+#!z8byR<#|M83C@Z*Q%2)+jT&m#jfB&RrhiHdliAhNG^_%8+cA4jT| +AG5`Po + +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 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +-- +2.1.0 + diff --git a/libreoffice.spec b/libreoffice.spec index f221e76..b721980 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -46,7 +46,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 1%{?libo_prerelease}%{?dist} +Release: 2%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0 Group: Applications/Productivity URL: http://www.libreoffice.org/ @@ -326,6 +326,7 @@ Patch18: 0001-radio-check-top-center-bottom-alignment-for-table-ce.patch Patch19: 0001-allow-comparing-documents-which-only-differ-by-frame.patch Patch20: 0001-classic-draw-rectangles-fit-to-contour-utterly-broke.patch Patch21: 0001-Use-the-same-advanced-Ellipse-and-Rectangle-shapes-i.patch +Patch22: 0001-rhbz-1180114-writerfilter-don-t-crash-on-w-customXml.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2349,6 +2350,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Thu Jan 15 2015 David Tardon - 1:4.4.0.2-2 +- Resolves: rhbz#1180114 writerfilter: don't crash on w:customXmlDelRangeStart + etc. + * Fri Jan 09 2015 David Tardon - 1:4.4.0.2-1 - update to 4.4.0 rc2