Bug 78402 - Validation (using cell range) is corrupted with column insert/remove
Summary: Validation (using cell range) is corrupted with column insert/remove
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-05-07 19:16 UTC by Teraslilja
Modified: 2020-07-16 10:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Validation (using cell range) is corrupted with column insert/remove (24.57 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-07 19:16 UTC, Teraslilja
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Teraslilja 2014-05-07 19:16:24 UTC
Created attachment 98640 [details]
Validation (using cell range) is corrupted with column insert/remove

Cells with Cell range based validation are corrupted (absolutive cell range shifts) by either inserting or removing columns.

If used validity cell range is $Sheet1.$J3:$N3 at D3, after removing column F, the validity range is still the same $Sheet1.$J3:$N3, thought valid values are shifted one column.

Expected: Validity cell range is modified (if necessary), if columns(or rows) are inserted or removed.

Version: Version: 4.2.3.3 Build ID: 420m0(Build:3)

For reference: Gnumeric does modify validity cell ranges.
Comment 1 m.a.riosv 2014-05-07 23:34:35 UTC
Hi Teraslilja, thanks for reporting.

Reproducible with:
Win7x64Ultimate
Version: 4.2.3.3 Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0
Version: 4.2.5.0.0+ Build ID: bc74773e8c5d62f4fe932366f1fae5bebbd19f65
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-07_03:55:27
Version: 4.3.0.0.alpha1+ Build ID: 081a0854635f4bc9f6f743ef4e2675c208405f74
   TinderBox: Win-x86@39, Branch:master, Time: 2014-05-06_23:32:18

Last working:
Version: 4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
Comment 2 Kohei Yoshida 2014-05-12 01:17:57 UTC
It's weird that when I try to create a test document from scratch it works fine.  But I can reproduce it with the submitted test document.  What's so special with this test document I wonder...
Comment 3 m.a.riosv 2014-05-12 01:31:52 UTC
Doing some test, seems that is a similar problem as it happens with named ranges and absolute references.

If the all address is not absolute it is not updated.
Comment 4 Kohei Yoshida 2014-05-12 01:33:35 UTC
I got it.  The row addresses in the validity settings are relative.
Comment 5 Kohei Yoshida 2014-05-12 01:55:30 UTC
(In reply to comment #3)
> Doing some test, seems that is a similar problem as it happens with named
> ranges and absolute references.

Yup.  The code treats it as if it's a named range, which is the reason for this behavior.

Let me think about this.
Comment 6 Commit Notification 2014-05-13 16:37:49 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=49bf3a1f5f38cdf259101b15a19d546b32151463

fdo#78402: Write test for this.



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 7 Commit Notification 2014-05-13 16:38:02 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#78402: Adjust references of validity entries as appropriate.



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 8 Kohei Yoshida 2014-05-13 16:40:54 UTC
4.2 backport: https://gerrit.libreoffice.org/9345
Comment 9 Commit Notification 2014-05-16 08:36:08 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0a47daf3175ec16d48669535a34823be47fbb42a&h=libreoffice-4-2

fdo#78402: Adjust references of validity entries as appropriate.


It will be available in LibreOffice 4.2.5.

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 m.a.riosv 2014-05-28 23:21:17 UTC
Thanks Kohei,
verified:
Win7x64
Version: 4.2.5.1 Build ID: 881bb88abfe2992c6cede97c23e64a9885de87de
Version: 4.2.6.0.0+ Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-28_10:43:01
Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Version: 4.4.0.0.alpha0+ Win-x86@39, Branch:master, Time: 2014-05-26_01:36:09