diff options
authorMiklos Vajna <>2016-07-12 17:56:46 +0200
committerMiklos Vajna <>2016-07-21 10:22:29 +0200
commitb0ef5ee39d3af9da10bb2ffcccea99e44664abdd (patch)
parent983dc855e1f5a93216308e1c09eb39f1bb7f4abe (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: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins <> (cherry picked from commit 22023b104cd1e024aecc28a6161bea519a584407)
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index b343f502e0fe..6f3be20869db 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -32,6 +32,7 @@
#include <vcl/unowrap.hxx>
#include <vcl/settings.hxx>
#include <vcl/sysdata.hxx>
+#include <comphelper/lok.hxx>
#include <vcl/outdevstate.hxx>
@@ -106,6 +107,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;