From bf61c46098e2f456fa1448c5204b7c4465025680 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 5 May 2011 14:38:19 +0200
Subject: [PATCH] rhbz#701152 ignore hidden objects
---
sw/source/core/view/viewsh.cxx | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 3466ab8..06ddcf3 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1042,12 +1042,16 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
- const Rectangle &rBound = pObj->GetObjRect().SVRect();
- const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
- if ( nL < nMinLeft )
- nMinLeft = nL;
- if( rBound.Right() + nOfst > nMaxRight )
- nMaxRight = rBound.Right() + nOfst;
+ // ignore objects that are not actually placed on the page
+ if (pObj->IsFormatPossible())
+ {
+ const Rectangle &rBound = pObj->GetObjRect().SVRect();
+ const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
+ if ( nL < nMinLeft )
+ nMinLeft = nL;
+ if( rBound.Right() + nOfst > nMaxRight )
+ nMaxRight = rBound.Right() + nOfst;
+ }
}
}
}
--
1.7.7.6