Created attachment 143810 [details] namedranges_expand_ref_demo.ots inserting columns on a sheet will extend global named ranges defined on other sheets, if option: LibreOffice Calc/General [x] Expand references when new columns/rows are inserted is enabled. this does not happen with LO 4.4.7.2/AOO 4.1.5. steps to reproduce: - open attached spreadsheet - check named range "TEST" - it will point to $Test.$A$3:$D$7 - select [InsertColumns with ExpandReferences enabled] (the macro will insert 3 columns at named range B_X and copy range B_CPY into the inserted ranges.) - check namedrange "TEST" - it will now point to $Test.$A$3:$G$7 i would expect, that inserting columns on sheet "Demo" will not change named ranges on other sheets. steps to reproduce with ExpandReference disabled: - open attached spreadsheet - check named range "TEST" - it will point to $Test.$A$3:$D$7 - select [InsertColumns with ExpandReferences disabled] - check namedrange "TEST" - it will still point to $Test.$A$3:$D$7
just noticed: to reproduce *without* macro: - open attached spreadsheet - *enable* option: LibreOffice Calc/General [x] Expand references when new columns/rows are inserted - select column headers E:G - context menu "Insert columns left" - check namedrange "TEST" - it will now point to $Test.$A$3:$G$7 btw: "B_CPY" will expand cause the inserting position is at the edge of the range. this is correct.
This seems to have begun at the below commit. Adding Cc: to Eike Rathke ; Could you possibly take a look at this one? Thanks c2f1aa2930785d707d1cf9b72d6eec16215d5f3a is the first bad commit commit c2f1aa2930785d707d1cf9b72d6eec16215d5f3a Author: Jenkins Build User <tdf@pollux.tdf> Date: Sat Dec 9 14:27:17 2017 +0100 source 02e69f0c3acec2c2e81692bc53c4356591a84ba5 author Eike Rathke <erack@redhat.com> 2016-01-26 16:10:06 +0100 committer Eike Rathke <erack@redhat.com> 2016-01-26 16:13:48 +0100 commit 02e69f0c3acec2c2e81692bc53c4356591a84ba5 (patch) tree 0948a83669adf3cba101186fe7ca5d2758692b1d parent 2a3a9dec50068321125e4a76de7042bf2d741bc7 (diff) Resolves: tdf#93151 handle ExpandRefs and mnColDelta the same as mnRowDelta
Investigating.
So inserting rows at the end of such constellation was always similar wrong..
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=da0dc858fc05e7f1d6a60ca61f722044e688d4f8 Resolves: tdf#118983 do not expand range if sheet references not affected It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review https://gerrit.libreoffice.org/59271 for 6-1 https://gerrit.libreoffice.org/59272 for 6-0
just did a quick test with Version: 6.2.0.0.alpha0+ (x64) Build ID: 991ff3d6205d8b594701c9df537cf8f0a629a92d CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: de-DE (de_DE); Calc: threaded with "[x] Expand references when new columns/rows are inserted" - inserting rows/columns above/left will expand the range - inserting rows/columns below/right will not expand the range - global named ranges defined on other sheets are not affected so this bug seems to be fixed.
Let's mark as verified, thanks for the confirmation, and to Eike for the fix!
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=826b2d68ee3985144e68966dc29bb3433d22b4d5&h=libreoffice-6-1 Resolves: tdf#118983 do not expand range if sheet references not affected It will be available in 6.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=211e4a9e03ef5f1c7c26617859435285d2699339&h=libreoffice-6-0 Resolves: tdf#118983 do not expand range if sheet references not affected It will be available in 6.0.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1d1e89988d45564d17acc286ecfb8d59cddf94ce tdf#118983: sc_uicalc: Add unittest It will be available in 7.4.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.