Description: Calc is ADDING print ranges from linked files to the existing print range, instead of replacing the current print range. This is causing duplications of the print range. Steps to Reproduce: If you have two spreadsheets- A and B, and A has a manually-selected print range (instead of the default of "entire-sheet"), and spreadsheet B contains a file link to A.... Each time document B is updated, it will copy in and *ADD* A's print range to the B document. It should not do that. It ends up creating repeating print ranges, resulting in printing multiple copies of the same sheet. In the above example, if A has a print range of: $A$1:$L$55 Then after one update of B, B's print range will contain: $A$1:$L$55,$A$1:$L$55 If the user then saves the B document, it becomes a permanent part of B. And the next time B is opened and updated, it will add yet another another like this: $A$1:$L$55,$A$1:$L$55,$A$1:$L$55 Actual Results: Duplicated print range Expected Results: Non-duplicated print range Reproducible: Always User Profile Reset: No Additional Info: See also: Bug 51022 which might be related?
More detailed steps to reproduce: * Create two spreadsheets (child.ods, mother.ods) * Open child.ods * Fill A1:H30 with some data * Select A1:H30 * Format -> Print Range -> Define * Save child.ods * Open mother.ods * Sheet -> Insert Sheet from File * Choose child.ods * Check "Link" checkbox * OK * Save mother.ods * Select inserted sheet * Format -> Print Range -> Edit - Should show $A$1:$H$30 * Cancel * Close mother.ods *Open mother.ods * Select inserted sheet * Format -> Print Range -> Edit (Should show $A$1:$H$30) * Cancel * Click banner to Allow updating external link * Select inserted sheet * Format -> Print Range -> Edit - Expected: Should show $A$1:$H$30 - Actual: Shows duplicated range: $A$1:$H$30,$A$1:$H$30 Every time you save, close and update links, it will duplicate the print range.
Confirming and marking as NEW. I don't have a bibsect environment installed, but I've at least tracked it to not affecting 7.5.2, but affecting 7.5.3. I changed the "earliest affected version" to 7.5.3.2. I also searched and found bug 66613, which is likely when this bug was introduced, so I've placed a see-also for that report. I won't mess with the importance, but it's a regression, so it should probably be adjusted.
Yep, the cause for this issue is bug 66613. I will provide a fix.
Thanks for the quick response, Andreas. Sorry for the hassle and thanks for all of your hard work!
No problem! Thx for testing. Patch is here: https://gerrit.libreoffice.org/c/core/+/158365 I am still writing the test for it.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/96b91357fb93028d35d70bdb52b4bac3ecbfbf57 tdf#157897 - Clear print ranges before adding additional ones It will be available in 24.2.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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/e61f8a36220d6e8800dd0decf2a680db97c371c9 tdf#157897 - Clear print ranges before adding additional ones It will be available in 7.6.3. 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.