summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/libreoffice/calc/document.py11
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: