https://bugs.documentfoundation.org/show_bug.cgi?id=162067
--- Comment #3 from [email protected] --- (In reply to Buovjaga from comment #2) > SetCellColor and SetSheetRef functions reside in BACnet_Template_Makros - > Modules - SC_RS_Modules > > I reproduce with the file all the way to 3.5.0, no need to save in between, > just run SetCellColor immediately after commenting out SetSheetRef. > > However, I can not reproduce in a new file. So I think something in your > macros is interfering with this. As I spent already quite a lot of time on > this, I would appreciate if you investigated it further to find out what in > your collection of macros is the reason for this. I just managed to reproduce the bug. As it turns out, the problem is opening an excel xlsm document with libreoffice and saving it as .ods It should be possible to reproduce by doing the following: 1. Create a new Excel Document 2. Record a Macro (I just changed A1 to blue) 3. Save as .xlsm 4. Open document with Libreoffice Calc (Right click -> Open with -> Libreoffice) 5. Replace the macro with the libreoffice equivalent And now the Bug will happen. If you open the document and run it, the cell turns blue. If you change anything in the code (e.g. add a space at the end of the comment), the macro starts turning the cell red. I did not manage to reverse this issue. Deleting the module and creating a new one in the standard location did nothing. For reference, here is the macro: 'Sets the Background of Cell A1 to Blue 'it will start turning cell A1 to Red after modifying the code anyhow. Even adding a space at the end of this comment does the trick (no saving needed) Sub SetCellColor oSheet = ThisComponent.CurrentController.ActiveSheet oSheet.getCellByPosition(0,0).CellBackColor = RGB(0, 0, 255) End sub As a Workaround I wrote this Macro: Function RGBToVal(r As Integer, g As Integer, b As Integer) As Long RGBToVal = (r * 65536) + (g * 256) + b End Function And Replaced "RGB(" with "RGBToVal(" using Ctrl+H. Let me know if you need any more info -- You are receiving this mail because: You are the assignee for the bug.
