Blame SOURCES/0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch

f085be
From a5793f5e0013b156600fd718d8f77870a9e73032 Mon Sep 17 00:00:00 2001
f085be
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f085be
Date: Fri, 18 Jul 2014 09:06:44 +0100
f085be
Subject: [PATCH] Resolves: fdo#81487 pasting into outline view crashes impress
f085be
f085be
CreateTitleTextObject will call indirectly ImpPageChange which
f085be
triggers tools::EventMultiplexerEvent::EID_PAGE_ORDER and so
f085be
in outlview.cxx without ignore page changes level in action
f085be
the outliner is filled in from the slide contents in
f085be
FillOutliner clearing the outliner contents and filling it
f085be
fresh, but..
f085be
f085be
a) this hack tower is not prepared for all the outliner
f085be
iterators to become invalid
f085be
b) the contents of this title object is empty, because
f085be
it was just created, and we didn't get a chance to fill
f085be
in its text.
f085be
f085be
This all works for typing vs pasting because the KeyInput
f085be
uses the OutlineViewPageChangesGuard guard which sets the
f085be
ignore pages changes bit.
f085be
f085be
So, given that OutlineView::UpdateDocument expects
f085be
the iterators of the outliner to be valid during
f085be
the lifetime of the method lock the full method with
f085be
the OutlineViewPageChangesGuard guard
f085be
f085be
Change-Id: Iecbf37d54f5f0c5a181be5f27832f769a3d2e389
f085be
---
f085be
 sd/source/ui/view/outlview.cxx | 2 ++
f085be
 1 file changed, 2 insertions(+)
f085be
f085be
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
f085be
index 268a32b..a76bb0b 100644
f085be
--- a/sd/source/ui/view/outlview.cxx
f085be
+++ b/sd/source/ui/view/outlview.cxx
f085be
@@ -1535,6 +1535,8 @@ void OutlineView::EndModelChange()
f085be
 /** updates all changes in the outliner model to the draw model */
f085be
 void OutlineView::UpdateDocument()
f085be
 {
f085be
+    OutlineViewPageChangesGuard aGuard(this);
f085be
+
f085be
     const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD);
f085be
     Paragraph* pPara = mrOutliner.GetParagraph( 0 );
f085be
     sal_uInt32 nPage;
f085be
-- 
f085be
1.9.3
f085be