You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ac...@apache.org on 2005/04/27 23:33:49 UTC
cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel CharacterRun.java Paragraph.java
acoliver 2005/04/27 14:33:49
Modified: src/scratchpad/src/org/apache/poi/hwpf/usermodel
CharacterRun.java Paragraph.java
Log:
added clone for properties objects. Sure makes it easier. Hey look ma,
javadoc!
Revision Changes Path
1.11 +12 -0 jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
Index: CharacterRun.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CharacterRun.java 24 Aug 2004 12:54:00 -0000 1.10
+++ CharacterRun.java 27 Apr 2005 21:33:49 -0000 1.11
@@ -521,6 +521,18 @@
}
/**
+ * 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.
*
* @return A deep copy.
1.10 +13 -0 jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java
Index: Paragraph.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Paragraph.java 24 Aug 2004 12:54:00 -0000 1.9
+++ Paragraph.java 27 Apr 2005 21:33:49 -0000 1.10
@@ -453,6 +453,19 @@
_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
{
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/