1# usage: runpy.sh fixtures/row-split/make.py <port> <out.odt> (office saving ODF 1.2 Extended) 2import sys, uno 3from unohelp import connect, desktop, pv 4 5port, out = int(sys.argv[1]), sys.argv[2] 6d = desktop(connect(port)) 7doc = d.loadComponentFromURL("private:factory/swriter", "_blank", 0, (pv("Hidden", True),)) 8tbl = doc.createInstance("com.sun.star.text.TextTable") 9tbl.initialize(3, 2) 10doc.Text.insertTextContent(doc.Text.End, tbl, False) 11rows = tbl.Rows 12rows.getByIndex(0).IsSplitAllowed = True 13rows.getByIndex(1).IsSplitAllowed = False 14rows.getByIndex(2).IsSplitAllowed = True 15rows.getByIndex(2).Height = 1000 16doc.storeToURL(uno.systemPathToFileUrl(out), (pv("FilterName", "writer8"),)) 17doc.close(True) 18