Description: Cross-table references in Writer formulas break if the source table name contains a trailing dot. Disallowing dots in table names might seem like a simple fix, but it's a significant breaking change. A more robust approach would be improving the parser to correctly handle trailing dots in table references. Steps to Reproduce: 1. Create a new Writer document 2. Create two tables: "Table1" and "Table2" 3. Rename "Table1" to "Table1." 3. Select "Table2" and "Insert or Edit Formula (F2)" and click on "Table1." Actual Results: 1. The cell in "Table2" shows "** Expression is faulty **" 2. The formula is set to "=<?>" Expected Results: 1. "Table2" shows the referenced value from "Table1." 2. The formula is correctly added Reproducible: Always User Profile Reset: No Additional Info: Version: 25.8.3.2 (AARCH64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 10; OS: macOS 15.7.4; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Including dots in table names breaks formula references. The easiest fix is to disallow dots in table names via UI validation. I suggest this approach as it's simple and avoids risky parser changes. Does UI/UX agree with this, or is allowing dots in table names a requirement?
I cannot confirm the issue. =<Table1.A1> works for me - but the reference breaks of course if you delete the dot or rename the table. And renaming the "Table1" to anything with a dot like "Table.1" or "Table1." does not for me (trying via Rename at the Navigator). (In reply to Jakub Trzebiatowski from comment #1) > Does UI/UX agree with this, or is allowing dots in table names a requirement? I am not aware of a Buzilla ticket requesting dots in table names. But I don't see why certain characters should be excluded from references. How about colons or slashes? However, if the dot is used to split the table name from the cell name I see no alternative (except to add a type-safe variable).
Testing with Version: 26.2.2.2 (X86_64) Build ID: 620(Build:2) CPU threads: 32; OS: Linux 6.19; UI render: default; VCL: kf6 (cairo+xcb) Locale: de-DE (en_US.UTF-8); UI: en-US 26.2.2-3 Calc: threaded
Created attachment 206750 [details] Demo document I had a Table1 and a Table2 The formula in Table2 was =sum(<Table1.A1:A5>) After renaming Table2 to Table2. (Table - Properties) became: =sum(<Table1.A1:A5>) or =sum(<Table1.?:?>) or =sum<?:A5> or =sum(<Table1.?:?>) Depending of the cell from Table2 from where I copied the formula. The formula get corrupted.
But now I made another test. On my demo document, I renamed the table from Table1 to Table11, and I get the same ** Expression is faulty **. So, it is not about the dot, is about changing the references. In the second table I get =sum(<Table1.A1:A5>), so it is not updating. Even if I go to Tools - Update - Update all nothing is updating. Version: 26.8.0.0.alpha0+ (X86_64) Build ID: 279c07f4b4a9e195fe90cd49e18e601e9060513c CPU threads: 16; OS: Linux 6.17; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
The same is happening on master Version: 26.8.0.0.alpha0+ (X86_64) Build ID: 279c07f4b4a9e195fe90cd49e18e601e9060513c CPU threads: 16; OS: Linux 6.17; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Thank you, Heiko Tietze, for your reply. I think the reason you cannot reproduce it is that you didn't rename "Table1" to "Table1.". The formula to reference "Table1." would be =<Table1..A1>. Any name with a dot (".") breaks the formula. For example, "Table.1" would result in the formula =<Table.1.A1>, and this doesn't work doesn't work either. It is not necessary to rename the table after creating the formula; the issue is reproducible for me when the table is renamed before adding the formula. The fact that renaming a table breaks existing formulas is a separate issue: https://bugs.documentfoundation.org/show_bug.cgi?id=83196. > How about colons or slashes? Colons and slashes work. The formula "=<Table/\:.A1>" works, but there are more special characters that break the formula. Unfortunately, I don't have time now to investigate, but the table name "Table/;!@#$%^&*(Ą" breaks the formula as well. I believe whoever works on the issue should ideally approach it more holistically: understanding which characters break the formula and why, and, if possible, preventing the user from naming the table with 'illegal' characters by defining a legal set of characters.
(In reply to BogdanB from comment #5) > But now I made another test. On my demo document, I renamed the table from > Table1 to Table11, and I get the same ** Expression is faulty **. So, it is > not about the dot, is about changing the references. In the second table I > get =sum(<Table1.A1:A5>), so it is not updating. > > Even if I go to Tools - Update - Update all nothing is updating. Renaming a table after it is used in a formula is a separate issue: https://bugs.documentfoundation.org/show_bug.cgi?id=83196. I fixed it in https://gerrit.libreoffice.org/c/core/+/203803. I see you changed the name of tdf#171783; please revert it and make it more specific. I intentionally created a separate issue to highlight that fixing tdf#83196 does not fix tdf#171783. Unless you suggest a different process here. Thanks.
(In reply to Jakub Trzebiatowski from comment #7) > I think the reason you cannot reproduce it is that you didn't rename > "Table1" to "Table1.". (In reply to BogdanB from comment #4) > After renaming ... (Table - Properties)... Indeed, the sidebar rename function prevents dots right now while the properties dialog allows adding it.