| Summary: | [OLE] Embedded Excel in OleFrame overides RCP MenuBar all the time. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Phil F. <phil.m.fischer> | ||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | sptaszkiewicz | ||||||
| Version: | 3.6 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 187619 [details]
Shows the RCP with the Excel View that has instantly changed the MenuBar.
Also switching to another view does not bring back the original RCP MenuBar.
Created attachment 187621 [details]
Shows the ExcelView with incorrect rendering as soon as it gets deactivated.
Deactivating the Excel in the View is bringing back the RCP MenuBar but show incorrect rendering of Excel.
The problem with menu is handled in bug 482308. *** This bug has been marked as a duplicate of bug 482308 *** |
Build Identifier: I20100608-0911 Starting a view that is embedding an Excel instance in an OleFrame is overriding the MenuBar of an RCP instantly until the Excel client gets deactivated. The Excel client is activated using the OLEIVERB_INPLACEACTIVATE. Looking to the Eclipse Corner Article about ActiveX and SWT, as well as Articles of MSDN, using the OLEIVERB_INPLACEACTIVATE should only mix-in the Excel menus as soon as the user clicks on it. Furthermore deactivating the Excel Client leads to improper rendering of it. Clicking outside excel does not hand back the standard RCP MenuBar and has to be forced by deactivating the client. The behaviour does also not change using OLEIVERB_UIACTIVATE or OLEIVERB_SHOW. The Excel used is an Excel2003. Same behaviour can be reproduced with Word as well. The view is based on the "plug-in example with a view". The modifiedd oced looks like this: public class ActiveXTest extends ViewPart { private Action action1; private Action action2; public ActiveXTest() { } OleFrame oleFrame; OleControlSite controlSite; public void createPartControl(Composite parent) { oleFrame = new OleFrame(parent , SWT.NONE); controlSite = new OleControlSite(oleFrame, SWT.NONE, "Excel.Sheet"); controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE); makeActions(); contributeToActionBars(); } private void contributeToActionBars() { IActionBars bars = getViewSite().getActionBars(); fillLocalPullDown(bars.getMenuManager()); fillLocalToolBar(bars.getToolBarManager()); } private void fillLocalPullDown(IMenuManager manager) { manager.add(action1); manager.add(new Separator()); manager.add(action2); } private void fillLocalToolBar(IToolBarManager manager) { manager.add(action1); manager.add(action2); } private void makeActions() { action1 = new Action() { public void run() { controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE); } }; action1.setText("Activate"); action1.setToolTipText("Activate"); action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages(). getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK)); action2 = new Action() { public void run() { controlSite.deactivateInPlaceClient(); } }; action2.setText("Deactivate"); action2.setToolTipText("Deactivate"); action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages(). getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK)); } public void setFocus() { controlSite.setFocus(); } } Reproducible: Always Steps to Reproduce: 1. Create an example plug-in with a view. 2. Use the code provided in the description. 3. Start the view as Eclipse Aplication. 4. Open the view. The embedded excel will directly change the MenuBar of the RCP. 5. Use the View's action to deactivate the excel. The RCP's MenuBar switches back to normal. But the rendering of Excel fails.