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