diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java index 9f97d4cd3c..8766affd71 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java @@ -60,7 +60,7 @@ public class XSLFTextParagraph implements TextParagraph(); _shape = shape; @@ -82,7 +82,7 @@ public class XSLFTextParagraph implements TextParagraph getTextRuns(){ + public List getTextRuns() { return _runs; } @Override - public Iterator iterator(){ + public Iterator iterator() { return _runs.iterator(); } @@ -116,7 +116,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetAlgn()) { val.accept(TextAlign.values()[props.getAlgn().intValue() - 1]); @@ -172,7 +172,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetFontAlgn()) { val.accept(FontAlign.values()[props.getFontAlgn().intValue() - 1]); @@ -188,7 +188,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetBuFont()) { val.accept(props.getBuFont().getTypeface()); @@ -214,7 +214,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetBuChar()) { val.accept(props.getBuChar().getChar()); @@ -233,7 +233,7 @@ public class XSLFTextParagraph implements TextParagraphnull value means to use the text font color. */ @SuppressWarnings("WeakerAccess") - public PaintStyle getBulletFontColor(){ + public PaintStyle getBulletFontColor() { Color col = fetchParagraphProperty(this::fetchBulletFontColor); return (col == null) ? null : DrawPaint.createSolidPaint(col); } @@ -253,7 +253,7 @@ public class XSLFTextParagraph implements TextParagraph val) { final XSLFSheet sheet = getParentShape().getSheet(); final XSLFTheme theme = sheet.getTheme(); - if(props.isSetBuClr()){ + if(props.isSetBuClr()) { XSLFColor c = new XSLFColor(props.getBuClr(), theme, null, sheet); val.accept(c.getColor()); } @@ -297,15 +297,15 @@ public class XSLFTextParagraph implements TextParagraph val) { - if(props.isSetBuSzPct()){ + if(props.isSetBuSzPct()) { val.accept(POIXMLUnits.parsePercent(props.getBuSzPct().xgetVal()) * 0.001); } - if(props.isSetBuSzPts()){ + if(props.isSetBuSzPts()) { val.accept( - props.getBuSzPts().getVal() * 0.01); } } @@ -320,7 +320,7 @@ public class XSLFTextParagraph implements TextParagraph */ @SuppressWarnings("WeakerAccess") - public void setBulletFontSize(double bulletSize){ + public void setBulletFontSize(double bulletSize) { CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { @@ -369,7 +369,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetMarR()) { val.accept(Units.toPoints(props.getMarR())); @@ -450,7 +450,7 @@ public class XSLFTextParagraph implements TextParagraph { if (props.isSetDefTabSz()) { val.accept(Units.toPoints(POIXMLUnits.parseLength(props.xgetDefTabSz()))); @@ -476,19 +476,19 @@ public class XSLFTextParagraph implements TextParagraph props::getLnSpc, props -> props::addNewLnSpc, props -> props::unsetLnSpc); } @Override - public Double getLineSpacing(){ + public Double getLineSpacing() { final Double lnSpc = getSpacing(props -> props::getLnSpc); if (lnSpc != null && lnSpc > 0) { // check if the percentage value is scaled @@ -503,17 +503,17 @@ public class XSLFTextParagraph implements TextParagraph props::getSpcBef, props -> props::addNewSpcBef, props -> props::unsetSpcBef); } @Override - public Double getSpaceBefore(){ + public Double getSpaceBefore() { return getSpacing(props -> props::getSpcBef); } @Override - public void setSpaceAfter(Double spaceAfter){ + public void setSpaceAfter(Double spaceAfter) { setSpacing(spaceAfter, props -> props::getSpcAft, props -> props::addNewSpcAft, props -> props::unsetSpcAft); } @@ -579,7 +579,7 @@ public class XSLFTextParagraph implements TextParagraph val) { if (props.isSetBuNone()) { val.accept(false); - } else if(props.isSetBuFont() || props.isSetBuChar()){ + } else if(props.isSetBuFont() || props.isSetBuChar()) { val.accept(true); } } @@ -677,7 +677,7 @@ public class XSLFTextParagraph implements TextParagraph T fetchParagraphProperty(ParaPropFetcher fetcher){ + private T fetchParagraphProperty(ParaPropFetcher fetcher) { final XSLFTextShape shape = getParentShape(); return new ParagraphPropertyFetcher<>(this, fetcher).fetchProperty(shape); } - void copy(XSLFTextParagraph other){ + void copy(XSLFTextParagraph other) { if (other == this) { return; } @@ -792,35 +792,35 @@ public class XSLFTextParagraph implements TextParagraph