summaryrefslogtreecommitdiff
path: root/bean
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2013-04-16 22:38:26 +1000
committerThomas Arnhold <thomas@arnhold.org>2013-04-16 23:12:03 +0000
commit43debfae8326ad98f9d130aa450f59ad49577d55 (patch)
tree2c5f6d01159f030fcaccc973c36b66116c0632d7 /bean
parent7cac1bc73c53d8bfb0b7d87966ae19ce2e918883 (diff)
General cleanup of OfficeBeans
Cleaned up Java source files: + removed unnecessary commented out code + corrected many spelling errors + formatting changes (remove decorations from comments, whitespacing, etc.) Change-Id: I4133908ceac874b273fe409d763b3ddbfc2055e5 Reviewed-on: https://gerrit.libreoffice.org/3413 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'bean')
-rw-r--r--bean/com/sun/star/comp/beans/CallWatchThread.java9
-rw-r--r--bean/com/sun/star/comp/beans/ContainerFactory.java2
-rw-r--r--bean/com/sun/star/comp/beans/Frame.java6
-rw-r--r--bean/com/sun/star/comp/beans/JavaWindowPeerFake.java16
-rw-r--r--bean/com/sun/star/comp/beans/LocalOfficeConnection.java76
-rw-r--r--bean/com/sun/star/comp/beans/LocalOfficeWindow.java16
-rw-r--r--bean/com/sun/star/comp/beans/NativeConnection.java6
-rw-r--r--bean/com/sun/star/comp/beans/NativeService.java2
-rw-r--r--bean/com/sun/star/comp/beans/NoConnectionException.java4
-rw-r--r--bean/com/sun/star/comp/beans/NoDocumentException.java2
-rw-r--r--bean/com/sun/star/comp/beans/OOoBean.java71
-rw-r--r--bean/com/sun/star/comp/beans/OfficeConnection.java4
-rw-r--r--bean/com/sun/star/comp/beans/OfficeWindow.java8
-rw-r--r--bean/com/sun/star/comp/beans/Wrapper.java5
14 files changed, 106 insertions, 121 deletions
diff --git a/bean/com/sun/star/comp/beans/CallWatchThread.java b/bean/com/sun/star/comp/beans/CallWatchThread.java
index ce6ed6a21c77..31f3a8cdb1e0 100644
--- a/bean/com/sun/star/comp/beans/CallWatchThread.java
+++ b/bean/com/sun/star/comp/beans/CallWatchThread.java
@@ -19,13 +19,12 @@
package com.sun.star.comp.beans;
-//---------------------------------------------------------------------------
/** Helper class to watch calls into OOo with a timeout.
*/
-//Do not add the thread instances to a threadgroup. When testing the bean in
-//an applet it turned out the ThreadGroup was in an inconsistent state
-//after navigating off the site that contains the applet and back to it.
-//That was tested with a Sun JRE 1.4.2_06
+// Do not add the thread instances to a threadgroup. When testing the bean in
+// an applet it turned out the ThreadGroup was in an inconsistent state
+// after navigating off the site that contains the applet and back to it.
+// That was tested with a Sun JRE 1.4.2_06
public class CallWatchThread extends Thread
{
private static boolean DEBUG = false;
diff --git a/bean/com/sun/star/comp/beans/ContainerFactory.java b/bean/com/sun/star/comp/beans/ContainerFactory.java
index c707a711c48e..d06a082c7db6 100644
--- a/bean/com/sun/star/comp/beans/ContainerFactory.java
+++ b/bean/com/sun/star/comp/beans/ContainerFactory.java
@@ -21,7 +21,7 @@ package com.sun.star.comp.beans;
import java.awt.Container;
/**
- * This interface reprecents an AWT container factory.
+ * This interface represents an AWT container factory.
*
* @deprecated
*
diff --git a/bean/com/sun/star/comp/beans/Frame.java b/bean/com/sun/star/comp/beans/Frame.java
index cd68bb789090..b14b633b6020 100644
--- a/bean/com/sun/star/comp/beans/Frame.java
+++ b/bean/com/sun/star/comp/beans/Frame.java
@@ -49,7 +49,7 @@ public class Frame
// com.sun.star.frame.XFrame
//--------------------------------------------------------------
- public void initialize( /*IN*/com.sun.star.awt.XWindow xWindow )
+ public void initialize( /*IN*/ com.sun.star.awt.XWindow xWindow )
{
xFrame.initialize( xWindow );
}
@@ -79,7 +79,7 @@ public class Frame
xFrame.setName( aName );
}
- public com.sun.star.frame.XFrame findFrame( /*IN*/String aTargetFrameName, /*IN*/int nSearchFlags )
+ public com.sun.star.frame.XFrame findFrame( /*IN*/ String aTargetFrameName, /*IN*/ int nSearchFlags )
{
return xFrame.findFrame( aTargetFrameName, nSearchFlags );
}
@@ -104,7 +104,7 @@ public class Frame
return xFrame.isActive();
}
- public boolean setComponent( /*IN*/com.sun.star.awt.XWindow xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
+ public boolean setComponent( /*IN*/ com.sun.star.awt.XWindow xComponentWindow, /*IN*/ com.sun.star.frame.XController xController )
{
return xFrame.setComponent( xComponentWindow, xController );
}
diff --git a/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java b/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
index da235fff18a3..7bcfa7ada7ff 100644
--- a/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
+++ b/bean/com/sun/star/comp/beans/JavaWindowPeerFake.java
@@ -25,7 +25,7 @@ import com.sun.star.awt.*;
*
* @since OOo 2.0.0
*/
-/* package */ class JavaWindowPeerFake
+class JavaWindowPeerFake
implements XSystemDependentWindowPeer, XWindowPeer
{
protected int localSystemType;
@@ -44,7 +44,7 @@ import com.sun.star.awt.*;
/** <p>Implementation of XSystemDependentWindowPeer (that's all we really need)</p>
* This method is called back from the OpenOffice.org toolkit to retrieve the system data.
*/
- public Object getWindowHandle(/*IN*/byte[] ProcessId, /*IN*/short SystemType)
+ public Object getWindowHandle(/*IN*/ byte[] ProcessId, /*IN*/ short SystemType)
throws com.sun.star.uno.RuntimeException
{
if (SystemType == localSystemType) {
@@ -63,28 +63,28 @@ import com.sun.star.awt.*;
/** not really neaded.
*/
- public void setPointer(/*IN*/XPointer Pointer)
+ public void setPointer(/*IN*/ XPointer Pointer)
throws com.sun.star.uno.RuntimeException
{
}
/** not really neaded.
*/
- public void setBackground(/*IN*/int Color)
+ public void setBackground(/*IN*/ int Color)
throws com.sun.star.uno.RuntimeException
{
}
/** not really neaded.
*/
- public void invalidate(/*IN*/short Flags)
+ public void invalidate(/*IN*/ short Flags)
throws com.sun.star.uno.RuntimeException
{
}
/** not really neaded.
*/
- public void invalidateRect(/*IN*/com.sun.star.awt.Rectangle Rect, /*IN*/short Flags)
+ public void invalidateRect(/*IN*/ com.sun.star.awt.Rectangle Rect, /*IN*/ short Flags)
throws com.sun.star.uno.RuntimeException
{
}
@@ -98,14 +98,14 @@ import com.sun.star.awt.*;
/** not really neaded.
*/
- public void addEventListener(/*IN*/com.sun.star.lang.XEventListener xListener)
+ public void addEventListener(/*IN*/ com.sun.star.lang.XEventListener xListener)
throws com.sun.star.uno.RuntimeException
{
}
/** not really neaded.
*/
- public void removeEventListener(/*IN*/com.sun.star.lang.XEventListener aListener)
+ public void removeEventListener(/*IN*/ com.sun.star.lang.XEventListener aListener)
throws com.sun.star.uno.RuntimeException
{
}
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
index f2dbbaa2d433..27467f051c5b 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
@@ -38,7 +38,7 @@ import com.sun.star.lib.uno.helper.UnoUrl;
import com.sun.star.lib.util.NativeLibraryLoader;
/**
- * This class reprecents a connection to the local office application.
+ * This class represents a connection to the local office application.
*
* @since OOo 2.0.0
*/
@@ -49,22 +49,22 @@ public class LocalOfficeConnection
public static final String OFFICE_LIB_NAME = "officebean";
public static final String OFFICE_ID_SUFFIX = "_Office";
- private Process mProcess;
+ private Process mProcess;
private ContainerFactory mContainerFactory;
private XComponentContext mContext;
private XBridge mBridge;
- private String mURL;
- private String mConnType;
- private String mPipe;
- private String mPort;
- private String mProtocol;
- private String mInitialObject;
+ private String mURL;
+ private String mConnType;
+ private String mPipe;
+ private String mPort;
+ private String mProtocol;
+ private String mInitialObject;
private List<XEventListener> mComponents = new ArrayList<XEventListener>();
private static long m_nBridgeCounter = 0;
- //-------------------------------------------------------------------------
+
static
{
// preload shared libraries whichs import lips are linked to officebean
@@ -115,7 +115,6 @@ public class LocalOfficeConnection
NativeLibraryLoader.loadLibrary( LocalOfficeConnection.class.getClassLoader(), "officebean" );
}
- //-------------------------------------------------------------------------
/**
* Constructor.
@@ -190,7 +189,7 @@ public class LocalOfficeConnection
}
/**
- * Sets an AWT container catory.
+ * Sets an AWT container factory.
*
* @param containerFactory This is a application provided AWT container
* factory.
@@ -201,7 +200,7 @@ public class LocalOfficeConnection
}
/**
- * Retrives the UNO component context.
+ * Retrieves the UNO component context.
* Establishes a connection if necessary and initialises the
* UNO service manager if it has not already been initialised.
* This method can return <code>null</code> if it fails to connect
@@ -242,12 +241,12 @@ public class LocalOfficeConnection
}
mComponents.clear();
- //Terminate the bridge. It turned out that this is necessary for the bean
- //to work properly when displayed in an applet within Internet Explorer.
- //When navigating off the page which is showing the applet and then going
- //back to it, then the Java remote bridge is damaged. That is the Java threads
- //do not work properly anymore. Therefore when Applet.stop is called the connection
- //to the office including the bridge needs to be terminated.
+ // Terminate the bridge. It turned out that this is necessary for the bean
+ // to work properly when displayed in an applet within Internet Explorer.
+ // When navigating off the page which is showing the applet and then going
+ // back to it, then the Java remote bridge is damaged. That is the Java threads
+ // do not work properly anymore. Therefore when Applet.stop is called the connection
+ // to the office including the bridge needs to be terminated.
if (mBridge != null)
{
XComponent comp = UnoRuntime.queryInterface(
@@ -379,19 +378,19 @@ public class LocalOfficeConnection
}
- //The function is copied and adapted from the UrlResolver.resolve.
- //We cannot use the URLResolver because we need access to the bridge which has
- //to be disposed when Applet.stop is called.
+ // The function is copied and adapted from the UrlResolver.resolve.
+ // We cannot use the URLResolver because we need access to the bridge which has
+ // to be disposed when Applet.stop is called.
private Object resolve(XComponentContext xLocalContext, String dcp)
throws com.sun.star.connection.NoConnectException,
com.sun.star.connection.ConnectionSetupException,
com.sun.star.lang.IllegalArgumentException
{
- String conDcp = null;
+ String conDcp = null;
String protDcp = null;
String rootOid = null;
- if(dcp.indexOf(';') == -1) {// use old style
+ if(dcp.indexOf(';') == -1) { // use old style
conDcp = dcp;
protDcp = "iiop";
rootOid = "classic_uno";
@@ -437,9 +436,9 @@ public class LocalOfficeConnection
// connect to the server
XConnection xConnection = connector_xConnector.connect(conDcp);
// create the bridge name. This should not be necessary if we pass an
- //empty string as bridge name into createBridge. Then we should always get
- //a new bridge. This does not work because of (i51323). Therefore we
- //create unique bridge names for the current process.
+ // empty string as bridge name into createBridge. Then we should always get
+ // a new bridge. This does not work because of (i51323). Therefore we
+ // create unique bridge names for the current process.
String sBridgeName = "OOoBean_private_bridge_" + String.valueOf(m_nBridgeCounter++);
try {
mBridge = xBridgeFactory.createBridge(sBridgeName, protDcp, xConnection, null);
@@ -478,7 +477,7 @@ public class LocalOfficeConnection
private void parseUnoUrlWithOfficePath(String url, String prefix)
throws java.net.MalformedURLException
{
- // Extruct parameters.
+ // Extract parameters.
int idx = url.indexOf(";urp;StarOffice.ServiceManager");
if (idx < 0)
throw new java.net.MalformedURLException(
@@ -589,7 +588,7 @@ public class LocalOfficeConnection
}
break;
- case 5: // a delimeter after the value
+ case 5: // a delimiter after the value
switch(ch) {
case ' ':
break;
@@ -670,7 +669,7 @@ public class LocalOfficeConnection
implements NativeService
{
/**
- * Retrive the office service identifier.
+ * Retrieve the office service identifier.
*
* @return The identifier of the office service.
*/
@@ -690,12 +689,12 @@ public class LocalOfficeConnection
{
int nSizeCmdArray = 4;
String sOption = null;
- //examine if user specified command-line options in system properties.
- //We may offer later a more sophisticated way of providing options if
- //the need arises. Currently this is intended to ease the pain during
- //development with pre-release builds of LibO where one wants to start
- //LibO with the --norestore options. The value of the property is simple
- //passed on to the Runtime.exec call.
+ // examine if user specified command-line options in system properties.
+ // We may offer later a more sophisticated way of providing options if
+ // the need arises. Currently this is intended to ease the pain during
+ // development with pre-release builds of LibO where one wants to start
+ // LibO with the --norestore options. The value of the property is simple
+ // passed on to the Runtime.exec call.
try {
sOption = System.getProperty("com.sun.star.officebean.Options");
if (sOption != null)
@@ -704,7 +703,7 @@ public class LocalOfficeConnection
{
e.printStackTrace();
}
- // create call with arguments
+ // create call with arguments
String[] cmdArray = new String[nSizeCmdArray];
// read UNO_PATH environment variable to get path to soffice binary
@@ -712,7 +711,6 @@ public class LocalOfficeConnection
if (unoPath == null)
throw new java.io.IOException( "UNO_PATH environment variable is not set (required system path to the office program directory)" );
-// cmdArray[0] = (new File(getProgramPath(), OFFICE_APP_NAME)).getPath();
cmdArray[0] = (new File(unoPath, OFFICE_APP_NAME)).getPath();
cmdArray[1] = "--nologo";
cmdArray[2] = "--nodefault";
@@ -736,9 +734,9 @@ public class LocalOfficeConnection
}
/**
- * Retrives the ammount of time to wait for the startup.
+ * Retrieves the amount of time to wait for the startup.
*
- * @return The ammount of time to wait in seconds(?).
+ * @return The amount of time to wait in seconds(?).
*/
public int getStartupTime()
{
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
index 9e471b03ee86..eae4ea5df338 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
@@ -66,7 +66,7 @@ public class LocalOfficeWindow
}
/**
- * Retrives an AWT component object associated with the OfficeWindow.
+ * Retrieves an AWT component object associated with the OfficeWindow.
*
* @return The AWT component object associated with the OfficeWindow.
*/
@@ -76,7 +76,7 @@ public class LocalOfficeWindow
}
/**
- * Retrives an UNO XWindowPeer object associated with the OfficeWindow.
+ * Retrieves an UNO XWindowPeer object associated with the OfficeWindow.
*
* @return The UNO XWindowPeer object associated with the OfficeWindow.
*/
@@ -233,24 +233,24 @@ public class LocalOfficeWindow
}
/**
- * Retrives a platform dependant system window identifier.
+ * Retrieves a platform dependent system window identifier.
*
* @return The system window identifier.
*/
private native long getNativeWindow();
/**
- * Retrives a platform dependant system window type.
+ * Retrieves a platform dependent system window type.
*
* @return The system window type.
*/
private native int getNativeWindowSystemType();
/**
- Returns an Any containing a sequences of com.sun.star.beans.NamedValue. One NamedValue
- contains the name "WINDOW" and the value is a Long representing the window handle.
- The second NamedValue has the name "XEMBED" and the value is true, when the XEmbed
- protocol shall be used fore embedding the native Window.
+ * Returns an Any containing a sequences of com.sun.star.beans.NamedValue. One NamedValue
+ * contains the name "WINDOW" and the value is a Long representing the window handle.
+ * The second NamedValue has the name "XEMBED" and the value is true, when the XEmbed
+ * protocol shall be used fore embedding the native Window.
*/
protected Any getWrappedWindowHandle()
{
diff --git a/bean/com/sun/star/comp/beans/NativeConnection.java b/bean/com/sun/star/comp/beans/NativeConnection.java
index bbe8badd8237..eebae5d40609 100644
--- a/bean/com/sun/star/comp/beans/NativeConnection.java
+++ b/bean/com/sun/star/comp/beans/NativeConnection.java
@@ -24,16 +24,16 @@ import com.sun.star.connection.XConnection;
*
* @deprecated.
*/
-/* package */ class NativeConnection
+class NativeConnection
implements XConnection
{
public native void connect(NativeService aNativeService)
throws com.sun.star.io.IOException;
- public native int read(/*OUT*/byte[][] aReadBytes, /*IN*/int nBytesToRead)
+ public native int read(/*OUT*/ byte[][] aReadBytes, /*IN*/ int nBytesToRead)
throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException;
- public native void write(/*IN*/byte[] aData)
+ public native void write(/*IN*/ byte[] aData)
throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException;
public native void flush()
diff --git a/bean/com/sun/star/comp/beans/NativeService.java b/bean/com/sun/star/comp/beans/NativeService.java
index 21e8e12819af..fb3a2ef76923 100644
--- a/bean/com/sun/star/comp/beans/NativeService.java
+++ b/bean/com/sun/star/comp/beans/NativeService.java
@@ -21,7 +21,7 @@ package com.sun.star.comp.beans;
/*
* @deprecated
*/
-/* package */ interface NativeService {
+interface NativeService {
public String getIdentifier();
public void startupService() throws java.io.IOException;
public int getStartupTime();
diff --git a/bean/com/sun/star/comp/beans/NoConnectionException.java b/bean/com/sun/star/comp/beans/NoConnectionException.java
index f343eee5d41a..42330ed74e58 100644
--- a/bean/com/sun/star/comp/beans/NoConnectionException.java
+++ b/bean/com/sun/star/comp/beans/NoConnectionException.java
@@ -19,8 +19,8 @@
package com.sun.star.comp.beans;
/** This exception is called when a method is called which
- needs an established connection but no connection is
- established yet or anymore.
+ needs an established connection but no connection is
+ established yet.
@since OOo 2.0.0
*/
diff --git a/bean/com/sun/star/comp/beans/NoDocumentException.java b/bean/com/sun/star/comp/beans/NoDocumentException.java
index aab30621b3b9..805961738e33 100644
--- a/bean/com/sun/star/comp/beans/NoDocumentException.java
+++ b/bean/com/sun/star/comp/beans/NoDocumentException.java
@@ -18,7 +18,7 @@
package com.sun.star.comp.beans;
-/** indicates that an operation needed a document, but no document was loaded.
+/** Indicates that an operation needed a document, but no document was loaded.
@since OOo 2.0.0
*/
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 9c30201639b3..34d707816555 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -50,8 +50,7 @@ public class OOoBean
// @requirement FUNC.BEAN.VIEW/0.4
// @requirement FUNC.BEAN.EDIT/0.4
- // This member contains the OOo window
- // if a connection is established.
+ // This member contains the OOo window if a connection is established.
// It is a child of the OOoBean canvas.
private OfficeWindow xFrameWindow;
@@ -146,7 +145,7 @@ public class OOoBean
nOOoCallTimeOut = nMilliSecs;
}
- /** Sets the period length in milli seconds to check the OOo connection.
+ /** Sets the period length in milliseconds to check the OOo connection.
This method does not need a connection to an OOo instance.
*/
@@ -155,7 +154,7 @@ public class OOoBean
nOOoCheckCycle = nMilliSecs;
}
- /** Sets the a connection to an OOo instance.
+ /** Sets a connection to an OOo instance.
@internal
*/
@@ -209,8 +208,8 @@ public class OOoBean
@deprecated This method is not useful in a multithreaded environment. Then
all threads accessing the instance would have to be synchronized in order to
- make is method work. It is better
- to call OOoBean's methods and be prepared to catch a NoConnectionException.
+ make is method work. It is better to call OOoBean's methods and be prepared
+ to catch a NoConnectionException.
*/
public boolean isOOoConnected()
{
@@ -247,16 +246,15 @@ public class OOoBean
// @requirement FUNC.CON.STOP/0.4 (via XComponent.dispose())
// @requirement FUNC.CON.NTFY/0.4 (via XComponent.addEventListener())
- /** Returns the a connection to an OOo instance.
+ /** Returns a connection to an OOo instance.
If no connection exists, a default connection will be created. An OfficeConnection
can be used to register listeners of type com.sun.star.lang.EventListener,
- which are notified when the connection to the
- office dies. One should not call the dispose method, because this may result
- in receiving com.sun.star.lang.DisposedExceptions when calling
- {@link #stopOOoConnection stopOOoConnection} or other API methods. If other instances share the
- same connection then they will stop function properly, because they loose their
- connection as well. The recommended way to end the connection is
+ which are notified when the connection to the office dies. One should not call the
+ dispose method, because this may result in receiving com.sun.star.lang.DisposedExceptions
+ when calling {@link #stopOOoConnection stopOOoConnection} or other API methods. If other
+ instances share the same connection then they will stop function properly, because
+ they lose their connection as well. The recommended way to end the connection is by
calling {@link #stopOOoConnection stopOOoConnection}.
@throws NoConnectionException
@@ -378,8 +376,8 @@ public class OOoBean
{
CallWatchThread aCallWatchThread =
new CallWatchThread( nOOoCallTimeOut, "clear" );
- //By closing the frame we avoid that dialogs are displayed, for example when
- //the document is modified.
+ // By closing the frame we avoid that dialogs are displayed, for example when
+ // the document is modified.
com.sun.star.util.XCloseable xCloseable = UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, aFrame );
if ( xCloseable != null )
{
@@ -446,16 +444,17 @@ public class OOoBean
was made visible (java.lang.Component.setVisible(true)).
<p>
Another scenario is that a OOoBean contains a document and is removed
- from a Java container and later added again. Then aquireSystemWindow needs
+ from a Java container and later added again. Then acquireSystemWindow needs
to be called after the container window is displayed.
+ <p>
@throws SystemWindowException
- if no system window can be aquired.
+ if no system window can be acquired.
@throws NoConnectionException
if the connection is not established.
*/
- public synchronized void aquireSystemWindow()
+ public synchronized void acquireSystemWindow()
throws
SystemWindowException,
@@ -482,7 +481,7 @@ public class OOoBean
from it's parent container.
@throws SystemWindowException
- if system window is not aquired.
+ if system window is not acquired.
@throws NoConnectionException
if the connection is not established.
@@ -608,14 +607,14 @@ public class OOoBean
") without com.sun.star.frame.XComponentLoader" );
}
- // Avoid Dialog 'Document changed' while reloading
+ // Avoid dialog 'Document changed' while reloading
if ( aDocument != null )
{
try {
aDocument.setModified(false);
} catch (com.sun.star.beans.PropertyVetoException ep) {
- //it dosn't make sense to throw the exception here. The interface does not
- //offer a way to add/remove respective listeners.
+ // it doesn't make sense to throw the exception here. The interface does not
+ // offer a way to add/remove respective listeners.
} catch (com.sun.star.lang.DisposedException ed) {
// can be disposed if user closed document via UI
}
@@ -643,10 +642,9 @@ public class OOoBean
"MacroExecutionMode", -1,
new Short( com.sun.star.document.MacroExecMode.USE_CONFIG ),
com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
- //String fn = aFRame.getName();
com.sun.star.lang.XComponent xComponent = xLoader.loadComponentFromURL(
- aURL, /*aFrame.getName()*/"_self", 0, aArgs );
+ aURL, "_self", 0, aArgs );
// nothing loaded?
if ( xComponent == null && aDocument != null )
@@ -660,7 +658,6 @@ public class OOoBean
throw new java.io.IOException(
"Can not load a document: \"" + aURL + "\"");
}
- // mDocumentURL = aURL; TBD: still needed?
// Get document's XModifiable interface if any.
aDocument = new OfficeDocument(
@@ -717,13 +714,8 @@ public class OOoBean
com.sun.star.util.CloseVetoException
{
// wrap Java stream into UNO stream
- /*
- com.sun.star.io.XInputStream xStream =
- new com.sun.star.lib.uno.adapter.InputStreamToXInputStreamAdapter(
- iInStream );
- */
- // copy stream....
+ // copy stream....
int s = 4096;
int r=0 ,n = 0;
byte[] buffer = new byte[s];
@@ -1002,9 +994,9 @@ public class OOoBean
/** Sets visibility of all tool bars known by this OOoBean version.
- Initially all tool bars are visible. By hiding all tool bars
+ Initially all tool bars are visible. By hiding all tool bars
utilizing this method, it is possible to turn just a subset of
- tool bars on afterwards, no matter whether all available tool
+ toolbars on afterwards, no matter whether all available tool
bars are known or not.
<p>
If an older OOoBean instance is used with a newer OOo instance,
@@ -1147,7 +1139,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
/** Returns the visibility of the menu bar.
- This method works independently from a connetion or loaded document.
+ This method works independently from a connection or loaded document.
If no connection is established or no document is loaded,
this method just returns a memorized status.
@@ -1195,7 +1187,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
/** Returns the visibility of the main function bar.
- This method works independently from a connetion or loaded document.
+ This method works independently from a connection or loaded document.
If no connection is established or no document is loaded,
this method just returns a memorized status.
@@ -1243,7 +1235,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
/** Returns the visibility of the tool function bar.
- This method works independently from a connetion or loaded document.
+ This method works independently from a conneiction or loaded document.
If no connection is established or no document is loaded,
this method just returns a memorized status.
@@ -1291,7 +1283,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
/** Returns the visibility of the status function bar.
- This method works independently from a connetion or loaded document.
+ This method works independently from a connection or loaded document.
If no connection is established or no document is loaded,
this method just returns a memorized status.
@@ -1492,7 +1484,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
catch ( java.lang.InterruptedException aExc )
{
dbgPrint("EventListener(" + aTag + ") interupted.");
- //thread can be ended by EvendListener.end();
+ // thread can be ended by EvendListener.end();
break;
}
}
@@ -1500,6 +1492,3 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
}
}
-
-
-
diff --git a/bean/com/sun/star/comp/beans/OfficeConnection.java b/bean/com/sun/star/comp/beans/OfficeConnection.java
index ca4ac0c42ab2..71c74a377efd 100644
--- a/bean/com/sun/star/comp/beans/OfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/OfficeConnection.java
@@ -24,7 +24,7 @@ import com.sun.star.lang.XComponent;
import com.sun.star.uno.XComponentContext;
/**
- * This abstract class reprecents a connection to the office
+ * This abstract class represents a connection to the office
* application.
@deprecated
@@ -62,7 +62,7 @@ public interface OfficeConnection
* The window is either a sub-class of java.awt.Canvas (local) or
* java.awt.Container (RVP).
*
- * This method does not add add the office window to its container.
+ * This method does not add the office window to its container.
*
* @param container This is an AWT container.
* @return The office window instance.
diff --git a/bean/com/sun/star/comp/beans/OfficeWindow.java b/bean/com/sun/star/comp/beans/OfficeWindow.java
index f088a4a8e39c..599bf02bd904 100644
--- a/bean/com/sun/star/comp/beans/OfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/OfficeWindow.java
@@ -23,8 +23,8 @@ import java.awt.Component;
import com.sun.star.awt.XWindowPeer;
/**
- * The concreate implementation of the OfficeWindow extends an
- * approperate type of visual component (java.awt.Canvas for local
+ * The concrete implementation of the OfficeWindow extends an
+ * appropriate type of visual component (java.awt.Canvas for local
* and java.awt.Container for remote).
@deprecated
@@ -32,14 +32,14 @@ import com.sun.star.awt.XWindowPeer;
public interface OfficeWindow
{
/**
- * Retrives an AWT component object associated with the OfficeWindow.
+ * Retrieves an AWT component object associated with the OfficeWindow.
*
* @return The AWT component object associated with the OfficeWindow.
*/
Component getAWTComponent();
/**
- * Retrives an UNO XWindowPeer object associated with the OfficeWindow.
+ * Retrieves an UNO XWindowPeer object associated with the OfficeWindow.
*
* @return The UNO XWindowPeer object associated with the OfficeWindow.
*/
diff --git a/bean/com/sun/star/comp/beans/Wrapper.java b/bean/com/sun/star/comp/beans/Wrapper.java
index 9303c868105d..30b7739efdb9 100644
--- a/bean/com/sun/star/comp/beans/Wrapper.java
+++ b/bean/com/sun/star/comp/beans/Wrapper.java
@@ -22,10 +22,10 @@ import com.sun.star.uno.UnoRuntime;
//==========================================================================
/** Wrapper base class for UNO services which emulates the upcoming
- mode of automatic runtime Java classes to get rid of the need for
+ mode of automatic runtime Java classes to get rid of the need for
queryInterface.
- Because its not worth the efford to create a runtime generated wrapper
+ Because it's not worth the effort to create a runtime generated wrapper
for this purpose, as it might be for OOo 2.0, you still have to use
UnoRuntime.queryInterface() for interfaces which are optional or come
from a subclass. But for non optional interfaces you can already
@@ -71,7 +71,6 @@ class Wrapper
public Object queryInterface( com.sun.star.uno.Type aType )
{
-//System.err.println( "Wrapper::queryInterface(" + aType + ")" );
return xQueryInterface.queryInterface( aType );
}