mirror of https://github.com/apache/poi.git
make sure all complex properties are correctly initialized and cloned
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144654 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f68e539874
commit
99089dfcdf
|
@ -25,15 +25,17 @@ public final class ParagraphProperties extends PAPAbstractType implements
|
||||||
private boolean jcLogical = false;
|
private boolean jcLogical = false;
|
||||||
|
|
||||||
public ParagraphProperties() {
|
public ParagraphProperties() {
|
||||||
setLspd(new LineSpacingDescriptor());
|
setAnld(new byte[84]);
|
||||||
setPhe(new byte[12]);
|
|
||||||
setBrcTop(new BorderCode());
|
setBrcTop(new BorderCode());
|
||||||
setBrcLeft(new BorderCode());
|
setBrcLeft(new BorderCode());
|
||||||
setBrcBottom(new BorderCode());
|
setBrcBottom(new BorderCode());
|
||||||
setBrcRight(new BorderCode());
|
setBrcRight(new BorderCode());
|
||||||
setBrcBetween(new BorderCode());
|
setBrcBetween(new BorderCode());
|
||||||
setBrcBar(new BorderCode());
|
setBrcBar(new BorderCode());
|
||||||
setAnld(new byte[84]);
|
setDcs( new DropCapSpecifier() );
|
||||||
|
setLspd( new LineSpacingDescriptor() );
|
||||||
|
setShd( new ShadingDescriptor() );
|
||||||
|
setPhe( new byte[12] );
|
||||||
|
|
||||||
setWidowControl(true);
|
setWidowControl(true);
|
||||||
getLspd().setMultiLinespace((short) 1);
|
getLspd().setMultiLinespace((short) 1);
|
||||||
|
@ -275,15 +277,17 @@ public final class ParagraphProperties extends PAPAbstractType implements
|
||||||
|
|
||||||
public Object clone() throws CloneNotSupportedException {
|
public Object clone() throws CloneNotSupportedException {
|
||||||
ParagraphProperties pp = (ParagraphProperties) super.clone();
|
ParagraphProperties pp = (ParagraphProperties) super.clone();
|
||||||
pp.setLspd((LineSpacingDescriptor) this.getLspd().clone());
|
pp.setAnld(getAnld().clone());
|
||||||
pp.setPhe(getPhe().clone());
|
|
||||||
pp.setBrcTop((BorderCode) getBrcTop().clone());
|
pp.setBrcTop((BorderCode) getBrcTop().clone());
|
||||||
pp.setBrcLeft((BorderCode) getBrcLeft().clone());
|
pp.setBrcLeft((BorderCode) getBrcLeft().clone());
|
||||||
pp.setBrcBottom((BorderCode) getBrcBottom().clone());
|
pp.setBrcBottom((BorderCode) getBrcBottom().clone());
|
||||||
pp.setBrcRight((BorderCode) getBrcRight().clone());
|
pp.setBrcRight((BorderCode) getBrcRight().clone());
|
||||||
pp.setBrcBetween((BorderCode) getBrcBetween().clone());
|
pp.setBrcBetween((BorderCode) getBrcBetween().clone());
|
||||||
pp.setBrcBar((BorderCode) getBrcBar().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;
|
return pp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue