Bug 97550 - Formulas in writer tables could not be writen translated
Summary: Formulas in writer tables could not be writen translated
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 97070 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-04 09:02 UTC by GUTH Christophe
Modified: 2016-12-05 21:22 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
corrected document to work with LibreOffice Writer (117.83 KB, application/vnd.oasis.opendocument.text)
2016-02-04 09:02 UTC, GUTH Christophe
Details
original document created with OpenOffice Writer (3.4.1) (479.40 KB, application/vnd.oasis.opendocument.text)
2016-02-04 09:02 UTC, GUTH Christophe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GUTH Christophe 2016-02-04 09:02:22 UTC
Created attachment 122369 [details]
corrected document to work with LibreOffice Writer

Hi, I just opened an writer document with table containing formula (just a sum of some cells) with Writer French (5.0.4.2). The formulas gives "** Expression Erronée **" when i click on the cell containing the formula.

The formula was placed under OpenOffice Writer (in french too) and was "=somme(c2:C4)".

When i change the formula in LibreOffice with an english version "=sum(c2:c4)", it works.

I think LibreOffice writer should use translated formulas too (all users won't speak english or know the english version of all functions), therefore, it cause a compatibility problem because user should correct all older documents to make it work with LibreOffice

Thanks
Comment 1 GUTH Christophe 2016-02-04 09:02:56 UTC
Created attachment 122370 [details]
original document created with OpenOffice Writer (3.4.1)
Comment 2 Arnaud Versini 2016-02-10 19:19:11 UTC
Confirmed on LibreOffice 5.1.0.2.

Formula in previous versions could be written translated like in Calc.
Comment 3 riesslibo 2016-02-23 10:05:12 UTC
Can confirm this with German written formulars like = summe (...) for 
Win7x64 with LibreOffice 5.1.0.3 with Geramn UI.
I observed this even with formulars generated with the formula assistant (fx)
left beside the entry field with a version before LibO 5.1 

This is a little bit frustrating, as all old documents and even templates 
with native language formulars in writer tables are now invalid in this LibO version.
Comment 4 raal 2016-02-25 13:43:12 UTC
This seems to have begun at the below commit.
Adding Cc: to Julien Nabet; Could you possibly take a look at this one? Thanks
 96412245dbfda9f4eee0a7ceeb0e7801ad33ea74 is the first bad commit
commit 96412245dbfda9f4eee0a7ceeb0e7801ad33ea74
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Nov 24 21:59:24 2015 -0800

    source d667e3210b12c7ce3b3727e2a0e369a520fbaaa4

    source d667e3210b12c7ce3b3727e2a0e369a520fbaaa4

:040000 040000 ddbf1c7bcd39db0b78ddafcd89fff41220dc79b1 b0610a4f2db855539d485335452dfe8ce60740b6 M      instdir


author	Julien Nabet <serval2412@yahoo.fr>	2015-11-22 16:42:08 (GMT)
committer	Mike Kaganski <mikekaganski@hotmail.com>	2015-11-24 22:03:10 (GMT)
commit d667e3210b12c7ce3b3727e2a0e369a520fbaaa4 (patch)
tree dbceb51cdab2c9205e483a859a34f1a838cbc9e6
parent 994d80fd53bc264cef92017dba5cbab1241e5a5b (diff)
tdf#61228: Wrong function names in Formula Writer are considered as SUM
Comment 5 Julien Nabet 2016-02-25 19:05:33 UTC
Did the other functions in French work in previous version?
Indeed, the previous behaviour considered "Sum" when you were putting any unknown string (see https://bugs.documentfoundation.org/show_bug.cgi?id=61228#c2).

Mike: I don't see how localized functions may be dealt, any thoughts?
Comment 6 raal 2016-02-25 19:18:56 UTC
(In reply to Julien Nabet from comment #5)
> Did the other functions in French work in previous version?

Yes, it's bisected. So before your commit it worked.
Comment 7 Julien Nabet 2016-02-25 19:29:43 UTC
(In reply to raal from comment #6)
> (In reply to Julien Nabet from comment #5)
> > Did the other functions in French work in previous version?
> 
> Yes, it's bisected. So before your commit it worked.

Please reread my previous comment, I meant that perhaps "somme" worked just like "azeaze" would have worked. That's why I asked about other functions (other than "somme").
Comment 3 was also about Sum function but in German.
Comment 8 riesslibo 2016-02-25 20:36:52 UTC
(In reply to Julien Nabet from comment #7)
> (In reply to raal from comment #6)
> > (In reply to Julien Nabet from comment #5)
> > > Did the other functions in French work in previous version?
> > 
> > Yes, it's bisected. So before your commit it worked.
> 
> Please reread my previous comment, I meant that perhaps "somme" worked just
> like "azeaze" would have worked. That's why I asked about other functions
> (other than "somme").
> Comment 3 was also about Sum function but in German.

Indeed, that's it, Summe is just handled as sum because it is not a valid function, if you write brzl its the same. I reproduced this with LibO 4.2.8.2
and tried it also with "Minimun" instead of min in 4.2.8.2, Minimum was handled
like sum, in 5.1.0.3 it is a faulty formular.
So, think you are right, there seems to be no "language sensitive" formular (just the menu item in the fx Assistant is it, but not the written function in the cell). And that it worked with "Summe" is just a side effect of the bad behaviour, that everything what can't be matched with a valid function name is handled without it hence like a sum.

Strange ... and sad, now we have to correct a lot of templates and documents ;-)
But never the less, thanks Julien!!
Comment 9 Julien Nabet 2016-02-25 20:40:30 UTC
(In reply to riesslibo from comment #8)
>...
> Indeed, that's it, Summe is just handled as sum because it is not a valid
> function, if you write brzl its the same. I reproduced this with LibO 4.2.8.2
> and tried it also with "Minimun" instead of min in 4.2.8.2, Minimum was
> handled
> like sum, in 5.1.0.3 it is a faulty formular.
> So, think you are right, there seems to be no "language sensitive" formular
> (just the menu item in the fx Assistant is it, but not the written function
> in the cell). And that it worked with "Summe" is just a side effect of the
> bad behaviour, that everything what can't be matched with a valid function
> name is handled without it hence like a sum.
> 
> Strange ... and sad, now we have to correct a lot of templates and documents
> ;-)
> But never the less, thanks Julien!!

Michael: should I revert https://cgit.freedesktop.org/libreoffice/core/commit/?id=d667e3210b12c7ce3b3727e2a0e369a520fbaaa4 ? Indeed, my goal is not put the mess in all the existing docs and I've got no idea how to deal with localized functions.
Comment 10 riesslibo 2016-02-25 21:01:37 UTC
Julien, that would be courteous, but even if it is a lot of work on our side, it is our fault, not yours/Libo. 
You have corrected something what was wrong, and if someone lean on something that is wrong, he is wrong ;-) and not the corrected version.

So, if I'm allowed to advice here, please do not revert something what is now right.

Again, thanks for your work on this.
Comment 11 Michael Meeks 2016-02-25 21:47:53 UTC
Hi Julien; I don't think it is worth reverting the patch =) The resolution I'd like is either NOTABUG (as now), or - if you want to go the extra mile - we can add a compatibility option that we set for old documents - that is clearly not visible in the UI; but lets this functionality continue. Perhaps it is worth filing an easy hack bug with some code pointers for some of these:

In general, I'd say asking the user to fix their documents to not use random text instead of =SUM would be a good plan.

Then again - I -imagine- that perhaps adding localized formula functionality (particularly if Calc has all the strings already correctly translated) might be good; Eike any take on whether we could re-use that in writer easily and (thus) save most of the people who were gotcha'd by this ? [ but really I'd want to not have localized text/fn names in the file-format anyway - so there is yet more work there I suspect ].

In general - it is good to clean this up, and reserve these names though - since we may well need those names to do different things in the future =)

Thanks !
Comment 12 Cor Nouws 2016-12-05 21:22:41 UTC
*** Bug 97070 has been marked as a duplicate of this bug. ***