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

          Priority: medium
            Bug ID: 78693
          Assignee: [email protected]
           Summary: The following piece of code generates an error when
                    closing the document.
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: unspecified
         Component: BASIC
           Product: LibreOffice

Important: before running the code copy any picture to the clipboard. The same
code works fine in Open Office.

var service_managername = "com.sun.star.ServiceManager"; var calc_servername =
"com.sun.star.frame.Desktop"; var service_manager = new
ActiveXObject(service_managername); var desktop =
service_manager.createInstance(calc_servername); var oDispatcher =
service_manager.createInstance("com.sun.star.frame.DispatchHelper");

var hidden_Param =
service_manager.Bridge_GetStruct("com.sun.star.beans.PropertyValue");
hidden_Param.Name = "Hidden"; hidden_Param.Value = true;

var PropValues = new Array(); PropValues[0] = hidden_Param;

var sheets_total = 0;

var document = desktop.LoadComponentFromURL("private:factory/scalc", "_blank",
0, PropValues);

document.lockControllers(); document.addActionLock();

oDispatcher.executeDispatch(document.CurrentController.Frame, ".uno:Paste", "",
0, new Array());

document.StoreToURL("file:///c:/test.ods", new Array());

document.unLockControllers(); document.removeActionLock();

document.close(true);

-- 
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