Does anyone have a Java example of copying header/footer contents between documents? I'm able to copy text, but the text format is not retained. Additionally, images are copied, but not anchored to the page header I'm insert them to.<br>
<br>Here is what I have:<br><br><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">fromXText = (XText) FileManager.getOOoUnoRuntimeQueryInterface(XText.class, fromProps.getPropertyValue("FooterText"));</span><br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">toXText = (XText) FileManager.getOOoUnoRuntimeQueryInterface(XText.class, toProps.getPropertyValue(</span><span style="font-family: courier new,monospace;">"FooterText"</span><span style="font-family: courier new,monospace;">));</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">if (xViewCursor != null) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> xViewCursor.gotoRange(toXText, false);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"><br>toXText.setString(fromXText.getString());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br><br>