Bug 160247 - CONVERT becomes CONVERT_OOO when cell formula is set via macro
Summary: CONVERT becomes CONVERT_OOO when cell formula is set via macro
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2024-03-17 21:02 UTC by vibrationoflife
Modified: 2024-03-24 20:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Contains macro that demonstrates bug. (43.21 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-17 21:02 UTC, vibrationoflife
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vibrationoflife 2024-03-17 21:02:46 UTC
Created attachment 193167 [details]
Contains macro that demonstrates bug.

I attempted to set the cell formaul to CONVERT and it becomes CONVERT_OOO and fails.
I have included an attachment with a simple macro:
The SUM formula works fine. The CONVERT fails.

I have tested this in basic and in python. From version 7.3 to Version 24.2. All fail the same. My testing machine is running Ubuntu 22.04.

Sub Main
  doc = ThisComponent
  sheet = doc.Sheets(0)
  sheet.getCellByPosition(0,0).setValue(1)
  sheet.getCellByPosition(1,0).setValue(2)
  sheet.getCellByPosition(2,0).setFormula("=SUM(A1:B1)")
  sheet.getCellByPosition(3,0).setFormula("=CONVERT(A1, ""yd"", ""m""")
End Sub

Screenshot Link: https://github.com/Amourspirit/python-ooouno-ex/assets/4193389/cdec402a-1386-47c8-838c-6ac50a76a87e
Comment 1 Werner Tietz 2024-03-24 14:46:31 UTC
Hallo

Confirmed with:
Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 4:7.4.7-1+deb12u1
Calc: threaded


___

If I use »…FormulaLocal« instead …»Formula« it works as expected!

```
sheet = XSCRIPTCONTEXT.getDocument().Sheets[0]
sheet[0 , :3].FormulaArray = [[1,2,"=SUM(A1:B1)"]]
# with english Functionnames!
sheet["D1"].FormulaLocal = '=convert(A1;"yd";"m")'