Download it now!
Bug 51990 - A Calc macro fails when arguments refer to other files, (works in OOO v3.2)
Summary: A Calc macro fails when arguments refer to other files, (works in OOO v3.2)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Noel Power
URL:
Whiteboard: target:4.2.0 target:4.1.1
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 19:36 UTC by joehope52
Modified: 2013-11-02 19:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Files for reproducing the error. (214.96 KB, application/zip)
2012-07-11 19:36 UTC, joehope52
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joehope52 2012-07-11 19:36:20 UTC
Created attachment 64123 [details]
Files for reproducing the error.

Overview:
A macro in Calc operating on numerical values in a matrix works well in OpenOffice v3.2.0 (Ubuntu 10.04) and OpenOffice v3.2.1 (Win XP SP3). (The macro is developed in this version).

The macro fails in LibreOffice when its parameters refer to other files. 
(The macro also fails in OpenOffice v3.3 for some cases but with a different error - wrong lookup).

The function of the macro is to interpolate linearly between columns in a matrix.

Three types of matrix filling has been provided in the attached examples: 
A normally filled matrix, a matrix with interleaved rows (only data on every second line), and matrices with empty areas (positions where no data has been entered).


Steps to reproduce:
First of all we are talking about Danish versions of LibreOffice in all cases.

1.
Start-up LibreOffice Calc v 3.5.4 (Danish)

2.
Copy the macro code from the attached file "Macro_source_code.txt" to the Standard library.

3.
Allow macros

4.
Open the attached file "Data.ods" and allow macros.
Now the result should look as in attached file "Data.ods_v3.5.4.bmp".
Below each matrix 3 interpolations between column 1 and 2 has been done in 3 different rows, and the results nicely shows 3, 13 and 23 as expected.

5.
Open the attached file "Data_a.ods" and allow macros.

Now the result should look as in attached file "Data_a.ods_v3.5.4.bmp".
Here the same interpolations have been done for each matrix but with the macroparameters now referring to the file "Data.ods".
Now the interpolation fails in all cases with error 504.

6.
Open the attached file "Data_b.ods" and allow macros.
Now the result should look as in attached file "Data_b.ods_v3.5.4.bmp".
This is a simple cell-to-cell reference to check the referencing to external files. These answers are correct.



Subconclusion:
It seems not to be the referencing to external files itself that creates the error.

The error is observed using WIN XP SP3 and Ubuntu 11,04. Seems independent of OS.


Additional information:
The Fejl_LO.zip file has been attached with the following files:
3 data files:
Data.ods
Data_a.ods
Data_b.ods
3 screen dumps:
Data.ods_v3.5.4.bmp
Data_a.ods_v3.5.4.bmp
Data_b.ods_v3.5.4.bmp
2 text files:
Macro_source_code.txt      (Macro source code - use this for test)
Macre_source_code_eng_comm.txt     (Same as above but with english comments)

The macro was developed in OpenOffice v3.2. When upgrading to OOO v3.3 the macro failed in some of the cases when referring to other files by delivering wrong results. LibreOffice v3.3 and on fails for all cases when referring to other files with error 504. I can send detailed step-by-step descriptions and files for the OOO case, if it would be at any help.
Comment 1 Joel Madero 2013-06-28 01:14:40 UTC
Noel - you mind checking this one out? I can confirm that it looks different from images provided but unsure about macro stuff - thanks!
Comment 2 Noel Power 2013-06-28 16:11:08 UTC
(In reply to comment #1)
> Noel - you mind checking this one out? I can confirm that it looks different
> from images provided but unsure about macro stuff - thanks!

its nothing to do with macros and everything to do with formulas and handling of external data :-)
Comment 3 Commit Notification 2013-07-09 15:50:34 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f3a0dd8fbc3ead1fe1ec1faec3377cedaacadd93

fix for fdo#51990 process external refs for macros



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2013-07-10 20:53:37 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6466fdc869116384025c8a84e1591de7c1dbd9ee&h=libreoffice-4-1

fix for fdo#51990 process external refs for macros


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 joehope52 2013-11-01 18:57:51 UTC
Hi Bugzilla

Now LibreOffice version 4.1 has been released in Danish and I have tested
it. The reported problem is solved. The macro now works.

Thankyou for the effort.

Best Regards
Jørn Pedersen


2013/7/10 <bugzilla-daemon@freedesktop.org>

>  Eike Rathke <erack@redhat.com> changed bug 51990<https://bugs.freedesktop.org/show_bug.cgi?id=51990>
>  What Removed Added  Status UNCONFIRMED RESOLVED  Resolution --- FIXED
> Assignee libreoffice-bugs@lists.freedesktop.org nopower@novell.com
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You are on the CC list for the bug.
>    - You reported the bug.
>
>