[libreoffice/f19] Resolves: rhbz#1003179 fix AUTOFMT related crashes in Writer Undo

David Tardon dtardon at fedoraproject.org
Thu Oct 10 14:20:53 UTC 2013


commit 9e2c49d5637e246cb4753a719755bbca5d8d82db
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Oct 8 22:40:25 2013 +0200

    Resolves: rhbz#1003179 fix AUTOFMT related crashes in Writer Undo

 ...w-eliminate-no-extent-RSID-only-AUTOFMT-h.patch |   45 ++++++++++++++++++++
 libreoffice.spec                                   |    3 +
 2 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/0001-fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch b/0001-fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch
new file mode 100644
index 0000000..1bf72b4
--- /dev/null
+++ b/0001-fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch
@@ -0,0 +1,45 @@
+From a79a7f315a0a3bc8148a88bb1d3c6f83a4552094 Mon Sep 17 00:00:00 2001
+From: Michael Stahl <mstahl at redhat.com>
+Date: Tue, 8 Oct 2013 18:37:35 +0200
+Subject: [PATCH] fdo#70201: sw: eliminate no-extent RSID-only AUTOFMT hints
+
+These are already filtered out in SwpHints::TryInsertHint(), but they
+can be produced by a SwTxtNode::Update() following some deletion like in
+SwTxtNode::ReplaceText() (or maybe CutImpl() and RstAttr() too?).
+
+So in order to prevent SwHistorySetTxt being created for these,
+filter them out in SwpHints::MergePortions(), which has the advantage
+that it's one location to change; probably filtering in Update() and
+RstAttr() both would work too.
+
+(regression from 6db39dbd7378351f6476f6db25eb7110c9cfb291)
+
+Change-Id: I597a9ab290dcc3fb1b624dd2dca241c462acf256
+(cherry picked from commit 91159b1c31a7fd474ba0b97828f593604790ce3c)
+---
+ sw/source/core/txtnode/thints.cxx | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
+index 0893dac..34dac0a 100644
+--- a/sw/source/core/txtnode/thints.cxx
++++ b/sw/source/core/txtnode/thints.cxx
+@@ -2528,6 +2528,15 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
+                     pHt->GetAutoFmt().GetStyleHandle());
+             if ((pSet->Count() == 1) && pSet->GetItem(RES_CHRATR_RSID, false))
+             {
++                // fdo#70201: eliminate no-extent RSID-only AUTOFMT
++                // could be produced by ReplaceText or (maybe?) RstAttr
++                if (*pHt->GetStart() == *pHt->GetEnd())
++                {
++                    SwpHintsArray::DeleteAtPos(i); // kill it without History!
++                    SwTxtAttr::Destroy(pHt, rNode.GetDoc()->GetAttrPool());
++                    --i;
++                    continue;
++                }
+                 // fdo#52028: this one has _only_ RSID => ignore it completely
+                 if (!pHt->IsFormatIgnoreStart() || !pHt->IsFormatIgnoreEnd())
+                 {
+-- 
+1.8.3.1
+
diff --git a/libreoffice.spec b/libreoffice.spec
index f8d47ea..d4068df 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -265,6 +265,7 @@ Patch25: 0001-Resolves-rhbz-996162-apparent-NULL-bullet-font.patch
 Patch26: 0001-rhbz-1001768-avoid-deadlock-in-OAccessibleContextHel.patch
 Patch27: 0001-rhbz-1001768-AtkListener-disposing-delay-notificatio.patch
 Patch28: 0001-fdo-69384-fix-impress-writer-copy-paste.patch
+Patch29: 0001-fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -1025,6 +1026,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch26 -p1 -b .rhbz-1001768-avoid-deadlock-in-OAccessibleContextHel.patch
 %patch27 -p1 -b .rhbz-1001768-AtkListener-disposing-delay-notificatio.patch
 %patch28 -p1 -b .fdo-69384-fix-impress-writer-copy-paste.patch
+%patch29 -p1 -b .fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2118,6 +2120,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 * Mon Oct 07 2013 Caolán McNamara <caolanm at redhat.com> - 1:4.1.2.3-4.UNBUILT
 - Resolves: rhbz#1001768: fix various a11y deadlocks and crashes
 - Resolves: rhbz#1016022 fix cut from impress and paste to writer
+- Resolves: rhbz#1003179 fix AUTOFMT related crashes in Writer Undo
 
 * Mon Oct 07 2013 Caolán McNamara <caolanm at redhat.com> - 1:4.1.2.3-3
 - Resolves: rhbz#1015281 crash on clicking custom animation


More information about the scm-commits mailing list