Created attachment 93413 [details] Screenshot_with_ErrorMessage Problem description: Steps to reproduce: 1. Open an ODS-File within a Macro-Module and a Command Button for Executing the Macro 2. Disable "Editing File" 3. Enable "Editing File" 4. Disable the Design Mode in the "Form Controls" Toolbox Current behavior: You get the Error-Message: "com.sun.star.uno.RuntimeException C:/cygwin/home/buildslave/ source/libocore/package/source/xstor/xstorage.cxx:4923:" The opened File is now also missed in the "Macro Selector". But it is available in "LibreOffice Basic". Expected behavior: The Macro shuold start. Operating System: Windows 7 Version: 4.2.0.4 release
Created attachment 93688 [details] An ods file demonstrating the error
Comment on attachment 93688 [details] An ods file demonstrating the error I can confirm the same error and missing document entry in 'Macro Selector' dialog (Tools>Macro>Run Macro...) happens in ods & odt when the file is set to read-only. If the file is left in edit mode the button works as expected. Lubuntu 13.10 x86_64 LibreOffice Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 Macro Security is set to Medium uname -a:Linux a1201T 3.11.0-15-lowlatency #8-Ubuntu SMP PREEMPT Sun Dec 15 21:38:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux The only difference being the error details reflecting the OS: com.sun.star.uno.RuntimeException/home/cloph/source/libo-core/package/source/xstor/xstorage.cxx:4923:
Not happening for me... do you have a debug build?
I must be missing something. Can you literally give me a step-by-step of what you are doing?
(In reply to comment #4) > I must be missing something. Can you literally give me a step-by-step of > what you are doing? Sure: Open new spreadsheet or writer doc Create new macro: Tools>Macros>Organise Macros>LibreOffice Basic... In the 'Macro from' window select 'Untitled 1' and press 'New' then 'OK' In the Basic IDE, enter: Sub printHW print "Hello World" End Sub Switch back to the spreadsheet or writer doc & save it Draw a Push Button:View>Toolbars>Form Controls (if not already visible) & select the Push Button & draw one on the spreadsheet or writer doc. Right mouse click on the Push Button and choose 'Control...' On the 'Events' tab assign printHW to 'Execute action' & close the 'Properties:Push Button' window Save the spreadsheet or writer doc & close LibreOffice entirely Open the od(s|t) (note it's editable) and press the button and the text box is displayed as expected. Now disable editing, press the Push button, and the error message is displayed. Close that. Enable editing and Form Controls toolbar will appear. Press the 'Design Mode On/Off' button to off and press the Push button and the error message appears. Now if you close the od(s|t) but *not* LO, then re-open it from the start centre, disable editing and then press the button you get the error message immediately rather than having it work first time.
I've just checked this again on my Ubuntu 13.10 x86_64 desktop uname -a: Linux a10-5800k 3.11.0-15-lowlatency #8-Ubuntu SMP PREEMPT Sun Dec 15 21:38:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux with Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 and Version: 4.1.4.2 Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72 and it's behaving the same way. I even created 2 new ods', one in each version, to test the same macro.
Created attachment 103027 [details] test document with screen shot from error
Testplatform W7 with Libreoffice 4.2.5 Problem description: printing document in read-only modus when print event has assigned action Steps to reproduce: 1. create new macro in standard-module1-main (the procedure cann be as well empty) 2. Below Tools - customize - save in Libreoffice connect “print document” to procedure “main” 3. open and save a new text document 4 change document editing status to readonly status over push button “edit file” 5 . print document see error message in document "test document with screen shot ..."
No error here. Win 7 64-bit Version: 4.4.0.0.alpha1+ Build ID: ad6d94009cf8ea526eb70bf1a07e5c6a21320f83 TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-04_00:06:27
I can confirm with steps from comment 8 Version: 4.4.0.0.alpha1+ Build ID: 04ea7b24ec1b5a027efa0b850f2bc3ac7116c52e TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-10-31_23:27:49 Error message: com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(), No error when doing steps from comment 1
I created a new bug for comment 8, bug 89470. Closing this as WFM.