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