def test01(self): "First styles" fn = self.addTempFile("66.sxw", showOutput=True) doc = TextDocument(fn) s = doc.addStyle(name="Rechts", family="paragraph", parentStyleName="Standard", className="text") s.addProperties(textAlign="end", justifySingleWord=False) doc.body.heading(1,"Rechnung Nr. 040235") doc.body.par("Datum: 10. Dezember 2004",styleName="Rechts") t = doc.body.table() t.column() t.column() t.column() t.column() t.row("Bezeichnung", "Menge", u"Stückpreis", "Preis") t.row("Tisch","1","15","15") t.row("Stuhl","4","10","40") doc.body.par(u"Alle Preise in €.") doc.body.par("Zahlungsbedingungen: ...") doc.save()
def test01(self): "First styles" fn = self.addTempFile("66.sxw", showOutput=True) doc = TextDocument(fn) s = doc.addStyle(name="Rechts", family="paragraph", parentStyleName="Standard", className="text") s.addProperties(textAlign="end", justifySingleWord=False) doc.body.heading(1, "Rechnung Nr. 040235") doc.body.par("Datum: 10. Dezember 2004", styleName="Rechts") t = doc.body.table() t.column() t.column() t.column() t.column() t.row("Bezeichnung", "Menge", u"Stückpreis", "Preis") t.row("Tisch", "1", "15", "15") t.row("Stuhl", "4", "10", "40") doc.body.par(u"Alle Preise in €.") doc.body.par("Zahlungsbedingungen: ...") doc.save()
def test01(self): fn = self.addTempFile("1.sxw", showOutput=True) doc = TextDocument(fn) doc.body.h1("Generating OpenOffice documents") doc.body.par("Here is a table:") t = doc.body.table() t.column() t.column() t.row("Kunde","Datum") t.row("Hinz","2004-11-16") t.row("Kunz","2004-11-17") doc.body.par("Here is another paragraph.") doc.save()
def test01(self): "First styles" fn = self.addTempFile("2.sxw", showOutput=True) doc = TextDocument(fn) s = doc.addStyle(name="Rechts", family="paragraph", parentStyleName="Standard", className="text") s.addProperties(textAlign="end", justifySingleWord=False) doc.body.heading(1, "Defining custom styles") doc.body.par("This is a right-aligned paragraph.", styleName="Rechts") doc.body.par("Here is a standard paragraph.") doc.save()
def test01(self): "First styles" fn = self.addTempFile("2.sxw", showOutput=True) doc = TextDocument(fn) s = doc.addStyle(name="Rechts", family="paragraph", parentStyleName="Standard", className="text") s.addProperties(textAlign="end", justifySingleWord=False) doc.body.heading(1,"Defining custom styles") doc.body.par("This is a right-aligned paragraph.", styleName="Rechts") doc.body.par("Here is a standard paragraph.") doc.save()