Kaydet (Commit) e5dd2e88 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

We're using the same rectangle for both calls, let's reuse it.

Change-Id: I884832fc92e0fe9c10711d9fdaf103076a05f721
üst bfad9f5b
...@@ -1785,6 +1785,9 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex ...@@ -1785,6 +1785,9 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
Imp()->GetDrawView()->AddWindowToPaintView(&rDevice); Imp()->GetDrawView()->AddWindowToPaintView(&rDevice);
} }
Rectangle aOutRect = Rectangle(Point(tilePosX, tilePosY),
rDevice.PixelToLogic(Size(contextWidth, contextHeight)));
// Make the requested area visible -- we can't use MakeVisible as that will // Make the requested area visible -- we can't use MakeVisible as that will
// only scroll the contents, but won't zoom/resize if needed. // only scroll the contents, but won't zoom/resize if needed.
// Without this, items/text that are outside the visible area (in the SwView) // Without this, items/text that are outside the visible area (in the SwView)
...@@ -1792,10 +1795,10 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex ...@@ -1792,10 +1795,10 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// tiledrendering app, or the gtktiledviewer) -- although ultimately we // tiledrendering app, or the gtktiledviewer) -- although ultimately we
// probably want to fix things so that the SwView's area doesn't affect // probably want to fix things so that the SwView's area doesn't affect
// tiled rendering? // tiled rendering?
VisPortChgd(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); VisPortChgd(SwRect(aOutRect));
// draw - works in logic coordinates // draw - works in logic coordinates
Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); Paint(aOutRect);
// Remove this device in DrawLayer // Remove this device in DrawLayer
if (Imp()->GetDrawView()) if (Imp()->GetDrawView())
......
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