diff options
authorMichael Stahl <>2016-12-07 14:04:24 +0100
committerMichael Stahl <>2016-12-07 14:46:08 +0100
commitae06f4be6bbdebc10a88c386064d548848e57f80 (patch)
parent4cda288e06146416c762dbc82132a1083b86c630 (diff)
tdf#101464 tdf#91260 sw: a11y for partially off-page drawing object
The problem is that the drawing object in the bugdoc is not disposed when the document view is closed at a scroll position that does not show the page with the anchor frame of the drawing object, but does show the top of the following page, because it will only be disposed via its anchor page. SwAccessibleChild::GetBox() must take into account that the model-determined bounding box of the SdrObject can be partially outside the page where the object is anchored since commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1. Change-Id: I4276ee636d054320977e2a0ed0f69e53bbc778a3
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index cf3e29520926..bc7f06d2cf61 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -258,6 +258,13 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const
else if( mpDrawObj )
aBox = SwRect( mpDrawObj->GetCurrentBoundRect() );
+ SwDrawContact const*const pContact(dynamic_cast<SwDrawContact const*>(::GetUserCall(mpDrawObj)));
+ // assume that a) the SwVirt* objects that don't have this are handled
+ // by the mpFrame case above b) for genuine SdrObject this must be set
+ // if it's connected to layout
+ assert(pContact);
+ // tdf#91260 drawing object may be partially off-page
+ aBox.Intersection(pContact->GetPageFrame()->Frame());
else if ( mpWindow )