| Summary: | Excel OLE is embedded as read-only, non-rich with no editor controls | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Prafulla <prafulla.srinivasan> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | eclipse.felipe | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Prafulla
Created attachment 178893 [details]
read-only non-rich UI
Move to Platform/SWT Snippet 199 works fine on my machine: windows xp + office 2003 (In reply to comment #3) > Snippet 199 works fine on my machine: windows xp + office 2003 I have XP Professional version 2002, Service Pack 3 + office 2002. Excel embedded opens as a non-rich read-only as standalone applications, or in an RCP. Word/Explorer work well. Is there a registry key thats probably incorrect on my system? or a dll? code:
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new FillLayout());
OleClientSite controlSite;
try {
OleFrame frame = new OleFrame(shell, SWT.NONE);
File f = new File("C:/test123.xls");
controlSite = new OleClientSite(frame, SWT.NONE, f);
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
} catch (SWTError e) {
e.printStackTrace();
System.out.println("Unable to open activeX control");
display.dispose();
return;
}
shell.open();
// OleAutomation excelSheet = new OleAutomation(controlSite);
// int[] dispIDs = excelSheet.getIDsOfNames(new String[] {"Application"});
// Variant pVarResult = excelSheet.getProperty(dispIDs[0]);
// OleAutomation application = pVarResult.getAutomation();
// pVarResult.dispose();
// excelSheet.dispose();
//
// int eventID = SheetSelectionChange;
// OleListener listener = new OleListener() {
// public void handleEvent (OleEvent e) {
// System.out.println("selection has changed");
// // two arguments which must be released (row and column)
// Variant[] args = e.arguments;
// for (int i = 0; i < args.length; i++) {
// System.out.println(args[i]);
// args [i].dispose();
// }
// }
// };
// controlSite.addEventListener(application, IID_AppEvents, eventID,
listener);
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
//application.dispose();
display.dispose ();
}
OleClient and OleControlSite give me the same readonly embedded objects. If I
leave the event-listner code uncommented, I get a null pointer exception on
"new OleAutomation(controlSite);" from the constructor.
stacktrace:
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.swt.ole.win32.OleAutomation.<init>(OleAutomation.java:124)
at com.hewitt.enabler.test.Snippet199.main(Snippet199.java:69)
Word/Explorer embed correctly, with no issues.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug has been marked as stalebug a while ago without any further interaction. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag. |