[Libreoffice-bugs] [Bug 47479] LibO Calc Macro .getCellRangeByName with named range
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 11 10:23:52 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=47479
--- Comment #7 from Buovjaga <todventtu at suomi24.fi> ---
(In reply to Jeremy from comment #1)
> I am getting the same error on 4.0.2.2 and previous release. I only get the
> error if I have deleted a range.
> The following code will recreate the problem. Sheet1 has a single range
> defined as "MYRANGE" and there is some data in the following cells.
>
> Sub Main
> Dim oSheet as Object
> DIM cBlock as New com.sun.star.table.CellRangeAddress
> dim myRow as integer
>
> oSheet = ThisComponent.sheets("Sheet1")
> myRow=oSheet.getCellRangeByName("MYRANGE").RAngeAddress.EndRow
>
>
> cBlock.Sheet=0
> cBlock.StartColumn=0
> cBlock.EndColumn=4
> cBlock.StartRow=myRow+1
> cBlock.EndRow=myRow+2
> osheet.removeRange(cBlock, com.sun.star.sheet.CellDeleteMode.UP)
>
> myRow=oSheet.getCellRangeByName("MYRANGE").RAngeAddress.EndRow ' << fails
> here
>
> End Sub
I put numbers in A1-8 and defined A1-A4 as MYRANGE. I ran the macro and it did
not fail. The macro removes two rows after the range.
Is there something I am missing?
Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503
CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3;
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 6 August 2019
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190811/89db7b22/attachment.html>
More information about the Libreoffice-bugs
mailing list