From 9c473160f70ea03f9b06a110ca95335a7fd637d7 Mon Sep 17 00:00:00 2001 From: Duong Nguyen Date: Tue, 14 Aug 2007 18:16:51 +0000 Subject: Bug 49098 - [OLE] Scrollbars (do not show/behavior not consistent) in OleEditor for Excel - horizontal scrollbar was not showing up when OleControlSite was used for Word or Excel. --- .../win32/org/eclipse/swt/ole/win32/OleClientSite.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole') 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 a8fd4f969d..92fdcf55fe 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 @@ -739,17 +739,16 @@ protected int GetWindow(int /*long*/ phwnd) { } // Copy the Window's handle into the memory passed in - COM.MoveMemory(phwnd, new int /*long*/[] {frame.handle}, OS.PTR_SIZEOF); + COM.MoveMemory(phwnd, new int /*long*/[] {handle}, OS.PTR_SIZEOF); return COM.S_OK; } RECT getRect() { - Point location = this.getLocation(); - Rectangle area = frame.getClientArea(); + Rectangle area = getClientArea(); RECT rect = new RECT(); - rect.left = location.x; - rect.top = location.y; - rect.right = location.x + area.width - borderWidths.left - borderWidths.right; - rect.bottom = location.y + area.height - borderWidths.top - borderWidths.bottom; + rect.left = area.x; + rect.top = area.y; + rect.right = area.x + area.width; + rect.bottom = area.y + area.height; return rect; } private int GetWindowContext(int /*long*/ ppFrame, int /*long*/ ppDoc, int /*long*/ lprcPosRect, int /*long*/ lprcClipRect, int /*long*/ lpFrameInfo) { -- cgit