diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-17 13:55:48 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-11-28 14:15:33 +0100 |
commit | ab6ec7c83feca1fca7531d3522a3b05964384bd7 (patch) | |
tree | e519bc265723c1c246ac7d2340841e3a1eb9f21c /qadevOOo | |
parent | 64fb8e366c84a3ff71500bbd513b1f3c9595fa66 (diff) |
backport implementation part of 754ade38ddb2e96187d00f3e621203cea34961fa
Change-Id: I7c732d94346be8f37fba1a32655ba224c74e0235
Reviewed-on: https://gerrit.libreoffice.org/20017
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit aaf3bc89d722ea3c034fd417cc36db9e4bbc125f)
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/utils.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index 4a77e41e2331..766f4e5bbb25 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -30,6 +30,7 @@ import java.net.ServerSocket; import java.net.URI; import java.net.URISyntaxException; +import com.sun.star.awt.XToolkitExperimental; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.Property; import com.sun.star.lang.XMultiServiceFactory; @@ -661,6 +662,17 @@ public class utils { } } + public static void waitForEventIdle(XMultiServiceFactory xMSF) { + try { + XToolkitExperimental xToolkit = UnoRuntime.queryInterface( + XToolkitExperimental.class, + xMSF.createInstance("com.sun.star.awt.Toolkit")); + xToolkit.processEventsToIdle(); + } catch (com.sun.star.uno.Exception ex) { + throw new RuntimeException(ex); + } + } + /** * Validate the AppExecutionCommand. Returned is an error message, starting * with "Error:", or a warning, if the command might work. |