Bug 55940

Summary: To subtract a cell requires a double minus.
Product: LibreOffice Reporter: gkislek
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: bfo.bugmail, serval2412
Priority: medium    
Version: 3.6.1.2 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: attachment-13636-0.html
attachment-13636-1.dat
20121012AcctBals.ods
20121012AcctBals.TXT

Description gkislek 2012-10-12 23:17:19 UTC
When doing a simple add and subtract of various cells on a small spreadsheet it requires a double minus -- to subtract one cell from another.
Comment 1 Julien Nabet 2012-10-17 21:26:43 UTC
Do you reproduce this on a brand new file or a specific file?
Could you attach the file which has the buggy behaviour?
Comment 2 gkislek 2012-10-18 00:11:05 UTC
Created attachment 68737 [details]
attachment-13636-0.html

Julien,
Thanks for the quick response.  I am attaching the ods file and the file that txt file that was opened with Calc to create the ods file.  It may be related to the fact that there is a dash (minus) sign in front of the numbers in the cells that were subtracted.  As I said it is a very simple spreadsheet.

Thank you,
Jerry

From: bugzilla-daemon@freedesktop.org 
Sent: Wednesday, October 17, 2012 5:26 PM
To: gkislek@juno.com 
Subject: [Bug 55940] To subtract a cell requires a double minus.

Julien Nabet changed bug 55940 
      What Removed Added 
      Status UNCONFIRMED  NEEDINFO  
      CC    serval2412@yahoo.fr  
      Ever confirmed    1  


Comment # 1 on bug 55940 from Julien Nabet 
Do you reproduce this on a brand new file or a specific file?
Could you attach the file which has the buggy behaviour?
--------------------------------------------------------------------------------
You are receiving this mail because: 
  a.. You reported the bug.
Comment 3 gkislek 2012-10-18 00:11:05 UTC
Created attachment 68738 [details]
attachment-13636-1.dat
Comment 4 gkislek 2012-10-18 00:11:05 UTC
Created attachment 68739 [details]
20121012AcctBals.ods
Comment 5 gkislek 2012-10-18 00:11:05 UTC
Created attachment 68740 [details]
20121012AcctBals.TXT
Comment 6 Julien Nabet 2012-10-18 05:57:48 UTC
Thank you for your feedback, I put it back to Unconfirmed.
I'll have time to make some tests after my day work tonight. But perhaps someone else would take a look before.
Comment 7 Julien Nabet 2012-10-20 07:09:29 UTC
Ok on pc Debian x86-64 with master sources updated today, I opened your ods file but I don't reproduce the problem.
Could you give exact steps to reproduce it?
Comment 8 gkislek 2012-10-20 23:18:34 UTC
So you opened the ods file and in cell B50 you do not see a double minus – sign in the formula for cells B29 and B33.  The formula is simple, =B12+B16+B22--B29--B33+B48 
I opened the txt file with Calc, summed the sub areas, and created the formula in Cell B50.  
Thanks for your time.  I really appreciate Libre Office and have been using it for quite some time.  I know that it is volunteers like you that make such a great program possible.

Thanks,
Jerry

From: bugzilla-daemon@freedesktop.org 
Sent: Saturday, October 20, 2012 3:09 AM
To: gkislek@juno.com 
Subject: [Bug 55940] To subtract a cell requires a double minus.


Comment # 7 on bug 55940 from Julien Nabet 
Ok on pc Debian x86-64 with master sources updated today, I opened your ods
file but I don't reproduce the problem.
Could you give exact steps to reproduce it?
--------------------------------------------------------------------------------
You are receiving this mail because: 
  a.. You reported the bug.
Comment 9 Julien Nabet 2012-10-20 23:33:57 UTC
Thank you for your feedback, I had missed the cell where there was a double minus.
But I still can't see the problem:
2 minus = an addition.

If in a cell, I put this:
=B12+B16+B22+B29+B33+B48
I got the same result as:
=B12+B16+B22--B29--B33+B48
aka here 937136,7

Sorry, I must really miss something but I still don't see problem.
If we focus on ods file (so let's forget for the moment the txt file), is there a problem for you in this file? If yes which one?

(again sorry if I miss something obvious)
Comment 10 gkislek 2012-10-21 01:20:32 UTC
It is easy to miss the –.  It really is not a problem for me in the file.  I thought it might be a problem with Calc since it doesn’t seem normal to use a double minus.  You are correct, If I just add the cell the result is the same.  I think that since the 2 cells have a negative number they are automatically subtracted when you add them up.  I had sort of thought that was what might be happening.  I just went and removed the minus in the 2 cells and the formula with all plus signs then added the 2 cells instead of subtracting them.
Again this is not a problem for me and it seems to me that Calc might doing the correct thing.  If you use a single minus then it seems to change the negative cells to positive, so then you have to use the second minus to actually subtract the negative cells.  This is interesting, I wonder if all spreadsheets would do the same.  Oh well, that is not important but it has been a good learning experience for me.  I hope I have not wasted a lot of your time. 

Thank you for your help,
Jerry 

From: bugzilla-daemon@freedesktop.org 
Sent: Saturday, October 20, 2012 7:33 PM
To: gkislek@juno.com 
Subject: [Bug 55940] To subtract a cell requires a double minus.

Julien Nabet changed bug 55940 
      What Removed Added 
      Status UNCONFIRMED  NEEDINFO  
      Ever confirmed    1  


Comment # 9 on bug 55940 from Julien Nabet 
Thank you for your feedback, I had missed the cell where there was a double
minus.
But I still can't see the problem:
2 minus = an addition.

If in a cell, I put this:
=B12+B16+B22+B29+B33+B48
I got the same result as:
=B12+B16+B22--B29--B33+B48
aka here 937136,7

Sorry, I must really miss something but I still don't see problem.
If we focus on ods file (so let's forget for the moment the txt file), is there
a problem for you in this file? If yes which one?

(again sorry if I miss something obvious)
--------------------------------------------------------------------------------
You are receiving this mail because: 
  a.. You reported the bug.
Comment 11 Julien Nabet 2012-10-23 20:44:38 UTC
Put it back to unconfirmed for the moment.
Comment 12 bfoman (inactive) 2013-05-06 11:52:45 UTC
(In reply to comment #10)
> the correct thing.  If you use a single minus then it seems to change the
> negative cells to positive, so then you have to use the second minus to
> actually subtract the negative cells.  This is interesting, I wonder if all
> spreadsheets would do the same.

Excel 2010 does the same. 

I think all this is not a bug - therefore marking it as RESOLVED NOTABUG. 
Do not hesitate to reopen in case of mistriage.