[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 28 08:23:34 UTC 2019
sw/source/core/layout/frmtool.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit d7b1580aa0ccbea844fb2408e8f3d19c3a97d6d1
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon May 27 14:29:24 2019 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 28 10:22:51 2019 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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 )),
More information about the Libreoffice-commits
mailing list