Kaydet (Commit) 1d74d6d3 authored tarafından Noel Grandin's avatar Noel Grandin

make OutputDevice::LogicToLogic respect empty Rectangle in more cases

follow the logic from the block at the top of the function

Change-Id: I3756eac9eb4fddb239a433927c52a505c7ab9b36
Reviewed-on: https://gerrit.libreoffice.org/73547
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 597ede6c
......@@ -1876,22 +1876,26 @@ tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource
{
ENTER4( rMapModeSource, rMapModeDest );
return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
auto left = fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) -
aMapResDest.mnMapOfsX,
fn5( rRectSource.Top() + aMapResSource.mnMapOfsY,
aMapResDest.mnMapOfsX;
auto top = fn5( rRectSource.Top() + aMapResSource.mnMapOfsY,
aMapResSource.mnMapScNumY, aMapResDest.mnMapScDenomY,
aMapResSource.mnMapScDenomY, aMapResDest.mnMapScNumY ) -
aMapResDest.mnMapOfsY,
fn5( rRectSource.Right() + aMapResSource.mnMapOfsX,
aMapResDest.mnMapOfsY;
if (rRectSource.IsEmpty())
return tools::Rectangle(left, top);
auto right = fn5( rRectSource.Right() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) -
aMapResDest.mnMapOfsX,
fn5( rRectSource.Bottom() + aMapResSource.mnMapOfsY,
aMapResDest.mnMapOfsX;
auto bottom = fn5( rRectSource.Bottom() + aMapResSource.mnMapOfsY,
aMapResSource.mnMapScNumY, aMapResDest.mnMapScDenomY,
aMapResSource.mnMapScDenomY, aMapResDest.mnMapScNumY ) -
aMapResDest.mnMapOfsY );
aMapResDest.mnMapOfsY;
return tools::Rectangle(left, top, right, bottom);
}
}
......
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