To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=97291 Issue #|97291 Summary|Incorrect graphic size and aspect ration on insert. Component|api Version|OOo 3.0 Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|jsc Reported by|pitonyak
------- Additional comments from [email protected] Tue Dec 16 00:03:05 +0000 2008 ------- Insert an image into a table cell using the API. If the image size is too wide for the table cell, then the image sizes incorrectly. This process works just fine when using the GUI. I saw this behavior after inserting the image into a table cell using the following code: oDoc = ThisComponent oText = oDoc.getText() oTable=oDoc.getTextTables().getByName("Table1") oImage = oDoc.createInstance( "com.sun.star.text.GraphicObject" ) oImage.GraphicURL = "file:///andrew0/home/andy/Pelosi.jpg" 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 ) When the image is inserted into the table, a height and width are assigned. The assigned height and width have the correct aspect ration.Unfortunately, the width is wider than the table cell. After inserting the image, look at the actual height and width from the graphic dialog. The values are completely wrong. Of course, you can't check the actual size of the image (see http://www.openoffice.org/issues/show_bug.cgi?id=85105). --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
