You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/02/24 18:26:38 UTC
svn commit: r1293349 - /incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx
Author: alg
Date: Fri Feb 24 17:26:37 2012
New Revision: 1293349
URL: http://svn.apache.org/viewvc?rev=1293349&view=rev
Log:
#118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction
Modified:
incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx
Modified: incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx?rev=1293349&r1=1293348&r2=1293349&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/gdimtf.cxx Fri Feb 24 17:26:37 2012
@@ -1778,25 +1778,10 @@ Rectangle GDIMetaFile::GetBoundRect( Out
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
- // get the bound rect of the contained metafile
- Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) );
- // scale the rect now on the assumption that the correct top left of the metafile
- // (not its bounds !) is (0,0)
- Size aPSize( aTransMtf.GetPrefSize() );
- aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
- Size aActSize( pAct->GetSize() );
- double fX = double(aActSize.Width())/double(aPSize.Width());
- double fY = double(aActSize.Height())/double(aPSize.Height());
- aRect.Left() = long(double(aRect.Left())*fX);
- aRect.Right() = long(double(aRect.Right())*fX);
- aRect.Top() = long(double(aRect.Top())*fY);
- aRect.Bottom() = long(double(aRect.Bottom())*fY);
-
- // transform the rect to current VDev state
- aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
-
- ImplActionBounds( aBound, aRect, aClipStack, 0 );
+ // MetaFloatTransparentAction is defined limiting it's content Metafile
+ // to it's geometry definition(Point, Size), so use these directly
+ const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
}
break;