Summary: | Macros: [REGRESSION] InsertByIndex works bad | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Teo91 <mcavalleri91> |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | serval2412 |
Priority: | medium | Keywords: | possibleRegression |
Version: | 4.2.3.3 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | BSA | ||
Crash report or crash signature: | Regression By: | ||
Attachments: |
InsertByIndex comparison LO 4.1 - 4.2, before and after
Test file .ods for InsertByIndex bug |
Created attachment 98810 [details]
Test file .ods for InsertByIndex bug
On pc Debian x86-64 with master sources updated today or with 4.2 updated yesterday, I don't reproduce this. 2 rows are inserted above the current row. I tried LO 4.2.5 pre-release and this issue is no more. Whatever was my bug, it's gone. Migrating Whiteboard tags to Keywords: (possibleRegression) [NinjaEdit] |
Created attachment 98809 [details] InsertByIndex comparison LO 4.1 - 4.2, before and after Problem description: Something works bad with "InsertByIndex", you can see the range is altered when the number of row to insert is equal or greater than 2. Look at the image for a comparison between LO 4.1.x and LO 4.2 Here is the macro code where the issue is located: sub bug oSheet = ThisComponent.currentController.activeSheet oCell=thisComponent.getCurrentSelection() lrow=oCell.RangeAddress.StartRow oSheet.getRows.insertByIndex(lrow, 2) end sub Try the attached .ods test file: - there is the formula =SUM(A9:C9) - use InsertByIndex macro instruction to insert rows above existing ones and you will get an alteration of the range used by =SUM() - same issue happens using =PRODUCT() and generally operations working on cells range. Current behavior: Range is changed when when the number of row to insert is equal or greater than 2. Expected behavior: InsertByIndex should work well with no range alteration, like in LO 4.1.x Operating System: All Version: 4.2.3.3 release Last worked in: 4.1.6.2 release