From 9ca4c4f086c1abf558fd6b9cc7503318b72f2858 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 16 Oct 2015 12:51:40 +0200 Subject: cid#1326334 Unguarded read Change-Id: I8cfe2805f2b8c1ae23fa955a28ff9ec43f353e38 --- .../com/sun/star/comp/beans/LocalOfficeWindow.java | 28 +++++++++------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'bean/com/sun/star/comp') diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java index b8b493e5f94b..a968de811ae8 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java @@ -75,18 +75,6 @@ public class LocalOfficeWindow return this; } - /** - * Retrieves an UNO XWindowPeer object associated with the OfficeWindow. - * - * @return The UNO XWindowPeer object associated with the OfficeWindow. - */ - public XWindowPeer getUNOWindowPeer() - { - if (mWindow == null) - createUNOWindowPeer(); - return mWindow; - } - /** * Receives a notification about the connection has been closed. * This method has to set the connection to null. @@ -171,11 +159,16 @@ public class LocalOfficeWindow releaseSystemWindow(); } - /** Factory method for a UNO AWT toolkit window as a child of this Java window. - * - */ - private synchronized XWindowPeer createUNOWindowPeer() - { + /** + * Retrieves an UNO XWindowPeer object associated with the OfficeWindow. + * + * @return The UNO XWindowPeer object associated with the OfficeWindow. + */ + public synchronized XWindowPeer getUNOWindowPeer() + { + if (mWindow != null) + return mWindow; + try { // get this windows native window type @@ -217,6 +210,7 @@ public class LocalOfficeWindow return mWindow; } + /** We make sure that the office window is notified that the parent * will be removed. */ -- cgit