summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-24 21:38:12 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-26 15:42:04 +0200
commite5dd2e8826433566e223d0572ed73f21d0b992f1 (patch)
tree0b8d7913d6904b07155adc75aac5dec81d5e9d1f /sw
parentbfad9f5b7bbcb93af46cae535120795ead1f4f0a (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.cxx7
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())