From fbf12935d3d66ca08cdf14205cee06bac0a8f35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20B=C3=A9arez?= Date: Sun, 5 Jan 2020 23:54:06 +0000 Subject: [PATCH] Fix JavaDoc warnings git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872361 13f79535-47bb-0310-9956-ffa450edef68 --- .../usermodel/chart/XDDFBarChartData.java | 9 +- .../poi/xddf/usermodel/text/XDDFTextRun.java | 10 +- .../poi/xslf/usermodel/XSLFTextParagraph.java | 182 ++++++++++++------ 3 files changed, 139 insertions(+), 62 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java index 689fcc63e0..a79d587dce 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java @@ -143,10 +143,13 @@ public class XDDFBarChartData extends XDDFChartData { } /** - * Minimum inclusive: -100 - *
- * Maximum inclusive: 100 * @param overlap + *
+ *
Minimum inclusive =
+ *
-100
+ *
Maximum inclusive =
+ *
100
+ *
*/ public void setOverlap(Byte overlap) { if (overlap == null) { diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java index ebab4c5f23..8d2c5c2015 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java @@ -376,8 +376,8 @@ public class XDDFTextRun { *
Minimum inclusive =
*
1
*
Maximum inclusive =
- *
400
- * + *
400
+ * */ public void setFontSize(Double size) { getOrCreateProperties().setFontSize(size); @@ -402,7 +402,8 @@ public class XDDFTextRun { *
Minimum inclusive =
*
0
*
Maximum inclusive =
- *
4000
+ *
4000
+ * */ public void setCharacterKerning(Double kerning) { getOrCreateProperties().setCharacterKerning(kerning); @@ -435,7 +436,8 @@ public class XDDFTextRun { *
Minimum inclusive =
*
-4000
*
Maximum inclusive =
- *
4000
+ *
4000
+ * */ public void setCharacterSpacing(Double spacing) { getOrCreateProperties().setCharacterSpacing(spacing); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java index 91c85ebe47..f07135213a 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java @@ -93,6 +93,7 @@ public class XSLFTextParagraph implements TextParagraph iterator(){ return _runs.iterator(); } @@ -149,6 +151,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetAlgn()){ TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1]; @@ -166,7 +169,9 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetFontAlgn()){ FontAlign val = FontAlign.values()[props.getFontAlgn().intValue() - 1]; @@ -199,13 +205,15 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuFont()){ setValue(props.getBuFont().getTypeface()); @@ -238,6 +247,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuChar()){ setValue(props.getBuChar().getChar()); @@ -266,6 +276,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuClr()){ XSLFColor c = new XSLFColor(props.getBuClr(), theme, null); @@ -284,8 +295,8 @@ public class XSLFTextParagraph implements TextParagraph - * If bulletSize >= 0, then bulletSize is a percentage of the font size. - * If bulletSize < 0, then it specifies the size in points + * If bulletSize >= 0, then bulletSize is a percentage of the font size. + * If bulletSize < 0, then it specifies the size in points *

* * @return the bullet size @@ -320,6 +331,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); @@ -340,8 +352,8 @@ public class XSLFTextParagraph implements TextParagraph - * If bulletSize >= 0, then bulletSize is a percentage of the font size. - * If bulletSize < 0, then it specifies the size in points + * If bulletSize >= 0, then bulletSize is a percentage of the font size. + * If bulletSize < 0, then it specifies the size in points *

*/ @SuppressWarnings("WeakerAccess") @@ -351,11 +363,15 @@ public class XSLFTextParagraph implements TextParagraph= 0) { CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); - if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); + if(pr.isSetBuSzPts()) { + pr.unsetBuSzPts(); + } } else { CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); - if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); + if(pr.isSetBuSzPct()) { + pr.unsetBuSzPct(); + } } } @@ -365,6 +381,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()) { + @Override public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { AutoNumberingScheme ans = AutoNumberingScheme.forOoxmlID(props.getBuAutoNum().getType().intValue()); @@ -386,6 +403,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()) { + @Override public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { if (props.getBuAutoNum().isSetStartAt()) { @@ -399,14 +417,18 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetIndent()){ setValue(Units.toPoints(props.getIndent())); @@ -431,10 +454,14 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetMarL()){ double val = Units.toPoints(props.getMarL()); @@ -463,10 +491,14 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetMarR()){ double val = Units.toPoints(props.getMarR()); @@ -495,6 +528,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetDefTabSz()){ double val = Units.toPoints(props.getDefTabSz()); @@ -511,6 +545,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if (props.isSetTabLst()) { CTTextTabStopList tabStops = props.getTabLst(); @@ -551,7 +586,7 @@ public class XSLFTextParagraph implements TextParagraph> getSpc) { final ParagraphPropertyFetcher fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(final CTTextParagraphProperties props){ final CTTextSpacing spc = getSpc.apply(props).get(); @@ -657,6 +693,7 @@ public class XSLFTextParagraph implements TextParagraph fetcher = new ParagraphPropertyFetcher(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuNone()) { setValue(false); @@ -678,24 +715,48 @@ public class XSLFTextParagraph implements TextParagraphnull if + * @return master style text paragraph properties, or null if * there are no master slides or the master slides do not contain a text paragraph */ private CTTextParagraphProperties getDefaultMasterStyle(){ CTPlaceholder ph = _shape.getPlaceholderDetails().getCTPlaceholder(false); - String defaultStyleSelector; + String defaultStyleSelector; switch(ph == null ? -1 : ph.getType().intValue()) { case STPlaceholderType.INT_TITLE: case STPlaceholderType.INT_CTR_TITLE: @@ -770,19 +833,19 @@ public class XSLFTextParagraph implements TextParagraph visitor){ final XSLFTextShape shape = getParentShape(); final XSLFSheet sheet = shape.getSheet(); - + if (!(sheet instanceof XSLFSlideMaster)) { if (_p.isSetPPr() && visitor.fetch(_p.getPPr())) { return; } - + if (shape.fetchShapeProperty(visitor)) { return; } @@ -819,14 +882,20 @@ public class XSLFTextParagraph implements TextParagraph0; i--) { thisP.removeBr(i-1); @@ -844,7 +913,7 @@ public class XSLFTextParagraph implements TextParagraph getTabStops() { ParagraphPropertyFetcher> fetcher = new ParagraphPropertyFetcher>(getIndentLevel()){ + @Override public boolean fetch(CTTextParagraphProperties props) { if (props.isSetTabLst()) { final List list = new ArrayList<>(); @@ -1018,7 +1090,7 @@ public class XSLFTextParagraph implements TextParagraph