You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by se...@apache.org on 2011/07/09 13:39:02 UTC
svn commit: r1144654 -
/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
Author: sergey
Date: Sat Jul 9 11:39:02 2011
New Revision: 1144654
URL: http://svn.apache.org/viewvc?rev=1144654&view=rev
Log:
make sure all complex properties are correctly initialized and cloned
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java?rev=1144654&r1=1144653&r2=1144654&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java Sat Jul 9 11:39:02 2011
@@ -25,15 +25,17 @@ public final class ParagraphProperties e
private boolean jcLogical = false;
public ParagraphProperties() {
- setLspd(new LineSpacingDescriptor());
- setPhe(new byte[12]);
+ setAnld(new byte[84]);
setBrcTop(new BorderCode());
setBrcLeft(new BorderCode());
setBrcBottom(new BorderCode());
setBrcRight(new BorderCode());
setBrcBetween(new BorderCode());
setBrcBar(new BorderCode());
- setAnld(new byte[84]);
+ setDcs( new DropCapSpecifier() );
+ setLspd( new LineSpacingDescriptor() );
+ setShd( new ShadingDescriptor() );
+ setPhe( new byte[12] );
setWidowControl(true);
getLspd().setMultiLinespace((short) 1);
@@ -275,15 +277,17 @@ public final class ParagraphProperties e
public Object clone() throws CloneNotSupportedException {
ParagraphProperties pp = (ParagraphProperties) super.clone();
- pp.setLspd((LineSpacingDescriptor) this.getLspd().clone());
- pp.setPhe(getPhe().clone());
+ pp.setAnld(getAnld().clone());
pp.setBrcTop((BorderCode) getBrcTop().clone());
pp.setBrcLeft((BorderCode) getBrcLeft().clone());
pp.setBrcBottom((BorderCode) getBrcBottom().clone());
pp.setBrcRight((BorderCode) getBrcRight().clone());
pp.setBrcBetween((BorderCode) getBrcBetween().clone());
pp.setBrcBar((BorderCode) getBrcBar().clone());
- pp.setAnld(getAnld().clone());
+ pp.setDcs( getDcs().clone() );
+ pp.setLspd( (LineSpacingDescriptor) getLspd().clone() );
+ pp.setShd( (ShadingDescriptor) getShd().clone() );
+ pp.setPhe( getPhe().clone() );
return pp;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org