Bug 101904 - Delete Contents dialog -- won't delete cell content "Date & time"
Summary: Delete Contents dialog -- won't delete cell content "Date & time"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium minor
Assignee: Jean-Sebastien Bevilacqua
URL:
Whiteboard: target:5.4.0 target:5.3.2 target:6.2.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2016-09-05 12:53 UTC by Alexis PAQUIN
Modified: 2018-06-28 17:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Delete cell content Date (9.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-09-05 12:53 UTC, Alexis PAQUIN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis PAQUIN 2016-09-05 12:53:33 UTC
Created attachment 127155 [details]
Delete cell content Date

Hey,

Since LO 4.2, we can't delete cell content Date.

With the attached file, select all cells, use "Sheet - Clear Cells", chose "Date & Time" and then OK. 
Result Date cells aren't delete.

I find an easy fix. In fact, since LO 4.2 the Date cell type disappear.

I will try to commit this fix and add the commit number.

Best reagards.
Comment 1 V Stuart Foote 2016-09-05 15:25:17 UTC
Did not check how far back the issue exists, but confirming.

Here are a bit better STR rather than selecting all.

Open attachment 127155 [details]
Select the two cells with dates A1 & C1
Context menu -> Clear Contents to open
Delete Contents dialog
uncheck all
check Date & Time
OK to apply

Expected -- the Dates selected are cleared

Actual -- the Dates are not changed

Selecting "Numbers" on the Delete Contents dialog clears the cells--so either the cells are not recognized as holding dates (even though they format as dates), or the Delete Contents dialog has faulty logic.
Comment 2 Alexis PAQUIN 2016-09-06 09:22:09 UTC
Hey,

Before commit the fix, i can tell you that the Date & Time cells aren't recognized during delete contents.

To fix it, i add a boolean to identify the Date & Time cells.

The Delete contents dialog is good.

Do you want the class source file ?

Best regards.

Alexis
Comment 3 V Stuart Foote 2016-09-06 11:07:43 UTC
Patches are welcome for review, or better commit back to git repo and post the gerrit link here.
Comment 4 Alexis PAQUIN 2016-09-06 14:11:18 UTC
There here is c:

https://gerrit.libreoffice.org/#/c/28691/
Comment 5 Alexis PAQUIN 2016-11-21 11:15:48 UTC
Hey,

The patche seem good now.
Don't we have to test it in an other way ?
And in witch version of LO this patche will be releas ?

Best regards
Comment 6 Eike Rathke 2016-11-22 10:02:15 UTC
The patch is not good, please see comment there of Nov-15
Comment 7 Alexis PAQUIN 2016-11-23 10:09:47 UTC
(In reply to Eike Rathke from comment #6)
> The patch is not good, please see comment there of Nov-15

Oh yes ! sorry for forgetting that .

I'm looking for fix it
Comment 8 Jean-Sebastien Bevilacqua 2017-02-09 09:14:28 UTC
Hi, I added a patch that fixes this bug: https://gerrit.libreoffice.org/#/c/34068/

Alexi Paquin is not working on it anymore so I have done the job.
Comment 9 Commit Notification 2017-03-07 17:42:14 UTC
Jean-Sebastien Bevilacqua committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4575d7cf657ae291c427c2318eb4600cec2f12b7

tdf#101904 Fix Date deleting in SCalc

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2017-03-07 23:08:27 UTC
Jean-Sebastien Bevilacqua committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e4db9f12046255dbcd968b28c670cb83cf83418&h=libreoffice-5-3

tdf#101904 Fix Date deleting in SCalc

It will be available in 5.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-06-28 05:07:05 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=681b3facd3ddb7ab4577c48e232fb29a269d0d40

uitest ProtectSheet, protectSpreadsheet, clearCells, tdf#101904

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xavier Van Wijmeersch 2018-06-28 17:33:41 UTC
its working date cells are deleted

Version: 6.2.0.0.alpha0+
Build ID: a1f5b1f30a5a80d7eeed2efe2564763bf1d12086
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded