If you have two opened Calc files that have the same name (i.e. they have different extension ods/xls or they are in different directories), when you use the "Duplicate sheet" function (in the right-clic menu), the new sheet is created in the first opened file. If it's the file you are working in, it's ok, but if it's the other... Way to reproduce: 1) Create a new Calc file as save it as testfile.ods 2) Type "File 1" in A1 (or anything else anywhere else) 3) Save your file 4) Create a second new calc file with the same name but in another directory or with another extension (xls) 5) Type "File 2" in A1 (or anything else anywhere else, just something different from the first file) 6) Save your file 7) Duplicate the sheet of the second file => Nothing seems to happen 8) Go to the first file => You will discover your duplicated sheet (compare the contents to confirm that it comes from the other file)
Repro on a recent 24.8 alpha and in LO 7.6.3.2 on Windows.
This happens also with LO 7.4, when the Duplicate Sheet context menu entry was introduced > implementation error. tdf#145745 CC'ing Rafael Lima.
Indeed, I can reproduce the issue. Thanks for reporting the issue. I'll take a look at it.
Fix here: https://gerrit.libreoffice.org/c/core/+/163763
FWIW, in comment 1 I replicated this with 2 files with the same name and in the _same_ directory, just with different file type (ods vs xls). I mention this because gerrit 163763 ATM says: " ...if two files were opened and had the same file name (but in a different directory)... " and my repro was slightly different. I'll test anyway in the coming days.
(In reply to ady from comment #5) > FWIW, in comment 1 I replicated this with 2 files with the same name and in > the _same_ directory, just with different file type (ods vs xls). This also works, because now the full path, file name and extension are considered. I've just tested it here and it works.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3432dec53cfa6409dffebfdd67ce663362c71115 tdf#159847 Fix "Duplicate Sheet" when two files have the same name It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 161975 has been marked as a duplicate of this bug. ***