Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2009-08-12 16:42:09 +0000
committerFelipe Heidrich2009-08-12 16:42:09 +0000
commit6baa6a5fb9f37d35da87a7f0aa453e598f3e6556 (patch)
treeb55d08bd421b6e9faf5559440d14f5c50e7ac1bb /bundles/org.eclipse.swt/Eclipse SWT OLE Win32
parent7f2ab38fb4043d4a5bb5f2320fea53804d91ff7f (diff)
downloadeclipse.platform.swt-6baa6a5fb9f37d35da87a7f0aa453e598f3e6556.tar.gz
eclipse.platform.swt-6baa6a5fb9f37d35da87a7f0aa453e598f3e6556.tar.xz
eclipse.platform.swt-6baa6a5fb9f37d35da87a7f0aa453e598f3e6556.zip
Bug 36802: [OLE] override OleAutomation.equals()
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OLE Win32')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
index 9199b4ad8d..ffffebcd02 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
@@ -397,7 +397,18 @@ public Variant getProperty(int dispIdMember, Variant[] rgvarg, int[] rgdispidNam
int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, rgdispidNamedArgs, pVarResult);
return (result == OLE.S_OK) ? pVarResult : null;
}
-
+public boolean equals(Object object) {
+ if (object == this) return true;
+ if (object instanceof OleAutomation) {
+ if (objIDispatch == null) return false;
+ OleAutomation oleAutomation = ((OleAutomation) object);
+ if (oleAutomation.objIDispatch == null) return false;
+ int address1 = objIDispatch.getAddress();
+ int address2 = oleAutomation.objIDispatch.getAddress();
+ return address1 == address2;
+ }
+ return false;
+}
/**
* Invokes a method on the OLE Object; the method has no parameters.
*

Back to the top