Created attachment 77316 [details] Writer-Document with a trivial embedded Excel 2010 OLE Try the following: ================== - run a Java-program loading the attached ODT - double click on the OLE-preview ("hallo") - an error occurs ("General OLE Error" or "Allgemeiner OLE Fehler") Code (setup classpath property): XComponentContext componentContext = Bootstrap.bootstrap(); XMultiServiceFactory serviceFactory = cast(XMultiServiceFactory.class, oOO.getServiceManager()); XDesktop desktop = UnoRuntime.queryInterface(XDesktop.class, serviceFactory.createInstance("com.sun.star.frame.Desktop")); UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL("file:///C:/....../Desktop/Report1.odt", "_default", FrameSearchFlag.AUTO, new PropertyValue[] {}); (please replace C:/....../ properly) Now try some other ways: (1) - run a Java-program loading the attached ODT (code see above) - perform a "Reload" either via Dispatch-Command or via UI - double click on the OLE-preview ("hallo") - Excel will open (if avaiable) (2) - open the attached odt (Report1.odt) with File/Open - double click on the OLE-preview ("hallo") - Excel will open (if avaiable) (3) - run a basic-macro loading the attached ODT - double click on the OLE-preview ("hallo") - Excel will open (if avaiable) Code: StarDesktop.loadComponentFromURL("file:///C:/....../Report1.odt", "_default", com.sun.star.frame.FrameSearchFlag.AUTO, Array()) (4) - run a Visual-Basic-Macro loading the attached ODT - double click on the OLE-preview ("hallo") - Excel will open (if avaiable) Code: Dim arg() Set oSM = CreateObject("com.sun.star.ServiceManager") Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop") Set oDoc = oDesk.loadComponentFromURL("file:///C:/Users/vikamsu/Desktop/Report1.odt", "_blank", 0, arg())
Noel - any thoughts on this one? Definitely not a major bug - major is if there is data loss/crashes/etc...lowering to normal
I disagree: if you ever dare to open and save the document after loading it with loadComponentFromUrl the OLE is corrupt. ==> data loss.
(In reply to comment #1) > Noel - any thoughts on this one? > > Definitely not a major bug - major is if there is data > loss/crashes/etc...lowering to normal sorry, I have no idea, seems strange that after a reload the ole will open correctly
@mathias.supp is this bug still present with latest LibO 4.3.5.2 release?
Sorry, didn't test it, yet. We currently use a workaround with the dispatch ".uno:Reload".
I can reproduce this using a simple Basic macro on 4.0.6.2/OSX Sub Foo Dim loadArgs(1) as New com.sun.star.beans.PropertyValue lUrl = "file:///DIRECTORY/CONTAINING/Report1.odt" lDoc = StarDesktop.LoadComponentFromURL(lUrl,"_blank",0,loadArgs()) End Sub When this is run immediately upon loading LO, double clicking on the OLE object doesn't work. However, on 4.4.2.2 there is no issue. Setting -> RESOLVED WORKSFORME (as the specific commit hasn't been identified)