diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java index db9826347..b125daa0a 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java @@ -520,6 +520,18 @@ public class CharacterRun _props.setIco24(colour24); } + /** + * clone the CharacterProperties object associated with this + * characterRun so that you can apply it to another CharacterRun + */ + public CharacterProperties cloneProperties() { + try { + return (CharacterProperties)_props.clone(); + } catch(java.lang.CloneNotSupportedException e) { + throw new RuntimeException(e); + } + } + /** * Used to create a deep copy of this object. * diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java index 51130fb72..a15adb6b1 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java @@ -453,6 +453,19 @@ public class Paragraph _papx.updateSprm(SPRM_FTTP, val); } + /** + * clone the ParagraphProperties object associated with this Paragraph so + * that you can apply the same properties to another paragraph. + * + */ + public ParagraphProperties cloneProperties() { + try { + return (ParagraphProperties)_props.clone(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + public Object clone() throws CloneNotSupportedException {