https://bugs.freedesktop.org/show_bug.cgi?id=63026

          Priority: medium
            Bug ID: 63026
          Assignee: [email protected]
           Summary: FILEOPEN: OLE-Objects cannot be opened within a
                    Writer-Document if loaded via Java and
                    loadComponentFromUrl
          Severity: major
    Classification: Unclassified
                OS: Windows (All)
          Reporter: [email protected]
          Hardware: x86-64 (AMD64)
            Status: UNCONFIRMED
           Version: 4.0.1.2 release
         Component: Writer
           Product: LibreOffice

Created attachment 77316
  --> https://bugs.freedesktop.org/attachment.cgi?id=77316&action=edit
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())

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to