Description: I have function maxsr(sheet) for return last row and column of data on sheet: GetRangeAddress() in this function return wrong Sheet, line and column only, regardless of the actual number of rows and columns on sheet. Bug is in version 25.2.4.3 (Windows and Ubuntu) Not in versions 25.2.3.2. an lowers, it works correctly here Steps to Reproduce: function maxsr(Sheet) oSheet = Sheet.CreateCursor() ' skip cursor to end of data on sheet oSheet.GoToEndOfUsedArea(False) maxsr = oSheet.GetRangeAddress() End Function Actual Results: Returned array is: Sheet = 38 StartColumn = 38 StartRow = 196 EndColumn = 38 EndRow = 196 Expected Results: nuber of last row and column on the sheet and Sheet Reproducible: Always User Profile Reset: No Additional Info: Version 25.2.4.3 https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=33e196637044ead23f5c3226cde09b47731f7e27 The same behavior is in the same version on Windows11, but I don't have the build number available right now
Created attachment 201431 [details] A sample with the macro Can't repro. Calling `tst_maxsr` in the attachment gives "Sheet: 0 Start column: 3 Start row: 9 End column: 3 End row: 9", as expected.
I have about 160 to 400 lines where I have the bug. Table has about 35 to 40 lists
Created attachment 201438 [details] Example file where occured bug
I add file "Example file where you can see the bug" I deleted sensitive data in this file. Please call from menu SURO/Novy projekt it call the NewProject() function, line 1214 In dialog you must write any number and first and last date Next is called function maxsr() on line 1266 where is critical code and it returm wrong data to aRangeAddres Sheet = 5 StartColumn = 8 StartRow = 196 EndColumn = 8 EndRow = 196 True may be last line and column of list "Sablona" StartColumn = 15 StartRow = 304 EndColumn = 15 EndRow = 304 maxsr() function is on line 2695 The same bugs are in every functions which calls maxsr()
(In reply to Zdenek Borecky from comment #4) > In dialog you must write any number and first and last date What format do the date controls accept? I tried e.g. 2025-01-01, 6/24/2025 (en-US), and 24.6.2025; all three were rejected (as soon as I move cursor elsewhere, it clears the box).
Found it; it took 25/6/2025. (In reply to Zdenek Borecky from comment #4) > Next is called function maxsr() on line 1266 where is critical code > and it returm wrong data to aRangeAddres > Sheet = 5 > StartColumn = 8 > StartRow = 196 > EndColumn = 8 > EndRow = 196 > True may be last line and column of list "Sablona" > StartColumn = 15 > StartRow = 304 > EndColumn = 15 > EndRow = 304 It's because at that stage, oSablona points to "Lidi", not "Sablona". *** This bug has been marked as a duplicate of bug 167178 ***