https://bugs.documentfoundation.org/show_bug.cgi?id=146440
Bug ID: 146440 Summary: UNO: Formula vs FormulaLocal: inconsistent cell formatting Product: LibreOffice Version: 7.4.0.0 alpha0+ Master Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: medium Component: Calc Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: mikekagan...@hotmail.com CC: er...@redhat.com In a new spreadsheet, execute these macros: Sub FormulaVsFormulaLocal ' Case 1. Comparing date values oCell = ThisComponent.Sheets(0).getCellByPosition(0, 0) oCell.Formula = "2021-12-27" oCell = ThisComponent.Sheets(0).getCellByPosition(0, 1) oCell.FormulaLocal = "2021-12-27" ' Case 2. Comparing boolean values oCell = ThisComponent.Sheets(0).getCellByPosition(1, 0) oCell.Formula = "TRUE" oCell = ThisComponent.Sheets(0).getCellByPosition(1, 1) oCell.FormulaLocal = "ИСТИНА" ' Note use of *localized* (ru) name for "TRUE" ' Case 3. Comparing string values oCell = ThisComponent.Sheets(0).getCellByPosition(2, 0) oCell.Formula = "'1" oCell = ThisComponent.Sheets(0).getCellByPosition(2, 1) oCell.FormulaLocal = "'1" End Sub Given that the initial format of all the cells is "Standard", I observe the following result in Version: 7.2.4.1 (x64) / LibreOffice Community Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9 CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL Case 1. Cell A1 is still formatted as Standard. It contains number 44557. Cell A2 is formatted as Date (YYYY-MM-DD). It contains date 2021-12-27. Case 2. Cell B1 is still formatted as Standard. It contains number 1. Cell B2 is formatted as BOOLEAN. It contains value "ИСТИНА". (Note that in other locales, the string in case 2 code should be modified accordingly.) Case 3. Cell C1 is formatted as Text (@). It contains string "1" (no apostrophe). Cell C2 is formatted as Standard. It contains string "'1" (apostrophe). I suppose all cases should behave consistently, and the only difference should be that Formula takes canonical representation, and FormulaLocal takes localized strings as user may enter... Especially confusing is that case 3 reverses which cell takes new number format. -- You are receiving this mail because: You are the assignee for the bug.