Kaydet (Commit) adce48ab authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

cleanup GetGraphicSizeTwip

Change-Id: I5f3c3c7826c867eaca8af0e2aa35c9919d8b1319
üst fbd06b24
...@@ -78,21 +78,19 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt ) ...@@ -78,21 +78,19 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt )
IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt )
IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos ) IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos )
Size GetGraphicSizeTwip( const Graphic& rGraphic, vcl::RenderContext* pOutDev ) Size GetGraphicSizeTwip(const Graphic& rGraphic, vcl::RenderContext* pOutDev)
{ {
const MapMode aMapTwip( MAP_TWIP ); const MapMode aMapTwip(MAP_TWIP);
Size aSize( rGraphic.GetPrefSize() ); Size aSize(rGraphic.GetPrefSize());
if( MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit() ) if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit())
{ {
if( !pOutDev ) if (!pOutDev)
pOutDev = Application::GetDefaultDevice(); pOutDev = Application::GetDefaultDevice();
aSize = pOutDev->PixelToLogic( aSize, aMapTwip ); aSize = pOutDev->PixelToLogic(aSize, aMapTwip);
} }
else else
{ {
aSize = OutputDevice::LogicToLogic( aSize, aSize = OutputDevice::LogicToLogic(aSize, rGraphic.GetPrefMapMode(), aMapTwip);
rGraphic.GetPrefMapMode(),
aMapTwip );
} }
return aSize; return aSize;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment