Problem description: Error message when deleting à page via DCOM Steps to reproduce: this code in delphi if I > iNbWorkSheet then begin while I > iNbWorkSheet do begin mxDocument.Sheets.removeByName('Feuille'+IntToStr(I)); Dec(I); end; gives the following error message com.sun.star.uno.RuntimeException: [msci_uno bridge error] UNO type of C++ exception unknown: "std.out_of_range",RTTI-name=".?AVout_of_range@str@@"! with 3.5RC3 No problem with 3.4 serie Browser: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0
' this VbScript code raises the exception ' when used with OpenOffice it works well Dim rSheets Set rSheets = objDocument.getSheets if rSheets.getCount() >= 3 then rSheets.removeByName(rSheets.getByIndex(2).Name)
An error occurs when deleting sheets using a LibreOffice Basic macro. No problem when using LibreOffice V 3.3.4 or OpenOffice 3.3.0 Os: Windows VISTA LibreOffice version 3.5.3 Steps to reproduce: Add the following macro in a new spreadsheet document: Sub TestRemove Dim StrNameOfSheet as String Dim LgNumberOfSheets as Long LgNumberOfSheets = ThisComponent.sheets.count If LgNumberOfSheets >= 2 then 'Deleting sheets For j = LgNumberOfSheets - 1 To 1 Step -1 StrNameOfSheet = ThisComponent.sheets.ElementNames(j) ThisComponent.sheets.RemoveByName(StrNameOfSheet) Next j Endif end sub Execute the macro. The following exception occurs: Type: com.sun.star.uno.RuntimeException Message : [msci_uno bridge error] UNO type of C++ exception unknown: “std.out_of_of_range”, RTTI-name=”.?AVout_of_range@std@@”!. The following procedure will avoid the exception: Before running the macro, add manually a new sheet.
Created attachment 61076 [details] Document with macros deleting sheets The attached document contains 2 macros First macro reproduces the bug while removing sheets. second macro gives a solution to avoid the bug.
Created attachment 61657 [details] Document with macros deleting sheets 2 Attached document modified to explain more precisely the bug. To reproduce the bug, the default number of sheets in a new spreadsheet document must be set out to 3 or more. Tools>Options>LibreOffice Calc>Default>3 (approximately translated from french)
Please, do not modify version number: it shows the first version in which the bug has been found. Works in 3.4 serie, so regression. Best regards. JBF
Bug described in comment 2 reproduced in 3.5.3 on Fedora 64 bit in 3.3.4 it works correctly, therefore regression
@ Noel Greetings What do You think about this bug?
confirmed, some api problem here with calc
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8b1d29bc9b00bc2730738a990023a65ab6e0219b fix bad stl access fdo#45987
Thanks for fixing this bug
I'll take this one. It needs another fix.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=90d0efb524b2cdd8d65808d18713bfd6b1d117ea Revert 4 commits related to fdo#45987
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=13bb6dcddcd3e19cd97fdb28e842c778e6e093b3 ensure that number of tabs is correctly set in ScViewData, fdo#45987
Markus Mohrhard committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=aab5d1e0caed5f65562d5eb4ac78c8467fb7c979&g=libreoffice-3-5 ensure that number of tabs is correctly set in ScViewData, fdo#45987 It will be available in LibreOffice 3.5.5.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "libreoffice-3-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c24c4f0becb40ac0450ccdb49c9af4ebcbd581b&g=libreoffice-3-5-4 ensure that number of tabs is correctly set in ScViewData, fdo#45987 It will be available already in LibreOffice 3.5.4.
Thanks for the bug fix. (tested on 3.5.4RC2)
*** Bug 49913 has been marked as a duplicate of this bug. ***