Apache OpenOffice (AOO) Bugzilla – Issue 128155
I can not show a text in a draw document
Last modified: 2019-07-19 08:19:29 UTC
I can not show a text in a draw document. I tried several ways and I feel the closer one is to show a TextShape or RectangleShape but I said close neighter of them works. Please an example I am not an expert so an example will be great I believe. here is my code: -------------------------------------------------- Dim drawDoc as object Dim thisDrawPage as object Dim centerX as double Dim centerY as double Dim x1 as double Dim x2 as double Dim y1 as double Dim y2 as double Dim height as double Dim wide as double drawDoc = ThisComponent thisDrawPage = drawDoc.drawPages( 0 ) ' -- -- -- centerX = (thisDrawPage.Width / 2) centerY = (thisDrawPage.Height / 2) height = 300 wide = 600 height = height * 10 wide = wide * 10 ' -- -- dotPosition = MakePoint( (centerX - (wide / 2)) , (centerY - (height / 2)) ) dotShape = drawDoc.createInstance( "com.sun.star.drawing.RectangleShape" ) 'dotShape = drawDoc.createInstance( "com.sun.star.drawing.TextShape" ) dotShape.Position = dotPosition dotShape.Size = MakeSize( wide, height ) 'dotShape.RotateAngle = 2000 '20 degrees dotShape.FillStyle = com.sun.star.drawing.FillStyle.NONE 'dotShape.LineStyle = com.sun.star.drawing.LineStyle.NONE dotShape.LineStyle = com.sun.star.drawing.LineStyle.DASH dotShape.setString("Tex") dotShape.Text.Visible = True dotShape.setText("Tex") thisDrawPage.Add( dotShape ) ' -- -- -------------------------------------------------- I have a button on the draw document. I press the button and then that code is executed. I see a sort of frame for the text on the document but the text does now show up. Any help is welcomed. Thanks a lot.
You are in wrong place here. This is a bug tracking system and not a help desk on macro programming. For this kind of question, please refer to our community forum or users mailing list: http://www.openoffice.org/support/