summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-12 17:56:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-13 07:11:41 +0000
commit22023b104cd1e024aecc28a6161bea519a584407 (patch)
treeeea64d11c7649296cf9302eeb70321ea5090d10c /vcl
parent7346a0cbea43f49578c5209da1416aa0b27fbddb (diff)
vcl lok: fix missing paints due to zero-sized windows
How to reproduce the problem: open an Impress presentation in gtktiledviewer, create two views. Start editing the text of a shape in one view -> nothing happens in the other view. There is no invalidation in the other view, as sdr::contact::ViewContact::AddViewObjectContact() is not called for either of the views. Editing with a single view only worked as when clicking into the shape, the ViewObjectContact is created. On the desktop, those ViewObjectContacts are created on the first paint of the slide, but in the LOK case the vcl::Window instances had a 0x0 size, so an invalidation didn't result in a paint -> no ViewObjectContact was created -> no LOK invalidation was sent. No testcase, as I didn't manage to write code that actually triggers the failure under cppunit with the fix reverted. Change-Id: If29fcea4258a45f3d6d9aab284445756609fa13c Reviewed-on: https://gerrit.libreoffice.org/27159 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/outdev.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 04d1210ca690..eccf50d5a504 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -21,6 +21,7 @@
#include <vcl/outdev.hxx>
#include <vcl/unowrap.hxx>
#include <vcl/sysdata.hxx>
+#include <comphelper/lok.hxx>
#include "salgdi.hxx"
#include "svdata.hxx"
@@ -65,6 +66,13 @@ OutputDevice::OutputDevice() :
mnOutOffY = 0;
mnOutWidth = 0;
mnOutHeight = 0;
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // Device size isn't set later in this case, and with zero size, we
+ // miss paint events.
+ mnOutWidth = 1;
+ mnOutHeight = 1;
+ }
mnDPIX = 0;
mnDPIY = 0;
mnDPIScaleFactor = 1;