Created attachment 175755 [details] leakingNumbering.odt: example document Similar to bug 93747, but much more insidious, is apply numbering to a backwards selected table cell's contents. The numbering also affects the non-selected cell on the left. 1. Open leakingNumbering.odt and put your cursor behind "XYZ" 2. Select backwards until it turns into table select mode. (At this point, it has selected both columns two and three.) Change the selection to only include column three. 3.) select bulleting or numbering. Notice that column two is affected as well.
I confirm it with Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 273a25c796fca9afa0dfadac57dc3f336831221c CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL
Lots of problems here. This goes back to the initial code dump. 1.) sw/source/core/edit/ednumber.cxx SelectionHasNumber needs to use for(SwPaM& rPaM : GetCursor()->GetRingContainer()) instead of SwPamRanges aRangeArr(*GetCursor()) which can't detect is PaM.HasMark(). And of course SelectionHasBullet has the same issue. 2.) DelNumRules has the same issue. 3.) SetCurNumRule has the same issue. sw/source/uibase/shells/txtnum.cxx ExecEnterNum is where the command to turn on numbering exists. It calls sw/source/uibase/wrtsh/wrtsh1.cxx NumOrBulletOn which calls these problematic functions.
Of course, the entire problem can be fixed if the selection itself is correct. However, that is a nasty and apparently rather complicated business. AFAICS, the problem is ultimately from sw/sources/core/crsr/swcrsr's SwTableCursor::MakeBoxSels if( bDel ) { SwPaM* pDel = pCur->GetPrev(); if( pDel == pCurrentCursor ) pCurrentCursor->DeleteMark(); else delete pDel; } In the reverse-select case, pCurrentCursor is pDel - so it isn't deleting that multiselection.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9a2e7bade3aa8b115f1973be532ec86fa0369171 tdf#145151 sw IsTableMode NumRule: unselected cells It will be available in 7.5.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5036c5a7afdd043c3fa5c108c985cd0d8ed352fa tdf#145151 sw IsTableMode SelectionHasNumber: unselected cells It will be available in 7.5.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6b6bedecf61e084e8db6b20a362a231dbac0e70a tdf#145151 sw IsTableMode GetNumRuleAtCurrCursorPos: unselected cells It will be available in 7.5.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.
No intention to backport. Next I'm going to try a fix based on comment 3 which will obsolete most of these changes - but is a bit more dangerous.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0031f34d0ba99de5384e13843e99ffbb01f729d0 tdf#145151 tdf#119540 sw IsTableMode: deselect unselected cell It will be available in 7.5.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fcbd1e8363f14fcbdcef9bb2a6bca8a2cb7644ac tdf#tdf#93747 tdf#145151 sw IsTableMode: revert obsolete one-offs It will be available in 7.5.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.
VERIFIED with Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: a56d0c34716f381accbd9d2e3040a62d3583d18d CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL Justin, thanks for fixing it!