aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2015-03-19 23:44:23 +0000
committerAndreas Beeker <kiwiwings@apache.org>2015-03-19 23:44:23 +0000
commit9a85a2e76bc5317617119f8644c7c6303a0e97dd (patch)
tree58cc24d738e3ccb9059d3d13d9da1967080c1230 /src/ooxml/java
parent7afac11f67ef21f520dc7b2e797e36f432624222 (diff)
downloadpoi-9a85a2e76bc5317617119f8644c7c6303a0e97dd.tar.gz
poi-9a85a2e76bc5317617119f8644c7c6303a0e97dd.zip
Snapshot commit - still lots of errors, xslf rendering works, started work on hslf
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/common_sl@1667902 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java')
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java23
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java18
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShadow.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java37
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java39
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java63
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java4
11 files changed, 115 insertions, 99 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
index 57e96f8ee5..9a58a5128a 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
@@ -19,25 +19,19 @@
package org.apache.poi.xslf.usermodel;
-import java.awt.Graphics2D;
-import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
-import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.openxml4j.opc.TargetMode;
-import org.apache.poi.sl.usermodel.*;
+import org.apache.poi.openxml4j.opc.*;
+import org.apache.poi.sl.usermodel.PlaceableShape;
+import org.apache.poi.sl.usermodel.ShapeGroup;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Units;
import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.drawingml.x2006.main.*;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTConnector;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShapeNonVisual;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTShape;
+import org.openxmlformats.schemas.presentationml.x2006.main.*;
/**
* Represents a group shape that consists of many shapes grouped together.
@@ -45,7 +39,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape;
* @author Yegor Kozlov
*/
@Beta
-public class XSLFGroupShape extends XSLFShape implements XSLFShapeContainer, PlaceableShape {
+public class XSLFGroupShape extends XSLFShape implements XSLFShapeContainer, ShapeGroup<XSLFShape> {
private final List<XSLFShape> _shapes;
private final CTGroupShapeProperties _grpSpPr;
private XSLFDrawing _drawing;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
index 62f9cc4ad6..a953e2013e 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
@@ -17,20 +17,19 @@
package org.apache.poi.xslf.usermodel;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.usermodel.Notes;
-import org.apache.poi.sl.usermodel.TextRun;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTNotesSlide;
-import org.openxmlformats.schemas.presentationml.x2006.main.NotesDocument;
+import org.openxmlformats.schemas.presentationml.x2006.main.*;
@Beta
-public final class XSLFNotes extends XSLFSheet implements Notes<XSLFShape> {
+public final class XSLFNotes extends XSLFSheet implements Notes<XSLFShape,XMLSlideShow> {
private CTNotesSlide _notes;
/**
@@ -91,19 +90,15 @@ public final class XSLFNotes extends XSLFSheet implements Notes<XSLFShape> {
return null;
}
- public TextRun getTextRun() {
+ @Override
+ public List<XSLFTextParagraph> getTextParagraphs() {
+ List<XSLFTextParagraph> tp = new ArrayList<XSLFTextParagraph>();
for (XSLFShape sh : super.getShapes()) {
if (sh instanceof XSLFTextShape) {
XSLFTextShape txt = (XSLFTextShape)sh;
- for (XSLFTextParagraph p : txt.getTextParagraphs()) {
- for (XSLFTextRun r : p.getTextRuns()) {
- return r;
- }
- }
+ tp.addAll(txt.getTextParagraphs());
}
}
- return null;
+ return tp;
}
-
-
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
index c5de537677..aeea5cc521 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
@@ -47,7 +47,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.NotesMasterDocument;
* @author Yegor Kozlov
*/
@Beta
- public class XSLFNotesMaster extends XSLFSheet implements MasterSheet<XSLFShape> {
+ public class XSLFNotesMaster extends XSLFSheet implements MasterSheet<XSLFShape,XMLSlideShow> {
private CTNotesMaster _slide;
private XSLFTheme _theme;
@@ -94,7 +94,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.NotesMasterDocument;
}
@Override
- public MasterSheet getMasterSheet() {
+ public MasterSheet<XSLFShape,XMLSlideShow> getMasterSheet() {
return null;
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
index d0f75e0535..b815e00d42 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
@@ -19,7 +19,6 @@
package org.apache.poi.xslf.usermodel;
-import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
@@ -32,27 +31,18 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
+import org.apache.poi.sl.usermodel.PictureShape;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtension;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTRelativeRect;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
-import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTPictureNonVisual;
+import org.openxmlformats.schemas.drawingml.x2006.main.*;
+import org.openxmlformats.schemas.presentationml.x2006.main.*;
/**
* Represents a picture shape
*/
@Beta
-public class XSLFPictureShape extends XSLFSimpleShape {
+public class XSLFPictureShape extends XSLFSimpleShape implements PictureShape {
private XSLFPictureData _data;
/*package*/ XSLFPictureShape(CTPicture shape, XSLFSheet sheet) {
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShadow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShadow.java
index 9004a6be5f..0b0e4f0aad 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShadow.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShadow.java
@@ -88,7 +88,7 @@ public class XSLFShadow extends XSLFShape implements Shadow {
*/
public Color getFillColor() {
SolidPaint ps = getFillStyle();
- if (ps == TRANSPARENT_PAINT) return null;
+ if (ps == PaintStyle.TRANSPARENT_PAINT) return null;
Color col = DrawPaint.applyColorTransform(ps.getSolidColor());
return col;
}
@@ -97,7 +97,7 @@ public class XSLFShadow extends XSLFShape implements Shadow {
public SolidPaint getFillStyle() {
XSLFTheme theme = getSheet().getTheme();
CTOuterShadowEffect ct = (CTOuterShadowEffect)getXmlObject();
- if(ct == null) return TRANSPARENT_PAINT;
+ if(ct == null) return PaintStyle.TRANSPARENT_PAINT;
CTSchemeColor phClr = ct.getSchemeClr();
final XSLFColor xc = new XSLFColor(ct, theme, phClr);
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java
index 5634838302..0f2ba25834 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java
@@ -19,7 +19,6 @@
package org.apache.poi.xslf.usermodel;
-import java.awt.Color;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
@@ -28,7 +27,6 @@ import java.util.Comparator;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.sl.draw.DrawPaint;
import org.apache.poi.sl.usermodel.*;
import org.apache.poi.sl.usermodel.PaintStyle.GradientPaint;
import org.apache.poi.sl.usermodel.PaintStyle.SolidPaint;
@@ -56,19 +54,6 @@ public abstract class XSLFShape implements Shape {
private CTNonVisualDrawingProps _nvPr;
private CTPlaceholder _ph;
- protected static final SolidPaint TRANSPARENT_PAINT = new SolidPaint() {
- public ColorStyle getSolidColor() {
- return new ColorStyle(){
- public Color getColor() { return DrawPaint.NO_PAINT; }
- public int getAlpha() { return -1; }
- public int getLumOff() { return -1; }
- public int getLumMod() { return -1; }
- public int getShade() { return -1; }
- public int getTint() { return -1; }
- };
- }
- };
-
protected XSLFShape(XmlObject shape, XSLFSheet sheet) {
_shape = shape;
_sheet = sheet;
@@ -146,7 +131,7 @@ public abstract class XSLFShape implements Shape {
try {
pr = shape.getSpPr();
if (((CTShapeProperties)pr).isSetNoFill()) {
- setValue(TRANSPARENT_PAINT);
+ setValue(PaintStyle.TRANSPARENT_PAINT);
return true;
}
} catch (IllegalStateException e) {}
@@ -158,7 +143,7 @@ public abstract class XSLFShape implements Shape {
pr = shape.getGrpSpPr();
}
if (pr == null) {
- setValue(TRANSPARENT_PAINT);
+ setValue(PaintStyle.TRANSPARENT_PAINT);
return true;
}
@@ -190,7 +175,7 @@ public abstract class XSLFShape implements Shape {
fillRef = getBgRef();
}
if (fillRef == null) {
- return TRANSPARENT_PAINT;
+ return PaintStyle.TRANSPARENT_PAINT;
}
// The idx attribute refers to the index of a fill style or
@@ -213,21 +198,21 @@ public abstract class XSLFShape implements Shape {
paint = selectPaint(fillProps, phClr, sheet.getPackagePart());
}
- return paint == null ? TRANSPARENT_PAINT : paint;
+ return paint == null ? PaintStyle.TRANSPARENT_PAINT : paint;
}
protected CTBackgroundProperties getBgPr() {
- String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:bgPr";
+ String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' p:bgPr";
return selectProperty(CTBackgroundProperties.class, xquery);
}
protected CTStyleMatrixReference getBgRef() {
- String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:bgRef";
+ String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' p:bgRef";
return selectProperty(CTStyleMatrixReference.class, xquery);
}
protected CTGroupShapeProperties getGrpSpPr() {
- String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:grpSpPr";
+ String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' p:grpSpPr";
return selectProperty(CTGroupShapeProperties.class, xquery);
}
@@ -241,7 +226,7 @@ public abstract class XSLFShape implements Shape {
protected CTShapeProperties getSpPr() {
if (_spPr == null) {
- String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:spPr";
+ String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' p:spPr";
_spPr = selectProperty(CTShapeProperties.class, xquery);
}
if (_spPr == null) {
@@ -252,7 +237,7 @@ public abstract class XSLFShape implements Shape {
protected CTShapeStyle getSpStyle() {
if (_spStyle == null) {
- String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:style";
+ String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' p:style";
_spStyle = selectProperty(CTShapeStyle.class, xquery);
}
return _spStyle;
@@ -348,7 +333,7 @@ public abstract class XSLFShape implements Shape {
paint = selectPaint(obj, phClr, pp);
if(paint != null) break;
}
- return paint == null ? TRANSPARENT_PAINT : paint;
+ return paint == null ? PaintStyle.TRANSPARENT_PAINT : paint;
}
/**
@@ -373,7 +358,7 @@ public abstract class XSLFShape implements Shape {
*/
protected PaintStyle selectPaint(XmlObject obj, final CTSchemeColor phClr, final PackagePart parentPart) {
if (obj instanceof CTNoFillProperties) {
- return TRANSPARENT_PAINT;
+ return PaintStyle.TRANSPARENT_PAINT;
} else if (obj instanceof CTSolidColorFillProperties) {
return selectPaint((CTSolidColorFillProperties)obj, phClr, parentPart);
} else if (obj instanceof CTBlipFillProperties) {
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
index 163d8a65aa..38dea1b462 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
@@ -37,7 +37,7 @@ import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelations
import org.openxmlformats.schemas.presentationml.x2006.main.*;
@Beta
-public abstract class XSLFSheet extends POIXMLDocumentPart implements XSLFShapeContainer, Sheet<XSLFShape> {
+public abstract class XSLFSheet extends POIXMLDocumentPart implements XSLFShapeContainer, Sheet<XSLFShape, XMLSlideShow> {
private XSLFCommonSlideData _commonSlideData;
private XSLFDrawing _drawing;
private List<XSLFShape> _shapes;
@@ -516,25 +516,26 @@ public abstract class XSLFSheet extends POIXMLDocumentPart implements XSLFShapeC
* Import a package part into this sheet.
*/
PackagePart importPart(PackageRelationship srcRel, PackagePart srcPafrt) {
-
- OPCPackage pkg = getPackagePart().getPackage();
- if(!pkg.containPart(srcPafrt.getPartName())){
- PackageRelationship rel = getPackagePart().addRelationship(
- srcPafrt.getPartName(), TargetMode.INTERNAL, srcRel.getRelationshipType());
-
- PackagePart part = pkg.createPart(srcPafrt.getPartName(), srcPafrt.getContentType());
- OutputStream out = part.getOutputStream();
- try {
- InputStream is = srcPafrt.getInputStream();
- IOUtils.copy(is, out);
- out.close();
- } catch (IOException e){
- throw new POIXMLException(e);
- }
- return part;
- } else {
+ PackagePart destPP = getPackagePart();
+ PackagePartName srcPPName = srcPafrt.getPartName();
+
+ OPCPackage pkg = destPP.getPackage();
+ if(pkg.containPart(srcPPName)){
// already exists
- return pkg.getPart(srcPafrt.getPartName());
+ return pkg.getPart(srcPPName);
+ }
+
+ destPP.addRelationship(srcPPName, TargetMode.INTERNAL, srcRel.getRelationshipType());
+
+ PackagePart part = pkg.createPart(srcPPName, srcPafrt.getContentType());
+ OutputStream out = part.getOutputStream();
+ try {
+ InputStream is = srcPafrt.getInputStream();
+ IOUtils.copy(is, out);
+ out.close();
+ } catch (IOException e){
+ throw new POIXMLException(e);
}
+ return part;
}
} \ No newline at end of file
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
index ffe0fc823d..fb97180605 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
@@ -19,19 +19,21 @@
package org.apache.poi.xslf.usermodel;
+import static org.apache.poi.sl.usermodel.PaintStyle.TRANSPARENT_PAINT;
+
import java.awt.Color;
import java.awt.geom.Rectangle2D;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.apache.poi.sl.draw.DrawPaint;
import org.apache.poi.sl.draw.geom.*;
import org.apache.poi.sl.usermodel.*;
import org.apache.poi.sl.usermodel.LineDecoration.DecorationShape;
import org.apache.poi.sl.usermodel.LineDecoration.DecorationSize;
import org.apache.poi.sl.usermodel.PaintStyle.SolidPaint;
import org.apache.poi.sl.usermodel.StrokeStyle.LineCap;
+import org.apache.poi.sl.usermodel.StrokeStyle.LineCompound;
import org.apache.poi.sl.usermodel.StrokeStyle.LineDash;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Units;
@@ -208,8 +210,7 @@ public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape {
PaintStyle ps = getLinePaint();
if (ps == null || ps == TRANSPARENT_PAINT) return null;
if (ps instanceof SolidPaint) {
- Color col = ((SolidPaint)ps).getSolidColor().getColor();
- return (col == DrawPaint.NO_PAINT) ? null : col;
+ return ((SolidPaint)ps).getSolidColor().getColor();
}
return null;
}
@@ -273,7 +274,6 @@ public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape {
}
/**
- *
* @return line width in points. <code>0</code> means no line.
*/
public double getLineWidth() {
@@ -311,6 +311,54 @@ public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape {
}
/**
+ * @return the line compound
+ */
+ public LineCompound getLineCompound() {
+ PropertyFetcher<Integer> fetcher = new PropertyFetcher<Integer>() {
+ public boolean fetch(XSLFShape shape) {
+ CTShapeProperties spPr = shape.getSpPr();
+ CTLineProperties ln = spPr.getLn();
+ if (ln != null) {
+ STCompoundLine.Enum stCmpd = ln.getCmpd();
+ if (stCmpd != null) {
+ setValue(stCmpd.intValue());
+ return true;
+ }
+ }
+ return false;
+ }
+ };
+ fetchShapeProperty(fetcher);
+
+ Integer cmpd = fetcher.getValue();
+ if (cmpd == null) {
+ CTLineProperties defaultLn = getDefaultLineProperties();
+ if (defaultLn != null) {
+ STCompoundLine.Enum stCmpd = defaultLn.getCmpd();
+ if (stCmpd != null) {
+ cmpd = stCmpd.intValue();
+ }
+ }
+ }
+
+ if (cmpd == null) return null;
+
+ switch (cmpd) {
+ default:
+ case STCompoundLine.INT_SNG:
+ return LineCompound.SINGLE;
+ case STCompoundLine.INT_DBL:
+ return LineCompound.DOUBLE;
+ case STCompoundLine.INT_THICK_THIN:
+ return LineCompound.THICK_THIN;
+ case STCompoundLine.INT_THIN_THICK:
+ return LineCompound.THIN_THICK;
+ case STCompoundLine.INT_TRI:
+ return LineCompound.TRIPLE;
+ }
+ }
+
+ /**
*
* @param dash a preset line dashing scheme to stroke thr shape outline
*/
@@ -453,8 +501,7 @@ public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape {
PaintStyle ps = getFillPaint();
if (ps == null || ps == TRANSPARENT_PAINT) return null;
if (ps instanceof SolidPaint) {
- Color col = ((SolidPaint)ps).getSolidColor().getColor();
- return (col == DrawPaint.NO_PAINT) ? null : col;
+ return ((SolidPaint)ps).getSolidColor().getColor();
}
return null;
}
@@ -769,6 +816,10 @@ public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape {
public double getLineWidth() {
return XSLFSimpleShape.this.getLineWidth();
}
+
+ public LineCompound getLineCompound() {
+ return XSLFSimpleShape.this.getLineCompound();
+ }
};
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
index 795daa30b5..ee62ee9d79 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
@@ -29,7 +29,7 @@ import org.openxmlformats.schemas.drawingml.x2006.main.*;
import org.openxmlformats.schemas.presentationml.x2006.main.*;
@Beta
-public final class XSLFSlide extends XSLFSheet implements Slide<XSLFShape> {
+public final class XSLFSlide extends XSLFSheet implements Slide<XSLFShape, XMLSlideShow> {
private final CTSlide _slide;
private XSLFSlideLayout _layout;
private XSLFComments _comments;
@@ -245,7 +245,7 @@ public final class XSLFSlide extends XSLFSheet implements Slide<XSLFShape> {
throw new UnsupportedOperationException();
}
- public void setNotes(Notes<XSLFShape> notes) {
+ public void setNotes(Notes<XSLFShape,XMLSlideShow> notes) {
// TODO Auto-generated method stub
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
index bd6c38ca46..65487bd45b 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
@@ -31,7 +31,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.SldLayoutDocument;
import java.io.IOException;
@Beta
-public class XSLFSlideLayout extends XSLFSheet implements MasterSheet<XSLFShape> {
+public class XSLFSlideLayout extends XSLFSheet implements MasterSheet<XSLFShape, XMLSlideShow> {
private CTSlideLayout _layout;
private XSLFSlideMaster _master;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
index 0b64306fd1..830a531a24 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
@@ -54,7 +54,7 @@ import java.util.Map;
* @author Yegor Kozlov
*/
@Beta
- public class XSLFSlideMaster extends XSLFSheet implements MasterSheet<XSLFShape> {
+ public class XSLFSlideMaster extends XSLFSheet implements MasterSheet<XSLFShape, XMLSlideShow> {
private CTSlideMaster _slide;
private Map<String, XSLFSlideLayout> _layouts;
private XSLFTheme _theme;
@@ -83,7 +83,7 @@ import java.util.Map;
}
@Override
- public MasterSheet getMasterSheet() {
+ public MasterSheet<XSLFShape, XMLSlideShow> getMasterSheet() {
return null;
}