/[packages]/updates/5/libreoffice/current/SOURCES/0001-a11y-crash-on-deleting-certain-frame-in-certain-docu.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-a11y-crash-on-deleting-certain-frame-in-certain-docu.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1142874 - (show annotations) (download)
Tue Aug 22 07:52:48 2017 UTC (6 years, 7 months ago) by neoclust
File size: 23459 byte(s)
New version 5.2.4
1 From 538096616926587d2d81c8d258d4a5b57862f644 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Thu, 30 Jun 2016 15:33:14 +0100
4 Subject: [PATCH] a11y crash on deleting certain frame in certain document
5
6 I've an internal RH document which crashes in a11y when a paragraph with a
7 graphic and a drawing frame in it is deleted.
8
9 The SdrObject is removed and deleted, but when
10 SwAccessibleContext::DisposeChild is called the object does not pass IsShowing
11 so its not removed from the accessibility map. Leaving an entry in the map
12 pointing to a deleted SdrObject
13
14 So here take the route-one approach of always removing from the map
15 accessibility children which depend on a SdrObject which is getting deleted,
16 whether or not it is inside the visible area at the moment.
17
18 The real change here is to SwAccessibleContext::DisposeChild and to
19 SwFrame::RemoveDrawObj
20
21 everything is called Dispose, hard to find anything
22
23 Change-Id: I473ed39c975886a6be30860cb61f6fe59c5508a4
24 (cherry picked from commit ad59dcf7dad19540403f5812677901e6fad30257)
25
26 Change-Id: I764cd54d6216d233756f52b5be66c80737b5e38d
27 Reviewed-on: https://gerrit.libreoffice.org/26824
28 Tested-by: Jenkins <ci@libreoffice.org>
29 Reviewed-by: Michael Stahl <mstahl@redhat.com>
30 (cherry picked from commit 04081b6907132c867041dd492408b5349f26cd42)
31 ---
32 sw/inc/accmap.hxx | 9 +++++----
33 sw/source/core/access/acccell.cxx | 4 ++--
34 sw/source/core/access/acccell.hxx | 2 +-
35 sw/source/core/access/acccontext.cxx | 20 +++++++++++---------
36 sw/source/core/access/acccontext.hxx | 8 ++++----
37 sw/source/core/access/accdoc.cxx | 4 ++--
38 sw/source/core/access/accdoc.hxx | 2 +-
39 sw/source/core/access/accframebase.cxx | 4 ++--
40 sw/source/core/access/accframebase.hxx | 2 +-
41 sw/source/core/access/accmap.cxx | 13 +++++++------
42 sw/source/core/access/accnotextframe.cxx | 4 ++--
43 sw/source/core/access/accnotextframe.hxx | 2 +-
44 sw/source/core/access/acctable.cxx | 8 ++++----
45 sw/source/core/access/acctable.hxx | 4 ++--
46 sw/source/core/draw/dview.cxx | 8 ++++----
47 sw/source/core/inc/viewimp.hxx | 10 +++++-----
48 sw/source/core/layout/fly.cxx | 4 ++--
49 sw/source/core/view/viewimp.cxx | 9 +++++----
50 sw/source/uibase/docvw/PostItMgr.cxx | 2 +-
51 19 files changed, 62 insertions(+), 57 deletions(-)
52
53 diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
54 index 2178a72..25c9696 100644
55 --- a/sw/inc/accmap.hxx
56 +++ b/sw/inc/accmap.hxx
57 @@ -182,10 +182,11 @@ public:
58 void RemoveContext( const SdrObject *pObj );
59
60 // Dispose frame and its children if bRecursive is set
61 - void Dispose( const SwFrame* pFrame,
62 - const SdrObject* pObj,
63 - vcl::Window* pWindow,
64 - bool bRecursive = false );
65 + void A11yDispose( const SwFrame* pFrame,
66 + const SdrObject* pObj,
67 + vcl::Window* pWindow,
68 + bool bRecursive = false,
69 + bool bCanSkipInvisible = true );
70
71 void InvalidatePosOrSize( const SwFrame* pFrame,
72 const SdrObject* pObj,
73 diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
74 index d448a7f..ca4ce14 100644
75 --- a/sw/source/core/access/acccell.cxx
76 +++ b/sw/source/core/access/acccell.cxx
77 @@ -263,13 +263,13 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
78 return aRet;
79 }
80
81 -void SwAccessibleCell::Dispose( bool bRecursive )
82 +void SwAccessibleCell::Dispose(bool bRecursive, bool bCanSkipInvisible)
83 {
84 const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() );
85 ::rtl::Reference< SwAccessibleContext > xAccImpl(
86 GetMap()->GetContextImpl( pParent, false ) );
87 if( xAccImpl.is() )
88 - xAccImpl->DisposeChild( SwAccessibleChild(GetFrame()), bRecursive );
89 + xAccImpl->DisposeChild(SwAccessibleChild(GetFrame()), bRecursive, bCanSkipInvisible);
90 SwAccessibleContext::Dispose( bRecursive );
91 }
92
93 diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
94 index 594dc73..9d543c6 100644
95 --- a/sw/source/core/access/acccell.hxx
96 +++ b/sw/source/core/access/acccell.hxx
97 @@ -83,7 +83,7 @@ public:
98 getSupportedServiceNames()
99 throw (css::uno::RuntimeException, std::exception) override;
100
101 - virtual void Dispose( bool bRecursive = false ) override;
102 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
103
104 virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
105
106 diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
107 index b74ed70..8fb2e30 100644
108 --- a/sw/source/core/access/acccontext.cxx
109 +++ b/sw/source/core/access/acccontext.cxx
110 @@ -393,8 +393,9 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrame* _pFrame,
111 }
112 }
113
114 -void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
115 - bool bRecursive )
116 +void SwAccessibleContext::DisposeChildren(const SwFrame *pFrame,
117 + bool bRecursive,
118 + bool bCanSkipInvisible)
119 {
120 const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *(GetMap()) );
121 SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
122 @@ -410,7 +411,7 @@ void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
123 if( xAccImpl.is() )
124 xAccImpl->Dispose( bRecursive );
125 else if( bRecursive )
126 - DisposeChildren( pLower, bRecursive );
127 + DisposeChildren(pLower, bRecursive, bCanSkipInvisible);
128 }
129 else if ( rLower.GetDrawObject() )
130 {
131 @@ -422,7 +423,7 @@ void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
132 }
133 else if ( rLower.GetWindow() )
134 {
135 - DisposeChild( rLower, false );
136 + DisposeChild(rLower, false, bCanSkipInvisible);
137 }
138 ++aIter;
139 }
140 @@ -1032,7 +1033,7 @@ void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
141 }
142 }
143
144 -void SwAccessibleContext::Dispose( bool bRecursive )
145 +void SwAccessibleContext::Dispose(bool bRecursive, bool bCanSkipInvisible)
146 {
147 SolarMutexGuard aGuard;
148
149 @@ -1044,7 +1045,7 @@ void SwAccessibleContext::Dispose( bool bRecursive )
150
151 // dispose children
152 if( bRecursive )
153 - DisposeChildren( GetFrame(), bRecursive );
154 + DisposeChildren(GetFrame(), bRecursive, bCanSkipInvisible);
155
156 // get parent
157 uno::Reference< XAccessible > xParent( GetWeakParent() );
158 @@ -1083,12 +1084,13 @@ void SwAccessibleContext::Dispose( bool bRecursive )
159 }
160
161 void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
162 - bool bRecursive )
163 + bool bRecursive, bool bCanSkipInvisible )
164 {
165 SolarMutexGuard aGuard;
166
167 - if ( IsShowing( *(GetMap()), rChildFrameOrObj ) ||
168 + if ( !bCanSkipInvisible ||
169 rChildFrameOrObj.AlwaysIncludeAsChild() ||
170 + IsShowing( *(GetMap()), rChildFrameOrObj ) ||
171 !SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly() )
172 {
173 // If the object could have existed before, than there is nothing to do,
174 @@ -1119,7 +1121,7 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrOb
175 }
176 }
177 else if( bRecursive && rChildFrameOrObj.GetSwFrame() )
178 - DisposeChildren( rChildFrameOrObj.GetSwFrame(), bRecursive );
179 + DisposeChildren(rChildFrameOrObj.GetSwFrame(), bRecursive, bCanSkipInvisible);
180 }
181
182 void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
183 diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
184 index 3adcbbd..6c6ae83 100644
185 --- a/sw/source/core/access/acccontext.hxx
186 +++ b/sw/source/core/access/acccontext.hxx
187 @@ -147,8 +147,8 @@ protected:
188
189 // Dispose children of the specified SwFrame. The SwFrame might belong to
190 // the current object or to any other child or grandchild.
191 - void DisposeChildren( const SwFrame *pFrame,
192 - bool bRecursive );
193 + void DisposeChildren(const SwFrame *pFrame,
194 + bool bRecursive, bool bCanSkipInvisible);
195
196 void DisposeShape( const SdrObject *pObj,
197 ::accessibility::AccessibleShape *pAccImpl );
198 @@ -315,10 +315,10 @@ public:
199 // thread safe C++ interface
200
201 // The object is not visible an longer and should be destroyed
202 - virtual void Dispose( bool bRecursive = false );
203 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true);
204
205 // The child object is not visible an longer and should be destroyed
206 - virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive );
207 + virtual void DisposeChild(const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive, bool bCanSkipInvisible);
208
209 // The object has been moved by the layout
210 virtual void InvalidatePosOrSize( const SwRect& rFrame );
211 diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
212 index bed5158..d01c612 100644
213 --- a/sw/source/core/access/accdoc.cxx
214 +++ b/sw/source/core/access/accdoc.cxx
215 @@ -380,14 +380,14 @@ SwAccessibleDocument::~SwAccessibleDocument()
216 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
217 }
218
219 -void SwAccessibleDocument::Dispose( bool bRecursive )
220 +void SwAccessibleDocument::Dispose(bool bRecursive, bool bCanSkipInvisible)
221 {
222 OSL_ENSURE( GetFrame() && GetMap(), "already disposed" );
223
224 vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
225 if( pWin )
226 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
227 - SwAccessibleContext::Dispose( bRecursive );
228 + SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
229 }
230
231 IMPL_LINK_TYPED( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
232 diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
233 index 5fdb656..e11f068 100644
234 --- a/sw/source/core/access/accdoc.hxx
235 +++ b/sw/source/core/access/accdoc.hxx
236 @@ -198,7 +198,7 @@ public:
237 // thread safe C++ interface
238
239 // The object is not visible an longer and should be destroyed
240 - virtual void Dispose( bool bRecursive = false ) override;
241 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
242
243 // XAccessibleComponent
244 sal_Int32 SAL_CALL getBackground()
245 diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
246 index 9cf0253..1382315 100644
247 --- a/sw/source/core/access/accframebase.cxx
248 +++ b/sw/source/core/access/accframebase.cxx
249 @@ -263,14 +263,14 @@ void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
250 }
251 }
252
253 -void SwAccessibleFrameBase::Dispose( bool bRecursive )
254 +void SwAccessibleFrameBase::Dispose(bool bRecursive, bool bCanSkipInvisible)
255 {
256 SolarMutexGuard aGuard;
257
258 if( GetRegisteredIn() )
259 GetRegisteredInNonConst()->Remove( this );
260
261 - SwAccessibleContext::Dispose( bRecursive );
262 + SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
263 }
264
265 //Get the selection cursor of the document.
266 diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
267 index 7d1ac0c..6df342a 100644
268 --- a/sw/source/core/access/accframebase.hxx
269 +++ b/sw/source/core/access/accframebase.hxx
270 @@ -57,7 +57,7 @@ public:
271 static sal_uInt8 GetNodeType( const SwFlyFrame *pFlyFrame );
272
273 // The object is not visible an longer and should be destroyed
274 - virtual void Dispose( bool bRecursive = false ) override;
275 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
276 virtual bool SetSelectedState( bool bSeleted ) override;
277 };
278
279 diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
280 index 4c2aaae..2a6a3c3 100644
281 --- a/sw/source/core/access/accmap.cxx
282 +++ b/sw/source/core/access/accmap.cxx
283 @@ -2241,10 +2241,11 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
284 }
285 }
286
287 -void SwAccessibleMap::Dispose( const SwFrame *pFrame,
288 - const SdrObject *pObj,
289 - vcl::Window* pWindow,
290 - bool bRecursive )
291 +void SwAccessibleMap::A11yDispose( const SwFrame *pFrame,
292 + const SdrObject *pObj,
293 + vcl::Window* pWindow,
294 + bool bRecursive,
295 + bool bCanSkipInvisible )
296 {
297 SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow );
298
299 @@ -2355,7 +2356,7 @@ void SwAccessibleMap::Dispose( const SwFrame *pFrame,
300 // be broadcasted at the end of the action to give the table
301 // a chance to generate a single table change event.
302
303 - xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive );
304 + xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive, bCanSkipInvisible );
305 }
306 else if( xShapeAccImpl.is() )
307 {
308 @@ -3189,7 +3190,7 @@ bool SwAccessibleMap::ReplaceChild (
309 // Also get keep parent.
310 uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
311 pCurrentChild = nullptr; // will be released by dispose
312 - Dispose( nullptr, pObj, nullptr );
313 + A11yDispose( nullptr, pObj, nullptr );
314
315 {
316 osl::MutexGuard aGuard( maMutex );
317 diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
318 index 3af6558..5a007f0 100644
319 --- a/sw/source/core/access/accnotextframe.cxx
320 +++ b/sw/source/core/access/accnotextframe.cxx
321 @@ -164,14 +164,14 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
322 }
323 }
324
325 -void SwAccessibleNoTextFrame::Dispose( bool bRecursive )
326 +void SwAccessibleNoTextFrame::Dispose(bool bRecursive, bool bCanSkipInvisible)
327 {
328 SolarMutexGuard aGuard;
329
330 if( aDepend.GetRegisteredIn() )
331 aDepend.GetRegisteredIn()->Remove( &aDepend );
332
333 - SwAccessibleFrameBase::Dispose( bRecursive );
334 + SwAccessibleFrameBase::Dispose(bRecursive, bCanSkipInvisible);
335 }
336
337 // #i73249#
338 diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
339 index d11dd25..6be3005 100644
340 --- a/sw/source/core/access/accnotextframe.hxx
341 +++ b/sw/source/core/access/accnotextframe.hxx
342 @@ -98,7 +98,7 @@ public:
343 throw ( css::uno::RuntimeException, std::exception ) override;
344
345 // The object is not visible an longer and should be destroyed
346 - virtual void Dispose( bool bRecursive = false ) override;
347 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
348
349 virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (css::uno::RuntimeException, std::exception) override;
350 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
351 diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
352 index 0831419..8706683 100644
353 --- a/sw/source/core/access/acctable.cxx
354 +++ b/sw/source/core/access/acctable.cxx
355 @@ -1391,18 +1391,18 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
356 SwAccessibleContext::InvalidatePosOrSize( rOldBox );
357 }
358
359 -void SwAccessibleTable::Dispose( bool bRecursive )
360 +void SwAccessibleTable::Dispose(bool bRecursive, bool bCanSkipInvisible)
361 {
362 SolarMutexGuard aGuard;
363
364 if( GetRegisteredIn() )
365 GetRegisteredInNonConst()->Remove( this );
366
367 - SwAccessibleContext::Dispose( bRecursive );
368 + SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
369 }
370
371 void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
372 - bool bRecursive )
373 + bool bRecursive, bool bCanSkipInvisible )
374 {
375 SolarMutexGuard aGuard;
376
377 @@ -1421,7 +1421,7 @@ void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
378 // about its change. We then must not call the superclass
379 uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrame, false ) );
380 if( !xAcc.is() )
381 - SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive );
382 + SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive, bCanSkipInvisible );
383 }
384
385 void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrameOrObj,
386 diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
387 index 8afd565..9f3c385 100644
388 --- a/sw/source/core/access/acctable.hxx
389 +++ b/sw/source/core/access/acctable.hxx
390 @@ -224,10 +224,10 @@ public:
391 virtual void InvalidatePosOrSize( const SwRect& rOldBox ) override;
392
393 // The object is not visible an longer and should be destroyed
394 - virtual void Dispose( bool bRecursive = false ) override;
395 + virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
396
397 virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj,
398 - bool bRecursive ) override;
399 + bool bRecursive, bool bCanSkipInvisible ) override;
400 virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj,
401 const SwRect& rFrame ) override;
402
403 diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
404 index 495485c..5105092 100644
405 --- a/sw/source/core/draw/dview.cxx
406 +++ b/sw/source/core/draw/dview.cxx
407 @@ -375,7 +375,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
408 }
409 else
410 {
411 - rImp.DisposeAccessibleObj( pAnchoredObj->GetDrawObj() );
412 + rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
413 rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
414 }
415 }
416 @@ -411,7 +411,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
417 }
418 else
419 {
420 - rImp.DisposeAccessibleObj( pAnchoredObj->GetDrawObj() );
421 + rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
422 rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
423 }
424 }
425 @@ -621,7 +621,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
426 }
427 else
428 {
429 - rImp.DisposeAccessibleObj( pTmpObj );
430 + rImp.DisposeAccessibleObj(pTmpObj, true);
431 rImp.AddAccessibleObj( pTmpObj );
432 }
433 }
434 @@ -640,7 +640,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
435 else
436 {
437 // adjustments for accessibility API
438 - rImp.DisposeAccessibleObj( pObj );
439 + rImp.DisposeAccessibleObj(pObj, true);
440 rImp.AddAccessibleObj( pObj );
441 }
442
443 diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
444 index 4ebe489..be88ca9 100644
445 --- a/sw/source/core/inc/viewimp.hxx
446 +++ b/sw/source/core/inc/viewimp.hxx
447 @@ -225,10 +225,10 @@ public:
448
449 /// Remove a frame from the accessible view
450 void DisposeAccessible( const SwFrame *pFrame, const SdrObject *pObj,
451 - bool bRecursive );
452 + bool bRecursive, bool bCanSkipInvisible );
453 inline void DisposeAccessibleFrame( const SwFrame *pFrame,
454 bool bRecursive = false );
455 - inline void DisposeAccessibleObj( const SdrObject *pObj );
456 + inline void DisposeAccessibleObj( const SdrObject *pObj, bool bCanSkipInvisible );
457
458 /// Move a frame's position in the accessible view
459 void MoveAccessible( const SwFrame *pFrame, const SdrObject *pObj,
460 @@ -278,12 +278,12 @@ inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap()
461 inline void SwViewShellImp::DisposeAccessibleFrame( const SwFrame *pFrame,
462 bool bRecursive )
463 {
464 - DisposeAccessible( pFrame, nullptr, bRecursive );
465 + DisposeAccessible( pFrame, nullptr, bRecursive, true );
466 }
467
468 -inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj )
469 +inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj, bool bCanSkipInvisible )
470 {
471 - DisposeAccessible( nullptr, pObj, false );
472 + DisposeAccessible( nullptr, pObj, false, bCanSkipInvisible );
473 }
474
475 inline void SwViewShellImp::MoveAccessibleFrame( const SwFrame *pFrame,
476 diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
477 index 66c131d..5ad9f40 100644
478 --- a/sw/source/core/layout/fly.cxx
479 +++ b/sw/source/core/layout/fly.cxx
480 @@ -2160,8 +2160,8 @@ void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
481 if( pSh )
482 {
483 SwRootFrame* pLayout = getRootFrame();
484 - if( pLayout && pLayout->IsAnyShellAccessible() )
485 - pSh->Imp()->DisposeAccessibleObj( _rToRemoveObj.GetDrawObj() );
486 + if (pLayout && pLayout->IsAnyShellAccessible())
487 + pSh->Imp()->DisposeAccessibleObj(_rToRemoveObj.GetDrawObj(), false);
488 }
489
490 // deregister from page frame
491 diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
492 index 254a5b7..e403be9 100644
493 --- a/sw/source/core/view/viewimp.cxx
494 +++ b/sw/source/core/view/viewimp.cxx
495 @@ -300,15 +300,16 @@ void SwViewShellImp::UpdateAccessible()
496 GetAccessibleMap().GetDocumentView();
497 }
498
499 -void SwViewShellImp::DisposeAccessible( const SwFrame *pFrame,
500 - const SdrObject *pObj,
501 - bool bRecursive )
502 +void SwViewShellImp::DisposeAccessible(const SwFrame *pFrame,
503 + const SdrObject *pObj,
504 + bool bRecursive,
505 + bool bCanSkipInvisible)
506 {
507 OSL_ENSURE( !pFrame || pFrame->IsAccessibleFrame(), "frame is not accessible" );
508 for(SwViewShell& rTmp : GetShell()->GetRingContainer())
509 {
510 if( rTmp.Imp()->IsAccessible() )
511 - rTmp.Imp()->GetAccessibleMap().Dispose( pFrame, pObj, nullptr, bRecursive );
512 + rTmp.Imp()->GetAccessibleMap().A11yDispose( pFrame, pObj, nullptr, bRecursive, bCanSkipInvisible );
513 }
514 }
515
516 diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
517 index 1ef3524..f6f4361 100644
518 --- a/sw/source/uibase/docvw/PostItMgr.cxx
519 +++ b/sw/source/uibase/docvw/PostItMgr.cxx
520 @@ -2194,7 +2194,7 @@ void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame,
521 if ( bRemoved &&
522 mpWrtShell->GetAccessibleMap() )
523 {
524 - mpWrtShell->GetAccessibleMap()->Dispose( nullptr, nullptr, &rSidebarWin );
525 + mpWrtShell->GetAccessibleMap()->A11yDispose( nullptr, nullptr, &rSidebarWin );
526 }
527 }
528 }
529 --
530 2.7.4
531

  ViewVC Help
Powered by ViewVC 1.1.30