I have a huge application that integrates LibreOffice and Delphi/Pascal code using OLE. Those routines work fine over 7 years but now with the outcomming of LibreOffice 4, several routines stop to work due to an error when I try to add a new sheet dynamically. When I try to store a value on a new sheet, I got IndexOutOfBoundsException. Document.Sheets.CopyByName('Base', 'New', 4); osheet := Document.Sheets.GetByIndex(4); osheet.getCellByPosition(Col, Lin).String := Value; It seems that getCellByPosition function got lost when I tried to add some value on the new sheet. On LibreOffice 3 the EXACT same routine works perfect. Because of this error, I can’t update LibreOffice for more than 50 users….
A few things: 1) This is not a blocker - please refrain from over-prioritizing bugs just because you are affected; 2) We need way better description of the issue, a test document, exact steps to reproduce, etc... etc... With this report there is nothing we can do to help you. I'm setting this as NEEDINFO, once you provide everything that is needed, please set to UNCONFIRMED. Also - have you tried with LibreOffice 5? That's the most recent release. FWIW - This seems like something that you'll want to consider L3 support. "I have a huge application" suggests you're using LibreOffice in a business setting. If you don't have L3 support - this will be fixed (after being confirmed) only after a voluntter CHOOSES to fix it and given how specific this issue seems to be...it could be a long time.
For reference: https://www.documentfoundation.org/certification/developers/ Also - give how specific this is - a bibisect would likely help and you (or one of those 50 users) are in the best position to do one: https://wiki.documentfoundation.org/QA/Bibisect/Linux
Are you sure about the index of the new sheet? How do you generate the document itself? Do you use an own document template or do you use the defaults? If you use the defaults, then you have "Sheet1", "Sheet2", "Sheet3" in LibreOffice 3, but only "Sheet1" in LibreOffice 4.
Hi Regina, thanks for the feedback. I am pretty sure that this is a LibreOffice 4 error because the routine works perfect in LibreOffice 3 with the exact same program and the exact same data.
Please insert (please transfer to Delphi-syntax, this is for BASIC) Document.Sheets.Count and examine it before you execute osheet := Document.Sheets.GetByIndex(4); What count value do you get in LO3 and what value in LO4 ?
Created attachment 118205 [details] Delphi Example that demonstrate the error This a Delphi 5 project that demonstrate the bug. The same executable runs perfectly well on LibreOffice 3
Hi Joel, as you asked, I attached a small Delphi program the show the problem. I add the source code and the executable if you don't have a Delphi environment available. If you test the same code on LibreOffice 3 it will run fine, that is, the problem just occurs on LibreOffice 4.
If you need any further info or test to be done, I will be glad to help.
@Josir is this bug still reproducible under LibO 5.2.3.3? please give an update of the bug status. NEEDINFO until then.
Hi folks! Thanks a lot. The problem was solved!
Good to hear. Let's set status to WORKSFORME, as the commit fixing the bug is unknown.