diff options
-rw-r--r-- | sw/source/core/view/vdraw.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index cfadd9e950dd..4ac29083c745 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -227,6 +227,17 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz ) { continue; } + else + { + // Actually this should never happen but currently layouting + // is broken. So don't move anchors, if the page is invalid. + // This should be turned into an DBG_ASSERT, once layouting is fixed! + const SwPageFrm *pPageFrm = pAnchor->FindPageFrm(); + if (!pPageFrm || pPageFrm->IsInvalid() ) { + SAL_WARN( "sw.resizeview", "Trying to move anchor from invalid page - fix layouting!" ); + continue; + } + } // no move for drawing objects in header/footer if ( pAnchor->FindFooterOrHeader() ) |