Issue 111762 - getCellRangeByName("Name1:Name2") causes exception
Summary: getCellRangeByName("Name1:Name2") causes exception
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: 4.1.0-dev
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-22 01:01 UTC by jimavera
Modified: 2013-11-26 15:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Demo of the bug (22.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-05-22 01:03 UTC, jimavera
no flags Details
Macro result screenshot (10.97 KB, image/jpeg)
2013-11-26 15:13 UTC, Edwin Sharp
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jimavera 2010-05-22 01:01:54 UTC
Names defined using Insert->Names->Define can be used to label individual cells,
and such names can be used in formulas such as SUM(Label1:Label2).

However, if a macro tries to access a range constructed with such labels by
calling ThisComponent.GetCurrentController.ActiveSheet.getCellRangeByName("Foo:Bar")
then an exception occurs.  The exception has an empty message string, so there
is something fishy about it. 

getCellRangeByName works when getting a single cell ("Foo") or a single
user-defined name which is pre-defined to be a range (e.g. Foo = A1:E1).

Please see the attached demo spreadsheet.

(Found in Ubuntu 10.04 on amd64)
Comment 1 jimavera 2010-05-22 01:03:17 UTC
Created attachment 69565 [details]
Demo of the bug
Comment 2 Edwin Sharp 2013-11-26 15:13:55 UTC
Created attachment 81991 [details]
Macro result screenshot
Comment 3 Edwin Sharp 2013-11-26 15:17:03 UTC
BASIC runtime error.
An exception occurred Type: com.sun.star.uno.RuntimeException Message:.

AOO410m1(Build:9750)  -  Rev. 1539999
2013-11-09_04:08:11 - Rev. 1540252
Debian