[libreoffice] Resolves: rhbz#1165740 arbitrarily backport some rtf crash fixes

Caolán McNamara caolanm at fedoraproject.org
Wed Nov 19 15:51:01 UTC 2014


commit eb6cfe2c7cb0f7ce25191c8609e18338312baece
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 19 15:50:58 2014 +0000

    Resolves: rhbz#1165740 arbitrarily backport some rtf crash fixes

 0001-Resolves-fdo-86449-backport-rtf-fixes.patch   |  222 +++++++++++++++++
 ...ves-fdo-86451-guard-all-the-tops-post-pop.patch |  252 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +-
 3 files changed, 480 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-fdo-86449-backport-rtf-fixes.patch b/0001-Resolves-fdo-86449-backport-rtf-fixes.patch
new file mode 100644
index 0000000..8dde37c
--- /dev/null
+++ b/0001-Resolves-fdo-86449-backport-rtf-fixes.patch
@@ -0,0 +1,222 @@
+From b4840d3632e4404bee4bd192a7db916cbad3a401 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Wed, 20 Aug 2014 08:56:54 +0100
+Subject: [PATCH 1/2] Resolves: fdo#86449 backport rtf fixes
+
+empty Reference
+
+valgrind + bff
+
+(cherry picked from commit 0a42632a74596cbc781746931bf8f2650994b80f)
+
+empty m_aStates
+
+valgrind + bff
+
+(cherry picked from commit e3247719911f4e9b61ec43ea1c9ce04bcddc4ff8)
+
+Change-Id: Id3c039a46dec5d2d4a4642dfb53d23a76972dde2
+3bd526b7ebf0f4fce5d0c7054809e0dc2908e73f
+Reviewed-on: https://gerrit.libreoffice.org/12965
+Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
+Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
+---
+ ...7381c4a46d642c79a4b1817dc0-101375-minimized.rtf | 62 ++++++++++++++++++++++
+ ...7381c4a46d642c79a4b1817dc0-108116-minimized.rtf | 62 ++++++++++++++++++++++
+ .../source/dmapper/DomainMapperTableHandler.cxx    |  8 ++-
+ writerfilter/source/rtftok/rtfdocumentimpl.cxx     | 13 ++---
+ 4 files changed, 138 insertions(+), 7 deletions(-)
+ create mode 100644 writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-101375-minimized.rtf
+ create mode 100644 writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-108116-minimized.rtf
+
+diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-101375-minimized.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-101375-minimized.rtf
+new file mode 100644
+index 0000000..c3ffebc
+--- /dev/null
++++ b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-101375-minimized.rtf
+@@ -0,0 +1,62 @@
++{\rtf1\ansi\deff0\adeflang1025
++{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset128 Times New Roman;}{\f4\froman\fprq2\fcharset128 Arial Narrow;}{\f5\froman\fprq0\fcharset128 Arial Narrow;}{\f6\froman\fprq2\fcharset128 Symbol;}{\f7\froman\fprq0\fcharset128 Symbol;}{\f8\froman\fprq2\fcharset128 Wingdings;}{\f9\froman\fprq0\fcharset128 Wingdings;}{\f10\froman\fprq0\fcharset128 Times New Roman;}{\f11\fnil\fprq2\fcharset0 Microsoft YaHei;}{\f12\fnil\fprq2\fcharset128 SimSun;}{\f13\fnil\fprq2\fcharset128 Times New Roman (Arabic);}{\f14\fnil\fprq0\fcharset128 Times New Roman (Arabic);}{\f15\fnil\fprq2\fcharset128 Times New Roman;}{\f16\fnil\fprq0\fcharset128 Times New Roman;}{\f17\fnil\fprq2\fcharset0 Mangal;}{\f18\fnil\fprq0\fcharset128 Mangal;}{\f19\fnil\fprq2\fcharset128 Mangal;}{\f20\fnil\fprq2\fcharset128 Cambria Math;}{\f21\fnil\fprq0\fcharset128 Cambria Math;}}
++{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red128\green128\blue128;}
++{\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040 Predefinito;}
++{\s15\sbasedon0\snext16\sb240\sa120\keepn\hich\af11\dbch\af17\afs28\loch\f2\fs28 Intestazione;}
++{\s16\sbasedon0\snext16\sb0\sa120 Corpo testo;}
++{\s17\sbasedon16\snext17\sb0\sa120\dbch\af18 Elenco;}
++{\s18\sbasedon0\snext18\sb120\sa120\noline\i\dbch\af18\afs24\ai\fs24 Didascalia;}
++{\s19\sbasedon0\snext19\noline\dbch\af18 Indice;}
++}{\info{\creatim\yr2011\mo9\dy28\hr16\min28}{\revtim\yr2011\mo9\dy28\hr16\min29}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern3500}}\deftab720
++
++{\*\pgdsctbl
++{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1417\margbsxn1134\pgdscnxt0 Predefinito;}}
++\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1134\margr1134\margt1417\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1417\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
++\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx9864\pgndec\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\keepn{\scaps\b\hich\af14\langfe1040\dbch\af14\afs26\alang1025\ab\rtlch \ltrch\loch\fs26\lang1040\loch\f5
++SSSSSSS  SSSSSSS curriculum vitae}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\langfe1040\dbch\af14\afs16\alang1025\rtlch \ltrch\loch\fs16\lang1040\loch\f5
++}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\keepn{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++Informazioni personali}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Nome}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSS SSSSSSS}\cell\cell\row\pard\trowd\trql\trleft-108\ltrrow\trrh876\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvert`lt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\h{phmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Indirizzo}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSS S. SSSSSSSS  SSSS}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40[\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSS SSSSS SSSSSS}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Telefono}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSSSS}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\langfe1040\dbch\af14\afs22\alang1025\rtlch \ltrch\loch\fs22\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++E-mail}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSSSSSSSSSSSSSSSS}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb120\sa0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Nazionalit\'e0}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSS}\cell\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Luogo e Data di nascita}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSS SSSSSSSSSS    }\cell\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par }
+\ No newline at end of file
+diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-108116-minimized.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-108116-minimized.rtf
+new file mode 100644
+index 0000000..9576906
+--- /dev/null
++++ b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_2063317381c4a46d642c79a4b1817dc0-108116-minimized.rtf
+@@ -0,0 +1,62 @@
++{\rtf1\ansi\deff0\adeflang1025
++{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset128 Times New Roman;}{\f4\froman\fprq2\fcharset128 Arial Narrow;}{\f5\froman\fprq0\fcharset128 Arial Narrow;}{\f6\froman\fprq2\fcharset128 Symbol;}{\f7\froman\fprq0\fcharset128 Symbol;}{\f8\froman\fprq2\fcharset128 Wingdings;}{\f9\froman\fprq0\fcharset128 Wingdings;}{\f10\froman\fprq0\fcharset128 Times New Roman;}{\f11\fnil\fprq2\fcharset0 Microsoft YaHei;}{\f12\fnil\fprq2\fcharset128 SimSun;}{\f13\fnil\fprq2\fcharset128 Times New Roman (Arabic);}{\f14\fnil\fprq0\fcharset128 Times New Roman (Arabic);}{\f15\fnil\fprq2\fcharset128 Times New Roman;}{\f16\fnil\fprq0\fcharset128 Times New Roman;}{\f17\fnil\fprq2\fcharset0 Mangal;}{\f18\fnil\fprq0\fcharset128 Mangal;}{\f19\fnil\fprq2\fcharset128 Mangal;}{\f20\fnil\fprq2\fcharset128 Cambria Math;}{\f21\fnil\fprq0\fcharset128 Cambria Math;}}
++{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red128\green128\blue128;}
++{\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040 Predefinito;}
++{\s15\sbasedon0\snext16\sb240\sa120\keepn\hich\af11\dbch\af17\afs28\loch\f2\fs28 Intestazione;}
++{\s16\sbasedon0\snext16\sb0\sa120 Corpo testo;}
++{\s17\sbasedon16\snext17\sb0\sa120\dbch\af18 Elenco;}
++{\s18\sbasedon0\snext18\sb120\sa120\noline\i\dbch\af18\afs24\ai\fs24 Didascalia;}
++{\s19\sbasedon0\snext19\noline\dbch\af18 Indice;}
++}{\info{\creatim\yr2011\mo9\dy28\hr16\min28}{\revtim\yr2011\mo9\dy28\hr16\min29}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern3500}}\deftab720
++
++{\*\pgdsctbl
++{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1417\margbsxn1134\pgdscnxt0 Predefinito;}}
++\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1134\margr1134\margt1417\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1417\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
++\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx9864\pgndec\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\keepn{\scaps\b\hich\af14\langfe1040\dbch\af14\afs26\alang1025\ab\rtlch \ltrch\loch\fs26\lang1040\loch\f5
++SSSSSSS  SSSSSSS curriculum vitae}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\langfe1040\dbch\af14\afs16\alang1025\rtlch \ltrch\loch\fs16\lang1040\loch\f5
++}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\keepn{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++Informazioni personali}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Nome}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSS SSSSSSS}\cell\cell\row\pard\trowd\trql\trleft-108\ltrrow\trrh876\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Indirizzo}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSS S. SSSSSSSS  SSSS}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\scaps\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSS SSSSS SSSSSS}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Telefono}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSSSS}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\langfe1040\dbch\af14\afs22\alang1025\rtlch \ltrch\loch\fs22\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++}\cell\row\pard\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2896\clvertalt\cellx9864\pard\plain \sp\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++E-mail}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSSSSSSSSSSSSSSSS}\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb120\sa0{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Nazionalit\'e0}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSSSS}\cell\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\rtlch \ltrch\loch
++}
++\par \trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\qr\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20\keepn{\hich\af14\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++Luogo e Data di nascita}\cell\trowd\trql\trleft-108\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clvertalt\cellx2623\clvertalt\cellx2895\clvertalt\cellx9864\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb20\sa20{\langfe1040\dbch\af14\afs20\alang1025\rtlch \ltrch\loch\fs20\lang1040\loch\f5
++}\cell\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\intbl\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb40\sa40{\b\hich\af14\langfe1040\dbch\af14\afs24\alang1025\ab\rtlch \ltrch\loch\fs24\lang1040\loch\f5
++SSSSSS SSSSSSSSSS    }\cell\cell\row\pard\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af22\langfe2052\dbch\af17\afs24\alang1081\loch\f0\fs24\lang1040\ql\nowidctlpar\faauto\li0\ri0\lin0\rin0\fi0{\rtlch \ltrch\loch
++}
++\par }
+\ No newline at end of file
+diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+index b8193c7..fdf292d 100644
+--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
++++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+@@ -921,6 +921,12 @@ bool lcl_emptyRow(TableSequence_t& rTableSeq, sal_Int32 nRow)
+     }
+ 
+     RowSequence_t rRowSeq = rTableSeq[nRow];
++    if (rRowSeq.getLength() == 0)
++    {
++        SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_pTableSeq?");
++        return false;
++    }
++
+     uno::Reference<text::XTextRangeCompare> xTextRangeCompare(rRowSeq[0][0]->getText(), uno::UNO_QUERY);
+     try
+     {
+@@ -931,7 +937,7 @@ bool lcl_emptyRow(TableSequence_t& rTableSeq, sal_Int32 nRow)
+             if (xTextRangeCompare->compareRegionStarts(rRowSeq[nCell][0], rRowSeq[nCell][1]) != 0)
+                 return false;
+     }
+-    catch (lang::IllegalArgumentException& e)
++    catch (const lang::IllegalArgumentException& e)
+     {
+         SAL_WARN("writerfilter", "compareRegionStarts() failed: " << e.Message);
+         return false;
+diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+index 31ff8b8..be56161 100644
+--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
++++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+@@ -5789,12 +5789,13 @@ int RTFDocumentImpl::popState()
+     case DESTINATION_SHAPEPROPERTYNAME:
+     case DESTINATION_SHAPEPROPERTYVALUE:
+     case DESTINATION_SHAPEPROPERTY:
+-    {
+-        m_aStates.top().aShape = aState.aShape;
+-        m_aStates.top().aPicture = aState.aPicture;
+-        m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
+-    }
+-    break;
++        if (!m_aStates.empty())
++        {
++            m_aStates.top().aShape = aState.aShape;
++            m_aStates.top().aPicture = aState.aPicture;
++            m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
++        }
++        break;
+     case DESTINATION_FLYMAINCONTENT:
+     case DESTINATION_SHPPICT:
+     case DESTINATION_SHAPE:
+-- 
+1.9.3
+
diff --git a/0002-Resolves-fdo-86451-guard-all-the-tops-post-pop.patch b/0002-Resolves-fdo-86451-guard-all-the-tops-post-pop.patch
new file mode 100644
index 0000000..131f31c
--- /dev/null
+++ b/0002-Resolves-fdo-86451-guard-all-the-tops-post-pop.patch
@@ -0,0 +1,252 @@
+From 566300ebd57e6ff07fdb014321e23a92c9bcf5ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Wed, 19 Nov 2014 12:14:08 +0000
+Subject: [PATCH 2/2] Resolves: fdo#86451 guard all the tops post pop
+
+Change-Id: I98be6f014893dfc7cee770c44cd9d0be32b39f5c
+Reviewed-on: https://gerrit.libreoffice.org/12966
+Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
+Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
+---
+ writerfilter/source/rtftok/rtfdocumentimpl.cxx | 177 ++++++++++++++-----------
+ 1 file changed, 97 insertions(+), 80 deletions(-)
+
+diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+index be56161..7c5cbf1 100644
+--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
++++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+@@ -5637,7 +5637,7 @@ int RTFDocumentImpl::popState()
+     case DESTINATION_PARAGRAPHNUMBERING:
+     {
+         RTFValue::Pointer_t pIdValue = aState.aTableAttributes.find(NS_ooxml::LN_CT_AbstractNum_nsid);
+-        if (pIdValue.get())
++        if (pIdValue.get() && !m_aStates.empty())
+         {
+             // Abstract numbering
+             RTFSprms aLeveltextAttributes;
+@@ -5706,85 +5706,96 @@ int RTFDocumentImpl::popState()
+     }
+     break;
+     case DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER:
+-    {
+-        // FIXME: don't use pDestinationText, points to popped state
+-        RTFValue::Pointer_t pValue(new RTFValue(aState.aDestinationText.makeStringAndClear(), true));
+-        m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelSuffix_val, pValue);
+-    }
++        if (!m_aStates.empty())
++        {
++            // FIXME: don't use pDestinationText, points to popped state
++            RTFValue::Pointer_t pValue(new RTFValue(aState.aDestinationText.makeStringAndClear(), true));
++            m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelSuffix_val, pValue);
++        }
+     break;
+     case DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE:
+-    {
+-        // FIXME: don't use pDestinationText, points to popped state
+-        RTFValue::Pointer_t pValue(new RTFValue(aState.aDestinationText.makeStringAndClear(), true));
+-        m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
+-    }
++        if (!m_aStates.empty())
++        {
++            // FIXME: don't use pDestinationText, points to popped state
++            RTFValue::Pointer_t pValue(new RTFValue(aState.aDestinationText.makeStringAndClear(), true));
++            m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
++        }
+     break;
+     case DESTINATION_LISTLEVEL:
+-    {
+-        RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
+-        aState.aTableAttributes.set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue);
++        if (!m_aStates.empty())
++        {
++            RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
++            aState.aTableAttributes.set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue);
+ 
+-        RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms));
+-        if (m_aStates.top().nDestinationState != DESTINATION_LFOLEVEL)
+-            m_aStates.top().aListLevelEntries.set(NS_ooxml::LN_CT_AbstractNum_lvl, pValue, OVERWRITE_NO_APPEND);
+-        else
+-            m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_NumLvl_lvl, pValue);
+-    }
++            RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms));
++            if (m_aStates.top().nDestinationState != DESTINATION_LFOLEVEL)
++                m_aStates.top().aListLevelEntries.set(NS_ooxml::LN_CT_AbstractNum_lvl, pValue, OVERWRITE_NO_APPEND);
++            else
++                m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_NumLvl_lvl, pValue);
++        }
+     break;
+     case DESTINATION_LFOLEVEL:
+-    {
+-        RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
+-        aState.aTableAttributes.set(NS_ooxml::LN_CT_NumLvl_ilvl, pInnerValue);
++        if (!m_aStates.empty())
++        {
++            RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
++            aState.aTableAttributes.set(NS_ooxml::LN_CT_NumLvl_ilvl, pInnerValue);
+ 
+-        RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms));
+-        m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Num_lvlOverride, pValue);
+-    }
++            RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms));
++            m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Num_lvlOverride, pValue);
++        }
+     break;
+     // list override table
+     case DESTINATION_LISTOVERRIDEENTRY:
+-    {
+-        if (m_aStates.top().nDestinationState == DESTINATION_LISTOVERRIDEENTRY)
+-        {
+-            // copy properties upwards so upper popState inserts it
+-            m_aStates.top().aTableAttributes = aState.aTableAttributes;
+-            m_aStates.top().aTableSprms = aState.aTableSprms;
+-        }
+-        else
++        if (!m_aStates.empty())
+         {
+-            RTFValue::Pointer_t pValue(new RTFValue(
+-                                           aState.aTableAttributes, aState.aTableSprms));
+-            m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, OVERWRITE_NO_APPEND);
++            if (m_aStates.top().nDestinationState == DESTINATION_LISTOVERRIDEENTRY)
++            {
++                // copy properties upwards so upper popState inserts it
++                m_aStates.top().aTableAttributes = aState.aTableAttributes;
++                m_aStates.top().aTableSprms = aState.aTableSprms;
++            }
++            else
++            {
++                RTFValue::Pointer_t pValue(new RTFValue(
++                                               aState.aTableAttributes, aState.aTableSprms));
++                m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, OVERWRITE_NO_APPEND);
++            }
+         }
+-    }
+     break;
+     case DESTINATION_LEVELTEXT:
+-    {
+-        RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes));
+-        m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_lvlText, pValue);
+-    }
++        if (!m_aStates.empty())
++        {
++            RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes));
++            m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_lvlText, pValue);
++        }
+     break;
+     case DESTINATION_LEVELNUMBERS:
+-        m_aStates.top().aTableSprms = aState.aTableSprms;
++        if (!m_aStates.empty())
++            m_aStates.top().aTableSprms = aState.aTableSprms;
+         break;
+     case DESTINATION_FIELDINSTRUCTION:
+-        m_aStates.top().nFieldStatus = FIELD_INSTRUCTION;
++        if (!m_aStates.empty())
++            m_aStates.top().nFieldStatus = FIELD_INSTRUCTION;
+         break;
+     case DESTINATION_FIELDRESULT:
+-        m_aStates.top().nFieldStatus = FIELD_RESULT;
++        if (!m_aStates.empty())
++            m_aStates.top().nFieldStatus = FIELD_RESULT;
+         break;
+     case DESTINATION_FIELD:
+         if (aState.nFieldStatus == FIELD_INSTRUCTION)
+             singleChar(0x15);
+         break;
+     case DESTINATION_SHAPEPROPERTYVALUEPICT:
+-    {
+-        m_aStates.top().aPicture = aState.aPicture;
+-        // both \sp and \sv are destinations, copy the text up-ward for later
+-        m_aStates.top().aDestinationText = aState.aDestinationText;
+-    }
++        if (!m_aStates.empty())
++        {
++            m_aStates.top().aPicture = aState.aPicture;
++            // both \sp and \sv are destinations, copy the text up-ward for later
++            m_aStates.top().aDestinationText = aState.aDestinationText;
++        }
+     break;
+     case DESTINATION_FALT:
+-        m_aStates.top().aTableSprms = aState.aTableSprms;
++        if (!m_aStates.empty())
++            m_aStates.top().aTableSprms = aState.aTableSprms;
+         break;
+     case DESTINATION_SHAPEPROPERTYNAME:
+     case DESTINATION_SHAPEPROPERTYVALUE:
+@@ -5799,40 +5810,46 @@ int RTFDocumentImpl::popState()
+     case DESTINATION_FLYMAINCONTENT:
+     case DESTINATION_SHPPICT:
+     case DESTINATION_SHAPE:
+-        m_aStates.top().aFrame = aState.aFrame;
+-        if (aState.nDestinationState == DESTINATION_SHPPICT && !m_aStates.empty() && m_aStates.top().nDestinationState == DESTINATION_LISTPICTURE)
++        if (!m_aStates.empty())
+         {
+-            RTFSprms aAttributes;
+-            aAttributes.set(NS_ooxml::LN_CT_NumPicBullet_numPicBulletId, RTFValue::Pointer_t(new RTFValue(m_nListPictureId++)));
+-            RTFSprms aSprms;
+-            // Dummy value, real picture is already sent to dmapper.
+-            aSprms.set(NS_ooxml::LN_CT_NumPicBullet_pict, RTFValue::Pointer_t(new RTFValue(0)));
+-            RTFValue::Pointer_t pValue(new RTFValue(aAttributes, aSprms));
+-            m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_numPicBullet, pValue, OVERWRITE_NO_APPEND);
++            m_aStates.top().aFrame = aState.aFrame;
++            if (aState.nDestinationState == DESTINATION_SHPPICT && m_aStates.top().nDestinationState == DESTINATION_LISTPICTURE)
++            {
++                RTFSprms aAttributes;
++                aAttributes.set(NS_ooxml::LN_CT_NumPicBullet_numPicBulletId, RTFValue::Pointer_t(new RTFValue(m_nListPictureId++)));
++                RTFSprms aSprms;
++                // Dummy value, real picture is already sent to dmapper.
++                aSprms.set(NS_ooxml::LN_CT_NumPicBullet_pict, RTFValue::Pointer_t(new RTFValue(0)));
++                RTFValue::Pointer_t pValue(new RTFValue(aAttributes, aSprms));
++                m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_numPicBullet, pValue, OVERWRITE_NO_APPEND);
++            }
+         }
+         break;
+     case DESTINATION_SHAPETEXT:
+-        // If we're leaving the shapetext group (it may have nested ones) and this is a shape, not an old drawingobject.
+-        if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT && !m_aStates.top().aDrawingObject.bHadShapeText)
++        if (!m_aStates.empty())
+         {
+-            m_aStates.top().bHadShapeText = true;
+-            if (!m_aStates.top().pCurrentBuffer)
+-                m_pSdrImport->close();
+-            else
+-                m_aStates.top().pCurrentBuffer->push_back(
+-                    Buf_t(BUFFER_ENDSHAPE));
+-        }
+-
+-        // It's allowed to declare these inside the the shape text, and they
+-        // are expected to have an effect for the whole shape.
+-        if (aState.aDrawingObject.nLeft)
+-            m_aStates.top().aDrawingObject.nLeft = aState.aDrawingObject.nLeft;
+-        if (aState.aDrawingObject.nTop)
+-            m_aStates.top().aDrawingObject.nTop = aState.aDrawingObject.nTop;
+-        if (aState.aDrawingObject.nRight)
+-            m_aStates.top().aDrawingObject.nRight = aState.aDrawingObject.nRight;
+-        if (aState.aDrawingObject.nBottom)
+-            m_aStates.top().aDrawingObject.nBottom = aState.aDrawingObject.nBottom;
++            // If we're leaving the shapetext group (it may have nested ones) and this is a shape, not an old drawingobject.
++            if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT && !m_aStates.top().aDrawingObject.bHadShapeText)
++            {
++                m_aStates.top().bHadShapeText = true;
++                if (!m_aStates.top().pCurrentBuffer)
++                    m_pSdrImport->close();
++                else
++                    m_aStates.top().pCurrentBuffer->push_back(
++                        Buf_t(BUFFER_ENDSHAPE));
++            }
++
++            // It's allowed to declare these inside the the shape text, and they
++            // are expected to have an effect for the whole shape.
++            if (aState.aDrawingObject.nLeft)
++                m_aStates.top().aDrawingObject.nLeft = aState.aDrawingObject.nLeft;
++            if (aState.aDrawingObject.nTop)
++                m_aStates.top().aDrawingObject.nTop = aState.aDrawingObject.nTop;
++            if (aState.aDrawingObject.nRight)
++                m_aStates.top().aDrawingObject.nRight = aState.aDrawingObject.nRight;
++            if (aState.aDrawingObject.nBottom)
++                m_aStates.top().aDrawingObject.nBottom = aState.aDrawingObject.nBottom;
++        }
+         break;
+     default:
+     {
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 65795a0..213c1c8 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -46,7 +46,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.1
-Release:        2%{?libo_prerelease}%{?dist}
+Release:        3%{?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/
@@ -343,6 +343,8 @@ Patch45: 0001-just-use-ANSI-C-declarations.patch
 Patch46: 0001-valgrind-check-return-of-convertDateTime-before-usin.patch
 Patch47: 0001-table-layout-cache-returns-wrong-rectangle.patch
 Patch48: 0001-impress-tables-are-not-interactively-growing.patch
+Patch49: 0001-Resolves-fdo-86449-backport-rtf-fixes.patch
+Patch50: 0002-Resolves-fdo-86451-guard-all-the-tops-post-pop.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2309,6 +2311,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Wed Nov 19 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.3.4.1-3
+- Resolves: rhbz#1165740 arbitrarily backport some rtf crash fixes
+
 * Thu Nov 13 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.3.4.1-2
 - fix impress table layout cache wrt wrong table selection border
 


More information about the scm-commits mailing list