diff options
author | Duong Nguyen <dnguyen> | 2008-10-24 19:35:16 +0000 |
---|---|---|
committer | Duong Nguyen <dnguyen> | 2008-10-24 19:35:16 +0000 |
commit | 2d17f57ac903f54029532c75b2167d639791a452 (patch) | |
tree | 52a06abebbf50dbd5f9acdf67223811d1ef54bca /bundles/org.eclipse.swt/Eclipse SWT OLE Win32 | |
parent | a3ad6c6fbb24f9a53c24c920ac93ac5914e538a3 (diff) | |
download | eclipse.platform.swt-2d17f57ac903f54029532c75b2167d639791a452.tar.gz eclipse.platform.swt-2d17f57ac903f54029532c75b2167d639791a452.tar.xz eclipse.platform.swt-2d17f57ac903f54029532c75b2167d639791a452.zip |
Bug 237102 - [OLE] OleControlSite with Excel.Sheet renders deactivated view improperly
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OLE Win32')
2 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java index 7c2d703ee4..bb82c78c83 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java @@ -955,7 +955,7 @@ private int OnUIActivate() { } return COM.S_OK; } -private int OnUIDeactivate(int fUndoable) { +int OnUIDeactivate(int fUndoable) { // currently, we are ignoring the fUndoable flag if (frame == null || frame.isDisposed()) return COM.S_OK; state = STATE_INPLACEACTIVE; diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java index f20dec3b3b..2e20f9e951 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java @@ -67,6 +67,8 @@ public class OleControlSite extends OleClientSite // work around for IE destroying the caret static int SWT_RESTORECARET; + static final String SHELL_PROG_ID = "Shell.Explorer"; //$NON-NLS-1$ + /** * Create an OleControlSite child widget using the OLE Document type associated with the * specified file. The OLE Document type is determined either through header information in the file @@ -664,7 +666,7 @@ void onFocusIn(Event e) { OS.SetFocus(phwnd[0]); } void onFocusOut(Event e) { - if (objIOleInPlaceObject != null) { + if (objIOleInPlaceObject != null && getProgramID().startsWith(SHELL_PROG_ID)) { /* * Bug in Windows. When IE7 loses focus and UIDeactivate() * is called, IE destroys the caret even though it is @@ -705,10 +707,17 @@ void onFocusOut(Event e) { private int OnFocus(int fGotFocus) { return COM.S_OK; } -protected int OnUIDeactivate(int fUndoable) { +int OnUIDeactivate(int fUndoable) { // controls don't need to do anything for // border space or menubars + if (frame == null || frame.isDisposed()) return COM.S_OK; state = STATE_INPLACEACTIVE; + frame.SetActiveObject(0,0); + redraw(); + Shell shell = getShell(); + if (isFocusControl() || frame.isFocusControl()) { + shell.traverse(SWT.TRAVERSE_TAB_NEXT); + } return COM.S_OK; } protected int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) { |