[Bug 113481] Cannot call Python macro from the command line using URI syntax
https://issues.apache.org/ooo/show_bug.cgi?id=113481 Edwin Sharp el...@apache.org changed: What|Removed |Added Keywords||needhelp CC||el...@apache.org Hardware|Unknown |All -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
[Bug 113481] Cannot call Python macro from the command line using URI syntax
https://issues.apache.org/ooo/show_bug.cgi?id=113481 --- Comment #5 from hanya hanya.r...@gmail.com --- Created attachment 82414 -- https://issues.apache.org/ooo/attachment.cgi?id=82414action=edit Patch to add fallback if the frame is not bound to the contrller Find current frame from SfxFrame tree or use current document shell if the document frame is not bound to the controller yet. And also, call dispatchFinished if document invocation is not found or the execution of the macro is interrupted because of the security settings. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
[Bug 113481] Cannot call Python macro from the command line using URI syntax
https://issues.apache.org/ooo/show_bug.cgi?id=113481 --- Comment #6 from hanya hanya.r...@gmail.com --- Created attachment 82415 -- https://issues.apache.org/ooo/attachment.cgi?id=82415action=edit Document contains macro to verify The attached document contains BeanShell macro to verify, the body of the document is empty. Execute the following command: soffice DocWithBeanShellMacro.odt vnd.sun.star.script:Library1.Macro1.bsh?language=BeanShelllocation=document With Medium level of macro security: - Enable Macros: Hello World (in BeanShell) is written by the macro. - Disable Macros: Empty document is shown. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
[Bug 113481] Cannot call Python macro from the command line using URI syntax
https://issues.apache.org/ooo/show_bug.cgi?id=113481 hanya hanya.r...@gmail.com changed: What|Removed |Added CC||hanya.r...@gmail.com --- Comment #3 from hanya hanya.r...@gmail.com --- vnd.sun.star.script protocol is handled by ScriptProtocolHandler in scripting/source/protocolhandler/scripthandler.cxx. The script is executed through dispatchWithNotification method but XController from the document frame is not valied in getScriptInvocation method at this time. As the side problem of this issue, when I start soffice with vnd.sun.star.script:...?location=document, the instance would not exit. It seems this happens because of the dispatch watcher for calling dispatchWithNotification method of the protocol handler for the script. When the protocol handler failed to access to the document's script, it returned without calling dispatchFinished method of the dispatch result listener. When I called the method with css::frame::DispatchResultState::FAILURE status, the instance of the office finished normally. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
[Bug 113481] Cannot call Python macro from the command line using URI syntax
https://issues.apache.org/ooo/show_bug.cgi?id=113481 --- Comment #4 from hanya hanya.r...@gmail.com --- css::frame::XDispatch interface is queried to execute the script from the instance of the desktop, so its XFrame do not know the controller of the document. Like SfxMacroLoader::GetObjectShell_Impl for macro: protocol, SfxFrame could be used to access to the document, it seems. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.