diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-03-18 04:47:03 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-03-18 04:52:35 +0100 |
commit | a22bec478a5fcb1423046d8d2f5d897aa9aa0440 (patch) | |
tree | a0d6f7b4159b4de9f55b27d798961b1f8b5ba2ab | |
parent | 21cc5084d5fdcedec7793dbf024552592a70324d (diff) |
uitest: add method to get the column object from a spreadsheet doc
Change-Id: I594779ad7b3fe97a1055ad9c999fe6be126875fb
-rw-r--r-- | uitest/libreoffice/calc/document.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/uitest/libreoffice/calc/document.py b/uitest/libreoffice/calc/document.py index aff34020a650..a251f29b2490 100644 --- a/uitest/libreoffice/calc/document.py +++ b/uitest/libreoffice/calc/document.py @@ -26,4 +26,15 @@ def get_cell_by_position(document, tab, column, row): sheet = get_sheet_from_doc(document, tab) return sheet.getCellByPosition(column, row) +def get_column(document, column, tab = 0): + """ Get the column object through the column index + + Keyword arguments: + document -- The document that should be used + tab -- The 0-based sheet number + column -- The 0-based column number + """ + sheet = get_sheet_from_doc(document, tab) + return sheet.getColumns().getByIndex(column) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |