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
Created attachment 122370 [details] original document created with OpenOffice Writer (3.4.1)
Confirmed on LibreOffice 5.1.0.2. Formula in previous versions could be written translated like in Calc.
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.
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
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?
(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.
(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.
(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!!
(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.
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.
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 !
*** Bug 97070 has been marked as a duplicate of this bug. ***