Bug 81126

Summary: TABLE: When Input Fields are used calculations using them fail
Product: LibreOffice Reporter: Lifeboy <roland>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: fdbugs, rb.henschel
Priority: medium Keywords: regression
Version: 4.2.4.2 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: Example of the input fields and failing calculation

Description Lifeboy 2014-07-09 20:01:33 UTC
Created attachment 102497 [details]
Example of the input fields and failing calculation

Problem description: I have a template that I used in LO3 (and before that LO2 if I recall correctly) that uses input fields in a table. A line total is calculated by referencing the Column and Row like this: =<B5>*<C5>.  Recently I have noticed that the calculations always returns 0 regardless of the value in B5 or C5.

I have an older machine with LO3.5 installed and there the exact same template and tests work 100%.

Steps to reproduce:
1. Create a table with at least 3 columns and 2 rows.
2. Create two input fields (Insert | Fields | Other | Functions | Input Field and type a reference) in A1 and B1 respectively
3. In C1 insert a formula (press F2) =<A1>*<B1>
4. Use <shift><ctrl><F9> to add values to A1 and B1.
5. Use <F9> to recalculate the formula in <C1>.  The value stays 0.

Expected behavior: The answer, the value of A1 multiplied by B1 is expected in C1.

This still works in LO3.5 as mentioned before.

              
Operating System: Ubuntu
Version: 4.2.4.2 release
Comment 1 Regina Henschel 2014-07-09 20:14:15 UTC
I see the same bug with version 4.4 on Windows 7. Analogous issue for Apache OpenOffice is https://issues.apache.org/ooo/show_bug.cgi?id=125228
Comment 2 Matthew Francis 2015-01-16 16:14:08 UTC
Already fixed through the below commit. It's in 4.4 and 4.5 master, and given the imminent release of 4.4, a 4.3 backport probably isn't on the cards


commit e465f0f4743162918dbdf2dcd50dedff00b1941c
Author:     Oliver-Rainer Wittmann <orw@apache.org>
AuthorDate: Mon Jul 14 13:36:56 2014 +0000
Commit:     Caolán McNamara <caolanm@redhat.com>
CommitDate: Mon Jul 14 15:57:18 2014 +0100

    Resolves: #i125228# correct consideration of InputFields...
    
    in table cells are part of table formulas
    
    (cherry picked from commit b384441c10475c9784eae3ea501afb22e0317468)
    
    Conflicts:
        sw/source/core/fields/cellfml.cxx
    
    Change-Id: I4780ce0c1ac9ac911b654f61aa12938d7b225139