diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-16 12:51:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-16 12:51:40 +0200 |
commit | 9ca4c4f086c1abf558fd6b9cc7503318b72f2858 (patch) | |
tree | 90d6f4e395db337baac650ea976273d1c5a6a69c /bean | |
parent | 1d3fc27b0f457d1c9b0106943c15f3e0c9ac6541 (diff) |
cid#1326334 Unguarded read
Change-Id: I8cfe2805f2b8c1ae23fa955a28ff9ec43f353e38
Diffstat (limited to 'bean')
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeWindow.java | 28 |
1 files changed, 11 insertions, 17 deletions
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 @@ -76,18 +76,6 @@ public class LocalOfficeWindow } /** - * 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 <code>null</code>. * @@ -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. */ |