added clone for properties objects. Sure makes it easier. Hey look ma,

javadoc!
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2005-04-27 21:33:49 +00:00
parent 3d6a9d6a48
commit 0cba55bf3e
2 changed files with 25 additions and 0 deletions

View File

@ -520,6 +520,18 @@ public class CharacterRun
_props.setIco24(colour24); _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. * Used to create a deep copy of this object.
* *

View File

@ -453,6 +453,19 @@ public class Paragraph
_papx.updateSprm(SPRM_FTTP, val); _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() public Object clone()
throws CloneNotSupportedException throws CloneNotSupportedException
{ {