Apache OpenOffice (AOO) Bugzilla – Issue 87974
Problem inserting negative numbers
Last modified: 2008-08-13 13:33:28 UTC
A negative number is not accepted by clicking on another cell, but is managed as a formula. Steps to reproduce: - In A1 type -1 and don't leave the cell - Now click on B1 - Result: A1 now contain -1B1. With unsigned numbers it works fine: - In A1 type 1 and don't leave the cell - Now click on B1 - Result: value 1 is accepted, and the cell B1 is selected Thank you for your attention
Can confirm it with OOo 2.4 (final) on Win2k en-locale. This is probably a regression of issue 20496: http://www.openoffice.org/issues/show_bug.cgi?id=20496 It strikes me, that the cell is not converted to a formula, but one end e.g. with a string like: -1A1
Confirming with 2.4 on WinXP - as described.
Confirm the issue. Ooo 2.4.0 final and Windows XP x86 Home/Professional.
Created attachment 53413 [details] Fix for mouse click problem (doesn't work similar to cursor keys)
Other possible problems: A) 1. Enter a formula (starting with '+') say '+10+20' 2. verify the cell has 30 3. Click Undo 4. Click Redo (now the cell value changes to +10+20 instead of 30) B) 1. Enter a formula with ref. say '+10+A1' 2. verify the cell has value 10 3. Now try changing A1 to something else by double clicking on A1 and choosing another cell (say B1) (see also issue 20496)
changing issue type to patch.
Hey Muthu, Thanks for your work! I tested your patch, and it works pretty well. But one thing I've noticed is that, when you type '=' in a cell then mouse-click on another cell, it ends the formula mode in the first cell, and I think that's unintended. Can you confirm that this happens on your end as well? Kohei
Created attachment 53619 [details] Updated patch
Kohei, yes, i hadn't tested the simple '=' case! i have updated the patch now...try it out... muthusuba
Hi Muthu, Ok, the simple cell reference case (e.g. =A1) now works. But entering a formula while matching parentheses are highlighted causes the formula to be entered as text. :-/ For example, in a totally empty document, type '=pi()' in a cell, then while seeing that the parens are highlighted, hit enter. That formula is now entered as text. But, if you type 'pi() + 1' then hit enter, it gets entered as formula. I think the key is to hit enter while the paren-matching is on, then the formula becomes text. I'm not sure what's causing this, but can you look into this? Thanks! Kohei
>if you type 'pi() + 1' then hit enter, Sorry, typo. I meant to say if you type '=pi() + 1' with an '='.
kohei, yes, looks like the handler for 'with formating' is being called. i have fixed, but i don;t know what else it might break. (but, for sure, anything starting with =, +, - cannot have formatting with this patch) We have to start with ' in case we need formatting for text starting with =/+/-. muthusuba
Created attachment 53759 [details] Updated patch.
*** Issue 92331 has been marked as a duplicate of this issue. ***
This is fixed with issue 91550. Note that it's part of the "Enhanced Formula Input" implementation, so only the behavior with "+" or "-" is changed, not with "=". But if we later want to change "=" behavior, too, it should be in the new code (ScTabViewShell::IsRefInputMode), so this patch is obsolete. *** This issue has been marked as a duplicate of 91550 ***
closing duplicate