diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-24 21:38:12 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-26 15:42:04 +0200 |
commit | e5dd2e8826433566e223d0572ed73f21d0b992f1 (patch) | |
tree | 0b8d7913d6904b07155adc75aac5dec81d5e9d1f /sw | |
parent | bfad9f5b7bbcb93af46cae535120795ead1f4f0a (diff) |
We're using the same rectangle for both calls, let's reuse it.
Change-Id: I884832fc92e0fe9c10711d9fdaf103076a05f721
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index daf5304e0d89..e545651f480d 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1785,6 +1785,9 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex 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 // only scroll the contents, but won't zoom/resize if needed. // 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 // tiledrendering app, or the gtktiledviewer) -- although ultimately we // probably want to fix things so that the SwView's area doesn't affect // tiled rendering? - VisPortChgd(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); + VisPortChgd(SwRect(aOutRect)); // draw - works in logic coordinates - Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); + Paint(aOutRect); // Remove this device in DrawLayer if (Imp()->GetDrawView()) |