--- sw/source/filter/ww8/wrtww8gr.cxx.orig 2009-11-10 16:54:31.000000000 -0200 +++ sw/source/filter/ww8/wrtww8gr.cxx 2009-11-10 16:54:47.000000000 -0200 @@ -608,7 +608,7 @@ substitute the final size and loose on retaining the scaling factor but still keep the correct display size anyway. */ - if ( (aGrTwipSz.Width() > USHRT_MAX) || (aGrTwipSz.Height() > USHRT_MAX) + if ( (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX) || (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) ) { aGrTwipSz.Width() = nWidth;