Kaydet (Commit) 508d2d2b authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski Kaydeden (comit) Björn Michaelsen

fdo#80926 Don't move anchors of invalid pages

If the anchor is valid, check if its page is valid too,
before moving anchors on view change.

Change-Id: Idffdfdb786cb29a105c06d652e6ad7315abfb4c5
Reviewed-on: https://gerrit.libreoffice.org/10976Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst 9099e21b
......@@ -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() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment