diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-24 11:50:51 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-24 11:50:51 +0000 |
commit | 9aab232a9687bcd998a782c7296be40c990d786a (patch) | |
tree | 90cf7c204e93586343b5aef3f1e32bef17432c91 /sd/source/ui/docshell | |
parent | 4235caf56600c9ff26e77c1687bee2d740db9570 (diff) |
INTEGRATION: CWS fwk33 (1.13.144); FILE MERGED
2006/03/03 13:48:12 mav 1.13.144.1: #i62746# do any action only if the change is more then one pixel
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r-- | sd/source/ui/docshell/sdclient.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx index 71c5300c73af..f00c414ddfe9 100644 --- a/sd/source/ui/docshell/sdclient.cxx +++ b/sd/source/ui/docshell/sdclient.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdclient.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: rt $ $Date: 2005-09-09 04:32:31 $ + * last change: $Author: obo $ $Date: 2006-03-24 12:50:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -196,8 +196,14 @@ void Client::ViewChanged() Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() ); Size aScaledSize( static_cast< long >( GetScaleWidth() * Fraction( aVisArea.GetWidth() ) ), static_cast< long >( GetScaleHeight() * Fraction( aVisArea.GetHeight() ) ) ); - if( Application::GetDefaultDevice()->LogicToPixel( aScaledSize, aMap100 ) != - Application::GetDefaultDevice()->LogicToPixel( aLogicRect.GetSize(), aMap100 ) ) + + // react to the change if the difference is bigger than one pixel + Size aPixelDiff = + Application::GetDefaultDevice()->LogicToPixel( + Size( aLogicRect.GetWidth() - aScaledSize.Width(), + aLogicRect.GetHeight() - aScaledSize.Height() ), + aMap100 ); + if( aPixelDiff.Width() || aPixelDiff.Height() ) { pSdrOle2Obj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); pSdrOle2Obj->BroadcastObjectChange(); |