Bug 93584 - OLE Incompatibility between LibreOffice 3 and 4
Summary: OLE Incompatibility between LibreOffice 3 and 4
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-21 22:38 UTC by Josir Gomes
Modified: 2016-12-25 04:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Delphi Example that demonstrate the error (204.09 KB, application/zip)
2015-08-26 20:23 UTC, Josir Gomes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josir Gomes 2015-08-21 22:38:13 UTC
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….
Comment 1 Joel Madero 2015-08-21 22:48:30 UTC
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.
Comment 2 Joel Madero 2015-08-21 22:52:57 UTC
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
Comment 3 Regina Henschel 2015-08-22 18:17:18 UTC
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.
Comment 4 Josir Gomes 2015-08-25 19:42:17 UTC
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.
Comment 5 Regina Henschel 2015-08-25 21:39:18 UTC
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 ?
Comment 6 Josir Gomes 2015-08-26 20:23:28 UTC
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
Comment 7 Josir Gomes 2015-08-26 20:26:19 UTC
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.
Comment 8 Josir Gomes 2015-08-26 21:07:00 UTC
If you need any further info or test to be done, I will be glad to help.
Comment 9 tommy27 2016-12-17 13:03:33 UTC
@Josir
is this bug still reproducible under LibO 5.2.3.3?
please give an update of the bug status.
NEEDINFO until then.
Comment 10 Josir Gomes 2016-12-22 19:22:57 UTC
Hi folks! Thanks a lot. The problem was solved!
Comment 11 Aron Budea 2016-12-25 04:50:08 UTC
Good to hear. Let's set status to WORKSFORME, as the commit fixing the bug is unknown.