Linien eines Textrahmens formatieren

Programmierung unter AOO/LO (StarBasic, Python, Java, ...)

Moderator: Moderatoren

turtle47
*******
Beiträge: 1849
Registriert: Mi, 04.01.2006 20:10
Wohnort: Rheinbach

Re: Linien eines Textrahmens formatieren

Beitrag von turtle47 »

Hi Chrissie,

wie ist es damit:

Code: Alles auswählen

Sub Leer
Dim odocument As Object
Dim oText As Object
Dim oCursor As Object
Dim oFrame As Object
Dim oFrameCursor As Object
Dim aBorder As New com.sun.star.table.BorderLine 
odocument = thiscomponent
oText = oDocument.Text
oCursor = oText.createTextCursor()
oFrame = oDocument.createInstance("com.sun.star.text.TextFrame")
oFrame.width = 9580
oFrame.height = 4900
oFrame.HoriOrientPosition = -1900
oFrame.VertOrientPosition = -1000
aBorder.OuterLineWidth  = 80
'aBorder.Color  = rgb(255,0,0)
oFrame.LeftBorder = aBorder
oFrame.RightBorder = aBorder
oFrame.TopBorder = aBorder
oFrame.BottomBorder = aBorder
oFrame.setname("Empfänger")
oFrame.HoriOrient = com.sun.star.text.HoriOrientation.NONE
oFrame.VertOrient = com.sun.star.text.VertOrientation.NONE
oText.insertTextContent(oCursor, oFrame, FALSE)
oFrame.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE
oFrameCursor = oFrame.createTextCursor()
oFrameCursor.string = "Super FC Schalke" + CHR(13)+CHR(13)+CHR(13)+CHR(13)+CHR(13)+ "S-0-4"
End Sub
?

Jürgen
Software hat keinen Verstand - benutze deinen eigenen...!

Win 7 SP1/ LibreOffice 3.4.2 OOO340m1 (Build:203) / Firefox 15.0.1 / Notebook ASUS K70IO 64 Bit-Betriebssytem