summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-05 11:22:45 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 11:24:00 +0200
commit0e93ef3ec1fe19a088e70810904140f4bbd60244 (patch)
treef486e6a0e7bc86205668dffb33507db17a6090b8 /vcl
parentb37b7b5cd5a4b7acdee4736008f3947317dad4ce (diff)
fix compiling of this java class
(even though it's not being built right now) Change-Id: I237cce48ea50b1184b166a8a8132ae425597bffe
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/complex/persistent_window_states/DocumentHandle.java36
1 files changed, 32 insertions, 4 deletions
diff --git a/vcl/qa/complex/persistent_window_states/DocumentHandle.java b/vcl/qa/complex/persistent_window_states/DocumentHandle.java
index ec09cac7a89a..e3760baf9862 100644
--- a/vcl/qa/complex/persistent_window_states/DocumentHandle.java
+++ b/vcl/qa/complex/persistent_window_states/DocumentHandle.java
@@ -22,12 +22,14 @@ import helper.WindowListener;
import com.sun.star.awt.PosSize;
import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.WindowEvent;
import com.sun.star.awt.XWindow;
import com.sun.star.beans.PropertyState;
import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.FrameSearchFlag;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XFrame;
+import com.sun.star.lang.EventObject;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
@@ -42,7 +44,7 @@ public class DocumentHandle {
// the current window
private XWindow xWin = null;
// a own window listener
- private final WindowListener wl;
+ private final MyWindowListener wl;
/**
* Constructor
@@ -50,7 +52,7 @@ public class DocumentHandle {
*/
public DocumentHandle(XComponentLoader xCompLoader) {
this.xCompLoader = xCompLoader;
- wl = new WindowListener();
+ wl = new MyWindowListener();
}
/**
@@ -61,7 +63,7 @@ public class DocumentHandle {
*/
public Rectangle loadDocument(XMultiServiceFactory xMSF, String docName, boolean hidden)
throws Exception{
- wl.resetTrigger();
+ wl.resizedTrigger = false;
try {
PropertyValue [] szArgs = null;
if (hidden) {
@@ -140,10 +142,36 @@ public class DocumentHandle {
* @return True if resize worked.
*/
private boolean resizeDocument(XMultiServiceFactory xMSF, Rectangle newPosSize){
- wl.resetTrigger();
+ wl.resizedTrigger = false;
xWin.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width,
newPosSize.Height, PosSize.POSSIZE);
util.utils.waitForEventIdle(xMSF);
return wl.resizedTrigger;
}
+
+ private static class MyWindowListener implements com.sun.star.awt.XWindowListener {
+ // resize called
+ public boolean resizedTrigger = false;
+
+ @Override
+ public void disposing(EventObject eventObject) {
+ }
+
+ @Override
+ public void windowHidden(EventObject eventObject) {
+ }
+
+ @Override
+ public void windowMoved(WindowEvent eventObject) {
+ }
+
+ @Override
+ public void windowResized(WindowEvent eventObject) {
+ resizedTrigger = true;
+ }
+
+ @Override
+ public void windowShown(EventObject eventObject) {
+ }
+ }
}