If you set cell to text type and than write -/[number](eg. -/2) , than it pops up message "LibreOffice Calc found an error in the formula entered. Do you want to accept the correction proposed below =/-2" I discused this on forum and it might be incorrect behaviour. I would not expect libbre office to interpret anything that is in text cell. It should set cell to text that I just wrote, no matter what's in here. I'm using version 6.3.0.4 and couldn't check it out if in newer version it is already fixed.
Reproducible with Version: 6.4.2.2 (x64) Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3 CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; Locale: ru-RU (ru_RU); UI-Language: en-US Calc: CL and with Version: 7.0.0.0.alpha0+ (x64) Build ID: 5a94ac9eec4a63708262b2389aa2a434aa47112e CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; Locale: ru-RU (ru_RU); UI-Language: en-US Calc: CL So setting Text format to the cell does not prevent interpreting formulas starting with "-", as opposed to formulas starting with "=".
In fact, it pre-processes any formula (starting with +, -, or =). The prompt appears on "invalid formulas", despite it's not going to store it as formula eventually. Cf.: "=///2" with "=2": in first case, it would try correct the input before storing the result as string, while in the second case, it will store it as string immediately. A code pointer: see ScViewFunc::EnterData, which processes formula (see "bool bFormula") before processing cell type (see "if (nType == SvNumFormatType::TEXT").
Possibly related: in empty cells formatted as text, typing "=" or "-" or "+" then pressing an arrow key adds respective cell address to the "formula". See https://ask.libreoffice.org/en/question/319620/can-i-turn-off-a-minus-signs-behavior/
The code pointer is in comment 2. Resolution of this easy hack should include a unit test (UITest) [1]. [1] https://wiki.documentfoundation.org/Development/UITests
start working on this
Baole Fang committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/730e6fa063fccbd12913362dd5d3c74ea14957be tdf#131638: Fix text cell incorrect formula It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.