summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-13 10:02:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-13 10:08:12 +0100
commitfd72427850d1f2db4d0b982391975d67b3e784fa (patch)
tree611325f060c3a8557e714b5fce5ca74e3a5bd2b7 /sw/source
parent84c69550bcb8139669de9cf98b51c35f21fe853d (diff)
Exclude FAR_AWAY objects from bounds computation
...otherwise, running CppunitTest_writerperfect_writer would overflow in ImplLogicToPixel (vcl/source/outdev/map.cxx) when nMaxRight would be ridiculously large due to including the ridiculously large right bound of an SwFlyLayFrm that is marked FAR_AWAY. Change-Id: Id6f8c895a953e99c5955b0f6ed655f8b79fba6f1
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/view/viewsh.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 580117f7c05d..9a5ff25ac2bd 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1085,12 +1085,14 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
if (pObj->IsFormatPossible())
{
const Rectangle &rBound = pObj->GetObjRect().SVRect();
- // OD 03.03.2003 #107927# - use correct datatype
- const SwTwips nL = std::max( 0L, rBound.Left() - nOfst );
- if ( nL < nMinLeft )
- nMinLeft = nL;
- if( rBound.Right() + nOfst > nMaxRight )
- nMaxRight = rBound.Right() + nOfst;
+ if (rBound.Left() != FAR_AWAY) {
+ // OD 03.03.2003 #107927# - use correct datatype
+ const SwTwips nL = std::max( 0L, rBound.Left() - nOfst );
+ if ( nL < nMinLeft )
+ nMinLeft = nL;
+ if( rBound.Right() + nOfst > nMaxRight )
+ nMaxRight = rBound.Right() + nOfst;
+ }
}
}
}