mirror of https://github.com/apache/poi.git
sonar fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1832229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e345646b9f
commit
4c95bc3372
|
@ -268,7 +268,7 @@ public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape,
|
|||
private CTLineProperties setBorderDefaults(BorderEdge edge) {
|
||||
final CTLineProperties ln = getCTLine(edge, true);
|
||||
if (ln == null) {
|
||||
return null;
|
||||
throw new IllegalStateException("CTLineProperties couldn't be initialized");
|
||||
}
|
||||
|
||||
if (ln.isSetNoFill()) {
|
||||
|
@ -366,6 +366,9 @@ public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape,
|
|||
}
|
||||
|
||||
CTLineProperties ln = setBorderDefaults(edge);
|
||||
if (!ln.isSetPrstDash()) {
|
||||
ln.addNewPrstDash();
|
||||
}
|
||||
ln.getPrstDash().setVal(STPresetLineDashVal.Enum.forInt(dash.ooxmlId));
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,10 @@ public final class SXSSFPicture implements Picture {
|
|||
@Override
|
||||
public void resize(double scale){
|
||||
XSSFClientAnchor anchor = getClientAnchor();
|
||||
if (anchor == null) {
|
||||
logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
|
||||
return;
|
||||
}
|
||||
|
||||
XSSFClientAnchor pref = getPreferredSize(scale);
|
||||
|
||||
|
@ -139,6 +143,10 @@ public final class SXSSFPicture implements Picture {
|
|||
*/
|
||||
public XSSFClientAnchor getPreferredSize(double scale){
|
||||
XSSFClientAnchor anchor = getClientAnchor();
|
||||
if (anchor == null) {
|
||||
logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
|
||||
return null;
|
||||
}
|
||||
|
||||
XSSFPictureData data = getPictureData();
|
||||
Dimension size = getImageDimension(data.getPackagePart(), data.getPictureType());
|
||||
|
|
Loading…
Reference in New Issue