Bug 124129 - sheet names containing a dot and used in conditional formatting formulas cause a non-existent external link to the "documents" user folder
Summary: sheet names containing a dot and used in conditional formatting formulas caus...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2019-03-17 16:00 UTC by software_bug
Modified: 2024-03-05 05:36 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
demo sheet name with dot (8.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-03-17 16:58 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description software_bug 2019-03-17 16:00:16 UTC
Description:
Spreadsheet names that contains a dot and are therefore enclosed in quotation marks, creates a non-existent link to the "Documents" folder of the Windows user directory, if they are used in conditional formatting formulas.

The link cannot be removed permanently and removing the link even deletes the formula of the field that is to be affected by the conditional formatting, so that the last result is then shown as static.

Steps to Reproduce:
New spreadsheet with two sheets, the second of them must contain a dot in its name (test1 and test.2).

Enter the following formula in A1 of the "test1" sheet:
IF($'test.2'.$A$1>=5; "yes"; "no")

Enter a value in A1 of the "test.2" sheet.

For A1 of the "test1" sheet, enter the following conditional formatting:

Condition 1: Formula is IF($'test.2'.$A$1>=5) with template "good"
Condition 2: Formula is IF($'test.2'.$A$1<5) with template "error"

Save and close the spreadsheet.

Actual Results:
Open the spreadsheet and now LibreOffice versions 6.1.x.x and above show the yellow warning bar for external links. If you delete the link and save the spreadsheet, the formula in A1 of "test1" is deleted after reopening. The link is back again, but A1 of the sheet1 shows no more its formula but the last value as static.

Expected Results:
Same as with version <=6.0.7.3 (no external link).


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Test-Spreadsheet for the english version:
https://filehorst.de/d/ctvaGeHh

The bug is confirmed by Harald Köster for the german version:
https://listarchives.libreoffice.org/de/discuss/msg22796.html
Comment 1 Oliver Brinzing 2019-03-17 16:57:45 UTC
reproducible with

Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: 

but not with LO 6.07.3
Comment 2 Oliver Brinzing 2019-03-17 16:58:19 UTC
Created attachment 150025 [details]
demo sheet name with dot
Comment 3 Oliver Brinzing 2019-03-17 17:11:11 UTC
seems to have started with:

commit ea55492a6e55290d92a59324b3cb31ed958981ab[log]
author	Tor Lillqvist <tml@collabora.com>	Sun Nov 26 23:28:05 2017 +0200
committer Tor Lillqvist <tml@collabora.com>	Thu Nov 30 06:34:59 2017 +0100
tree 58263fb7ad37f07f93739bfac67ea25ae674127e
parent 42dafb5c7bd218f4d368fbd1113fa4a0fcd7f0cb [diff]

Deduplicate conditional formats loaded from .ods

If there are several separate conditional format elements that can be
represented as just one (with several ranges), try to do that.

A particular customer document used to take 3 minutes 20 seconds to
load, and it contained so many (tens of thousands) conditional formats
that the Format> Conditional Formatting> Manage... dialog was
practically impossible to use.

Now loading that document takes 15 seconds and there are just a
handful of separate conditional formats.

Also add a simple unit test to verify the deduplication.

Change-Id: I7c468af99956d4646ee5507390f1476caff52325
Reviewed-on: https://gerrit.libreoffice.org/45460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>

https://gerrit.libreoffice.org/plugins/gitiles/core/+/ea55492a6e55290d92a59324b3cb31ed958981ab

/cygdrive/d/sources/bibisect/bibisect-win32-6.1
$ git bisect bad 0fda7e3500a8258a0d83720dca8dbcfe13b31cc2 is the first bad commit
commit 0fda7e3500a8258a0d83720dca8dbcfe13b31cc2
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Mon Dec 11 22:14:31 2017 -0800
    source ea55492a6e55290d92a59324b3cb31ed958981ab
    source ea55492a6e55290d92a59324b3cb31ed958981ab
:040000 040000 0b7fe810368ec0f61edc24f3f07720bc28d28974 177abea0453db92fab009be20f402792cda9ba6b M      instdir

/cygdrive/d/sources/bibisect/bibisect-win32-6.1
$ git bisect log
# bad: [1d66cc00ca6fd2e562cbed88704051b2f5d989e3] source 8d2abb388b0a2423c9b7e1f52373e1b06dd9786f
# good: [29d08f54c2f71ffee4fe12dbb24c5f5cbedecfd2] source 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
git bisect start 'master' 'oldest'
# bad: [3ac46f6c41b5044f162a451b10af0dc5afdcc113] source 22c7c3f54dbb93f856190c561b2540064c5a767d
git bisect bad 3ac46f6c41b5044f162a451b10af0dc5afdcc113
# bad: [aa87e2b4fca257b364e56d731159caf9884e32dd] source 7970cca95027cca9847202c6e8263124a4eb30a6
git bisect bad aa87e2b4fca257b364e56d731159caf9884e32dd
# bad: [c76d72527c9591f94ec82f87130c10fe600502f0] source a5be07d6b627a18f104e2feed063ff9020e8c610
git bisect bad c76d72527c9591f94ec82f87130c10fe600502f0
# bad: [29511c6b4a1b32ee7152a65c936b19264d5fb0ed] source 7cbedaa94f23a1f7676ff649ee6c19eb3a42dfb0
git bisect bad 29511c6b4a1b32ee7152a65c936b19264d5fb0ed
# bad: [224b94ee3b8bda787708897c9ad0f3fadb2d09be] source 035fad219e1729c9e4fe8a54fd85f23c065de616
git bisect bad 224b94ee3b8bda787708897c9ad0f3fadb2d09be
# good: [d9bc9c7692ac60857e334bfe41694bd720283e6c] source 76f28863e7974da5a7280b3efa8a157c114ca03c
git bisect good d9bc9c7692ac60857e334bfe41694bd720283e6c
# bad: [14ca7444370534bbe43c1be3d8e38d1c5d72f1a7] source c26f644db80e10f755911d277aac0e1d42731d29
git bisect bad 14ca7444370534bbe43c1be3d8e38d1c5d72f1a7
# good: [4d5c7b5d342e388a98be7247197b3e43dd473023] source 209f48daebfebb6391282a1096e12b0f149ee1ce
git bisect good 4d5c7b5d342e388a98be7247197b3e43dd473023
# good: [45d12d231d66a443cdd9f252543fc88b8d56704b] source 76a9f10a08ddaea6edb7d4c01ccdd56aa7695a96
git bisect good 45d12d231d66a443cdd9f252543fc88b8d56704b
# good: [d35649f04bf0ed73b376512dc218ed1e5e0f1010] source 9e5e92c4a1415aac8b0107950f577d1679499e62
git bisect good d35649f04bf0ed73b376512dc218ed1e5e0f1010
# bad: [d043424029a9da9446ff76aeda16af6129dede9c] source 0025fa723afb9f6a0d94b9b3185ea14da18f1bd5
git bisect bad d043424029a9da9446ff76aeda16af6129dede9c
# good: [e9676060282c03b8e1fe2a56ac938c3e4861f1a4] source 42dafb5c7bd218f4d368fbd1113fa4a0fcd7f0cb
git bisect good e9676060282c03b8e1fe2a56ac938c3e4861f1a4
# bad: [0fda7e3500a8258a0d83720dca8dbcfe13b31cc2] source ea55492a6e55290d92a59324b3cb31ed958981ab
git bisect bad 0fda7e3500a8258a0d83720dca8dbcfe13b31cc2
# first bad commit: [0fda7e3500a8258a0d83720dca8dbcfe13b31cc2] source ea55492a6e55290d92a59324b3cb31ed958981ab
Comment 4 Roman Kuznetsov 2019-03-17 19:22:24 UTC
(In reply to Oliver Brinzing from comment #3)
> seems to have started with:
> 
> commit ea55492a6e55290d92a59324b3cb31ed958981ab[log]
> author	Tor Lillqvist <tml@collabora.com>	Sun Nov 26 23:28:05 2017 +0200
> committer Tor Lillqvist <tml@collabora.com>	Thu Nov 30 06:34:59 2017 +0100

Olivier, please CC regression author to bug yourself, it's easy
Comment 5 Martin Srdoš 2020-12-31 16:07:13 UTC
Hello,

I can't reproduce in

Version: 7.2.0.0.alpha0+ (x64)
Build ID: c0eee433e079d8e3413f4691607e075b99af92b0
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-US
Calc: threaded

Could you please try to reproduce it with a master build from https://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongsidethe standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 6 software_bug 2021-02-04 21:17:53 UTC
(In reply to Martin Srdoš from comment #5)
> Hello,
> 
> I can't reproduce in
> 
> Version: 7.2.0.0.alpha0+ (x64)
> Build ID: c0eee433e079d8e3413f4691607e075b99af92b0
> CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL:
> win
> Locale: cs-CZ (cs_CZ); UI: en-US
> Calc: threaded

Hello,

absolutley nothing has changed. I can reproduce it with:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 62ee3d791d63cb693109b063b73dff5e81356d90
CPU threads: 2; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 7 Sławomir Nizio 2022-09-06 21:21:18 UTC
I can confirm exactly the same behaviour with LibreOffice Calc 7.3.5.2 on Linux (Ubuntu 22.04) using Polish locale:

- conditional formatting with a formula to a sheet with a dot in the name causes the message about external link to be displayed,
- removal of the external link (Edit - Links to External Files) turns the formula in the cell to be a static value (and does not make the warning go away after reopening).

But there is more. I noticed that the problem with the "external links" message goes away with some conditional types used.

It is displayed with types used: "Formula is" and "Cell value / is equal to."
It is not displayed with "Cell value / is between" with both values for example $'test.2'.$A$1 (just example values). In this case, Edit - Links to External Files is greyed out. "Is not between" also works.


PS I don't know the rules of bug priorities here, but maybe the first problem (removing the formula causing the value to be turned static) can be considered data loss and bug priority should be increased just to have a little more attention and awareness of this issue?
Comment 8 Stéphane Guillou (stragu) 2024-03-05 05:36:55 UTC
Not reproduced anymore in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e939685f9c6918830bd3097062790bfccbce937e
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Fix bibisected in linux-64-7.4 repo to firs _good_ build [18b2eb81462e7695d52e9018a7e17ed7a5c915bf] which is:

commit fe687d1b8f5305edfb167152a4fb19ffa20c5404
author	Eike Rathke 	Thu May 12 00:20:05 2022 +0200
Related: tdf#142635 Remove address parsing failback code
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134212

Thanks Eike!