A few months ago I wrote a forum post at OpenOffice.org because I was having problem transferring the header/footer contents and format between two documents.<br><br><a href="http://user.services.openoffice.org/en/forum/viewtopic.php?f=25&t=38739&p=180951">http://user.services.openoffice.org/en/forum/viewtopic.php?f=25&t=38739&p=180951</a><br>
<br>Basically, I'm using insertDocumentFromURL to merge two documents. Unfortunately, that method doesn't import the header/footer to the pages of the inserted document. So, I attempt to manually add those, but to no avail.<br>
<br>Here is what I'm doing (the forum post might be easier to read):<br><br>I mostly got it working, except for the copying of the actually
header/footer text. Whenever I read in a new document, the header and
footer text is always applied to the first page (or Default page style),
instead of the newly created page style. So, for instance, let's say I
have the following documents.<br><br>Document 1: Footer = "hello #1"<br>Document 2: Footer = "hello #2"<br>Document 3: Footer = "hello #3"<br>Document 4: Footer = "hello #4"<br><br>
I first load Document 1, creating a new instance of DocumentWrapper (please note that some code was left out for brevity).<br>Next,
I append Document 2 by calling wrapper.appendDocument("path to document
2"). This inserts document 2 with a page break and section break. A
new Page Style is create with the random name generated, but when I copy
the header/footer info from Document 2 into the new Page Style, it gets
applied to the Default Page Style, or page one.<br><br>Next, I append
Document 3 by calling wrapper.appendDocument("path to document 3").
This inserts document 3 after document 2 (with proper page breaks), but
again the header/footer data is applied to page 1, or Default Page
Style.<br><br>The same occurs for Document 4. <br><br>I've included all
the relevant code below. Please note that I had to leave the PAGE BREAK
code as is, otherwise the insertion of a new document would not occur
on a new page. I may be able to leave out the Section Break, but I for
now it shouldn't be a problem. I think I initially used them because
some documents had multiple columns, but that is handled with the page
styles.<br><br>Any additional thoughts?<br><br><dl class="codebox"><dd><code>public class DocumentWrapper {<br><br> private XTextDocument document;<br><br> public void appendDocument(String tempDoc) throws IllegalArgumentException, java.lang.Exception {<br>
<br> PropertyValue[] xComponentLoadProps = ... //"AsTemplate", "Hidden"<br><br> DocumentWrapper document22 = new DocumentWrapper(componentImport(tempDoc, xComponentLoadProps));<br>
<br> String newStyleName = String.valueOf("ps_" + Math.random());<br><br> XStyle document2Style = document2.getStyle(StyleFamilies.PageStyles, PageStyles.Standard);<br><br> document.getText().createTextCursor().gotoEnd(false); <br>
<br> XTextCursor cursor = this.insertSectionBreak(newStyleName);<br><br> XDocumentInsertable xDocI = (XDocumentInsertable) getOOoUnoRuntimeQueryInterface(XDocumentInsertable.class, cursor);<br><br> xDocI.insertDocumentFromURL((new File(tempDoc)).toURI().toString(), new PropertyValue[0]);<br>
<br> Object o = getOOoUnoRuntimeServiceCreateInstance("com.sun.star.style.PageStyle", document);<br><br> XStyle newPageStyle = (XStyle) getOOoUnoRuntimeQueryInterface(XStyle.class, o);<br><br>
newPageStyle.setName(newStyleName);<br><br> DocumentWrapper.copyPageStyleProperties(document2Style, newPageStyle);<br><br> this.setStyle(StyleFamilies.PageStyles, newPageStyle);<br><br> XParagraphCursor xParaCursor = (XParagraphCursor) getOOoUnoRuntimeQueryInterface( XParagraphCursor.class, cursor);<br>
<br> XPropertySet paraProps = (XPropertySet) getOOoUnoRuntimeQueryInterface( XPropertySet.class, xParaCursor);<br><br> paraProps.setPropertyValue(ParagraphStyleProperties.PageDescName, newPageStyleName);<br>
<br> paraProps = null;<br><br> xParaCursor = null;<br><br> xDocI = null;<br><br> cursor = null;<br><br> document2Style = null;<br><br> newStyleName = null;<br><br>
}<br><br>
public XTextCursor insertSectionBreak(String newSectionName) throws
UnknownPropertyException, IllegalArgumentException,
WrappedTargetException, PropertyVetoException, Exception,
java.lang.Exception {<br><br> XText xDocText = this.document.getText();<br><br> XTextCursor xOrigDocTextCursor = xDocText.createTextCursor();<br><br> xOrigDocTextCursor.gotoEnd(false);<br><br>
XPropertySet xOrigDocTextCursorProp = (XPropertySet)
getOOoUnoRuntimeQueryInterface(XPropertySet.class, xOrigDocTextCursor);<br><br> xOrigDocTextCursorProp.setPropertyValue("BreakType", BreakType.PAGE_BEFORE);<br><br> xDocText.insertControlCharacter(xOrigDocTextCursor, ControlCharacter.PARAGRAPH_BREAK, false);<br>
xOrigDocTextCursorProp.setPropertyValue("BreakType", BreakType.NONE);<br><br>
XParagraphCursor xParaCursor = (XParagraphCursor)
getOOoUnoRuntimeQueryInterface( XParagraphCursor.class,
xOrigDocTextCursor);<br><br> xParaCursor.gotoPreviousParagraph(false);<br><br> XNamed xChildNamed = (XNamed) getOOoUnoRuntimeQueryInterface(<br><br> XNamed.class,<br><br> getOOoUnoRuntimeServiceCreateInstance("com.sun.star.text.TextSection", this.document));<br>
<br> xChildNamed.setName(newSectionName);<br><br> XTextContent xChildContent = (XTextContent) getOOoUnoRuntimeQueryInterface(XTextContent.class, xChildNamed);<br><br> xDocText.insertTextContent(xOrigDocTextCursor, xChildContent, false);<br>
<br> xParaCursor.gotoPreviousParagraph(false);<br><br> xOrigDocTextCursorProp = null;<br><br> xParaCursor = null;<br><br> xDocText = null;<br><br> xChildNamed = null;<br><br> xChildContent = null;<br>
<br> return xOrigDocTextCursor;<br><br> }<br><br>
public static void copyHeaderProperties(XPropertySet fromProps,
XPropertySet toProps) throws UnknownPropertyException,
WrappedTargetException, PropertyVetoException, IllegalArgumentException {<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBackColor,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBackColor));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicFilter,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicFilter));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicLocation,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicLocation));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicURL,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBackGraphicURL));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBackTransparent,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBackTransparent));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBodyDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBodyDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBottomBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBottomBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderBottomBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderBottomBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderDynamicSpacing,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderDynamicSpacing));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderIsDynamicHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderIsDynamicHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderLeftBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderLeftBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderLeftBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderLeftBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderLeftMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderLeftMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderRightBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderRightBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderRightBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderRightBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderRightMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderRightMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderShadowFormat,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderShadowFormat));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderTopBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTopBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderTopBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTopBorderDistance));<br><br> Boolean isOn = Boolean.FALSE;<br><br> Boolean isShared = Boolean.FALSE;<br><br> Object objectIsOn = fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderIsOn);<br>
<br> Object objectIsShared = fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderIsShared);<br><br> if (objectIsOn instanceof Any){<br><br> if (((Any)objectIsOn).getType() == Type.BOOLEAN){<br>
<br> isOn = (Boolean) ((Any)objectIsOn).getObject();<br><br> }<br><br> } else if (objectIsOn instanceof Boolean){<br><br> isOn = (Boolean) objectIsOn;<br><br> }<br><br> if (objectIsShared instanceof Any){<br>
<br> if (((Any)objectIsShared).getType() == Type.BOOLEAN){<br><br> isShared = (Boolean) ((Any)objectIsShared).getObject();<br><br> }<br><br> } else if (objectIsShared instanceof Boolean){<br>
<br> isShared = (Boolean) objectIsShared;<br><br> }<br><br> objectIsOn = null;<br><br> objectIsShared = null;<br><br> toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderIsOn, isOn);<br>
<br> toProps.setPropertyValue(PageStyles.PageStyleProperties.HeaderIsShared, isShared);<br><br> XText fromXText = null;<br><br> XText toXText = null;<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderText));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderText));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTextLeft));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTextLeft));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTextRight));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.HeaderTextRight));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br> fromXText = null;<br><br> toXText = null;<br>
<br> }<br><br>
public static void copyFooterProperties(XPropertySet fromProps,
XPropertySet toProps) throws UnknownPropertyException,
WrappedTargetException, PropertyVetoException, IllegalArgumentException {<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBackColor,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBackColor));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicFilter,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicFilter));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicLocation,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicLocation));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicURL,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBackGraphicURL));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBackTransparent,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBackTransparent));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBodyDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBodyDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBottomBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBottomBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterBottomBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterBottomBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterDynamicSpacing,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterDynamicSpacing));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterIsDynamicHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterIsDynamicHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterLeftBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterLeftBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterLeftBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterLeftBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterLeftMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterLeftMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterRightBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterRightBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterRightBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterRightBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterRightMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterRightMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterShadowFormat,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterShadowFormat));<br><br> Boolean isOn = Boolean.FALSE;<br><br> Boolean isShared = Boolean.FALSE;<br><br> Object objectIsOn = fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterIsOn);<br>
<br> Object objectIsShared = fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterIsShared);<br><br> if (objectIsOn instanceof Any){<br><br> if (((Any)objectIsOn).getType() == Type.BOOLEAN){<br>
<br> isOn = (Boolean) ((Any)objectIsOn).getObject();<br><br> }<br><br> } else if (objectIsOn instanceof Boolean){<br><br> isOn = (Boolean) objectIsOn;<br><br> }<br><br> if (objectIsShared instanceof Any){<br>
<br> if (((Any)objectIsShared).getType() == Type.BOOLEAN){<br><br> isShared = (Boolean) ((Any)objectIsShared).getObject();<br><br> }<br><br> } else if (objectIsShared instanceof Boolean){<br>
<br> isShared = (Boolean) objectIsShared;<br><br> }<br><br> objectIsOn = null;<br><br> objectIsShared = null;<br><br> toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterIsOn, isOn);<br>
<br> toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterIsShared, isShared);<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterTopBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTopBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FooterTopBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTopBorderDistance));<br><br> XText fromXText;<br><br> XText toXText;<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterText));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.FooterText));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTextLeft));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTextLeft));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br>
fromXText = (XText) getOOoUnoRuntimeQueryInterface(XText.class,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTextRight));<br><br>
if (isOn.booleanValue() && isShared.booleanValue()
&& fromXText != null && fromXText.getString() != null
&& !fromXText.getString().isEmpty()){<br><br> toXText
= (XText) getOOoUnoRuntimeQueryInterface(XText.class,
toProps.getPropertyValue(PageStyles.PageStyleProperties.FooterTextRight));<br><br> toXText.setString(fromXText.getString());<br><br> }<br><br> fromXText = null;<br><br> toXText = null;<br>
<br> }<br><br>
public static void copyPageStyleProperties(XStyle fromStyle, XStyle
toStyle) throws UnknownPropertyException, WrappedTargetException,
PropertyVetoException, IllegalArgumentException {<br><br> XPropertySet fromProps = (XPropertySet) getOOoUnoRuntimeQueryInterface(XPropertySet.class, fromStyle);<br><br> XPropertySet toProps = (XPropertySet) getOOoUnoRuntimeQueryInterface(XPropertySet.class, toStyle);<br>
<br> DocumentWrapper.copyHeaderProperties(fromProps, toProps);<br><br> DocumentWrapper.copyFooterProperties(fromProps, toProps);<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BackColor,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BackColor));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BackGraphicFilter,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BackGraphicFilter));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BackGraphicLocation,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BackGraphicLocation));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BackGraphicURL,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BackGraphicURL));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BackTransparent,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BackTransparent));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BottomBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BottomBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BottomBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BottomBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.BottomMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.BottomMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineAdjust,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineAdjust));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineColor,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineColor));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineRelativeWidth,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineRelativeWidth));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineTextDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineTextDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.FootnoteLineWeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.FootnoteLineWeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridBaseHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridBaseHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridBaseWidth,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridBaseWidth));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridColor,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridColor));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridDisplay,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridDisplay));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridLines,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridLines));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridMode,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridMode));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridPrint,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridPrint));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridRubyHeight,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridRubyHeight));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.GridSnapToChars,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.GridSnapToChars));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.Height,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.Height));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.IsLandscape,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.IsLandscape));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.LeftBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.LeftBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.LeftBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.LeftBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.LeftMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.LeftMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.NumberingType,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.NumberingType));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.PageStyleLayout,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.PageStyleLayout));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.PrinterPaperTray,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.PrinterPaperTray));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.RegisterParagraphStyle,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.RegisterParagraphStyle));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.RightBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.RightBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.RightBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.RightBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.RightMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.RightMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.RubyBelow,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.RubyBelow));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.ShadowFormat,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.ShadowFormat));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.Size,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.Size));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.StandardPageMode,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.StandardPageMode));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.TextColumns,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.TextColumns));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.TopBorder,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.TopBorder));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.TopBorderDistance,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.TopBorderDistance));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.TopMargin,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.TopMargin));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.UserDefinedAttributes,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.UserDefinedAttributes));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.Width,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.Width));<br><br>
toProps.setPropertyValue(PageStyles.PageStyleProperties.WritingMode,
fromProps.getPropertyValue(PageStyles.PageStyleProperties.WritingMode));<br><br> fromProps = null;<br><br> toProps = null;<br><br> }<br>}<br></code></dd></dl><br><br>