Bug 126417 - No way to get a cell from CellRange
Summary: No way to get a cell from CellRange
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
6.2.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-15 23:50 UTC by Konstantin Kharlamov
Modified: 2019-07-16 07:03 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
script to connect to LO server (702 bytes, text/x-python)
2019-07-15 23:51 UTC, Konstantin Kharlamov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2019-07-15 23:50:55 UTC
# Steps to reproduce
1. Execute: soffice --calc --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager"
2. Download the attachment (python script to connect to LO)
3. In directory with the script run `python`, and execute:
    >>> exec(open("./connect-to-lo.py").read())
    >>> row = model.CurrentController.ActiveSheet.Rows.getByIndex(0)
    >>> cell_range = row.getCellRangeByName(row.AbsoluteName)

4. Try to access the first cell in the given cell_range

## Expected

There's a way to do it

## Actual

There's no way to do it.
Comment 1 Konstantin Kharlamov 2019-07-15 23:51:34 UTC
Created attachment 152798 [details]
script to connect to LO server
Comment 2 Konstantin Kharlamov 2019-07-16 01:40:55 UTC
I asked on IRC: turns out, a range has a function getCellByPosition(), whose addressing is relative to the range. E.g. if your range starts at 1,1 global position, then your_range.getCellByPosition(0,0) would refer to 1,1 cell in global coordinates.