Apache OpenOffice (AOO) Bugzilla – Issue 62461
Can't set the property FIRST PARAGRAPH in the WRAP menu from API
Last modified: 2013-02-24 21:07:35 UTC
Hi, i use the API&Java to load some RTF into a big one writer file. In this RTF the images are represented from a string (something like #....#),at runtime i substitute the string inserting the image,then i would to wrap the text around the image, so i set this property for the GraphicObject that represent the image: gObject = mxDocFactory.createInstance("com.sun.star.text.GraphicObject" ); ps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, gObject); ... ps.setPropertyValue("AnchorType",TextContentAnchorType.AT_PARAGRAPH); ps.setPropertyValue("SurroundAnchorOnly",new Boolean(true)); ps.setPropertyValue("GraphicURL", "file:///"+url); ps.setPropertyValue("Surround",com.sun.star.text.WrapTextMode.RIGHT); ps.setPropertyValue("SurroundContour",new Boolean(true)); ps.setPropertyValue("ContourOutside",new Boolean(true)); s.setPropertyValue("IsAutomaticContour",new Boolean(false)); The problem is that OO set automatically the flag FIRST PARAGRAPH in the submenu WRAP (find it clicking with the right button on the image), i need to uncheck this property with the API but i don't found anything... I can't do this manually because the image in the final document are thousands... The problem is the same with OO1.1.4 and OO2.0 This is a bug? or something else??
thoriredd: Can you upload a sample document and attach a simple macro (SB code) out of your Java code?
removing the line ps.setPropertyValue("SurroundAnchorOnly",new Boolean(true)); should remove the mark at "FirstParagraph"
Thanks, now it's ok... sorry for the mistake!
closing