diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-27 14:29:24 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-28 10:22:51 +0200 |
commit | d7b1580aa0ccbea844fb2408e8f3d19c3a97d6d1 (patch) | |
tree | e71f36d9ab7cd6137e67b1281d8ca7d56fbdbb60 | |
parent | e8f4bf9df5b6a9b24256d00462d94c430e319134 (diff) |
sw: InsertCnt_(): don't call FindPrevCnt() when it doesn't make sense
When pasting a table we get:
warn:legacy.osl:29407:29407:sw/source/core/layout/findfrm.cxx:1136: <SwFrame::FindPrevCnt_()> - unknown layout situation: current frame should be in page header or page foote
... because SwCellFrame's constructor inserts the content of the cell
before the SwCellFrame's mpUpper is set, so it's not connected to
anything; hence FindNextCnt()/FindPrevCnt() can only return frames
inside the cell anyway, and all of those are newly created, so
invalidating a11y flow-relations for them seems pointless because a11y
doesn't even know about them yet.
Change-Id: I96eb59d6ecfdaa453894d06494c6c50faa7cd1bd
Reviewed-on: https://gerrit.libreoffice.org/73046
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 0526dfe5b2bd..484e5d2a8e93 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1431,7 +1431,8 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && - pViewShell->GetLayout()->IsAnyShellAccessible() ) + pViewShell->GetLayout()->IsAnyShellAccessible() && + pFrame->FindPageFrame() != nullptr) { pViewShell->InvalidateAccessibleParaFlowRelation( dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), @@ -1512,7 +1513,8 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && - pViewShell->GetLayout()->IsAnyShellAccessible() ) + pViewShell->GetLayout()->IsAnyShellAccessible() && + pFrame->FindPageFrame() != nullptr) { pViewShell->InvalidateAccessibleParaFlowRelation( dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), @@ -1592,7 +1594,8 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && - pViewShell->GetLayout()->IsAnyShellAccessible() ) + pViewShell->GetLayout()->IsAnyShellAccessible() && + pFrame->FindPageFrame() != nullptr) { pViewShell->InvalidateAccessibleParaFlowRelation( dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), |