| View previous topic :: View next topic |
| Author |
Message |
ernst_org General User

Joined: 04 Sep 2007 Posts: 38
|
Posted: Tue Nov 25, 2008 2:30 pm Post subject: HELP OO 3.0 |
|
|
I have hade no problem to insert images in a table using this code
| Code: |
oDoc = ThisComponent
TextTables = oDoc.createInstance( "com.sun.star.text.TextTable" )
oViewCursor = oDoc.getCurrentController().getViewCursor()
oText = oDoc.getText()
TextTables = oDoc.getTextTables()
oTable=TextTables.getByName("TabellLogotyp")
oImage = oDoc.createInstance( "com.sun.star.text.GraphicObject" )
oPath= getIniPath(inifil)
lFil="/Logotyp_Int.jpg"
oImage.GraphicURL = "file:///" & oPath & lFil
oImage.AnchorType = com.sun.star.text.TextContentAnchorType.AS_CHARACTER
oCell = oTable.getCellByPosition( 0, 0 )
oText = oCell.getText()
oCursor = oText.createTextCursor()
oText.insertTextContent( oCursor, oImage, False )
|
But after updating to 00 3.0 then the with and hight is totaly wrong. Can any one help me.... ??? |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Mon Dec 15, 2008 3:15 pm Post subject: |
|
|
I spent about an hour looking at this, and I noticed that the behavior appears to be different depending on the size of the image. When I inserted a rather small graphic, everything looked fine. A larger graphic, and things went wrong. I think that this is a bug. _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
ernst_org General User

Joined: 04 Sep 2007 Posts: 38
|
Posted: Mon Dec 15, 2008 3:29 pm Post subject: ok |
|
|
| Thanks for the look, than I know that! |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Mon Dec 15, 2008 4:08 pm Post subject: |
|
|
Perhaps I should have added, that if absolutely needed, you can do silly things such as:
1. Insert the image
2. Look at the desired size
3. Look at the containing cell
4. If the cell is not sufficiently wide, then remove the image from the document, insert the image again, and set the size before assigning the URL. _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
ernst_org General User

Joined: 04 Sep 2007 Posts: 38
|
Posted: Tue Dec 16, 2008 1:47 pm Post subject: Good point |
|
|
Yea that is a good point of view.
Bugg like this shall they bee reported somewhere? |
|
| Back to top |
|
 |
|