Bug 146529 - FILEOPEN External document loading lookup fails if optimal height calculation is enabled on cell with reference (Windows-only)
Summary: FILEOPEN External document loading lookup fails if optimal height calculation...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Regressions-row-height
  Show dependency treegraph
 
Reported: 2022-01-02 19:35 UTC by Peter Rozsa
Modified: 2024-01-24 02:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Base file (9.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-02 19:35 UTC, Peter Rozsa
Details
Workaround (11.10 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-02 19:36 UTC, Peter Rozsa
Details
Example file to reproduce the issue (11.15 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-02 19:37 UTC, Peter Rozsa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Rozsa 2022-01-02 19:35:19 UTC
Description:
After opening a Calc document with a reference in it to another document, the lookup for the referenced file fails with this warning message:
"The following external file could not be loaded. Data linked from this file did not get updated.

file:///C:/Users/prozsa/Documents/base.ods"

Calculations are fine after closing the warning dialog.

I managed to work around the issue, it seems that optimal row height styling triggers too early cell value evaluation on the open document, and the referenced document's path lookup fails.
The mentioned code part checks if there's any cell range that has to be evaluated, and then calls an update on those ranges, thus the cells with the INDIRECT reference to the other file get evaluated, and the referenced document gets loaded:
https://github.com/LibreOffice/core/blob/4e2c4bd9228bd0cf973f13dbe4410a2391d06ab8/sc/source/filter/xml/xmlimprt.cxx#L1424

If I turn off every "style:use-optimal-row-height" in the base documents content.xml then the issue resolves.

See attached files; base.ods is the referenced file, good.ods shows the good behaviour with optimal row height turned off, bad.ods shows the problematic loading.

Steps to Reproduce:
1.Create an indirect reference to another Calc doc like =INDIRECT(A1) where A1 contains a reference like this: 'base.ods'#Sheet1.A1:B10
2.Save and close the document
3.Reopen it

Actual Results:
Warning dialog with this message: The following external file could not be loaded. Data linked from this file did not get updated.

file:///C:/Users/prozsa/Documents/base.ods

Expected Results:
No warning dialog


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Verzió: 6.4.7.2 (x64)
Build az.: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU szálak: 4; OS: Windows 10.0 Build 19043; Felületmegjelenítés: alapértelmezett; VCL: win; 
Területi beállítások: hu-HU (hu_HU); Felület nyelve: hu-HU
Calc: CL
Comment 1 Peter Rozsa 2022-01-02 19:35:45 UTC
Created attachment 177250 [details]
Base file
Comment 2 Peter Rozsa 2022-01-02 19:36:36 UTC
Created attachment 177251 [details]
Workaround
Comment 3 Peter Rozsa 2022-01-02 19:37:06 UTC
Created attachment 177252 [details]
Example file to reproduce the issue
Comment 4 raal 2022-02-15 21:10:02 UTC
No repro with Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 2f0c26dc83448a934af5383f9f6b7a607c334744
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo

No repro Version: 7.1.7.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Ubuntu package version: 1:7.1.7-0ubuntu0.21.04.1
Calc: threaded

Version 6.4 is old, please test with current version.
Comment 5 Peter Rozsa 2022-02-20 17:11:04 UTC
Dear raal,

Thank you for your answer!


Re-tested with 7.4.0 DEV: after opening bad.ods and allowing updating on the warning ribbon (Automatic update of external links has been disabled.), the issue definitely came.

Version info:

Version: 7.4.0.0.alpha0+ (x86) / LibreOffice Community
Build ID: 6dbe55d34ad65627ef37f10dfdb548a717bb8c78
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Regards, Peter
Comment 6 Buovjaga 2022-12-14 10:37:03 UTC
Bibisected with win32-6.2 to
https://git.libreoffice.org/core/commit/1e55a47e89a9d9d6cf9cb3993484022aaf2c097b
tdf#62268: allow row height recalculation on document load

Still seen in
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9b46020c262045aed0beace4708565235c2523cc
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo