[Libreoffice-commits] .: sw/source

David Tardon dtardon at kemper.freedesktop.org
Thu May 5 05:38:46 PDT 2011


 sw/source/core/view/viewsh.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 1f4ba3f5fcbb0fdfeb42dc0a93d4e293913098b0
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 5 14:38:19 2011 +0200

    rhbz#701152 ignore hidden objects

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index fae44c9..bcae1df 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;
+                            }
                         }
                     }
                 }


More information about the Libreoffice-commits mailing list