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 = hidden_Param;
var sheets_total = 0;
var document = desktop.LoadComponentFromURL("private:factory/scalc", "_blank", 0, PropValues);
oDispatcher.executeDispatch(document.CurrentController.Frame, ".uno:Paste", "", 0, new Array());
document.StoreToURL("file:///c:/test.ods", new Array());
Please always specify which version of LibreOffice the issue is about.
Noel - thoughts on this one? Are you the one who I should be pinging about this ? ;) This macro stuff always throws us for a loop :-D
(In reply to comment #2)
> Noel - thoughts on this one? Are you the one who I should be pinging about
> this ? ;) This macro stuff always throws us for a loop :-D
Sorry, I have no idea, especially from the description, not even a hint as to what the error is or what it says. It is unlikely to be a 'macro' (e.g. basic) error.
The example here seems to be using visual basic exercising/communicating with libreoffice over activex so more likely the problem here is with the ole bridge. However also equally likley that the problem is some lifecycle issue with soffice and *any* client, it would be interesting if someone could convert the same example below to pyuno or java (using the uno api) and see if also generates the error. Additionally converting the example to a pure libreoffice basic macro and running it from inside libreoffice basic would also be useful (to rule out a more manageable and self contained error)
So with an expert who says he has no idea what's going on with this because of the lack of a clear description of the problem I am placing this in NEEDINFO.
(1) Attach a document that has the macro already in it (vs. asking us to copy paste)
(2) Provide a clear description of what the macro is supposed to do;
(3) Provide a clear description of the error.
Once you do these set the bug back to UNCONFIRMED. Thanks
Dear Bug Submitter,
This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.
For more information about our NEEDINFO policy please read the wiki located here:
If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.
Thank you for helping us make LibreOffice even better for everyone!
This NEEDINFO message was generated on: 2015-09-03
Dear Bug Submitter,
Please read this message in its entirety before proceeding.
Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):
a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present
b) Provide easy to reproduce steps – the simpler the better
c) Provide any test case(s) which will help us confirm the problem
d) Provide screenshots of the problem if you think it might help
e) Read all comments and provide any requested information
Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue.
Please do not:
a) respond via email
b) update the version field in the bug or any of the other details on the top section of FDO
Message generated on: 2015-10-14