From: Andreas Beeker Date: Sun, 19 Jul 2015 19:00:32 +0000 (+0000) Subject: merge trunk to common sl branch X-Git-Tag: REL_3_13_FINAL~207^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89ab6304a47d06a3f16178e6d6c7451474200c8c;p=poi.git merge trunk to common sl branch git-svn-id: https://svn.apache.org/repos/asf/poi/branches/common_sl@1691843 13f79535-47bb-0310-9956-ffa450edef68 --- 89ab6304a47d06a3f16178e6d6c7451474200c8c diff --cc build.xml index 9fa34a84e1,ca705de4b5..d7b5482b48 --- a/build.xml +++ b/build.xml @@@ -697,39 -702,7 +709,39 @@@ under the License - + + + + + + + + + + + + + + + + + + + + + + + + - ++ + + + + + + + + >> extends DrawTextShape { ++ public DrawAutoShape(T shape) { ++ super(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawBackground.java index 0000000000,0000000000..35c844d8d0 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawBackground.java @@@ -1,0 -1,0 +1,60 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.*; ++import java.awt.geom.Rectangle2D; ++ ++import org.apache.poi.sl.usermodel.*; ++import org.apache.poi.sl.usermodel.Shape; ++ ++ ++public class DrawBackground extends DrawShape { ++ public DrawBackground(T shape) { ++ super(shape); ++ } ++ ++ public void draw(Graphics2D graphics) { ++ Dimension pg = shape.getSheet().getSlideShow().getPageSize(); ++ final Rectangle2D anchor = new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight()); ++ ++ PlaceableShape ps = new PlaceableShape(){ ++ public ShapeContainer getParent() { return null; } ++ public Rectangle2D getAnchor() { return anchor; } ++ public void setAnchor(Rectangle2D anchor) {} ++ public double getRotation() { return 0; } ++ public void setRotation(double theta) {} ++ public void setFlipHorizontal(boolean flip) {} ++ public void setFlipVertical(boolean flip) {} ++ public boolean getFlipHorizontal() { return false; } ++ public boolean getFlipVertical() { return false; } ++ }; ++ ++ DrawFactory drawFact = DrawFactory.getInstance(graphics); ++ DrawPaint dp = drawFact.getPaint(ps); ++ Paint fill = dp.getPaint(graphics, shape.getFillStyle().getPaint()); ++ Rectangle2D anchor2 = getAnchor(graphics, anchor); ++ ++ if(fill != null) { ++ graphics.setPaint(fill); ++ graphics.fill(anchor2); ++ } ++ } ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/DrawConnectorShape.java index 0000000000,0000000000..0fee07cf6d new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawConnectorShape.java @@@ -1,0 -1,0 +1,26 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++public class DrawConnectorShape extends DrawSimpleShape { ++ public DrawConnectorShape(T shape) { ++ super(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawFactory.java index 0000000000,0000000000..97b3f52147 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawFactory.java @@@ -1,0 -1,0 +1,148 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import static org.apache.poi.sl.draw.Drawable.DRAW_FACTORY; ++ ++import java.awt.Graphics2D; ++import java.awt.font.TextLayout; ++import java.text.AttributedString; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++public class DrawFactory { ++ protected static ThreadLocal defaultFactory = new ThreadLocal(); ++ ++ /** ++ * Set a custom draw factory for the current thread. ++ * This is a fallback, for operations where usercode can't set a graphics context. ++ * Preferably use the rendering hint {@link Drawable#DRAW_FACTORY} to set the factory. ++ * ++ * @param factory ++ */ ++ public static void setDefaultFactory(DrawFactory factory) { ++ defaultFactory.set(factory); ++ } ++ ++ public static DrawFactory getInstance(Graphics2D graphics) { ++ // first try to find the factory over the rendering hint ++ DrawFactory factory = null; ++ boolean isHint = false; ++ if (graphics != null) { ++ factory = (DrawFactory)graphics.getRenderingHint(DRAW_FACTORY); ++ isHint = (factory != null); ++ } ++ // secondly try the thread local default ++ if (factory == null) { ++ factory = defaultFactory.get(); ++ } ++ // and at last, use the default factory ++ if (factory == null) { ++ factory = new DrawFactory(); ++ } ++ if (graphics != null && !isHint) { ++ graphics.setRenderingHint(DRAW_FACTORY, factory); ++ } ++ return factory; ++ } ++ ++ @SuppressWarnings("unchecked") ++ public Drawable getDrawable(Shape shape) { ++ if (shape instanceof TextBox) { ++ return getDrawable((TextBox>)shape); ++ } else if (shape instanceof FreeformShape) { ++ return getDrawable((FreeformShape>)shape); ++ } else if (shape instanceof TextShape) { ++ return getDrawable((TextShape>)shape); ++ } else if (shape instanceof GroupShape) { ++ return getDrawable((GroupShape)shape); ++ } else if (shape instanceof PictureShape) { ++ return getDrawable((PictureShape)shape); ++ } else if (shape instanceof Background) { ++ return getDrawable((Background)shape); ++ } else if (shape instanceof ConnectorShape) { ++ return getDrawable((ConnectorShape)shape); ++ } else if (shape instanceof TableShape) { ++ return getDrawable((TableShape)shape); ++ } else if (shape instanceof Slide) { ++ return getDrawable((Slide>)shape); ++ } else if (shape instanceof MasterSheet) { ++ return getDrawable((MasterSheet)shape); ++ } else if (shape instanceof Sheet) { ++ return getDrawable((Sheet)shape); ++ } ++ ++ throw new IllegalArgumentException("Unsupported shape type: "+shape.getClass()); ++ } ++ ++ public >> DrawSlide getDrawable(T sheet) { ++ return new DrawSlide(sheet); ++ } ++ ++ public > DrawSheet getDrawable(T sheet) { ++ return new DrawSheet(sheet); ++ } ++ ++ public > DrawMasterSheet getDrawable(T sheet) { ++ return new DrawMasterSheet(sheet); ++ } ++ ++ public >> DrawTextBox getDrawable(T shape) { ++ return new DrawTextBox(shape); ++ } ++ ++ public >> DrawFreeformShape getDrawable(T shape) { ++ return new DrawFreeformShape(shape); ++ } ++ ++ public DrawConnectorShape getDrawable(T shape) { ++ return new DrawConnectorShape(shape); ++ } ++ ++ public DrawTableShape getDrawable(T shape) { ++ return new DrawTableShape(shape); ++ } ++ ++ public >> DrawTextShape getDrawable(T shape) { ++ return new DrawTextShape(shape); ++ } ++ ++ public > DrawGroupShape getDrawable(T shape) { ++ return new DrawGroupShape(shape); ++ } ++ ++ public DrawPictureShape getDrawable(T shape) { ++ return new DrawPictureShape(shape); ++ } ++ ++ public DrawTextParagraph getDrawable(TextParagraph paragraph) { ++ return new DrawTextParagraph(paragraph); ++ } ++ ++ public DrawBackground getDrawable(T shape) { ++ return new DrawBackground(shape); ++ } ++ ++ public DrawTextFragment getTextFragment(TextLayout layout, AttributedString str) { ++ return new DrawTextFragment(layout, str); ++ } ++ ++ public DrawPaint getPaint(PlaceableShape shape) { ++ return new DrawPaint(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawFontManager.java index 0000000000,0000000000..9c49489ffc new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawFontManager.java @@@ -1,0 -1,0 +1,38 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw; ++ ++/** ++ * Manages fonts when rendering slides. ++ * ++ * Use this class to handle unknown / missing fonts or to substitute fonts ++ */ ++public interface DrawFontManager { ++ ++ /** ++ * select a font to be used to paint text ++ * ++ * @param typeface the font family as defined in the .pptx file. ++ * This can be unknown or missing in the graphic environment. ++ * ++ * @return the font to be used to paint text ++ */ ++ String getRendererableFont(String typeface, int pitchFamily); ++} diff --cc src/java/org/apache/poi/sl/draw/DrawFreeformShape.java index 0000000000,0000000000..b8dd7c3f20 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawFreeformShape.java @@@ -1,0 -1,0 +1,26 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++public class DrawFreeformShape>> extends DrawAutoShape { ++ public DrawFreeformShape(T shape) { ++ super(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawGroupShape.java index 0000000000,0000000000..60af5f710e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawGroupShape.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.geom.AffineTransform; ++import java.awt.geom.Rectangle2D; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++ ++public class DrawGroupShape> extends DrawShape implements Drawable { ++ ++ public DrawGroupShape(T shape) { ++ super(shape); ++ } ++ ++ public void draw(Graphics2D graphics) { ++ ++ // the coordinate system of this group of shape ++ Rectangle2D interior = shape.getInteriorAnchor(); ++ // anchor of this group relative to the parent shape ++ Rectangle2D exterior = shape.getAnchor(); ++ ++ AffineTransform tx = (AffineTransform)graphics.getRenderingHint(Drawable.GROUP_TRANSFORM); ++ AffineTransform tx0 = new AffineTransform(tx); ++ ++ double scaleX = interior.getWidth() == 0. ? 1.0 : exterior.getWidth() / interior.getWidth(); ++ double scaleY = interior.getHeight() == 0. ? 1.0 : exterior.getHeight() / interior.getHeight(); ++ ++ tx.translate(exterior.getX(), exterior.getY()); ++ tx.scale(scaleX, scaleY); ++ tx.translate(-interior.getX(), -interior.getY()); ++ ++ DrawFactory drawFact = DrawFactory.getInstance(graphics); ++ AffineTransform at2 = graphics.getTransform(); ++ ++ for (Shape child : shape) { ++ // remember the initial transform and restore it after we are done with the drawing ++ AffineTransform at = graphics.getTransform(); ++ graphics.setRenderingHint(Drawable.GSAVE, true); ++ ++ Drawable draw = drawFact.getDrawable(child); ++ draw.applyTransform(graphics); ++ draw.draw(graphics); ++ ++ // restore the coordinate system ++ graphics.setTransform(at); ++ graphics.setRenderingHint(Drawable.GRESTORE, true); ++ } ++ ++ graphics.setTransform(at2); ++ graphics.setRenderingHint(Drawable.GROUP_TRANSFORM, tx0); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawMasterSheet.java index 0000000000,0000000000..6b5d0781df new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawMasterSheet.java @@@ -1,0 -1,0 +1,38 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++ ++public class DrawMasterSheet> extends DrawSheet { ++ ++ public DrawMasterSheet(T sheet) { ++ super(sheet); ++ } ++ ++ /** ++ * Checks if this sheet displays the specified shape. ++ * ++ * Subclasses can override it and skip certain shapes from drawings, ++ * for instance, slide masters and layouts don't display placeholders ++ */ ++ protected boolean canDraw(Shape shape){ ++ return !(shape instanceof SimpleShape) || !((SimpleShape)shape).isPlaceholder(); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawPaint.java index 0000000000,0000000000..16562b82a0 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawPaint.java @@@ -1,0 -1,0 +1,444 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import static org.apache.poi.sl.usermodel.PaintStyle.TRANSPARENT_PAINT; ++ ++import java.awt.*; ++import java.awt.MultipleGradientPaint.ColorSpaceType; ++import java.awt.MultipleGradientPaint.CycleMethod; ++import java.awt.geom.*; ++import java.io.IOException; ++import java.io.InputStream; ++ ++import org.apache.poi.sl.usermodel.*; ++import org.apache.poi.sl.usermodel.PaintStyle.GradientPaint; ++import org.apache.poi.sl.usermodel.PaintStyle.SolidPaint; ++import org.apache.poi.sl.usermodel.PaintStyle.TexturePaint; ++import org.apache.poi.util.POILogFactory; ++import org.apache.poi.util.POILogger; ++ ++ ++/** ++ * This class handles color transformations ++ * ++ * @see HSL code taken from Java Tips Weblog ++ */ ++public class DrawPaint { ++ // HSL code is public domain - see https://tips4java.wordpress.com/contact-us/ ++ ++ private final static POILogger LOG = POILogFactory.getLogger(DrawPaint.class); ++ ++ protected PlaceableShape shape; ++ ++ public DrawPaint(PlaceableShape shape) { ++ this.shape = shape; ++ } ++ ++ public static SolidPaint createSolidPaint(final Color color) { ++ return new SolidPaint() { ++ public ColorStyle getSolidColor() { ++ return new ColorStyle(){ ++ public Color getColor() { return color; } ++ 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; } ++ }; ++ } ++ }; ++ } ++ ++ public Paint getPaint(Graphics2D graphics, PaintStyle paint) { ++ if (paint instanceof SolidPaint) { ++ return getSolidPaint((SolidPaint)paint, graphics); ++ } else if (paint instanceof GradientPaint) { ++ return getGradientPaint((GradientPaint)paint, graphics); ++ } else if (paint instanceof TexturePaint) { ++ return getTexturePaint((TexturePaint)paint, graphics); ++ } ++ return null; ++ } ++ ++ protected Paint getSolidPaint(SolidPaint fill, Graphics2D graphics) { ++ return applyColorTransform(fill.getSolidColor()); ++ } ++ ++ protected Paint getGradientPaint(GradientPaint fill, Graphics2D graphics) { ++ switch (fill.getGradientType()) { ++ case linear: ++ return createLinearGradientPaint(fill, graphics); ++ case circular: ++ return createRadialGradientPaint(fill, graphics); ++ case shape: ++ return createPathGradientPaint(fill, graphics); ++ default: ++ throw new UnsupportedOperationException("gradient fill of type "+fill+" not supported."); ++ } ++ } ++ ++ protected Paint getTexturePaint(TexturePaint fill, Graphics2D graphics) { ++ InputStream is = fill.getImageData(); ++ if (is == null) return TRANSPARENT_PAINT.getSolidColor().getColor(); ++ assert(graphics != null); ++ ++ ImageRenderer renderer = (ImageRenderer)graphics.getRenderingHint(Drawable.IMAGE_RENDERER); ++ if (renderer == null) renderer = new ImageRenderer(); ++ ++ try { ++ renderer.loadImage(fill.getImageData(), fill.getContentType()); ++ } catch (IOException e) { ++ LOG.log(POILogger.ERROR, "Can't load image data - using transparent color", e); ++ return TRANSPARENT_PAINT.getSolidColor().getColor(); ++ } ++ ++ int alpha = fill.getAlpha(); ++ if (alpha != -1) { ++ renderer.setAlpha(alpha/100000.f); ++ } ++ ++ Dimension dim = renderer.getDimension(); ++ Rectangle2D textAnchor = new Rectangle2D.Double(0, 0, dim.getWidth(), dim.getHeight()); ++ Paint paint = new java.awt.TexturePaint(renderer.getImage(), textAnchor); ++ ++ return paint; ++ } ++ ++ /** ++ * Convert color transformations in {@link ColorStyle} to a {@link Color} instance ++ */ ++ public static Color applyColorTransform(ColorStyle color){ ++ Color result = color.getColor(); ++ ++ if (result == null || color.getAlpha() == 100) { ++ return TRANSPARENT_PAINT.getSolidColor().getColor(); ++ } ++ ++ result = applyAlpha(result, color); ++ result = applyLuminance(result, color); ++ result = applyShade(result, color); ++ result = applyTint(result, color); ++ ++ return result; ++ } ++ ++ protected static Color applyAlpha(Color c, ColorStyle fc) { ++ int alpha = c.getAlpha(); ++ return (alpha == 255) ? c : new Color(c.getRed(), c.getGreen(), c.getBlue(), alpha); ++ } ++ ++ /** ++ * Apply lumMod / lumOff adjustments ++ * ++ * @param c the color to modify ++ * @param lumMod luminance modulation in the range [0..100000] ++ * @param lumOff luminance offset in the range [0..100000] ++ * @return modified color ++ * ++ * @see Using Office Open XML to Customize Document Formatting in the 2007 Office System ++ */ ++ protected static Color applyLuminance(Color c, ColorStyle fc) { ++ int lumMod = fc.getLumMod(); ++ if (lumMod == -1) lumMod = 100000; ++ ++ int lumOff = fc.getLumOff(); ++ if (lumOff == -1) lumOff = 0; ++ ++ if (lumMod == 100000 && lumOff == 0) return c; ++ ++ // The lumMod value is the percent luminance. A lumMod value of "60000", ++ // is 60% of the luminance of the original color. ++ // When the color is a shade of the original theme color, the lumMod ++ // attribute is the only one of the tags shown here that appears. ++ // The tag appears after the tag when the color is a ++ // tint of the original. The lumOff value always equals 1-lumMod, which is used in the tint calculation ++ // ++ // Despite having different ways to display the tint and shade percentages, ++ // all of the programs use the same method to calculate the resulting color. ++ // Convert the original RGB value to HSL ... and then adjust the luminance (L) ++ // with one of the following equations before converting the HSL value back to RGB. ++ // (The % tint in the following equations refers to the tint, themetint, themeshade, ++ // or lumMod values, as applicable.) ++ // ++ // For a shade, the equation is luminance * %tint. ++ // ++ // For a tint, the equation is luminance * %tint + (1-%tint). ++ // (Note that 1-%tint is equal to the lumOff value in DrawingML.) ++ ++ double fLumOff = lumOff / 100000d; ++ double fLumMod = lumMod / 100000d; ++ ++ double hsl[] = RGB2HSL(c); ++ hsl[2] = hsl[2]*fLumMod+fLumOff; ++ ++ Color c2 = HSL2RGB(hsl[0], hsl[1], hsl[2], c.getAlpha()/255d); ++ return c2; ++ } ++ ++ /** ++ * This algorithm returns result different from PowerPoint. ++ * TODO: revisit and improve ++ */ ++ protected static Color applyShade(Color c, ColorStyle fc) { ++ int shade = fc.getShade(); ++ if (shade == -1) return c; ++ ++ float fshade = shade / 100000.f; ++ ++ float red = c.getRed() * fshade; ++ float green = c.getGreen() * fshade; ++ float blue = c.getGreen() * fshade; ++ ++ return new Color(Math.round(red), Math.round(green), Math.round(blue), c.getAlpha()); ++ } ++ ++ /** ++ * This algorithm returns result different from PowerPoint. ++ * TODO: revisit and improve ++ */ ++ protected static Color applyTint(Color c, ColorStyle fc) { ++ int tint = fc.getTint(); ++ if (tint == -1) return c; ++ ++ float ftint = tint / 100000.f; ++ ++ float red = ftint * c.getRed() + (1.f - ftint) * 255.f; ++ float green = ftint * c.getGreen() + (1.f - ftint) * 255.f; ++ float blue = ftint * c.getBlue() + (1.f - ftint) * 255.f; ++ ++ return new Color(Math.round(red), Math.round(green), Math.round(blue), c.getAlpha()); ++ } ++ ++ ++ protected Paint createLinearGradientPaint(GradientPaint fill, Graphics2D graphics) { ++ double angle = fill.getGradientAngle(); ++ Rectangle2D anchor = DrawShape.getAnchor(graphics, shape); ++ ++ AffineTransform at = AffineTransform.getRotateInstance( ++ Math.toRadians(angle), ++ anchor.getX() + anchor.getWidth() / 2, ++ anchor.getY() + anchor.getHeight() / 2); ++ ++ double diagonal = Math.sqrt(anchor.getHeight() * anchor.getHeight() + anchor.getWidth() * anchor.getWidth()); ++ Point2D p1 = new Point2D.Double(anchor.getX() + anchor.getWidth() / 2 - diagonal / 2, ++ anchor.getY() + anchor.getHeight() / 2); ++ p1 = at.transform(p1, null); ++ ++ Point2D p2 = new Point2D.Double(anchor.getX() + anchor.getWidth(), anchor.getY() + anchor.getHeight() / 2); ++ p2 = at.transform(p2, null); ++ ++ snapToAnchor(p1, anchor); ++ snapToAnchor(p2, anchor); ++ ++ float[] fractions = fill.getGradientFractions(); ++ Color[] colors = new Color[fractions.length]; ++ ++ int i = 0; ++ for (ColorStyle fc : fill.getGradientColors()) { ++ colors[i++] = applyColorTransform(fc); ++ } ++ ++ AffineTransform grAt = new AffineTransform(); ++ if(fill.isRotatedWithShape()) { ++ double rotation = shape.getRotation(); ++ if (rotation != 0.) { ++ double centerX = anchor.getX() + anchor.getWidth() / 2; ++ double centerY = anchor.getY() + anchor.getHeight() / 2; ++ ++ grAt.translate(centerX, centerY); ++ grAt.rotate(Math.toRadians(-rotation)); ++ grAt.translate(-centerX, -centerY); ++ } ++ } ++ ++ return new LinearGradientPaint ++ (p1, p2, fractions, colors, CycleMethod.NO_CYCLE, ColorSpaceType.SRGB, grAt); ++ } ++ ++ protected Paint createRadialGradientPaint(GradientPaint fill, Graphics2D graphics) { ++ Rectangle2D anchor = DrawShape.getAnchor(graphics, shape); ++ ++ Point2D pCenter = new Point2D.Double(anchor.getX() + anchor.getWidth()/2, ++ anchor.getY() + anchor.getHeight()/2); ++ ++ float radius = (float)Math.max(anchor.getWidth(), anchor.getHeight()); ++ ++ float[] fractions = fill.getGradientFractions(); ++ Color[] colors = new Color[fractions.length]; ++ ++ int i=0; ++ for (ColorStyle fc : fill.getGradientColors()) { ++ colors[i++] = applyColorTransform(fc); ++ } ++ ++ return new RadialGradientPaint(pCenter, radius, fractions, colors); ++ } ++ ++ protected Paint createPathGradientPaint(GradientPaint fill, Graphics2D graphics) { ++ // currently we ignore an eventually center setting ++ ++ float[] fractions = fill.getGradientFractions(); ++ Color[] colors = new Color[fractions.length]; ++ ++ int i=0; ++ for (ColorStyle fc : fill.getGradientColors()) { ++ colors[i++] = applyColorTransform(fc); ++ } ++ ++ return new PathGradientPaint(colors, fractions); ++ } ++ ++ protected void snapToAnchor(Point2D p, Rectangle2D anchor) { ++ if (p.getX() < anchor.getX()) { ++ p.setLocation(anchor.getX(), p.getY()); ++ } else if (p.getX() > (anchor.getX() + anchor.getWidth())) { ++ p.setLocation(anchor.getX() + anchor.getWidth(), p.getY()); ++ } ++ ++ if (p.getY() < anchor.getY()) { ++ p.setLocation(p.getX(), anchor.getY()); ++ } else if (p.getY() > (anchor.getY() + anchor.getHeight())) { ++ p.setLocation(p.getX(), anchor.getY() + anchor.getHeight()); ++ } ++ } ++ ++ /** ++ * Convert HSL values to a RGB Color. ++ * ++ * @param h Hue is specified as degrees in the range 0 - 360. ++ * @param s Saturation is specified as a percentage in the range 1 - 100. ++ * @param l Luminance is specified as a percentage in the range 1 - 100. ++ * @param alpha the alpha value between 0 - 1 ++ * ++ * @returns the RGB Color object ++ */ ++ private static Color HSL2RGB(double h, double s, double l, double alpha) { ++ if (s <0.0f || s > 100.0f) { ++ String message = "Color parameter outside of expected range - Saturation"; ++ throw new IllegalArgumentException( message ); ++ } ++ ++ if (l <0.0f || l > 100.0f) { ++ String message = "Color parameter outside of expected range - Luminance"; ++ throw new IllegalArgumentException( message ); ++ } ++ ++ if (alpha <0.0f || alpha > 1.0f) { ++ String message = "Color parameter outside of expected range - Alpha"; ++ throw new IllegalArgumentException( message ); ++ } ++ ++ // Formula needs all values between 0 - 1. ++ ++ h = h % 360.0f; ++ h /= 360f; ++ s /= 100f; ++ l /= 100f; ++ ++ double q = (l < 0.5d) ++ ? l * (1d + s) ++ : (l + s) - (s * l); ++ ++ double p = 2d * l - q; ++ ++ double r = Math.max(0, HUE2RGB(p, q, h + (1.0d / 3.0d))); ++ double g = Math.max(0, HUE2RGB(p, q, h)); ++ double b = Math.max(0, HUE2RGB(p, q, h - (1.0d / 3.0d))); ++ ++ r = Math.min(r, 1.0d); ++ g = Math.min(g, 1.0d); ++ b = Math.min(b, 1.0d); ++ ++ return new Color((float)r, (float)g, (float)b, (float)alpha); ++ } ++ ++ private static double HUE2RGB(double p, double q, double h) { ++ if (h < 0d) h += 1d; ++ ++ if (h > 1d) h -= 1d; ++ ++ if (6d * h < 1d) { ++ return p + ((q - p) * 6d * h); ++ } ++ ++ if (2d * h < 1d) { ++ return q; ++ } ++ ++ if (3d * h < 2d) { ++ return p + ( (q - p) * 6d * ((2.0d / 3.0d) - h) ); ++ } ++ ++ return p; ++ } ++ ++ ++ /** ++ * Convert a RGB Color to it corresponding HSL values. ++ * ++ * @return an array containing the 3 HSL values. ++ */ ++ private static double[] RGB2HSL(Color color) ++ { ++ // Get RGB values in the range 0 - 1 ++ ++ float[] rgb = color.getRGBColorComponents( null ); ++ double r = rgb[0]; ++ double g = rgb[1]; ++ double b = rgb[2]; ++ ++ // Minimum and Maximum RGB values are used in the HSL calculations ++ ++ double min = Math.min(r, Math.min(g, b)); ++ double max = Math.max(r, Math.max(g, b)); ++ ++ // Calculate the Hue ++ ++ double h = 0; ++ ++ if (max == min) { ++ h = 0; ++ } else if (max == r) { ++ h = ((60d * (g - b) / (max - min)) + 360d) % 360d; ++ } else if (max == g) { ++ h = (60d * (b - r) / (max - min)) + 120d; ++ } else if (max == b) { ++ h = (60d * (r - g) / (max - min)) + 240d; ++ } ++ ++ // Calculate the Luminance ++ ++ double l = (max + min) / 2d; ++ ++ // Calculate the Saturation ++ ++ double s = 0; ++ ++ if (max == min) { ++ s = 0; ++ } else if (l <= .5d) { ++ s = (max - min) / (max + min); ++ } else { ++ s = (max - min) / (2d - max - min); ++ } ++ ++ return new double[] {h, s * 100, l * 100}; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/DrawPictureShape.java index 0000000000,0000000000..3d00b4ec6b new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawPictureShape.java @@@ -1,0 -1,0 +1,54 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.Insets; ++import java.awt.geom.Rectangle2D; ++import java.io.IOException; ++ ++import org.apache.poi.sl.usermodel.PictureData; ++import org.apache.poi.sl.usermodel.PictureShape; ++ ++ ++public class DrawPictureShape extends DrawSimpleShape { ++ public DrawPictureShape(T shape) { ++ super(shape); ++ } ++ ++ @Override ++ public void drawContent(Graphics2D graphics) { ++ PictureData data = shape.getPictureData(); ++ if(data == null) return; ++ ++ ImageRenderer renderer = (ImageRenderer)graphics.getRenderingHint(Drawable.IMAGE_RENDERER); ++ if (renderer == null) renderer = new ImageRenderer(); ++ ++ Rectangle2D anchor = getAnchor(graphics, shape); ++ ++ Insets insets = shape.getClipping(); ++ ++ try { ++ renderer.loadImage(data.getData(), data.getContentType()); ++ renderer.drawImage(graphics, anchor, insets); ++ } catch (IOException e) { ++ // TODO: draw specific runtime exception? ++ throw new RuntimeException(e); ++ } ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawShape.java index 0000000000,0000000000..13ef4292a3 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawShape.java @@@ -1,0 -1,0 +1,143 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.geom.AffineTransform; ++import java.awt.geom.Rectangle2D; ++ ++import org.apache.poi.sl.usermodel.PlaceableShape; ++import org.apache.poi.sl.usermodel.Shape; ++ ++ ++public class DrawShape implements Drawable { ++ ++ protected final T shape; ++ ++ public DrawShape(T shape) { ++ this.shape = shape; ++ } ++ ++ /** ++ * Apply 2-D transforms before drawing this shape. This includes rotation and flipping. ++ * ++ * @param graphics the graphics whos transform matrix will be modified ++ */ ++ public void applyTransform(Graphics2D graphics) { ++ if (!(shape instanceof PlaceableShape)) return; ++ ++ PlaceableShape ps = (PlaceableShape)shape; ++ AffineTransform tx = (AffineTransform)graphics.getRenderingHint(Drawable.GROUP_TRANSFORM); ++ if (tx == null) tx = new AffineTransform(); ++ final Rectangle2D anchor = tx.createTransformedShape(ps.getAnchor()).getBounds2D(); ++ ++ // rotation ++ double rotation = ps.getRotation(); ++ if (rotation != 0.) { ++ // PowerPoint rotates shapes relative to the geometric center ++ double centerX = anchor.getCenterX(); ++ double centerY = anchor.getCenterY(); ++ ++ // normalize rotation ++ rotation %= 360.; ++ if (rotation < 0) rotation += 360.; ++ ++ int quadrant = (((int)rotation+45)/90)%4; ++ double scaleX = 1.0, scaleY = 1.0; ++ ++ // scale to bounding box (bug #53176) ++ if (quadrant == 1 || quadrant == 3) { ++ // In quadrant 1 and 3, which is basically a shape in a more or less portrait orientation ++ // (45-135 degrees and 225-315 degrees), we need to first rotate the shape by a multiple ++ // of 90 degrees and then resize the bounding box to its original bbox. After that we can ++ // rotate the shape to the exact rotation amount. ++ // It's strange that you'll need to rotate the shape back and forth again, but you can ++ // think of it, as if you paint the shape on a canvas. First you rotate the canvas, which might ++ // be already (differently) scaled, so you can paint the shape in its default orientation ++ // and later on, turn it around again to compare it with its original size ... ++ ++ AffineTransform txs; ++ if (ps.getClass().getCanonicalName().toLowerCase().contains("hslf")) { ++ txs = new AffineTransform(tx); ++ } else { ++ // this handling is only based on try and error ... not sure why xslf is handled differently. ++ txs = new AffineTransform(); ++ txs.translate(centerX, centerY); ++ txs.rotate(Math.PI/2.); // actually doesn't matter if +/- 90 degrees ++ txs.translate(-centerX, -centerY); ++ txs.concatenate(tx); ++ } ++ ++ txs.translate(centerX, centerY); ++ txs.rotate(Math.PI/2.); ++ txs.translate(-centerX, -centerY); ++ ++ Rectangle2D anchor2 = txs.createTransformedShape(ps.getAnchor()).getBounds2D(); ++ ++ scaleX = anchor.getWidth() == 0. ? 1.0 : anchor.getWidth() / anchor2.getWidth(); ++ scaleY = anchor.getHeight() == 0. ? 1.0 : anchor.getHeight() / anchor2.getHeight(); ++ } else { ++ quadrant = 0; ++ } ++ ++ // transformation is applied reversed ... ++ graphics.translate(centerX, centerY); ++ graphics.rotate(Math.toRadians(rotation-quadrant*90.)); ++ graphics.scale(scaleX, scaleY); ++ graphics.rotate(Math.toRadians(quadrant*90)); ++ graphics.translate(-centerX, -centerY); ++ } ++ ++ //flip horizontal ++ if (ps.getFlipHorizontal()) { ++ graphics.translate(anchor.getX() + anchor.getWidth(), anchor.getY()); ++ graphics.scale(-1, 1); ++ graphics.translate(-anchor.getX(), -anchor.getY()); ++ } ++ ++ //flip vertical ++ if (ps.getFlipVertical()) { ++ graphics.translate(anchor.getX(), anchor.getY() + anchor.getHeight()); ++ graphics.scale(1, -1); ++ graphics.translate(-anchor.getX(), -anchor.getY()); ++ } ++ } ++ ++ ++ public void draw(Graphics2D graphics) { ++ } ++ ++ public void drawContent(Graphics2D context) { ++ } ++ ++ public static Rectangle2D getAnchor(Graphics2D graphics, PlaceableShape shape) { ++ return getAnchor(graphics, shape.getAnchor()); ++ } ++ ++ public static Rectangle2D getAnchor(Graphics2D graphics, Rectangle2D anchor) { ++ if(graphics == null) { ++ return anchor; ++ } ++ ++ AffineTransform tx = (AffineTransform)graphics.getRenderingHint(Drawable.GROUP_TRANSFORM); ++ if(tx != null) { ++ anchor = tx.createTransformedShape(anchor).getBounds2D(); ++ } ++ return anchor; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawSheet.java index 0000000000,0000000000..e4c7e185e8 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawSheet.java @@@ -1,0 -1,0 +1,91 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Dimension; ++import java.awt.Color; ++import java.awt.Graphics2D; ++ ++import java.awt.geom.AffineTransform; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++ ++public class DrawSheet> implements Drawable { ++ ++ protected final T sheet; ++ ++ public DrawSheet(T sheet) { ++ this.sheet = sheet; ++ } ++ ++ public void draw(Graphics2D graphics) { ++ Dimension dim = sheet.getSlideShow().getPageSize(); ++ Color whiteTrans = new Color(1f,1f,1f,0f); ++ graphics.setColor(whiteTrans); ++ graphics.fillRect(0, 0, (int)dim.getWidth(), (int)dim.getHeight()); ++ ++ DrawFactory drawFact = DrawFactory.getInstance(graphics); ++ MasterSheet master = sheet.getMasterSheet(); ++ ++ if(sheet.getFollowMasterGraphics() && master != null) { ++ Drawable drawer = drawFact.getDrawable(master); ++ drawer.draw(graphics); ++ } ++ ++ graphics.setRenderingHint(Drawable.GROUP_TRANSFORM, new AffineTransform()); ++ ++ for (Shape shape : sheet.getShapes()) { ++ if(!canDraw(shape)) continue; ++ ++ // remember the initial transform and restore it after we are done with drawing ++ AffineTransform at = graphics.getTransform(); ++ ++ // concrete implementations can make sense of this hint, ++ // for example PSGraphics2D or PDFGraphics2D would call gsave() / grestore ++ graphics.setRenderingHint(Drawable.GSAVE, true); ++ ++ // apply rotation and flipping ++ Drawable drawer = drawFact.getDrawable(shape); ++ drawer.applyTransform(graphics); ++ // draw stuff ++ drawer.draw(graphics); ++ ++ // restore the coordinate system ++ graphics.setTransform(at); ++ ++ graphics.setRenderingHint(Drawable.GRESTORE, true); ++ } ++ } ++ ++ public void applyTransform(Graphics2D context) { ++ } ++ ++ public void drawContent(Graphics2D context) { ++ } ++ ++ /** ++ * Checks if this sheet displays the specified shape. ++ * ++ * Subclasses can override it and skip certain shapes from drawings, ++ * for instance, slide masters and layouts don't display placeholders ++ */ ++ protected boolean canDraw(Shape shape){ ++ return true; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawSimpleShape.java index 0000000000,0000000000..e674166090 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawSimpleShape.java @@@ -1,0 -1,0 +1,420 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.*; ++import java.awt.geom.*; ++import java.io.*; ++import java.nio.charset.Charset; ++import java.util.*; ++import java.util.List; ++ ++import javax.xml.bind.*; ++import javax.xml.stream.*; ++import javax.xml.stream.EventFilter; ++import javax.xml.stream.events.StartElement; ++import javax.xml.stream.events.XMLEvent; ++ ++import org.apache.poi.sl.draw.binding.CTCustomGeometry2D; ++import org.apache.poi.sl.draw.geom.*; ++import org.apache.poi.sl.usermodel.*; ++import org.apache.poi.sl.usermodel.LineDecoration.DecorationSize; ++import org.apache.poi.sl.usermodel.PaintStyle.SolidPaint; ++import org.apache.poi.sl.usermodel.StrokeStyle.*; ++import org.apache.poi.util.Units; ++ ++ ++public class DrawSimpleShape extends DrawShape { ++ ++ public DrawSimpleShape(T shape) { ++ super(shape); ++ } ++ ++ @Override ++ public void draw(Graphics2D graphics) { ++// RenderableShape rShape = new RenderableShape(this); ++// rShape.render(graphics); ++ ++ DrawPaint drawPaint = DrawFactory.getInstance(graphics).getPaint(shape); ++ Paint fill = drawPaint.getPaint(graphics, shape.getFillStyle().getPaint()); ++ Paint line = drawPaint.getPaint(graphics, shape.getStrokeStyle().getPaint()); ++ BasicStroke stroke = getStroke(); // the stroke applies both to the shadow and the shape ++ graphics.setStroke(stroke); ++ ++ Collection elems = computeOutlines(graphics); ++ ++ // first paint the shadow ++ drawShadow(graphics, elems, fill, line); ++ ++ // then fill the shape interior ++ if (fill != null) { ++ graphics.setPaint(fill); ++ for (Outline o : elems) { ++ if (o.getPath().isFilled()){ ++ java.awt.Shape s = o.getOutline(); ++ graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); ++ graphics.fill(s); ++ } ++ } ++ } ++ ++ // then draw any content within this shape (text, image, etc.) ++ drawContent(graphics); ++ ++ // then stroke the shape outline ++ if(line != null) { ++ graphics.setPaint(line); ++ for(Outline o : elems){ ++ if(o.getPath().isStroked()){ ++ java.awt.Shape s = o.getOutline(); ++ graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); ++ graphics.draw(s); ++ } ++ } ++ } ++ ++ // draw line decorations ++ drawDecoration(graphics, line, stroke); ++ } ++ ++ protected void drawDecoration(Graphics2D graphics, Paint line, BasicStroke stroke) { ++ if(line == null) return; ++ graphics.setPaint(line); ++ ++ List lst = new ArrayList(); ++ LineDecoration deco = shape.getLineDecoration(); ++ Outline head = getHeadDecoration(graphics, deco, stroke); ++ if (head != null) lst.add(head); ++ Outline tail = getTailDecoration(graphics, deco, stroke); ++ if (tail != null) lst.add(tail); ++ ++ ++ for(Outline o : lst){ ++ java.awt.Shape s = o.getOutline(); ++ Path p = o.getPath(); ++ graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); ++ ++ if(p.isFilled()) graphics.fill(s); ++ if(p.isStroked()) graphics.draw(s); ++ } ++ } ++ ++ protected Outline getTailDecoration(Graphics2D graphics, LineDecoration deco, BasicStroke stroke) { ++ DecorationSize tailLength = deco.getTailLength(); ++ DecorationSize tailWidth = deco.getTailWidth(); ++ ++ double lineWidth = Math.max(2.5, stroke.getLineWidth()); ++ ++ Rectangle2D anchor = getAnchor(graphics, shape); ++ double x2 = anchor.getX() + anchor.getWidth(), ++ y2 = anchor.getY() + anchor.getHeight(); ++ ++ double alpha = Math.atan(anchor.getHeight() / anchor.getWidth()); ++ ++ AffineTransform at = new AffineTransform(); ++ java.awt.Shape shape = null; ++ Path p = null; ++ Rectangle2D bounds; ++ double scaleY = Math.pow(2, tailWidth.ordinal()); ++ double scaleX = Math.pow(2, tailLength.ordinal()); ++ switch (deco.getTailShape()) { ++ case OVAL: ++ p = new Path(); ++ shape = new Ellipse2D.Double(0, 0, lineWidth * scaleX, lineWidth * scaleY); ++ bounds = shape.getBounds2D(); ++ at.translate(x2 - bounds.getWidth() / 2, y2 - bounds.getHeight() / 2); ++ at.rotate(alpha, bounds.getX() + bounds.getWidth() / 2, bounds.getY() + bounds.getHeight() / 2); ++ break; ++ case ARROW: ++ p = new Path(); ++ GeneralPath arrow = new GeneralPath(); ++ arrow.moveTo((float) (-lineWidth * 3), (float) (-lineWidth * 2)); ++ arrow.lineTo(0, 0); ++ arrow.lineTo((float) (-lineWidth * 3), (float) (lineWidth * 2)); ++ shape = arrow; ++ at.translate(x2, y2); ++ at.rotate(alpha); ++ break; ++ case TRIANGLE: ++ p = new Path(); ++ scaleY = tailWidth.ordinal() + 1; ++ scaleX = tailLength.ordinal() + 1; ++ GeneralPath triangle = new GeneralPath(); ++ triangle.moveTo((float) (-lineWidth * scaleX), (float) (-lineWidth * scaleY / 2)); ++ triangle.lineTo(0, 0); ++ triangle.lineTo((float) (-lineWidth * scaleX), (float) (lineWidth * scaleY / 2)); ++ triangle.closePath(); ++ shape = triangle; ++ at.translate(x2, y2); ++ at.rotate(alpha); ++ break; ++ default: ++ break; ++ } ++ ++ if (shape != null) { ++ shape = at.createTransformedShape(shape); ++ } ++ return shape == null ? null : new Outline(shape, p); ++ } ++ ++ Outline getHeadDecoration(Graphics2D graphics, LineDecoration deco, BasicStroke stroke) { ++ DecorationSize headLength = deco.getHeadLength(); ++ DecorationSize headWidth = deco.getHeadWidth(); ++ ++ double lineWidth = Math.max(2.5, stroke.getLineWidth()); ++ ++ Rectangle2D anchor = getAnchor(graphics, shape); ++ double x1 = anchor.getX(), ++ y1 = anchor.getY(); ++ ++ double alpha = Math.atan(anchor.getHeight() / anchor.getWidth()); ++ ++ AffineTransform at = new AffineTransform(); ++ java.awt.Shape shape = null; ++ Path p = null; ++ Rectangle2D bounds; ++ double scaleY = 1; ++ double scaleX = 1; ++ switch (deco.getHeadShape()) { ++ case OVAL: ++ p = new Path(); ++ shape = new Ellipse2D.Double(0, 0, lineWidth * scaleX, lineWidth * scaleY); ++ bounds = shape.getBounds2D(); ++ at.translate(x1 - bounds.getWidth() / 2, y1 - bounds.getHeight() / 2); ++ at.rotate(alpha, bounds.getX() + bounds.getWidth() / 2, bounds.getY() + bounds.getHeight() / 2); ++ break; ++ case STEALTH: ++ case ARROW: ++ p = new Path(false, true); ++ GeneralPath arrow = new GeneralPath(); ++ arrow.moveTo((float) (lineWidth * 3 * scaleX), (float) (-lineWidth * scaleY * 2)); ++ arrow.lineTo(0, 0); ++ arrow.lineTo((float) (lineWidth * 3 * scaleX), (float) (lineWidth * scaleY * 2)); ++ shape = arrow; ++ at.translate(x1, y1); ++ at.rotate(alpha); ++ break; ++ case TRIANGLE: ++ p = new Path(); ++ scaleY = headWidth.ordinal() + 1; ++ scaleX = headLength.ordinal() + 1; ++ GeneralPath triangle = new GeneralPath(); ++ triangle.moveTo((float) (lineWidth * scaleX), (float) (-lineWidth * scaleY / 2)); ++ triangle.lineTo(0, 0); ++ triangle.lineTo((float) (lineWidth * scaleX), (float) (lineWidth * scaleY / 2)); ++ triangle.closePath(); ++ shape = triangle; ++ at.translate(x1, y1); ++ at.rotate(alpha); ++ break; ++ default: ++ break; ++ } ++ ++ if (shape != null) { ++ shape = at.createTransformedShape(shape); ++ } ++ return shape == null ? null : new Outline(shape, p); ++ } ++ ++ public BasicStroke getStroke() { ++ StrokeStyle strokeStyle = shape.getStrokeStyle(); ++ ++ float lineWidth = (float) strokeStyle.getLineWidth(); ++ if (lineWidth == 0.0f) lineWidth = 0.25f; // Both PowerPoint and OOo draw zero-length lines as 0.25pt ++ ++ LineDash lineDash = strokeStyle.getLineDash(); ++ if (lineDash == null) { ++ lineDash = LineDash.SOLID; ++ } ++ ++ int dashPatI[] = lineDash.pattern; ++ final float dash_phase = 0; ++ float[] dashPatF = null; ++ if (dashPatI != null) { ++ dashPatF = new float[dashPatI.length]; ++ for (int i=0; i outlines ++ , Paint fill ++ , Paint line ++ ) { ++ Shadow shadow = shape.getShadow(); ++ if (shadow == null || (fill == null && line == null)) return; ++ ++ SolidPaint shadowPaint = shadow.getFillStyle(); ++ Color shadowColor = DrawPaint.applyColorTransform(shadowPaint.getSolidColor()); ++ ++ double shapeRotation = shape.getRotation(); ++ if(shape.getFlipVertical()) { ++ shapeRotation += 180; ++ } ++ double angle = shadow.getAngle() - shapeRotation; ++ double dist = shadow.getDistance(); ++ double dx = dist * Math.cos(Math.toRadians(angle)); ++ double dy = dist * Math.sin(Math.toRadians(angle)); ++ ++ graphics.translate(dx, dy); ++ ++ for(Outline o : outlines){ ++ java.awt.Shape s = o.getOutline(); ++ Path p = o.getPath(); ++ graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); ++ graphics.setPaint(shadowColor); ++ ++ if(fill != null && p.isFilled()){ ++ graphics.fill(s); ++ } else if (line != null && p.isStroked()) { ++ graphics.draw(s); ++ } ++ } ++ ++ graphics.translate(-dx, -dy); ++ } ++ ++ protected static CustomGeometry getCustomGeometry(String name) { ++ return getCustomGeometry(name, null); ++ } ++ ++ protected static CustomGeometry getCustomGeometry(String name, Graphics2D graphics) { ++ @SuppressWarnings("unchecked") ++ Map presets = (graphics == null) ++ ? null ++ : (Map)graphics.getRenderingHint(Drawable.PRESET_GEOMETRY_CACHE); ++ ++ if (presets == null) { ++ presets = new HashMap(); ++ if (graphics != null) { ++ graphics.setRenderingHint(Drawable.PRESET_GEOMETRY_CACHE, presets); ++ } ++ ++ String packageName = "org.apache.poi.sl.draw.binding"; ++ InputStream presetIS = Drawable.class.getResourceAsStream("presetShapeDefinitions.xml"); ++ Reader xml = new InputStreamReader( presetIS, Charset.forName("UTF-8") ); ++ ++ // StAX: ++ EventFilter startElementFilter = new EventFilter() { ++ @Override ++ public boolean accept(XMLEvent event) { ++ return event.isStartElement(); ++ } ++ }; ++ ++ try { ++ XMLInputFactory staxFactory = XMLInputFactory.newInstance(); ++ XMLEventReader staxReader = staxFactory.createXMLEventReader(xml); ++ XMLEventReader staxFiltRd = staxFactory.createFilteredReader(staxReader, startElementFilter); ++ // Ignore StartElement: ++ staxFiltRd.nextEvent(); ++ // JAXB: ++ JAXBContext jaxbContext = JAXBContext.newInstance(packageName); ++ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); ++ ++ while (staxFiltRd.peek() != null) { ++ StartElement evRoot = (StartElement)staxFiltRd.peek(); ++ String cusName = evRoot.getName().getLocalPart(); ++ // XMLEvent ev = staxReader.nextEvent(); ++ JAXBElement el = unmarshaller.unmarshal(staxReader, CTCustomGeometry2D.class); ++ CTCustomGeometry2D cusGeom = el.getValue(); ++ ++ presets.put(cusName, new CustomGeometry(cusGeom)); ++ } ++ } catch (Exception e) { ++ throw new RuntimeException("Unable to load preset geometries.", e); ++ } ++ } ++ ++ return presets.get(name); ++ } ++ ++ protected Collection computeOutlines(Graphics2D graphics) { ++ ++ List lst = new ArrayList(); ++ CustomGeometry geom = shape.getGeometry(); ++ if(geom == null) { ++ return lst; ++ } ++ ++ Rectangle2D anchor = getAnchor(graphics, shape); ++ for (Path p : geom) { ++ ++ double w = p.getW() == -1 ? anchor.getWidth() * Units.EMU_PER_POINT : p.getW(); ++ double h = p.getH() == -1 ? anchor.getHeight() * Units.EMU_PER_POINT : p.getH(); ++ ++ // the guides in the shape definitions are all defined relative to each other, ++ // so we build the path starting from (0,0). ++ final Rectangle2D pathAnchor = new Rectangle2D.Double(0,0,w,h); ++ ++ Context ctx = new Context(geom, pathAnchor, shape); ++ ++ java.awt.Shape gp = p.getPath(ctx); ++ ++ // translate the result to the canvas coordinates in points ++ AffineTransform at = new AffineTransform(); ++ at.translate(anchor.getX(), anchor.getY()); ++ ++ double scaleX, scaleY; ++ if (p.getW() != -1) { ++ scaleX = anchor.getWidth() / p.getW(); ++ } else { ++ scaleX = 1.0 / Units.EMU_PER_POINT; ++ } ++ if (p.getH() != -1) { ++ scaleY = anchor.getHeight() / p.getH(); ++ } else { ++ scaleY = 1.0 / Units.EMU_PER_POINT; ++ } ++ ++ at.scale(scaleX, scaleY); ++ ++ java.awt.Shape canvasShape = at.createTransformedShape(gp); ++ ++ lst.add(new Outline(canvasShape, p)); ++ } ++ ++ return lst; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/DrawSlide.java index 0000000000,0000000000..cfa316738e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawSlide.java @@@ -1,0 -1,0 +1,41 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++ ++public class DrawSlide>> extends DrawSheet { ++ ++ public DrawSlide(T slide) { ++ super(slide); ++ } ++ ++ public void draw(Graphics2D graphics) { ++ Background bg = sheet.getBackground(); ++ if(bg != null) { ++ DrawFactory drawFact = DrawFactory.getInstance(graphics); ++ Drawable db = drawFact.getDrawable(bg); ++ db.draw(graphics); ++ } ++ ++ super.draw(graphics); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawTableShape.java index 0000000000,0000000000..ceb6450d0b new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawTableShape.java @@@ -1,0 -1,0 +1,27 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++public class DrawTableShape extends DrawShape { ++ // to be implemented ... ++ public DrawTableShape(T shape) { ++ super(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawTextBox.java index 0000000000,0000000000..89d69223ff new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawTextBox.java @@@ -1,0 -1,0 +1,26 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import org.apache.poi.sl.usermodel.*; ++ ++public class DrawTextBox>> extends DrawAutoShape { ++ public DrawTextBox(T shape) { ++ super(shape); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/DrawTextFragment.java index 0000000000,0000000000..acb6b4c766 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawTextFragment.java @@@ -1,0 -1,0 +1,105 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.font.TextLayout; ++import java.text.*; ++ ++public class DrawTextFragment implements Drawable { ++ final TextLayout layout; ++ final AttributedString str; ++ double x, y; ++ ++ public DrawTextFragment(TextLayout layout, AttributedString str) { ++ this.layout = layout; ++ this.str = str; ++ } ++ ++ public void setPosition(double x, double y) { ++ // TODO: replace it, by applyTransform???? ++ this.x = x; ++ this.y = y; ++ } ++ ++ public void draw(Graphics2D graphics){ ++ if(str == null) { ++ return; ++ } ++ ++ double yBaseline = y + layout.getAscent(); ++ ++ Integer textMode = (Integer)graphics.getRenderingHint(Drawable.TEXT_RENDERING_MODE); ++ if(textMode != null && textMode == Drawable.TEXT_AS_SHAPES){ ++ layout.draw(graphics, (float)x, (float)yBaseline); ++ } else { ++ graphics.drawString(str.getIterator(), (float)x, (float)yBaseline ); ++ } ++ } ++ ++ public void applyTransform(Graphics2D graphics) { ++ } ++ ++ public void drawContent(Graphics2D graphics) { ++ } ++ ++ public TextLayout getLayout() { ++ return layout; ++ } ++ ++ public AttributedString getAttributedString() { ++ return str; ++ } ++ ++ /** ++ * @return full height of this text run which is sum of ascent, descent and leading ++ */ ++ public float getHeight(){ ++ double h = Math.ceil(layout.getAscent()) + Math.ceil(layout.getDescent()) + layout.getLeading(); ++ return (float)h; ++ } ++ ++ /** ++ * ++ * @return width if this text run ++ */ ++ public float getWidth(){ ++ return layout.getAdvance(); ++ } ++ ++ /** ++ * ++ * @return the string to be painted ++ */ ++ public String getString(){ ++ if (str == null) return ""; ++ ++ AttributedCharacterIterator it = str.getIterator(); ++ StringBuilder buf = new StringBuilder(); ++ for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) { ++ buf.append(c); ++ } ++ return buf.toString(); ++ } ++ ++ @Override ++ public String toString(){ ++ return "[" + getClass().getSimpleName() + "] " + getString(); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/DrawTextParagraph.java index 0000000000,0000000000..e2db501e85 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java @@@ -1,0 -1,0 +1,462 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Color; ++import java.awt.Graphics2D; ++import java.awt.font.*; ++import java.awt.geom.Rectangle2D; ++import java.text.*; ++import java.text.AttributedCharacterIterator.Attribute; ++import java.util.*; ++ ++import org.apache.poi.sl.usermodel.*; ++import org.apache.poi.sl.usermodel.TextParagraph.BulletStyle; ++import org.apache.poi.sl.usermodel.TextParagraph.TextAlign; ++import org.apache.poi.sl.usermodel.TextRun.TextCap; ++import org.apache.poi.util.Units; ++ ++public class DrawTextParagraph implements Drawable { ++ protected TextParagraph paragraph; ++ double x, y; ++ protected List lines = new ArrayList(); ++ protected String rawText; ++ protected DrawTextFragment bullet; ++ protected int autoNbrIdx = 0; ++ ++ /** ++ * the highest line in this paragraph. Used for line spacing. ++ */ ++ protected double maxLineHeight; ++ ++ public DrawTextParagraph(TextParagraph paragraph) { ++ this.paragraph = paragraph; ++ } ++ ++ public void setPosition(double x, double y) { ++ // TODO: replace it, by applyTransform???? ++ this.x = x; ++ this.y = y; ++ } ++ ++ public double getY() { ++ return y; ++ } ++ ++ /** ++ * Sets the auto numbering index of the handled paragraph ++ * @param index the auto numbering index ++ */ ++ public void setAutoNumberingIdx(int index) { ++ autoNbrIdx = index; ++ } ++ ++ public void draw(Graphics2D graphics){ ++ if (lines.isEmpty()) return; ++ ++ Insets2D insets = paragraph.getParentShape().getInsets(); ++ double leftInset = insets.left; ++ double rightInset = insets.right; ++ double penY = y; ++ ++ boolean firstLine = true; ++ int indentLevel = paragraph.getIndentLevel(); ++ Double leftMargin = paragraph.getLeftMargin(); ++ if (leftMargin == null) { ++ // if the marL attribute is omitted, then a value of 347663 is implied ++ leftMargin = Units.toPoints(347663*(indentLevel+1)); ++ } ++ Double indent = paragraph.getIndent(); ++ if (indent == null) { ++ indent = Units.toPoints(347663*indentLevel); ++ } ++ Double rightMargin = paragraph.getRightMargin(); ++ if (rightMargin == null) { ++ rightMargin = 0d; ++ } ++ ++ //The vertical line spacing ++ Double spacing = paragraph.getLineSpacing(); ++ if (spacing == null) spacing = 100d; ++ ++ for(DrawTextFragment line : lines){ ++ double penX; ++ ++ if(firstLine) { ++ if (!isEmptyParagraph()) { ++ // TODO: find out character style for empty, but bulleted/numbered lines ++ bullet = getBullet(graphics, line.getAttributedString().getIterator()); ++ } ++ ++ if (bullet != null){ ++ bullet.setPosition(x + indent, penY); ++ bullet.draw(graphics); ++ // don't let text overlay the bullet and advance by the bullet width ++ double bulletWidth = bullet.getLayout().getAdvance() + 1; ++ penX = x + Math.max(leftMargin, indent+bulletWidth); ++ } else { ++ penX = x + indent; ++ } ++ } else { ++ penX = x + leftMargin; ++ } ++ ++ Rectangle2D anchor = DrawShape.getAnchor(graphics, paragraph.getParentShape()); ++ ++ TextAlign ta = paragraph.getTextAlign(); ++ if (ta == null) ta = TextAlign.LEFT; ++ switch (ta) { ++ case CENTER: ++ penX += (anchor.getWidth() - leftMargin - line.getWidth() - leftInset - rightInset) / 2; ++ break; ++ case RIGHT: ++ penX += (anchor.getWidth() - line.getWidth() - leftInset - rightInset); ++ break; ++ default: ++ break; ++ } ++ ++ line.setPosition(penX, penY); ++ line.draw(graphics); ++ ++ if(spacing > 0) { ++ // If linespacing >= 0, then linespacing is a percentage of normal line height. ++ penY += spacing*0.01* line.getHeight(); ++ } else { ++ // negative value means absolute spacing in points ++ penY += -spacing; ++ } ++ ++ firstLine = false; ++ } ++ ++ y = penY - y; ++ } ++ ++ public float getFirstLineHeight() { ++ return (lines.isEmpty()) ? 0 : lines.get(0).getHeight(); ++ } ++ ++ public float getLastLineHeight() { ++ return (lines.isEmpty()) ? 0 : lines.get(lines.size()-1).getHeight(); ++ } ++ ++ public boolean isEmptyParagraph() { ++ return (lines.isEmpty() || rawText.trim().isEmpty()); ++ } ++ ++ public void applyTransform(Graphics2D graphics) { ++ } ++ ++ public void drawContent(Graphics2D graphics) { ++ } ++ ++ /** ++ * break text into lines, each representing a line of text that fits in the wrapping width ++ * ++ * @param graphics ++ */ ++ protected void breakText(Graphics2D graphics){ ++ lines.clear(); ++ ++ DrawFactory fact = DrawFactory.getInstance(graphics); ++ StringBuilder text = new StringBuilder(); ++ AttributedString at = getAttributedString(graphics, text); ++ boolean emptyParagraph = ("".equals(text.toString().trim())); ++ ++ AttributedCharacterIterator it = at.getIterator(); ++ LineBreakMeasurer measurer = new LineBreakMeasurer(it, graphics.getFontRenderContext()); ++ for (;;) { ++ int startIndex = measurer.getPosition(); ++ ++ double wrappingWidth = getWrappingWidth(lines.size() == 0, graphics) + 1; // add a pixel to compensate rounding errors ++ // shape width can be smaller that the sum of insets (this was proved by a test file) ++ if(wrappingWidth < 0) wrappingWidth = 1; ++ ++ int nextBreak = text.indexOf("\n", startIndex + 1); ++ if(nextBreak == -1) nextBreak = it.getEndIndex(); ++ ++ TextLayout layout = measurer.nextLayout((float)wrappingWidth, nextBreak, true); ++ if (layout == null) { ++ // layout can be null if the entire word at the current position ++ // does not fit within the wrapping width. Try with requireNextWord=false. ++ layout = measurer.nextLayout((float)wrappingWidth, nextBreak, false); ++ } ++ ++ if(layout == null) { ++ // exit if can't break any more ++ break; ++ } ++ ++ int endIndex = measurer.getPosition(); ++ // skip over new line breaks (we paint 'clear' text runs not starting or ending with \n) ++ if(endIndex < it.getEndIndex() && text.charAt(endIndex) == '\n'){ ++ measurer.setPosition(endIndex + 1); ++ } ++ ++ TextAlign hAlign = paragraph.getTextAlign(); ++ if(hAlign == TextAlign.JUSTIFY || hAlign == TextAlign.JUSTIFY_LOW) { ++ layout = layout.getJustifiedLayout((float)wrappingWidth); ++ } ++ ++ AttributedString str = (emptyParagraph) ++ ? null // we will not paint empty paragraphs ++ : new AttributedString(it, startIndex, endIndex); ++ DrawTextFragment line = fact.getTextFragment(layout, str); ++ lines.add(line); ++ ++ maxLineHeight = Math.max(maxLineHeight, line.getHeight()); ++ ++ if(endIndex == it.getEndIndex()) break; ++ } ++ ++ rawText = text.toString(); ++ } ++ ++ protected DrawTextFragment getBullet(Graphics2D graphics, AttributedCharacterIterator firstLineAttr) { ++ BulletStyle bulletStyle = paragraph.getBulletStyle(); ++ if (bulletStyle == null) return null; ++ ++ String buCharacter; ++ AutoNumberingScheme ans = bulletStyle.getAutoNumberingScheme(); ++ if (ans != null) { ++ buCharacter = ans.format(autoNbrIdx); ++ } else { ++ buCharacter = bulletStyle.getBulletCharacter(); ++ } ++ if (buCharacter == null) return null; ++ ++ String buFont = bulletStyle.getBulletFont(); ++ if (buFont == null) buFont = paragraph.getDefaultFontFamily(); ++ assert(buFont != null); ++ ++ Color buColor = bulletStyle.getBulletFontColor(); ++ if (buColor == null) buColor = (Color)firstLineAttr.getAttribute(TextAttribute.FOREGROUND); ++ ++ float fontSize = (Float)firstLineAttr.getAttribute(TextAttribute.SIZE); ++ Double buSz = bulletStyle.getBulletFontSize(); ++ if (buSz == null) buSz = 100d; ++ if (buSz > 0) fontSize *= buSz* 0.01; ++ else fontSize = (float)-buSz; ++ ++ ++ AttributedString str = new AttributedString(buCharacter); ++ str.addAttribute(TextAttribute.FOREGROUND, buColor); ++ str.addAttribute(TextAttribute.FAMILY, buFont); ++ str.addAttribute(TextAttribute.SIZE, fontSize); ++ ++ TextLayout layout = new TextLayout(str.getIterator(), graphics.getFontRenderContext()); ++ DrawFactory fact = DrawFactory.getInstance(graphics); ++ return fact.getTextFragment(layout, str); ++ } ++ ++ protected String getRenderableText(TextRun tr) { ++ StringBuilder buf = new StringBuilder(); ++ TextCap cap = tr.getTextCap(); ++ String tabs = null; ++ for (char c : tr.getRawText().toCharArray()) { ++ if(c == '\t') { ++ if (tabs == null) { ++ tabs = tab2space(tr); ++ } ++ buf.append(tabs); ++ continue; ++ } ++ ++ switch (cap) { ++ case ALL: c = Character.toUpperCase(c); break; ++ case SMALL: c = Character.toLowerCase(c); break; ++ case NONE: break; ++ } ++ ++ buf.append(c); ++ } ++ ++ return buf.toString(); ++ } ++ ++ /** ++ * Replace a tab with the effective number of white spaces. ++ */ ++ private String tab2space(TextRun tr) { ++ AttributedString string = new AttributedString(" "); ++ String typeFace = tr.getFontFamily(); ++ if (typeFace == null) typeFace = "Lucida Sans"; ++ string.addAttribute(TextAttribute.FAMILY, typeFace); ++ ++ Double fs = tr.getFontSize(); ++ if (fs == null) fs = 12d; ++ string.addAttribute(TextAttribute.SIZE, fs.floatValue()); ++ ++ TextLayout l = new TextLayout(string.getIterator(), new FontRenderContext(null, true, true)); ++ double wspace = l.getAdvance(); ++ ++ Double tabSz = paragraph.getDefaultTabSize(); ++ if (tabSz == null) tabSz = wspace*4; ++ ++ int numSpaces = (int)Math.ceil(tabSz / wspace); ++ StringBuilder buf = new StringBuilder(); ++ for(int i = 0; i < numSpaces; i++) { ++ buf.append(' '); ++ } ++ return buf.toString(); ++ } ++ ++ ++ /** ++ * Returns wrapping width to break lines in this paragraph ++ * ++ * @param firstLine whether the first line is breaking ++ * ++ * @return wrapping width in points ++ */ ++ protected double getWrappingWidth(boolean firstLine, Graphics2D graphics){ ++ // internal margins for the text box ++ ++ Insets2D insets = paragraph.getParentShape().getInsets(); ++ double leftInset = insets.left; ++ double rightInset = insets.right; ++ ++ Rectangle2D anchor = DrawShape.getAnchor(graphics, paragraph.getParentShape()); ++ ++ int indentLevel = paragraph.getIndentLevel(); ++ Double leftMargin = paragraph.getLeftMargin(); ++ if (leftMargin == null) { ++ // if the marL attribute is omitted, then a value of 347663 is implied ++ leftMargin = Units.toPoints(347663*(indentLevel+1)); ++ } ++ Double indent = paragraph.getIndent(); ++ if (indent == null) { ++ indent = Units.toPoints(347663*indentLevel); ++ } ++ Double rightMargin = paragraph.getRightMargin(); ++ if (rightMargin == null) { ++ rightMargin = 0d; ++ } ++ ++ double width; ++ TextShape> ts = paragraph.getParentShape(); ++ if (!ts.getWordWrap()) { ++ // if wordWrap == false then we return the advance to the right border of the sheet ++ width = ts.getSheet().getSlideShow().getPageSize().getWidth() - anchor.getX(); ++ } else { ++ width = anchor.getWidth() - leftInset - rightInset - leftMargin - rightMargin; ++ if (firstLine) { ++ if (bullet != null){ ++ if (indent > 0) width -= indent; ++ } else { ++ if (indent > 0) width -= indent; // first line indentation ++ else if (indent < 0) { // hanging indentation: the first line start at the left margin ++ width += leftMargin; ++ } ++ } ++ } ++ } ++ ++ return width; ++ } ++ ++ private static class AttributedStringData { ++ Attribute attribute; ++ Object value; ++ int beginIndex, endIndex; ++ AttributedStringData(Attribute attribute, Object value, int beginIndex, int endIndex) { ++ this.attribute = attribute; ++ this.value = value; ++ this.beginIndex = beginIndex; ++ this.endIndex = endIndex; ++ } ++ } ++ ++ protected AttributedString getAttributedString(Graphics2D graphics, StringBuilder text){ ++ List attList = new ArrayList(); ++ if (text == null) text = new StringBuilder(); ++ ++ DrawFontManager fontHandler = (DrawFontManager)graphics.getRenderingHint(Drawable.FONT_HANDLER); ++ ++ for (TextRun run : paragraph){ ++ String runText = getRenderableText(run); ++ // skip empty runs ++ if (runText.isEmpty()) continue; ++ ++ int beginIndex = text.length(); ++ text.append(runText); ++ int endIndex = text.length(); ++ ++ Color fgColor = run.getFontColor(); ++ if (fgColor == null) fgColor = Color.BLACK; ++ attList.add(new AttributedStringData(TextAttribute.FOREGROUND, fgColor, beginIndex, endIndex)); ++ ++ // user can pass an custom object to convert fonts ++ String fontFamily = run.getFontFamily(); ++ @SuppressWarnings("unchecked") ++ Map fontMap = (Map)graphics.getRenderingHint(Drawable.FONT_MAP); ++ if (fontMap != null && fontMap.containsKey(fontFamily)) { ++ fontFamily = fontMap.get(fontFamily); ++ } ++ if(fontHandler != null) { ++ fontFamily = fontHandler.getRendererableFont(fontFamily, run.getPitchAndFamily()); ++ } ++ if (fontFamily == null) { ++ fontFamily = paragraph.getDefaultFontFamily(); ++ } ++ attList.add(new AttributedStringData(TextAttribute.FAMILY, fontFamily, beginIndex, endIndex)); ++ ++ Double fontSz = run.getFontSize(); ++ if (fontSz == null) fontSz = paragraph.getDefaultFontSize(); ++ attList.add(new AttributedStringData(TextAttribute.SIZE, fontSz.floatValue(), beginIndex, endIndex)); ++ ++ if(run.isBold()) { ++ attList.add(new AttributedStringData(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, beginIndex, endIndex)); ++ } ++ if(run.isItalic()) { ++ attList.add(new AttributedStringData(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE, beginIndex, endIndex)); ++ } ++ if(run.isUnderlined()) { ++ attList.add(new AttributedStringData(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON, beginIndex, endIndex)); ++ attList.add(new AttributedStringData(TextAttribute.INPUT_METHOD_UNDERLINE, TextAttribute.UNDERLINE_LOW_TWO_PIXEL, beginIndex, endIndex)); ++ } ++ if(run.isStrikethrough()) { ++ attList.add(new AttributedStringData(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON, beginIndex, endIndex)); ++ } ++ if(run.isSubscript()) { ++ attList.add(new AttributedStringData(TextAttribute.SUPERSCRIPT, TextAttribute.SUPERSCRIPT_SUB, beginIndex, endIndex)); ++ } ++ if(run.isSuperscript()) { ++ attList.add(new AttributedStringData(TextAttribute.SUPERSCRIPT, TextAttribute.SUPERSCRIPT_SUPER, beginIndex, endIndex)); ++ } ++ } ++ ++ // ensure that the paragraph contains at least one character ++ // We need this trick to correctly measure text ++ if (text.length() == 0) { ++ Double fontSz = paragraph.getDefaultFontSize(); ++ text.append(" "); ++ attList.add(new AttributedStringData(TextAttribute.SIZE, fontSz.floatValue(), 0, 1)); ++ } ++ ++ AttributedString string = new AttributedString(text.toString()); ++ for (AttributedStringData asd : attList) { ++ string.addAttribute(asd.attribute, asd.value, asd.beginIndex, asd.endIndex); ++ } ++ ++ return string; ++ } ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/DrawTextShape.java index 0000000000,0000000000..5862ac598c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/DrawTextShape.java @@@ -1,0 -1,0 +1,179 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.geom.AffineTransform; ++import java.awt.geom.Rectangle2D; ++import java.awt.image.BufferedImage; ++import java.util.*; ++ ++import org.apache.poi.sl.usermodel.*; ++import org.apache.poi.sl.usermodel.TextParagraph.BulletStyle; ++import org.apache.poi.util.JvmBugs; ++ ++public class DrawTextShape>> extends DrawSimpleShape { ++ ++ public DrawTextShape(T shape) { ++ super(shape); ++ } ++ ++ @Override ++ public void drawContent(Graphics2D graphics) { ++ Rectangle2D anchor = DrawShape.getAnchor(graphics, shape); ++ Insets2D insets = shape.getInsets(); ++ double x = anchor.getX() + insets.left; ++ double y = anchor.getY(); ++ ++ // remember the initial transform ++ AffineTransform tx = graphics.getTransform(); ++ ++ // Transform of text in flipped shapes is special. ++ // At this point the flip and rotation transform is already applied ++ // (see DrawShape#applyTransform ), but we need to restore it to avoid painting "upside down". ++ // See Bugzilla 54210. ++ ++ if(shape.getFlipVertical()){ ++ graphics.translate(anchor.getX(), anchor.getY() + anchor.getHeight()); ++ graphics.scale(1, -1); ++ graphics.translate(-anchor.getX(), -anchor.getY()); ++ ++ // text in vertically flipped shapes is rotated by 180 degrees ++ double centerX = anchor.getX() + anchor.getWidth()/2; ++ double centerY = anchor.getY() + anchor.getHeight()/2; ++ graphics.translate(centerX, centerY); ++ graphics.rotate(Math.toRadians(180)); ++ graphics.translate(-centerX, -centerY); ++ } ++ ++ // Horizontal flipping applies only to shape outline and not to the text in the shape. ++ // Applying flip second time restores the original not-flipped transform ++ if(shape.getFlipHorizontal()){ ++ graphics.translate(anchor.getX() + anchor.getWidth(), anchor.getY()); ++ graphics.scale(-1, 1); ++ graphics.translate(-anchor.getX() , -anchor.getY()); ++ } ++ ++ ++ // first dry-run to calculate the total height of the text ++ double textHeight = shape.getTextHeight(); ++ ++ switch (shape.getVerticalAlignment()){ ++ case TOP: ++ y += insets.top; ++ break; ++ case BOTTOM: ++ y += anchor.getHeight() - textHeight - insets.bottom; ++ break; ++ default: ++ case MIDDLE: ++ double delta = anchor.getHeight() - textHeight - insets.top - insets.bottom; ++ y += insets.top + delta/2; ++ break; ++ } ++ ++ drawParagraphs(graphics, x, y); ++ ++ // restore the transform ++ graphics.setTransform(tx); ++ } ++ ++ /** ++ * paint the paragraphs starting from top left (x,y) ++ * ++ * @return the vertical advance, i.e. the cumulative space occupied by the text ++ */ ++ public double drawParagraphs(Graphics2D graphics, double x, double y) { ++ DrawFactory fact = DrawFactory.getInstance(graphics); ++ Insets2D shapePadding = shape.getInsets(); ++ ++ double y0 = y; ++ Iterator> paragraphs = shape.iterator(); ++ ++ boolean isFirstLine = true; ++ for (int autoNbrIdx=0; paragraphs.hasNext(); autoNbrIdx++){ ++ TextParagraph p = paragraphs.next(); ++ DrawTextParagraph dp = fact.getDrawable(p); ++ BulletStyle bs = p.getBulletStyle(); ++ if (bs == null || bs.getAutoNumberingScheme() == null) { ++ autoNbrIdx = -1; ++ } else { ++ Integer startAt = bs.getAutoNumberingStartAt(); ++ if (startAt == null) startAt = 1; ++ // TODO: handle reset auto number indexes ++ if (startAt > autoNbrIdx) autoNbrIdx = startAt; ++ } ++ dp.setAutoNumberingIdx(autoNbrIdx); ++ dp.breakText(graphics); ++ ++ if (!isFirstLine) { ++ // the amount of vertical white space before the paragraph ++ Double spaceBefore = p.getSpaceBefore(); ++ if (spaceBefore == null) spaceBefore = 0d; ++ if(spaceBefore > 0) { ++ // positive value means percentage spacing of the height of the first line, e.g. ++ // the higher the first line, the bigger the space before the paragraph ++ y += spaceBefore*0.01*dp.getFirstLineHeight(); ++ } else { ++ // negative value means the absolute spacing in points ++ y += -spaceBefore; ++ } ++ } ++ isFirstLine = false; ++ ++ dp.setPosition(x, y); ++ dp.draw(graphics); ++ y += dp.getY(); ++ ++ if (paragraphs.hasNext()) { ++ Double spaceAfter = p.getSpaceAfter(); ++ if (spaceAfter == null) spaceAfter = 0d; ++ if(spaceAfter > 0) { ++ // positive value means percentage spacing of the height of the last line, e.g. ++ // the higher the last line, the bigger the space after the paragraph ++ y += spaceAfter*0.01*dp.getLastLineHeight(); ++ } else { ++ // negative value means the absolute spacing in points ++ y += -spaceAfter; ++ } ++ } ++ } ++ return y - y0; ++ } ++ ++ /** ++ * Compute the cumulative height occupied by the text ++ */ ++ public double getTextHeight(){ ++ // dry-run in a 1x1 image and return the vertical advance ++ BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); ++ Graphics2D graphics = img.createGraphics(); ++ fixFonts(graphics); ++ return drawParagraphs(graphics, 0, 0); ++ } ++ ++ @SuppressWarnings("unchecked") ++ private static void fixFonts(Graphics2D graphics) { ++ if (!JvmBugs.hasLineBreakMeasurerBug()) return; ++ Map fontMap = (Map)graphics.getRenderingHint(Drawable.FONT_MAP); ++ if (fontMap == null) fontMap = new HashMap(); ++ fontMap.put("Calibri", "Lucida Sans"); ++ fontMap.put("Cambria", "Lucida Bright"); ++ graphics.setRenderingHint(Drawable.FONT_MAP, fontMap); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/Drawable.java index 0000000000,0000000000..54128b82c6 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/Drawable.java @@@ -1,0 -1,0 +1,140 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.Graphics2D; ++import java.awt.RenderingHints; ++ ++import org.apache.poi.util.Internal; ++ ++ ++public interface Drawable { ++ class DrawableHint extends RenderingHints.Key { ++ protected DrawableHint(int id) { ++ super(id); ++ } ++ ++ public boolean isCompatibleValue(Object val) { ++ return true; ++ } ++ ++ public String toString() { ++ switch (intKey()) { ++ case 1: return "DRAW_FACTORY"; ++ case 2: return "GROUP_TRANSFORM"; ++ case 3: return "IMAGE_RENDERER"; ++ case 4: return "TEXT_RENDERING_MODE"; ++ case 5: return "GRADIENT_SHAPE"; ++ case 6: return "PRESET_GEOMETRY_CACHE"; ++ case 7: return "FONT_HANDLER"; ++ case 8: return "FONT_FALLBACK"; ++ case 9: return "FONT_MAP"; ++ case 10: return "GSAVE"; ++ case 11: return "GRESTORE"; ++ default: return "UNKNOWN_ID "+intKey(); ++ } ++ } ++ } ++ ++ /** ++ * {@link DrawFactory} which will be used to draw objects into this graphics context ++ */ ++ DrawableHint DRAW_FACTORY = new DrawableHint(1); ++ ++ /** ++ * Key will be internally used to store affine transformation temporarily within group shapes ++ */ ++ @Internal ++ DrawableHint GROUP_TRANSFORM = new DrawableHint(2); ++ ++ /** ++ * Use a custom image renderer of an instance of {@link ImageRenderer} ++ */ ++ DrawableHint IMAGE_RENDERER = new DrawableHint(3); ++ ++ /** ++ * how to render text: ++ * ++ * {@link #TEXT_AS_CHARACTERS} (default) means to draw via ++ * {@link java.awt.Graphics2D#drawString(java.text.AttributedCharacterIterator, float, float)}. ++ * This mode draws text as characters. Use it if the target graphics writes the actual ++ * character codes instead of glyph outlines (PDFGraphics2D, SVGGraphics2D, etc.) ++ * ++ * {@link #TEXT_AS_SHAPES} means to render via ++ * {@link java.awt.font.TextLayout#draw(java.awt.Graphics2D, float, float)}. ++ * This mode draws glyphs as shapes and provides some advanced capabilities such as ++ * justification and font substitution. Use it if the target graphics is an image. ++ * ++ */ ++ DrawableHint TEXT_RENDERING_MODE = new DrawableHint(4); ++ ++ /** ++ * PathGradientPaint needs the shape to be set. ++ * It will be achieved through setting it in the rendering hints ++ */ ++ DrawableHint GRADIENT_SHAPE = new DrawableHint(5); ++ ++ ++ /** ++ * Internal key for caching the preset geometries ++ */ ++ DrawableHint PRESET_GEOMETRY_CACHE = new DrawableHint(6); ++ ++ /** ++ * draw text via {@link java.awt.Graphics2D#drawString(java.text.AttributedCharacterIterator, float, float)} ++ */ ++ int TEXT_AS_CHARACTERS = 1; ++ ++ /** ++ * draw text via {@link java.awt.font.TextLayout#draw(java.awt.Graphics2D, float, float)} ++ */ ++ int TEXT_AS_SHAPES = 2; ++ ++ /** ++ * Use this object to resolve unknown / missing fonts when rendering slides ++ */ ++ DrawableHint FONT_HANDLER = new DrawableHint(7); ++ DrawableHint FONT_FALLBACK = new DrawableHint(8); ++ DrawableHint FONT_MAP = new DrawableHint(9); ++ ++ DrawableHint GSAVE = new DrawableHint(10); ++ DrawableHint GRESTORE = new DrawableHint(11); ++ ++ ++ ++ /** ++ * Apply 2-D transforms before drawing this shape. This includes rotation and flipping. ++ * ++ * @param graphics the graphics whos transform matrix will be modified ++ */ ++ void applyTransform(Graphics2D graphics); ++ ++ /** ++ * Draw this shape into the supplied canvas ++ * ++ * @param graphics the graphics to draw into ++ */ ++ void draw(Graphics2D graphics); ++ ++ /** ++ * draw any content within this shape (image, text, etc.). ++ * ++ * @param graphics the graphics to draw into ++ */ ++ void drawContent(Graphics2D graphics); ++} diff --cc src/java/org/apache/poi/sl/draw/ImageRenderer.java index 0000000000,0000000000..87561aedd4 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/ImageRenderer.java @@@ -1,0 -1,0 +1,192 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++package org.apache.poi.sl.draw; ++ ++import java.awt.*; ++import java.awt.geom.AffineTransform; ++import java.awt.geom.Rectangle2D; ++import java.awt.image.BufferedImage; ++import java.awt.image.RescaleOp; ++import java.io.*; ++ ++import javax.imageio.ImageIO; ++ ++/** ++ * For now this class renders only images supported by the javax.imageio.ImageIO ++ * framework. Subclasses can override this class to support other formats, for ++ * example, use Apache Batik to render WMF, PICT can be rendered using Apple QuickTime API for Java: ++ * ++ *
++ * 
++ * public class MyImageRendener extends ImageRendener {
++ *     InputStream data;
++ *
++ *     public boolean drawImage(Graphics2D graphics,Rectangle2D anchor,Insets clip) {
++ *         // draw image
++ *       DataInputStream is = new DataInputStream(data);
++ *       org.apache.batik.transcoder.wmf.tosvg.WMFRecordStore wmfStore =
++ *               new org.apache.batik.transcoder.wmf.tosvg.WMFRecordStore();
++ *       try {
++ *           wmfStore.read(is);
++ *       } catch (IOException e){
++ *           return;
++ *       }
++ *
++ *       float scale = (float)anchor.width/wmfStore.getWidthPixels();
++ *
++ *       org.apache.batik.transcoder.wmf.tosvg.WMFPainter painter =
++ *               new org.apache.batik.transcoder.wmf.tosvg.WMFPainter(wmfStore, 0, 0, scale);
++ *       graphics.translate(anchor.x, anchor.y);
++ *       painter.paint(graphics);
++ *     }
++ *
++ *     public void loadImage(InputStream data, String contentType) throws IOException {
++ *         if ("image/wmf".equals(contentType)) {
++ *             this.data = data;
++ *             // use Apache Batik to handle WMF
++ *         } else {
++ *             super.loadImage(data,contentType);
++ *         }
++ *     }
++ * }
++ * 
++ * 
++ * ++ * and then pass this class to your instance of java.awt.Graphics2D: ++ * ++ *
++ * 
++ * graphics.setRenderingHint(Drawable.IMAGE_RENDERER, new MyImageRendener());
++ * 
++ * 
++ */ ++public class ImageRenderer { ++ protected BufferedImage img; ++ ++ /** ++ * Load and buffer the image ++ * ++ * @param data the raw image stream ++ * @param contentType the content type ++ */ ++ public void loadImage(InputStream data, String contentType) throws IOException { ++ img = convertBufferedImage(ImageIO.read(data)); ++ } ++ ++ /** ++ * Load and buffer the image ++ * ++ * @param data the raw image stream ++ * @param contentType the content type ++ */ ++ public void loadImage(byte data[], String contentType) throws IOException { ++ img = convertBufferedImage(ImageIO.read(new ByteArrayInputStream(data))); ++ } ++ ++ protected static BufferedImage convertBufferedImage(BufferedImage img) { ++ BufferedImage bi = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB); ++ Graphics g = bi.getGraphics(); ++ g.drawImage(img, 0, 0, null); ++ g.dispose(); ++ return bi; ++ } ++ ++ ++ /** ++ * @return the buffered image ++ */ ++ public BufferedImage getImage() { ++ return img; ++ } ++ ++ /** ++ * @return the dimension of the buffered image ++ */ ++ public Dimension getDimension() { ++ return (img == null) ++ ? new Dimension(0,0) ++ : new Dimension(img.getWidth(),img.getHeight()); ++ } ++ ++ /** ++ * @param alpha the alpha [0..1] to be added to the image (possibly already containing an alpha channel) ++ */ ++ public void setAlpha(double alpha) { ++ if (img == null) return; ++ ++ Dimension dim = getDimension(); ++ BufferedImage newImg = new BufferedImage((int)dim.getWidth(), (int)dim.getHeight(), BufferedImage.TYPE_INT_ARGB); ++ Graphics2D g = newImg.createGraphics(); ++ RescaleOp op = new RescaleOp(new float[]{1.0f, 1.0f, 1.0f, (float)alpha}, new float[]{0,0,0,0}, null); ++ g.drawImage(img, op, 0, 0); ++ g.dispose(); ++ ++ img = newImg; ++ } ++ ++ ++ /** ++ * Render picture data into the supplied graphics ++ * ++ * @return true if the picture data was successfully rendered ++ */ ++ public boolean drawImage( ++ Graphics2D graphics, ++ Rectangle2D anchor) { ++ return drawImage(graphics, anchor, null); ++ } ++ ++ /** ++ * Render picture data into the supplied graphics ++ * ++ * @return true if the picture data was successfully rendered ++ */ ++ public boolean drawImage( ++ Graphics2D graphics, ++ Rectangle2D anchor, ++ Insets clip) { ++ if (img == null) return false; ++ ++ boolean isClipped = true; ++ if (clip == null) { ++ isClipped = false; ++ clip = new Insets(0,0,0,0); ++ } ++ ++ int iw = img.getWidth(); ++ int ih = img.getHeight(); ++ ++ ++ double cw = (100000-clip.left-clip.right) / 100000.0; ++ double ch = (100000-clip.top-clip.bottom) / 100000.0; ++ double sx = anchor.getWidth()/(iw*cw); ++ double sy = anchor.getHeight()/(ih*ch); ++ double tx = anchor.getX()-(iw*sx*clip.left/100000.0); ++ double ty = anchor.getY()-(ih*sy*clip.top/100000.0); ++ ++ AffineTransform at = new AffineTransform(sx, 0, 0, sy, tx, ty) ; ++ ++ Shape clipOld = graphics.getClip(); ++ if (isClipped) graphics.clip(anchor.getBounds2D()); ++ graphics.drawRenderedImage(img, at); ++ graphics.setClip(clipOld); ++ ++ return true; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/PathGradientPaint.java index 0000000000,0000000000..c5ad799f4c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/PathGradientPaint.java @@@ -1,0 -1,0 +1,186 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw; ++ ++import java.awt.*; ++import java.awt.MultipleGradientPaint.ColorSpaceType; ++import java.awt.MultipleGradientPaint.CycleMethod; ++import java.awt.geom.*; ++import java.awt.image.*; ++ ++class PathGradientPaint implements Paint { ++ ++ // http://asserttrue.blogspot.de/2010/01/how-to-iimplement-custom-paint-in-50.html ++ protected final Color colors[]; ++ protected final float fractions[]; ++ protected final int capStyle; ++ protected final int joinStyle; ++ protected final int transparency; ++ ++ ++ public PathGradientPaint(Color colors[], float fractions[]) { ++ this(colors,fractions,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND); ++ } ++ ++ public PathGradientPaint(Color colors[], float fractions[], int capStyle, int joinStyle) { ++ this.colors = colors; ++ this.fractions = fractions; ++ this.capStyle = capStyle; ++ this.joinStyle = joinStyle; ++ ++ // determine transparency ++ boolean opaque = true; ++ for (int i = 0; i < colors.length; i++){ ++ opaque = opaque && (colors[i].getAlpha() == 0xff); ++ } ++ this.transparency = opaque ? OPAQUE : TRANSLUCENT; ++ } ++ ++ public PaintContext createContext(ColorModel cm, ++ Rectangle deviceBounds, ++ Rectangle2D userBounds, ++ AffineTransform transform, ++ RenderingHints hints) { ++ return new PathGradientContext(cm, deviceBounds, userBounds, transform, hints); ++ } ++ ++ public int getTransparency() { ++ return transparency; ++ } ++ ++ class PathGradientContext implements PaintContext { ++ protected final Rectangle deviceBounds; ++ protected final Rectangle2D userBounds; ++ protected final AffineTransform xform; ++ protected final RenderingHints hints; ++ ++ /** ++ * for POI: the shape will be only known when the subclasses determines the concrete implementation ++ * in the draw/-content method, so we need to postpone the setting/creation as long as possible ++ **/ ++ protected final Shape shape; ++ protected final PaintContext pCtx; ++ protected final int gradientSteps; ++ WritableRaster raster; ++ ++ public PathGradientContext( ++ ColorModel cm ++ , Rectangle deviceBounds ++ , Rectangle2D userBounds ++ , AffineTransform xform ++ , RenderingHints hints ++ ) { ++ shape = (Shape)hints.get(Drawable.GRADIENT_SHAPE); ++ if (shape == null) { ++ throw new IllegalPathStateException("PathGradientPaint needs a shape to be set via the rendering hint PathGradientPaint.GRADIANT_SHAPE."); ++ } ++ ++ this.deviceBounds = deviceBounds; ++ this.userBounds = userBounds; ++ this.xform = xform; ++ this.hints = hints; ++ ++ gradientSteps = getGradientSteps(shape); ++ ++ Point2D start = new Point2D.Double(0, 0); ++ Point2D end = new Point2D.Double(gradientSteps, 0); ++ LinearGradientPaint gradientPaint = new LinearGradientPaint(start, end, fractions, colors, CycleMethod.NO_CYCLE, ColorSpaceType.SRGB, new AffineTransform()); ++ ++ Rectangle bounds = new Rectangle(0, 0, gradientSteps, 1); ++ pCtx = gradientPaint.createContext(cm, bounds, bounds, new AffineTransform(), hints); ++ } ++ ++ public void dispose() {} ++ ++ public ColorModel getColorModel() { ++ return pCtx.getColorModel(); ++ } ++ ++ public Raster getRaster(int xOffset, int yOffset, int w, int h) { ++ ColorModel cm = getColorModel(); ++ if (raster == null) createRaster(); ++ ++ // TODO: eventually use caching here ++ WritableRaster childRaster = cm.createCompatibleWritableRaster(w, h); ++ Rectangle2D childRect = new Rectangle2D.Double(xOffset, yOffset, w, h); ++ if (!childRect.intersects(deviceBounds)) { ++ // usually doesn't happen ... ++ return childRaster; ++ } ++ ++ Rectangle2D destRect = new Rectangle2D.Double(); ++ Rectangle2D.intersect(childRect, deviceBounds, destRect); ++ int dx = (int)(destRect.getX()-deviceBounds.getX()); ++ int dy = (int)(destRect.getY()-deviceBounds.getY()); ++ int dw = (int)destRect.getWidth(); ++ int dh = (int)destRect.getHeight(); ++ Object data = raster.getDataElements(dx, dy, dw, dh, null); ++ dx = (int)(destRect.getX()-childRect.getX()); ++ dy = (int)(destRect.getY()-childRect.getY()); ++ childRaster.setDataElements(dx, dy, dw, dh, data); ++ ++ return childRaster; ++ } ++ ++ protected int getGradientSteps(Shape shape) { ++ Rectangle rect = shape.getBounds(); ++ int lower = 1; ++ int upper = (int)(Math.max(rect.getWidth(),rect.getHeight())/2.0); ++ while (lower < upper-1) { ++ int mid = lower + (upper - lower) / 2; ++ BasicStroke bs = new BasicStroke(mid, capStyle, joinStyle); ++ Area area = new Area(bs.createStrokedShape(shape)); ++ if (area.isSingular()) { ++ upper = mid; ++ } else { ++ lower = mid; ++ } ++ } ++ return upper; ++ } ++ ++ ++ ++ protected void createRaster() { ++ ColorModel cm = getColorModel(); ++ raster = cm.createCompatibleWritableRaster((int)deviceBounds.getWidth(), (int)deviceBounds.getHeight()); ++ BufferedImage img = new BufferedImage(cm, raster, false, null); ++ Graphics2D graphics = img.createGraphics(); ++ graphics.setRenderingHints(hints); ++ graphics.translate(-deviceBounds.getX(), -deviceBounds.getY()); ++ graphics.transform(xform); ++ ++ Raster img2 = pCtx.getRaster(0, 0, gradientSteps, 1); ++ int rgb[] = new int[cm.getNumComponents()]; ++ ++ for (int i = gradientSteps-1; i>=0; i--) { ++ img2.getPixel(i, 0, rgb); ++ Color c = new Color(rgb[0],rgb[1],rgb[2]); ++ if (rgb.length == 4) { ++ // it doesn't work to use just a color with transparency ... ++ graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, rgb[3]/255.0f)); ++ } ++ graphics.setStroke(new BasicStroke(i+1, capStyle, joinStyle)); ++ graphics.setColor(c); ++ graphics.draw(shape); ++ } ++ ++ graphics.dispose(); ++ } ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTAdjPoint2D.java index 0000000000,0000000000..d7fc0ae07f new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTAdjPoint2D.java @@@ -1,0 -1,0 +1,109 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_AdjPoint2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_AdjPoint2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="x" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="y" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_AdjPoint2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTAdjPoint2D { ++ ++ @XmlAttribute(name = "x", required = true) ++ protected String x; ++ @XmlAttribute(name = "y", required = true) ++ protected String y; ++ ++ /** ++ * Gets the value of the x property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getX() { ++ return x; ++ } ++ ++ /** ++ * Sets the value of the x property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setX(String value) { ++ this.x = value; ++ } ++ ++ public boolean isSetX() { ++ return (this.x!= null); ++ } ++ ++ /** ++ * Gets the value of the y property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getY() { ++ return y; ++ } ++ ++ /** ++ * Sets the value of the y property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setY(String value) { ++ this.y = value; ++ } ++ ++ public boolean isSetY() { ++ return (this.y!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTAdjustHandleList.java index 0000000000,0000000000..d684cccb74 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTAdjustHandleList.java @@@ -1,0 -1,0 +1,99 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlElements; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_AdjustHandleList complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_AdjustHandleList">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <choice maxOccurs="unbounded" minOccurs="0">
++ *         <element name="ahXY" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_XYAdjustHandle"/>
++ *         <element name="ahPolar" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_PolarAdjustHandle"/>
++ *       </choice>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_AdjustHandleList", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "ahXYOrAhPolar" ++}) ++public class CTAdjustHandleList { ++ ++ @XmlElements({ ++ @XmlElement(name = "ahXY", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTXYAdjustHandle.class), ++ @XmlElement(name = "ahPolar", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPolarAdjustHandle.class) ++ }) ++ protected List ahXYOrAhPolar; ++ ++ /** ++ * Gets the value of the ahXYOrAhPolar property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the ahXYOrAhPolar property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getAhXYOrAhPolar().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTXYAdjustHandle } ++ * {@link CTPolarAdjustHandle } ++ * ++ * ++ */ ++ public List getAhXYOrAhPolar() { ++ if (ahXYOrAhPolar == null) { ++ ahXYOrAhPolar = new ArrayList(); ++ } ++ return this.ahXYOrAhPolar; ++ } ++ ++ public boolean isSetAhXYOrAhPolar() { ++ return ((this.ahXYOrAhPolar!= null)&&(!this.ahXYOrAhPolar.isEmpty())); ++ } ++ ++ public void unsetAhXYOrAhPolar() { ++ this.ahXYOrAhPolar = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTAngle.java index 0000000000,0000000000..2da2373e25 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTAngle.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Angle complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Angle">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Angle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Angle", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTAngle { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTColor.java index 0000000000,0000000000..dd3cca3602 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTColor.java @@@ -1,0 -1,0 +1,237 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Color complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Color">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorChoice"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Color", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "scrgbClr", ++ "srgbClr", ++ "hslClr", ++ "sysClr", ++ "schemeClr", ++ "prstClr" ++}) ++public class CTColor { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTScRgbColor scrgbClr; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTSRgbColor srgbClr; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTHslColor hslClr; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTSystemColor sysClr; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTSchemeColor schemeClr; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPresetColor prstClr; ++ ++ /** ++ * Gets the value of the scrgbClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTScRgbColor } ++ * ++ */ ++ public CTScRgbColor getScrgbClr() { ++ return scrgbClr; ++ } ++ ++ /** ++ * Sets the value of the scrgbClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTScRgbColor } ++ * ++ */ ++ public void setScrgbClr(CTScRgbColor value) { ++ this.scrgbClr = value; ++ } ++ ++ public boolean isSetScrgbClr() { ++ return (this.scrgbClr!= null); ++ } ++ ++ /** ++ * Gets the value of the srgbClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTSRgbColor } ++ * ++ */ ++ public CTSRgbColor getSrgbClr() { ++ return srgbClr; ++ } ++ ++ /** ++ * Sets the value of the srgbClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTSRgbColor } ++ * ++ */ ++ public void setSrgbClr(CTSRgbColor value) { ++ this.srgbClr = value; ++ } ++ ++ public boolean isSetSrgbClr() { ++ return (this.srgbClr!= null); ++ } ++ ++ /** ++ * Gets the value of the hslClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTHslColor } ++ * ++ */ ++ public CTHslColor getHslClr() { ++ return hslClr; ++ } ++ ++ /** ++ * Sets the value of the hslClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTHslColor } ++ * ++ */ ++ public void setHslClr(CTHslColor value) { ++ this.hslClr = value; ++ } ++ ++ public boolean isSetHslClr() { ++ return (this.hslClr!= null); ++ } ++ ++ /** ++ * Gets the value of the sysClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTSystemColor } ++ * ++ */ ++ public CTSystemColor getSysClr() { ++ return sysClr; ++ } ++ ++ /** ++ * Sets the value of the sysClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTSystemColor } ++ * ++ */ ++ public void setSysClr(CTSystemColor value) { ++ this.sysClr = value; ++ } ++ ++ public boolean isSetSysClr() { ++ return (this.sysClr!= null); ++ } ++ ++ /** ++ * Gets the value of the schemeClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTSchemeColor } ++ * ++ */ ++ public CTSchemeColor getSchemeClr() { ++ return schemeClr; ++ } ++ ++ /** ++ * Sets the value of the schemeClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTSchemeColor } ++ * ++ */ ++ public void setSchemeClr(CTSchemeColor value) { ++ this.schemeClr = value; ++ } ++ ++ public boolean isSetSchemeClr() { ++ return (this.schemeClr!= null); ++ } ++ ++ /** ++ * Gets the value of the prstClr property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPresetColor } ++ * ++ */ ++ public CTPresetColor getPrstClr() { ++ return prstClr; ++ } ++ ++ /** ++ * Sets the value of the prstClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPresetColor } ++ * ++ */ ++ public void setPrstClr(CTPresetColor value) { ++ this.prstClr = value; ++ } ++ ++ public boolean isSetPrstClr() { ++ return (this.prstClr!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTColorMRU.java index 0000000000,0000000000..8ec68ba085 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTColorMRU.java @@@ -1,0 -1,0 +1,106 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlElements; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_ColorMRU complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_ColorMRU">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorChoice" maxOccurs="10" minOccurs="0"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_ColorMRU", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorChoice" ++}) ++public class CTColorMRU { ++ ++ @XmlElements({ ++ @XmlElement(name = "scrgbClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTScRgbColor.class), ++ @XmlElement(name = "srgbClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTSRgbColor.class), ++ @XmlElement(name = "hslClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTHslColor.class), ++ @XmlElement(name = "sysClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTSystemColor.class), ++ @XmlElement(name = "schemeClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTSchemeColor.class), ++ @XmlElement(name = "prstClr", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPresetColor.class) ++ }) ++ protected List egColorChoice; ++ ++ /** ++ * Gets the value of the egColorChoice property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorChoice property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorChoice().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTScRgbColor } ++ * {@link CTSRgbColor } ++ * {@link CTHslColor } ++ * {@link CTSystemColor } ++ * {@link CTSchemeColor } ++ * {@link CTPresetColor } ++ * ++ * ++ */ ++ public List getEGColorChoice() { ++ if (egColorChoice == null) { ++ egColorChoice = new ArrayList(); ++ } ++ return this.egColorChoice; ++ } ++ ++ public boolean isSetEGColorChoice() { ++ return ((this.egColorChoice!= null)&&(!this.egColorChoice.isEmpty())); ++ } ++ ++ public void unsetEGColorChoice() { ++ this.egColorChoice = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTComplementTransform.java index 0000000000,0000000000..dd1a56c0b9 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTComplementTransform.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_ComplementTransform complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_ComplementTransform">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_ComplementTransform", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTComplementTransform { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTConnection.java index 0000000000,0000000000..f5d5e17268 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTConnection.java @@@ -1,0 -1,0 +1,95 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlSchemaType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Connection complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Connection">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="id" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_DrawingElementId" />
++ *       <attribute name="idx" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Connection", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTConnection { ++ ++ @XmlAttribute(name = "id", required = true) ++ protected long id; ++ @XmlAttribute(name = "idx", required = true) ++ @XmlSchemaType(name = "unsignedInt") ++ protected long idx; ++ ++ /** ++ * Gets the value of the id property. ++ * ++ */ ++ public long getId() { ++ return id; ++ } ++ ++ /** ++ * Sets the value of the id property. ++ * ++ */ ++ public void setId(long value) { ++ this.id = value; ++ } ++ ++ public boolean isSetId() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the idx property. ++ * ++ */ ++ public long getIdx() { ++ return idx; ++ } ++ ++ /** ++ * Sets the value of the idx property. ++ * ++ */ ++ public void setIdx(long value) { ++ this.idx = value; ++ } ++ ++ public boolean isSetIdx() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTConnectionSite.java index 0000000000,0000000000..eae59a0f0a new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTConnectionSite.java @@@ -1,0 -1,0 +1,114 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_ConnectionSite complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_ConnectionSite">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pos" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D"/>
++ *       </sequence>
++ *       <attribute name="ang" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_ConnectionSite", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pos" ++}) ++public class CTConnectionSite { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTAdjPoint2D pos; ++ @XmlAttribute(name = "ang", required = true) ++ protected String ang; ++ ++ /** ++ * Gets the value of the pos property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D getPos() { ++ return pos; ++ } ++ ++ /** ++ * Sets the value of the pos property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public void setPos(CTAdjPoint2D value) { ++ this.pos = value; ++ } ++ ++ public boolean isSetPos() { ++ return (this.pos!= null); ++ } ++ ++ /** ++ * Gets the value of the ang property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getAng() { ++ return ang; ++ } ++ ++ /** ++ * Sets the value of the ang property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setAng(String value) { ++ this.ang = value; ++ } ++ ++ public boolean isSetAng() { ++ return (this.ang!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTConnectionSiteList.java index 0000000000,0000000000..a3c98898c4 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTConnectionSiteList.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_ConnectionSiteList complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_ConnectionSiteList">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="cxn" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ConnectionSite" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_ConnectionSiteList", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "cxn" ++}) ++public class CTConnectionSiteList { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected List cxn; ++ ++ /** ++ * Gets the value of the cxn property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the cxn property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getCxn().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTConnectionSite } ++ * ++ * ++ */ ++ public List getCxn() { ++ if (cxn == null) { ++ cxn = new ArrayList(); ++ } ++ return this.cxn; ++ } ++ ++ public boolean isSetCxn() { ++ return ((this.cxn!= null)&&(!this.cxn.isEmpty())); ++ } ++ ++ public void unsetCxn() { ++ this.cxn = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTCustomGeometry2D.java index 0000000000,0000000000..d6856ee637 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTCustomGeometry2D.java @@@ -1,0 -1,0 +1,242 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_CustomGeometry2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_CustomGeometry2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="avLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomGuideList" minOccurs="0"/>
++ *         <element name="gdLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomGuideList" minOccurs="0"/>
++ *         <element name="ahLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjustHandleList" minOccurs="0"/>
++ *         <element name="cxnLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ConnectionSiteList" minOccurs="0"/>
++ *         <element name="rect" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomRect" minOccurs="0"/>
++ *         <element name="pathLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DList"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_CustomGeometry2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "avLst", ++ "gdLst", ++ "ahLst", ++ "cxnLst", ++ "rect", ++ "pathLst" ++}) ++public class CTCustomGeometry2D { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTGeomGuideList avLst; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTGeomGuideList gdLst; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTAdjustHandleList ahLst; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTConnectionSiteList cxnLst; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTGeomRect rect; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTPath2DList pathLst; ++ ++ /** ++ * Gets the value of the avLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public CTGeomGuideList getAvLst() { ++ return avLst; ++ } ++ ++ /** ++ * Sets the value of the avLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public void setAvLst(CTGeomGuideList value) { ++ this.avLst = value; ++ } ++ ++ public boolean isSetAvLst() { ++ return (this.avLst!= null); ++ } ++ ++ /** ++ * Gets the value of the gdLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public CTGeomGuideList getGdLst() { ++ return gdLst; ++ } ++ ++ /** ++ * Sets the value of the gdLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public void setGdLst(CTGeomGuideList value) { ++ this.gdLst = value; ++ } ++ ++ public boolean isSetGdLst() { ++ return (this.gdLst!= null); ++ } ++ ++ /** ++ * Gets the value of the ahLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjustHandleList } ++ * ++ */ ++ public CTAdjustHandleList getAhLst() { ++ return ahLst; ++ } ++ ++ /** ++ * Sets the value of the ahLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjustHandleList } ++ * ++ */ ++ public void setAhLst(CTAdjustHandleList value) { ++ this.ahLst = value; ++ } ++ ++ public boolean isSetAhLst() { ++ return (this.ahLst!= null); ++ } ++ ++ /** ++ * Gets the value of the cxnLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTConnectionSiteList } ++ * ++ */ ++ public CTConnectionSiteList getCxnLst() { ++ return cxnLst; ++ } ++ ++ /** ++ * Sets the value of the cxnLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTConnectionSiteList } ++ * ++ */ ++ public void setCxnLst(CTConnectionSiteList value) { ++ this.cxnLst = value; ++ } ++ ++ public boolean isSetCxnLst() { ++ return (this.cxnLst!= null); ++ } ++ ++ /** ++ * Gets the value of the rect property. ++ * ++ * @return ++ * possible object is ++ * {@link CTGeomRect } ++ * ++ */ ++ public CTGeomRect getRect() { ++ return rect; ++ } ++ ++ /** ++ * Sets the value of the rect property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTGeomRect } ++ * ++ */ ++ public void setRect(CTGeomRect value) { ++ this.rect = value; ++ } ++ ++ public boolean isSetRect() { ++ return (this.rect!= null); ++ } ++ ++ /** ++ * Gets the value of the pathLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPath2DList } ++ * ++ */ ++ public CTPath2DList getPathLst() { ++ return pathLst; ++ } ++ ++ /** ++ * Sets the value of the pathLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPath2DList } ++ * ++ */ ++ public void setPathLst(CTPath2DList value) { ++ this.pathLst = value; ++ } ++ ++ public boolean isSetPathLst() { ++ return (this.pathLst!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTEmbeddedWAVAudioFile.java index 0000000000,0000000000..8787125f47 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTEmbeddedWAVAudioFile.java @@@ -1,0 -1,0 +1,152 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_EmbeddedWAVAudioFile complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_EmbeddedWAVAudioFile">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute ref="{http://schemas.openxmlformats.org/officeDocument/2006/relationships}embed use="required""/>
++ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
++ *       <attribute name="builtIn" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_EmbeddedWAVAudioFile", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTEmbeddedWAVAudioFile { ++ ++ @XmlAttribute(name = "embed", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", required = true) ++ protected String embed; ++ @XmlAttribute(name = "name") ++ protected String name; ++ @XmlAttribute(name = "builtIn") ++ protected Boolean builtIn; ++ ++ /** ++ * Embedded Audio File Relationship ID ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getEmbed() { ++ return embed; ++ } ++ ++ /** ++ * Sets the value of the embed property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setEmbed(String value) { ++ this.embed = value; ++ } ++ ++ public boolean isSetEmbed() { ++ return (this.embed!= null); ++ } ++ ++ /** ++ * Gets the value of the name property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getName() { ++ if (name == null) { ++ return ""; ++ } else { ++ return name; ++ } ++ } ++ ++ /** ++ * Sets the value of the name property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setName(String value) { ++ this.name = value; ++ } ++ ++ public boolean isSetName() { ++ return (this.name!= null); ++ } ++ ++ /** ++ * Gets the value of the builtIn property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isBuiltIn() { ++ if (builtIn == null) { ++ return false; ++ } else { ++ return builtIn; ++ } ++ } ++ ++ /** ++ * Sets the value of the builtIn property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setBuiltIn(boolean value) { ++ this.builtIn = value; ++ } ++ ++ public boolean isSetBuiltIn() { ++ return (this.builtIn!= null); ++ } ++ ++ public void unsetBuiltIn() { ++ this.builtIn = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTFixedPercentage.java index 0000000000,0000000000..d1ed283f5d new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTFixedPercentage.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_FixedPercentage complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_FixedPercentage">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_FixedPercentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_FixedPercentage", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTFixedPercentage { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGammaTransform.java index 0000000000,0000000000..7cf6cb195c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGammaTransform.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_GammaTransform complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GammaTransform">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GammaTransform", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTGammaTransform { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGeomGuide.java index 0000000000,0000000000..5622e4c28d new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGeomGuide.java @@@ -1,0 -1,0 +1,112 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++ ++ ++/** ++ *

Java class for CT_GeomGuide complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GeomGuide">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="name" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideName" />
++ *       <attribute name="fmla" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideFormula" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GeomGuide", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTGeomGuide { ++ ++ @XmlAttribute(name = "name", required = true) ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String name; ++ @XmlAttribute(name = "fmla", required = true) ++ protected String fmla; ++ ++ /** ++ * Gets the value of the name property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getName() { ++ return name; ++ } ++ ++ /** ++ * Sets the value of the name property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setName(String value) { ++ this.name = value; ++ } ++ ++ public boolean isSetName() { ++ return (this.name!= null); ++ } ++ ++ /** ++ * Gets the value of the fmla property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getFmla() { ++ return fmla; ++ } ++ ++ /** ++ * Sets the value of the fmla property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setFmla(String value) { ++ this.fmla = value; ++ } ++ ++ public boolean isSetFmla() { ++ return (this.fmla!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGeomGuideList.java index 0000000000,0000000000..4490933b4f new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGeomGuideList.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_GeomGuideList complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GeomGuideList">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="gd" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomGuide" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GeomGuideList", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "gd" ++}) ++public class CTGeomGuideList { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected List gd; ++ ++ /** ++ * Gets the value of the gd property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the gd property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getGd().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTGeomGuide } ++ * ++ * ++ */ ++ public List getGd() { ++ if (gd == null) { ++ gd = new ArrayList(); ++ } ++ return this.gd; ++ } ++ ++ public boolean isSetGd() { ++ return ((this.gd!= null)&&(!this.gd.isEmpty())); ++ } ++ ++ public void unsetGd() { ++ this.gd = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGeomRect.java index 0000000000,0000000000..3198f0410e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGeomRect.java @@@ -1,0 -1,0 +1,171 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_GeomRect complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GeomRect">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="l" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="t" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="r" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="b" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GeomRect", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTGeomRect { ++ ++ @XmlAttribute(name = "l", required = true) ++ protected String l; ++ @XmlAttribute(name = "t", required = true) ++ protected String t; ++ @XmlAttribute(name = "r", required = true) ++ protected String r; ++ @XmlAttribute(name = "b", required = true) ++ protected String b; ++ ++ /** ++ * Gets the value of the l property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getL() { ++ return l; ++ } ++ ++ /** ++ * Sets the value of the l property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setL(String value) { ++ this.l = value; ++ } ++ ++ public boolean isSetL() { ++ return (this.l!= null); ++ } ++ ++ /** ++ * Gets the value of the t property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getT() { ++ return t; ++ } ++ ++ /** ++ * Sets the value of the t property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setT(String value) { ++ this.t = value; ++ } ++ ++ public boolean isSetT() { ++ return (this.t!= null); ++ } ++ ++ /** ++ * Gets the value of the r property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getR() { ++ return r; ++ } ++ ++ /** ++ * Sets the value of the r property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setR(String value) { ++ this.r = value; ++ } ++ ++ public boolean isSetR() { ++ return (this.r!= null); ++ } ++ ++ /** ++ * Gets the value of the b property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getB() { ++ return b; ++ } ++ ++ /** ++ * Sets the value of the b property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setB(String value) { ++ this.b = value; ++ } ++ ++ public boolean isSetB() { ++ return (this.b!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGrayscaleTransform.java index 0000000000,0000000000..643db025a2 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGrayscaleTransform.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_GrayscaleTransform complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GrayscaleTransform">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GrayscaleTransform", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTGrayscaleTransform { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTGroupTransform2D.java index 0000000000,0000000000..f06e1d8f99 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTGroupTransform2D.java @@@ -1,0 -1,0 +1,296 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_GroupTransform2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_GroupTransform2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="off" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Point2D" minOccurs="0"/>
++ *         <element name="ext" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_PositiveSize2D" minOccurs="0"/>
++ *         <element name="chOff" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Point2D" minOccurs="0"/>
++ *         <element name="chExt" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_PositiveSize2D" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="rot" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Angle" default="0" />
++ *       <attribute name="flipH" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *       <attribute name="flipV" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_GroupTransform2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "off", ++ "ext", ++ "chOff", ++ "chExt" ++}) ++public class CTGroupTransform2D { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPoint2D off; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPositiveSize2D ext; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPoint2D chOff; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPositiveSize2D chExt; ++ @XmlAttribute(name = "rot") ++ protected Integer rot; ++ @XmlAttribute(name = "flipH") ++ protected Boolean flipH; ++ @XmlAttribute(name = "flipV") ++ protected Boolean flipV; ++ ++ /** ++ * Gets the value of the off property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public CTPoint2D getOff() { ++ return off; ++ } ++ ++ /** ++ * Sets the value of the off property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public void setOff(CTPoint2D value) { ++ this.off = value; ++ } ++ ++ public boolean isSetOff() { ++ return (this.off!= null); ++ } ++ ++ /** ++ * Gets the value of the ext property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public CTPositiveSize2D getExt() { ++ return ext; ++ } ++ ++ /** ++ * Sets the value of the ext property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public void setExt(CTPositiveSize2D value) { ++ this.ext = value; ++ } ++ ++ public boolean isSetExt() { ++ return (this.ext!= null); ++ } ++ ++ /** ++ * Gets the value of the chOff property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public CTPoint2D getChOff() { ++ return chOff; ++ } ++ ++ /** ++ * Sets the value of the chOff property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public void setChOff(CTPoint2D value) { ++ this.chOff = value; ++ } ++ ++ public boolean isSetChOff() { ++ return (this.chOff!= null); ++ } ++ ++ /** ++ * Gets the value of the chExt property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public CTPositiveSize2D getChExt() { ++ return chExt; ++ } ++ ++ /** ++ * Sets the value of the chExt property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public void setChExt(CTPositiveSize2D value) { ++ this.chExt = value; ++ } ++ ++ public boolean isSetChExt() { ++ return (this.chExt!= null); ++ } ++ ++ /** ++ * Gets the value of the rot property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getRot() { ++ if (rot == null) { ++ return 0; ++ } else { ++ return rot; ++ } ++ } ++ ++ /** ++ * Sets the value of the rot property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setRot(int value) { ++ this.rot = value; ++ } ++ ++ public boolean isSetRot() { ++ return (this.rot!= null); ++ } ++ ++ public void unsetRot() { ++ this.rot = null; ++ } ++ ++ /** ++ * Gets the value of the flipH property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isFlipH() { ++ if (flipH == null) { ++ return false; ++ } else { ++ return flipH; ++ } ++ } ++ ++ /** ++ * Sets the value of the flipH property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setFlipH(boolean value) { ++ this.flipH = value; ++ } ++ ++ public boolean isSetFlipH() { ++ return (this.flipH!= null); ++ } ++ ++ public void unsetFlipH() { ++ this.flipH = null; ++ } ++ ++ /** ++ * Gets the value of the flipV property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isFlipV() { ++ if (flipV == null) { ++ return false; ++ } else { ++ return flipV; ++ } ++ } ++ ++ /** ++ * Sets the value of the flipV property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setFlipV(boolean value) { ++ this.flipV = value; ++ } ++ ++ public boolean isSetFlipV() { ++ return (this.flipV!= null); ++ } ++ ++ public void unsetFlipV() { ++ this.flipV = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTHslColor.java index 0000000000,0000000000..376d423ee3 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTHslColor.java @@@ -1,0 -1,0 +1,221 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_HslColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_HslColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="hue" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedAngle" />
++ *       <attribute name="sat" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *       <attribute name="lum" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_HslColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTHslColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "hue", required = true) ++ protected int hue; ++ @XmlAttribute(name = "sat", required = true) ++ protected int sat; ++ @XmlAttribute(name = "lum", required = true) ++ protected int lum; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the hue property. ++ * ++ */ ++ public int getHue() { ++ return hue; ++ } ++ ++ /** ++ * Sets the value of the hue property. ++ * ++ */ ++ public void setHue(int value) { ++ this.hue = value; ++ } ++ ++ public boolean isSetHue() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the sat property. ++ * ++ */ ++ public int getSat() { ++ return sat; ++ } ++ ++ /** ++ * Sets the value of the sat property. ++ * ++ */ ++ public void setSat(int value) { ++ this.sat = value; ++ } ++ ++ public boolean isSetSat() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the lum property. ++ * ++ */ ++ public int getLum() { ++ return lum; ++ } ++ ++ /** ++ * Sets the value of the lum property. ++ * ++ */ ++ public void setLum(int value) { ++ this.lum = value; ++ } ++ ++ public boolean isSetLum() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTHyperlink.java index 0000000000,0000000000..0c89f392ac new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTHyperlink.java @@@ -1,0 -1,0 +1,403 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Hyperlink complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Hyperlink">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="snd" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_EmbeddedWAVAudioFile" minOccurs="0"/>
++ *         <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute ref="{http://schemas.openxmlformats.org/officeDocument/2006/relationships}id"/>
++ *       <attribute name="invalidUrl" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
++ *       <attribute name="action" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
++ *       <attribute name="tgtFrame" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
++ *       <attribute name="tooltip" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
++ *       <attribute name="history" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
++ *       <attribute name="highlightClick" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *       <attribute name="endSnd" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Hyperlink", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "snd", ++ "extLst" ++}) ++public class CTHyperlink { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTEmbeddedWAVAudioFile snd; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTOfficeArtExtensionList extLst; ++ @XmlAttribute(name = "id", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships") ++ protected String id; ++ @XmlAttribute(name = "invalidUrl") ++ protected String invalidUrl; ++ @XmlAttribute(name = "action") ++ protected String action; ++ @XmlAttribute(name = "tgtFrame") ++ protected String tgtFrame; ++ @XmlAttribute(name = "tooltip") ++ protected String tooltip; ++ @XmlAttribute(name = "history") ++ protected Boolean history; ++ @XmlAttribute(name = "highlightClick") ++ protected Boolean highlightClick; ++ @XmlAttribute(name = "endSnd") ++ protected Boolean endSnd; ++ ++ /** ++ * Gets the value of the snd property. ++ * ++ * @return ++ * possible object is ++ * {@link CTEmbeddedWAVAudioFile } ++ * ++ */ ++ public CTEmbeddedWAVAudioFile getSnd() { ++ return snd; ++ } ++ ++ /** ++ * Sets the value of the snd property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTEmbeddedWAVAudioFile } ++ * ++ */ ++ public void setSnd(CTEmbeddedWAVAudioFile value) { ++ this.snd = value; ++ } ++ ++ public boolean isSetSnd() { ++ return (this.snd!= null); ++ } ++ ++ /** ++ * Gets the value of the extLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTOfficeArtExtensionList } ++ * ++ */ ++ public CTOfficeArtExtensionList getExtLst() { ++ return extLst; ++ } ++ ++ /** ++ * Sets the value of the extLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTOfficeArtExtensionList } ++ * ++ */ ++ public void setExtLst(CTOfficeArtExtensionList value) { ++ this.extLst = value; ++ } ++ ++ public boolean isSetExtLst() { ++ return (this.extLst!= null); ++ } ++ ++ /** ++ * Drawing Object Hyperlink Target ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getId() { ++ return id; ++ } ++ ++ /** ++ * Sets the value of the id property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setId(String value) { ++ this.id = value; ++ } ++ ++ public boolean isSetId() { ++ return (this.id!= null); ++ } ++ ++ /** ++ * Gets the value of the invalidUrl property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getInvalidUrl() { ++ if (invalidUrl == null) { ++ return ""; ++ } else { ++ return invalidUrl; ++ } ++ } ++ ++ /** ++ * Sets the value of the invalidUrl property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setInvalidUrl(String value) { ++ this.invalidUrl = value; ++ } ++ ++ public boolean isSetInvalidUrl() { ++ return (this.invalidUrl!= null); ++ } ++ ++ /** ++ * Gets the value of the action property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getAction() { ++ if (action == null) { ++ return ""; ++ } else { ++ return action; ++ } ++ } ++ ++ /** ++ * Sets the value of the action property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setAction(String value) { ++ this.action = value; ++ } ++ ++ public boolean isSetAction() { ++ return (this.action!= null); ++ } ++ ++ /** ++ * Gets the value of the tgtFrame property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getTgtFrame() { ++ if (tgtFrame == null) { ++ return ""; ++ } else { ++ return tgtFrame; ++ } ++ } ++ ++ /** ++ * Sets the value of the tgtFrame property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setTgtFrame(String value) { ++ this.tgtFrame = value; ++ } ++ ++ public boolean isSetTgtFrame() { ++ return (this.tgtFrame!= null); ++ } ++ ++ /** ++ * Gets the value of the tooltip property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getTooltip() { ++ if (tooltip == null) { ++ return ""; ++ } else { ++ return tooltip; ++ } ++ } ++ ++ /** ++ * Sets the value of the tooltip property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setTooltip(String value) { ++ this.tooltip = value; ++ } ++ ++ public boolean isSetTooltip() { ++ return (this.tooltip!= null); ++ } ++ ++ /** ++ * Gets the value of the history property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isHistory() { ++ if (history == null) { ++ return true; ++ } else { ++ return history; ++ } ++ } ++ ++ /** ++ * Sets the value of the history property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setHistory(boolean value) { ++ this.history = value; ++ } ++ ++ public boolean isSetHistory() { ++ return (this.history!= null); ++ } ++ ++ public void unsetHistory() { ++ this.history = null; ++ } ++ ++ /** ++ * Gets the value of the highlightClick property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isHighlightClick() { ++ if (highlightClick == null) { ++ return false; ++ } else { ++ return highlightClick; ++ } ++ } ++ ++ /** ++ * Sets the value of the highlightClick property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setHighlightClick(boolean value) { ++ this.highlightClick = value; ++ } ++ ++ public boolean isSetHighlightClick() { ++ return (this.highlightClick!= null); ++ } ++ ++ public void unsetHighlightClick() { ++ this.highlightClick = null; ++ } ++ ++ /** ++ * Gets the value of the endSnd property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isEndSnd() { ++ if (endSnd == null) { ++ return false; ++ } else { ++ return endSnd; ++ } ++ } ++ ++ /** ++ * Sets the value of the endSnd property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setEndSnd(boolean value) { ++ this.endSnd = value; ++ } ++ ++ public boolean isSetEndSnd() { ++ return (this.endSnd!= null); ++ } ++ ++ public void unsetEndSnd() { ++ this.endSnd = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTInverseGammaTransform.java index 0000000000,0000000000..eaff064d70 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTInverseGammaTransform.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_InverseGammaTransform complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_InverseGammaTransform">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_InverseGammaTransform", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTInverseGammaTransform { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTInverseTransform.java index 0000000000,0000000000..84af625337 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTInverseTransform.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_InverseTransform complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_InverseTransform">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_InverseTransform", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTInverseTransform { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTOfficeArtExtension.java index 0000000000,0000000000..ec864d3b53 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTOfficeArtExtension.java @@@ -1,0 -1,0 +1,122 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAnyElement; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlSchemaType; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++import org.w3c.dom.Element; ++ ++ ++/** ++ *

Java class for CT_OfficeArtExtension complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_OfficeArtExtension">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <any processContents='lax'/>
++ *       </sequence>
++ *       <attribute name="uri" type="{http://www.w3.org/2001/XMLSchema}token" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_OfficeArtExtension", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "any" ++}) ++public class CTOfficeArtExtension { ++ ++ @XmlAnyElement(lax = true) ++ protected Object any; ++ @XmlAttribute(name = "uri") ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ @XmlSchemaType(name = "token") ++ protected String uri; ++ ++ /** ++ * Gets the value of the any property. ++ * ++ * @return ++ * possible object is ++ * {@link Object } ++ * {@link Element } ++ * ++ */ ++ public Object getAny() { ++ return any; ++ } ++ ++ /** ++ * Sets the value of the any property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Object } ++ * {@link Element } ++ * ++ */ ++ public void setAny(Object value) { ++ this.any = value; ++ } ++ ++ public boolean isSetAny() { ++ return (this.any!= null); ++ } ++ ++ /** ++ * Gets the value of the uri property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getUri() { ++ return uri; ++ } ++ ++ /** ++ * Sets the value of the uri property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setUri(String value) { ++ this.uri = value; ++ } ++ ++ public boolean isSetUri() { ++ return (this.uri!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTOfficeArtExtensionList.java index 0000000000,0000000000..f0b54cb180 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTOfficeArtExtensionList.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_OfficeArtExtensionList complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_OfficeArtExtensionList">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_OfficeArtExtensionList"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_OfficeArtExtensionList", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "ext" ++}) ++public class CTOfficeArtExtensionList { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected List ext; ++ ++ /** ++ * Gets the value of the ext property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the ext property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getExt().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTOfficeArtExtension } ++ * ++ * ++ */ ++ public List getExt() { ++ if (ext == null) { ++ ext = new ArrayList(); ++ } ++ return this.ext; ++ } ++ ++ public boolean isSetExt() { ++ return ((this.ext!= null)&&(!this.ext.isEmpty())); ++ } ++ ++ public void unsetExt() { ++ this.ext = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2D.java index 0000000000,0000000000..5294812967 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2D.java @@@ -1,0 -1,0 +1,303 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlElements; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <choice maxOccurs="unbounded" minOccurs="0">
++ *         <element name="close" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DClose"/>
++ *         <element name="moveTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DMoveTo"/>
++ *         <element name="lnTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DLineTo"/>
++ *         <element name="arcTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DArcTo"/>
++ *         <element name="quadBezTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DQuadBezierTo"/>
++ *         <element name="cubicBezTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DCubicBezierTo"/>
++ *       </choice>
++ *       <attribute name="w" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" default="0" />
++ *       <attribute name="h" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" default="0" />
++ *       <attribute name="fill" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PathFillMode" default="norm" />
++ *       <attribute name="stroke" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
++ *       <attribute name="extrusionOk" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "closeOrMoveToOrLnTo" ++}) ++public class CTPath2D { ++ ++ @XmlElements({ ++ @XmlElement(name = "close", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DClose.class), ++ @XmlElement(name = "moveTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DMoveTo.class), ++ @XmlElement(name = "lnTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DLineTo.class), ++ @XmlElement(name = "arcTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DArcTo.class), ++ @XmlElement(name = "quadBezTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DQuadBezierTo.class), ++ @XmlElement(name = "cubicBezTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = CTPath2DCubicBezierTo.class) ++ }) ++ protected List closeOrMoveToOrLnTo; ++ @XmlAttribute(name = "w") ++ protected Long w; ++ @XmlAttribute(name = "h") ++ protected Long h; ++ @XmlAttribute(name = "fill") ++ protected STPathFillMode fill; ++ @XmlAttribute(name = "stroke") ++ protected Boolean stroke; ++ @XmlAttribute(name = "extrusionOk") ++ protected Boolean extrusionOk; ++ ++ /** ++ * Gets the value of the closeOrMoveToOrLnTo property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the closeOrMoveToOrLnTo property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getCloseOrMoveToOrLnTo().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTPath2DClose } ++ * {@link CTPath2DMoveTo } ++ * {@link CTPath2DLineTo } ++ * {@link CTPath2DArcTo } ++ * {@link CTPath2DQuadBezierTo } ++ * {@link CTPath2DCubicBezierTo } ++ * ++ * ++ */ ++ public List getCloseOrMoveToOrLnTo() { ++ if (closeOrMoveToOrLnTo == null) { ++ closeOrMoveToOrLnTo = new ArrayList(); ++ } ++ return this.closeOrMoveToOrLnTo; ++ } ++ ++ public boolean isSetCloseOrMoveToOrLnTo() { ++ return ((this.closeOrMoveToOrLnTo!= null)&&(!this.closeOrMoveToOrLnTo.isEmpty())); ++ } ++ ++ public void unsetCloseOrMoveToOrLnTo() { ++ this.closeOrMoveToOrLnTo = null; ++ } ++ ++ /** ++ * Gets the value of the w property. ++ * ++ * @return ++ * possible object is ++ * {@link Long } ++ * ++ */ ++ public long getW() { ++ if (w == null) { ++ return 0L; ++ } else { ++ return w; ++ } ++ } ++ ++ /** ++ * Sets the value of the w property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Long } ++ * ++ */ ++ public void setW(long value) { ++ this.w = value; ++ } ++ ++ public boolean isSetW() { ++ return (this.w!= null); ++ } ++ ++ public void unsetW() { ++ this.w = null; ++ } ++ ++ /** ++ * Gets the value of the h property. ++ * ++ * @return ++ * possible object is ++ * {@link Long } ++ * ++ */ ++ public long getH() { ++ if (h == null) { ++ return 0L; ++ } else { ++ return h; ++ } ++ } ++ ++ /** ++ * Sets the value of the h property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Long } ++ * ++ */ ++ public void setH(long value) { ++ this.h = value; ++ } ++ ++ public boolean isSetH() { ++ return (this.h!= null); ++ } ++ ++ public void unsetH() { ++ this.h = null; ++ } ++ ++ /** ++ * Gets the value of the fill property. ++ * ++ * @return ++ * possible object is ++ * {@link STPathFillMode } ++ * ++ */ ++ public STPathFillMode getFill() { ++ if (fill == null) { ++ return STPathFillMode.NORM; ++ } else { ++ return fill; ++ } ++ } ++ ++ /** ++ * Sets the value of the fill property. ++ * ++ * @param value ++ * allowed object is ++ * {@link STPathFillMode } ++ * ++ */ ++ public void setFill(STPathFillMode value) { ++ this.fill = value; ++ } ++ ++ public boolean isSetFill() { ++ return (this.fill!= null); ++ } ++ ++ /** ++ * Gets the value of the stroke property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isStroke() { ++ if (stroke == null) { ++ return true; ++ } else { ++ return stroke; ++ } ++ } ++ ++ /** ++ * Sets the value of the stroke property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setStroke(boolean value) { ++ this.stroke = value; ++ } ++ ++ public boolean isSetStroke() { ++ return (this.stroke!= null); ++ } ++ ++ public void unsetStroke() { ++ this.stroke = null; ++ } ++ ++ /** ++ * Gets the value of the extrusionOk property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isExtrusionOk() { ++ if (extrusionOk == null) { ++ return true; ++ } else { ++ return extrusionOk; ++ } ++ } ++ ++ /** ++ * Sets the value of the extrusionOk property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setExtrusionOk(boolean value) { ++ this.extrusionOk = value; ++ } ++ ++ public boolean isSetExtrusionOk() { ++ return (this.extrusionOk!= null); ++ } ++ ++ public void unsetExtrusionOk() { ++ this.extrusionOk = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DArcTo.java index 0000000000,0000000000..5464ee4d14 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DArcTo.java @@@ -1,0 -1,0 +1,171 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DArcTo complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DArcTo">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="wR" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="hR" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="stAng" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
++ *       <attribute name="swAng" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DArcTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPath2DArcTo { ++ ++ @XmlAttribute(name = "wR", required = true) ++ protected String wr; ++ @XmlAttribute(name = "hR", required = true) ++ protected String hr; ++ @XmlAttribute(name = "stAng", required = true) ++ protected String stAng; ++ @XmlAttribute(name = "swAng", required = true) ++ protected String swAng; ++ ++ /** ++ * Gets the value of the wr property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getWR() { ++ return wr; ++ } ++ ++ /** ++ * Sets the value of the wr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setWR(String value) { ++ this.wr = value; ++ } ++ ++ public boolean isSetWR() { ++ return (this.wr!= null); ++ } ++ ++ /** ++ * Gets the value of the hr property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getHR() { ++ return hr; ++ } ++ ++ /** ++ * Sets the value of the hr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setHR(String value) { ++ this.hr = value; ++ } ++ ++ public boolean isSetHR() { ++ return (this.hr!= null); ++ } ++ ++ /** ++ * Gets the value of the stAng property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getStAng() { ++ return stAng; ++ } ++ ++ /** ++ * Sets the value of the stAng property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setStAng(String value) { ++ this.stAng = value; ++ } ++ ++ public boolean isSetStAng() { ++ return (this.stAng!= null); ++ } ++ ++ /** ++ * Gets the value of the swAng property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getSwAng() { ++ return swAng; ++ } ++ ++ /** ++ * Sets the value of the swAng property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setSwAng(String value) { ++ this.swAng = value; ++ } ++ ++ public boolean isSetSwAng() { ++ return (this.swAng!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DClose.java index 0000000000,0000000000..a60f98bb67 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DClose.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DClose complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DClose">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DClose", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPath2DClose { ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DCubicBezierTo.java index 0000000000,0000000000..e1818fa5db new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DCubicBezierTo.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DCubicBezierTo complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DCubicBezierTo">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pt" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D" maxOccurs="3" minOccurs="3"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DCubicBezierTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pt" ++}) ++public class CTPath2DCubicBezierTo { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected List pt; ++ ++ /** ++ * Gets the value of the pt property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the pt property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getPt().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTAdjPoint2D } ++ * ++ * ++ */ ++ public List getPt() { ++ if (pt == null) { ++ pt = new ArrayList(); ++ } ++ return this.pt; ++ } ++ ++ public boolean isSetPt() { ++ return ((this.pt!= null)&&(!this.pt.isEmpty())); ++ } ++ ++ public void unsetPt() { ++ this.pt = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DLineTo.java index 0000000000,0000000000..9c6d1b39a8 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DLineTo.java @@@ -1,0 -1,0 +1,82 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DLineTo complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DLineTo">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pt" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DLineTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pt" ++}) ++public class CTPath2DLineTo { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTAdjPoint2D pt; ++ ++ /** ++ * Gets the value of the pt property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D getPt() { ++ return pt; ++ } ++ ++ /** ++ * Sets the value of the pt property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public void setPt(CTAdjPoint2D value) { ++ this.pt = value; ++ } ++ ++ public boolean isSetPt() { ++ return (this.pt!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DList.java index 0000000000,0000000000..cd31a0ba57 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DList.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DList complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DList">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="path" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2D" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DList", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "path" ++}) ++public class CTPath2DList { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected List path; ++ ++ /** ++ * Gets the value of the path property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the path property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getPath().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTPath2D } ++ * ++ * ++ */ ++ public List getPath() { ++ if (path == null) { ++ path = new ArrayList(); ++ } ++ return this.path; ++ } ++ ++ public boolean isSetPath() { ++ return ((this.path!= null)&&(!this.path.isEmpty())); ++ } ++ ++ public void unsetPath() { ++ this.path = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DMoveTo.java index 0000000000,0000000000..f5e210f768 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DMoveTo.java @@@ -1,0 -1,0 +1,82 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DMoveTo complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DMoveTo">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pt" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DMoveTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pt" ++}) ++public class CTPath2DMoveTo { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTAdjPoint2D pt; ++ ++ /** ++ * Gets the value of the pt property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D getPt() { ++ return pt; ++ } ++ ++ /** ++ * Sets the value of the pt property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public void setPt(CTAdjPoint2D value) { ++ this.pt = value; ++ } ++ ++ public boolean isSetPt() { ++ return (this.pt!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPath2DQuadBezierTo.java index 0000000000,0000000000..b588775245 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPath2DQuadBezierTo.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Path2DQuadBezierTo complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Path2DQuadBezierTo">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pt" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D" maxOccurs="2" minOccurs="2"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Path2DQuadBezierTo", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pt" ++}) ++public class CTPath2DQuadBezierTo { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected List pt; ++ ++ /** ++ * Gets the value of the pt property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the pt property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getPt().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link CTAdjPoint2D } ++ * ++ * ++ */ ++ public List getPt() { ++ if (pt == null) { ++ pt = new ArrayList(); ++ } ++ return this.pt; ++ } ++ ++ public boolean isSetPt() { ++ return ((this.pt!= null)&&(!this.pt.isEmpty())); ++ } ++ ++ public void unsetPt() { ++ this.pt = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPercentage.java index 0000000000,0000000000..e1a74b53e5 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPercentage.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Percentage complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Percentage">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Percentage", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPercentage { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPoint2D.java index 0000000000,0000000000..06cbfbc7aa new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPoint2D.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Point2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Point2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="x" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *       <attribute name="y" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Point2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPoint2D { ++ ++ @XmlAttribute(name = "x", required = true) ++ protected long x; ++ @XmlAttribute(name = "y", required = true) ++ protected long y; ++ ++ /** ++ * Gets the value of the x property. ++ * ++ */ ++ public long getX() { ++ return x; ++ } ++ ++ /** ++ * Sets the value of the x property. ++ * ++ */ ++ public void setX(long value) { ++ this.x = value; ++ } ++ ++ public boolean isSetX() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the y property. ++ * ++ */ ++ public long getY() { ++ return y; ++ } ++ ++ /** ++ * Sets the value of the y property. ++ * ++ */ ++ public void setY(long value) { ++ this.y = value; ++ } ++ ++ public boolean isSetY() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPoint3D.java index 0000000000,0000000000..3cbeb670f9 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPoint3D.java @@@ -1,0 -1,0 +1,116 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Point3D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Point3D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="x" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *       <attribute name="y" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *       <attribute name="z" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Point3D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPoint3D { ++ ++ @XmlAttribute(name = "x", required = true) ++ protected long x; ++ @XmlAttribute(name = "y", required = true) ++ protected long y; ++ @XmlAttribute(name = "z", required = true) ++ protected long z; ++ ++ /** ++ * Gets the value of the x property. ++ * ++ */ ++ public long getX() { ++ return x; ++ } ++ ++ /** ++ * Sets the value of the x property. ++ * ++ */ ++ public void setX(long value) { ++ this.x = value; ++ } ++ ++ public boolean isSetX() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the y property. ++ * ++ */ ++ public long getY() { ++ return y; ++ } ++ ++ /** ++ * Sets the value of the y property. ++ * ++ */ ++ public void setY(long value) { ++ this.y = value; ++ } ++ ++ public boolean isSetY() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the z property. ++ * ++ */ ++ public long getZ() { ++ return z; ++ } ++ ++ /** ++ * Sets the value of the z property. ++ * ++ */ ++ public void setZ(long value) { ++ this.z = value; ++ } ++ ++ public boolean isSetZ() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPolarAdjustHandle.java index 0000000000,0000000000..646dad5b58 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPolarAdjustHandle.java @@@ -1,0 -1,0 +1,273 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++ ++ ++/** ++ *

Java class for CT_PolarAdjustHandle complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PolarAdjustHandle">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pos" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D"/>
++ *       </sequence>
++ *       <attribute name="gdRefR" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideName" />
++ *       <attribute name="minR" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="maxR" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="gdRefAng" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideName" />
++ *       <attribute name="minAng" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
++ *       <attribute name="maxAng" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PolarAdjustHandle", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pos" ++}) ++public class CTPolarAdjustHandle { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTAdjPoint2D pos; ++ @XmlAttribute(name = "gdRefR") ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String gdRefR; ++ @XmlAttribute(name = "minR") ++ protected String minR; ++ @XmlAttribute(name = "maxR") ++ protected String maxR; ++ @XmlAttribute(name = "gdRefAng") ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String gdRefAng; ++ @XmlAttribute(name = "minAng") ++ protected String minAng; ++ @XmlAttribute(name = "maxAng") ++ protected String maxAng; ++ ++ /** ++ * Gets the value of the pos property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D getPos() { ++ return pos; ++ } ++ ++ /** ++ * Sets the value of the pos property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public void setPos(CTAdjPoint2D value) { ++ this.pos = value; ++ } ++ ++ public boolean isSetPos() { ++ return (this.pos!= null); ++ } ++ ++ /** ++ * Gets the value of the gdRefR property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getGdRefR() { ++ return gdRefR; ++ } ++ ++ /** ++ * Sets the value of the gdRefR property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setGdRefR(String value) { ++ this.gdRefR = value; ++ } ++ ++ public boolean isSetGdRefR() { ++ return (this.gdRefR!= null); ++ } ++ ++ /** ++ * Gets the value of the minR property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMinR() { ++ return minR; ++ } ++ ++ /** ++ * Sets the value of the minR property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMinR(String value) { ++ this.minR = value; ++ } ++ ++ public boolean isSetMinR() { ++ return (this.minR!= null); ++ } ++ ++ /** ++ * Gets the value of the maxR property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMaxR() { ++ return maxR; ++ } ++ ++ /** ++ * Sets the value of the maxR property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMaxR(String value) { ++ this.maxR = value; ++ } ++ ++ public boolean isSetMaxR() { ++ return (this.maxR!= null); ++ } ++ ++ /** ++ * Gets the value of the gdRefAng property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getGdRefAng() { ++ return gdRefAng; ++ } ++ ++ /** ++ * Sets the value of the gdRefAng property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setGdRefAng(String value) { ++ this.gdRefAng = value; ++ } ++ ++ public boolean isSetGdRefAng() { ++ return (this.gdRefAng!= null); ++ } ++ ++ /** ++ * Gets the value of the minAng property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMinAng() { ++ return minAng; ++ } ++ ++ /** ++ * Sets the value of the minAng property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMinAng(String value) { ++ this.minAng = value; ++ } ++ ++ public boolean isSetMinAng() { ++ return (this.minAng!= null); ++ } ++ ++ /** ++ * Gets the value of the maxAng property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMaxAng() { ++ return maxAng; ++ } ++ ++ /** ++ * Sets the value of the maxAng property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMaxAng(String value) { ++ this.maxAng = value; ++ } ++ ++ public boolean isSetMaxAng() { ++ return (this.maxAng!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPositiveFixedAngle.java index 0000000000,0000000000..962db95137 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPositiveFixedAngle.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PositiveFixedAngle complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PositiveFixedAngle">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedAngle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PositiveFixedAngle", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPositiveFixedAngle { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPositiveFixedPercentage.java index 0000000000,0000000000..001f01adce new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPositiveFixedPercentage.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PositiveFixedPercentage complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PositiveFixedPercentage">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedPercentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PositiveFixedPercentage", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPositiveFixedPercentage { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPositivePercentage.java index 0000000000,0000000000..8fc61f301f new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPositivePercentage.java @@@ -1,0 -1,0 +1,70 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PositivePercentage complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PositivePercentage">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositivePercentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PositivePercentage", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPositivePercentage { ++ ++ @XmlAttribute(name = "val", required = true) ++ protected int val; ++ ++ /** ++ * Gets the value of the val property. ++ * ++ */ ++ public int getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ */ ++ public void setVal(int value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPositiveSize2D.java index 0000000000,0000000000..c8d76e6e56 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPositiveSize2D.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PositiveSize2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PositiveSize2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="cx" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" />
++ *       <attribute name="cy" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PositiveSize2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTPositiveSize2D { ++ ++ @XmlAttribute(name = "cx", required = true) ++ protected long cx; ++ @XmlAttribute(name = "cy", required = true) ++ protected long cy; ++ ++ /** ++ * Gets the value of the cx property. ++ * ++ */ ++ public long getCx() { ++ return cx; ++ } ++ ++ /** ++ * Sets the value of the cx property. ++ * ++ */ ++ public void setCx(long value) { ++ this.cx = value; ++ } ++ ++ public boolean isSetCx() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the cy property. ++ * ++ */ ++ public long getCy() { ++ return cy; ++ } ++ ++ /** ++ * Sets the value of the cy property. ++ * ++ */ ++ public void setCy(long value) { ++ this.cy = value; ++ } ++ ++ public boolean isSetCy() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPresetColor.java index 0000000000,0000000000..e240a711a0 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPresetColor.java @@@ -1,0 -1,0 +1,183 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PresetColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PresetColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="val" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PresetColorVal" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PresetColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTPresetColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "val") ++ protected STPresetColorVal val; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the val property. ++ * ++ * @return ++ * possible object is ++ * {@link STPresetColorVal } ++ * ++ */ ++ public STPresetColorVal getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ * @param value ++ * allowed object is ++ * {@link STPresetColorVal } ++ * ++ */ ++ public void setVal(STPresetColorVal value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return (this.val!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPresetGeometry2D.java index 0000000000,0000000000..b55b02ea07 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPresetGeometry2D.java @@@ -1,0 -1,0 +1,114 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PresetGeometry2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PresetGeometry2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="avLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomGuideList" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="prst" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_ShapeType" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PresetGeometry2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "avLst" ++}) ++public class CTPresetGeometry2D { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTGeomGuideList avLst; ++ @XmlAttribute(name = "prst", required = true) ++ protected STShapeType prst; ++ ++ /** ++ * Gets the value of the avLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public CTGeomGuideList getAvLst() { ++ return avLst; ++ } ++ ++ /** ++ * Sets the value of the avLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public void setAvLst(CTGeomGuideList value) { ++ this.avLst = value; ++ } ++ ++ public boolean isSetAvLst() { ++ return (this.avLst!= null); ++ } ++ ++ /** ++ * Gets the value of the prst property. ++ * ++ * @return ++ * possible object is ++ * {@link STShapeType } ++ * ++ */ ++ public STShapeType getPrst() { ++ return prst; ++ } ++ ++ /** ++ * Sets the value of the prst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link STShapeType } ++ * ++ */ ++ public void setPrst(STShapeType value) { ++ this.prst = value; ++ } ++ ++ public boolean isSetPrst() { ++ return (this.prst!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTPresetTextShape.java index 0000000000,0000000000..f7082b353b new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTPresetTextShape.java @@@ -1,0 -1,0 +1,114 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_PresetTextShape complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_PresetTextShape">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="avLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GeomGuideList" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="prst" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_TextShapeType" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_PresetTextShape", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "avLst" ++}) ++public class CTPresetTextShape { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTGeomGuideList avLst; ++ @XmlAttribute(name = "prst", required = true) ++ protected STTextShapeType prst; ++ ++ /** ++ * Gets the value of the avLst property. ++ * ++ * @return ++ * possible object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public CTGeomGuideList getAvLst() { ++ return avLst; ++ } ++ ++ /** ++ * Sets the value of the avLst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTGeomGuideList } ++ * ++ */ ++ public void setAvLst(CTGeomGuideList value) { ++ this.avLst = value; ++ } ++ ++ public boolean isSetAvLst() { ++ return (this.avLst!= null); ++ } ++ ++ /** ++ * Gets the value of the prst property. ++ * ++ * @return ++ * possible object is ++ * {@link STTextShapeType } ++ * ++ */ ++ public STTextShapeType getPrst() { ++ return prst; ++ } ++ ++ /** ++ * Sets the value of the prst property. ++ * ++ * @param value ++ * allowed object is ++ * {@link STTextShapeType } ++ * ++ */ ++ public void setPrst(STTextShapeType value) { ++ this.prst = value; ++ } ++ ++ public boolean isSetPrst() { ++ return (this.prst!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTRatio.java index 0000000000,0000000000..3a951c1f1f new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTRatio.java @@@ -1,0 -1,0 +1,93 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Ratio complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Ratio">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="n" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
++ *       <attribute name="d" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Ratio", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTRatio { ++ ++ @XmlAttribute(name = "n", required = true) ++ protected long n; ++ @XmlAttribute(name = "d", required = true) ++ protected long d; ++ ++ /** ++ * Gets the value of the n property. ++ * ++ */ ++ public long getN() { ++ return n; ++ } ++ ++ /** ++ * Sets the value of the n property. ++ * ++ */ ++ public void setN(long value) { ++ this.n = value; ++ } ++ ++ public boolean isSetN() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the d property. ++ * ++ */ ++ public long getD() { ++ return d; ++ } ++ ++ /** ++ * Sets the value of the d property. ++ * ++ */ ++ public void setD(long value) { ++ this.d = value; ++ } ++ ++ public boolean isSetD() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTRelativeRect.java index 0000000000,0000000000..e332bd83c9 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTRelativeRect.java @@@ -1,0 -1,0 +1,203 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_RelativeRect complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_RelativeRect">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="l" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" default="0" />
++ *       <attribute name="t" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" default="0" />
++ *       <attribute name="r" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" default="0" />
++ *       <attribute name="b" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" default="0" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_RelativeRect", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTRelativeRect { ++ ++ @XmlAttribute(name = "l") ++ protected Integer l; ++ @XmlAttribute(name = "t") ++ protected Integer t; ++ @XmlAttribute(name = "r") ++ protected Integer r; ++ @XmlAttribute(name = "b") ++ protected Integer b; ++ ++ /** ++ * Gets the value of the l property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getL() { ++ if (l == null) { ++ return 0; ++ } else { ++ return l; ++ } ++ } ++ ++ /** ++ * Sets the value of the l property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setL(int value) { ++ this.l = value; ++ } ++ ++ public boolean isSetL() { ++ return (this.l!= null); ++ } ++ ++ public void unsetL() { ++ this.l = null; ++ } ++ ++ /** ++ * Gets the value of the t property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getT() { ++ if (t == null) { ++ return 0; ++ } else { ++ return t; ++ } ++ } ++ ++ /** ++ * Sets the value of the t property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setT(int value) { ++ this.t = value; ++ } ++ ++ public boolean isSetT() { ++ return (this.t!= null); ++ } ++ ++ public void unsetT() { ++ this.t = null; ++ } ++ ++ /** ++ * Gets the value of the r property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getR() { ++ if (r == null) { ++ return 0; ++ } else { ++ return r; ++ } ++ } ++ ++ /** ++ * Sets the value of the r property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setR(int value) { ++ this.r = value; ++ } ++ ++ public boolean isSetR() { ++ return (this.r!= null); ++ } ++ ++ public void unsetR() { ++ this.r = null; ++ } ++ ++ /** ++ * Gets the value of the b property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getB() { ++ if (b == null) { ++ return 0; ++ } else { ++ return b; ++ } ++ } ++ ++ /** ++ * Sets the value of the b property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setB(int value) { ++ this.b = value; ++ } ++ ++ public boolean isSetB() { ++ return (this.b!= null); ++ } ++ ++ public void unsetB() { ++ this.b = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTSRgbColor.java index 0000000000,0000000000..ef920d601a new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTSRgbColor.java @@@ -1,0 -1,0 +1,186 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.HexBinaryAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++ ++ ++/** ++ *

Java class for CT_SRgbColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_SRgbColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_HexBinary3" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_SRgbColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTSRgbColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "val", required = true) ++ @XmlJavaTypeAdapter(HexBinaryAdapter.class) ++ protected byte[] val; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the val property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public byte[] getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setVal(byte[] value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return (this.val!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTScRgbColor.java index 0000000000,0000000000..335e4b2912 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTScRgbColor.java @@@ -1,0 -1,0 +1,221 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_ScRgbColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_ScRgbColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="r" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *       <attribute name="g" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *       <attribute name="b" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Percentage" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_ScRgbColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTScRgbColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "r", required = true) ++ protected int r; ++ @XmlAttribute(name = "g", required = true) ++ protected int g; ++ @XmlAttribute(name = "b", required = true) ++ protected int b; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the r property. ++ * ++ */ ++ public int getR() { ++ return r; ++ } ++ ++ /** ++ * Sets the value of the r property. ++ * ++ */ ++ public void setR(int value) { ++ this.r = value; ++ } ++ ++ public boolean isSetR() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the g property. ++ * ++ */ ++ public int getG() { ++ return g; ++ } ++ ++ /** ++ * Sets the value of the g property. ++ * ++ */ ++ public void setG(int value) { ++ this.g = value; ++ } ++ ++ public boolean isSetG() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the b property. ++ * ++ */ ++ public int getB() { ++ return b; ++ } ++ ++ /** ++ * Sets the value of the b property. ++ * ++ */ ++ public void setB(int value) { ++ this.b = value; ++ } ++ ++ public boolean isSetB() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTScale2D.java index 0000000000,0000000000..2e8eba1940 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTScale2D.java @@@ -1,0 -1,0 +1,114 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Scale2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Scale2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="sx" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Ratio"/>
++ *         <element name="sy" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Ratio"/>
++ *       </sequence>
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Scale2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "sx", ++ "sy" ++}) ++public class CTScale2D { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTRatio sx; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTRatio sy; ++ ++ /** ++ * Gets the value of the sx property. ++ * ++ * @return ++ * possible object is ++ * {@link CTRatio } ++ * ++ */ ++ public CTRatio getSx() { ++ return sx; ++ } ++ ++ /** ++ * Sets the value of the sx property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTRatio } ++ * ++ */ ++ public void setSx(CTRatio value) { ++ this.sx = value; ++ } ++ ++ public boolean isSetSx() { ++ return (this.sx!= null); ++ } ++ ++ /** ++ * Gets the value of the sy property. ++ * ++ * @return ++ * possible object is ++ * {@link CTRatio } ++ * ++ */ ++ public CTRatio getSy() { ++ return sy; ++ } ++ ++ /** ++ * Sets the value of the sy property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTRatio } ++ * ++ */ ++ public void setSy(CTRatio value) { ++ this.sy = value; ++ } ++ ++ public boolean isSetSy() { ++ return (this.sy!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTSchemeColor.java index 0000000000,0000000000..7febaad838 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTSchemeColor.java @@@ -1,0 -1,0 +1,183 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_SchemeColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_SchemeColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_SchemeColorVal" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_SchemeColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTSchemeColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "val", required = true) ++ protected STSchemeColorVal val; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the val property. ++ * ++ * @return ++ * possible object is ++ * {@link STSchemeColorVal } ++ * ++ */ ++ public STSchemeColorVal getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ * @param value ++ * allowed object is ++ * {@link STSchemeColorVal } ++ * ++ */ ++ public void setVal(STSchemeColorVal value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return (this.val!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTSphereCoords.java index 0000000000,0000000000..a29d744465 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTSphereCoords.java @@@ -1,0 -1,0 +1,116 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_SphereCoords complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_SphereCoords">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="lat" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedAngle" />
++ *       <attribute name="lon" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedAngle" />
++ *       <attribute name="rev" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveFixedAngle" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_SphereCoords", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTSphereCoords { ++ ++ @XmlAttribute(name = "lat", required = true) ++ protected int lat; ++ @XmlAttribute(name = "lon", required = true) ++ protected int lon; ++ @XmlAttribute(name = "rev", required = true) ++ protected int rev; ++ ++ /** ++ * Gets the value of the lat property. ++ * ++ */ ++ public int getLat() { ++ return lat; ++ } ++ ++ /** ++ * Sets the value of the lat property. ++ * ++ */ ++ public void setLat(int value) { ++ this.lat = value; ++ } ++ ++ public boolean isSetLat() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the lon property. ++ * ++ */ ++ public int getLon() { ++ return lon; ++ } ++ ++ /** ++ * Sets the value of the lon property. ++ * ++ */ ++ public void setLon(int value) { ++ this.lon = value; ++ } ++ ++ public boolean isSetLon() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the rev property. ++ * ++ */ ++ public int getRev() { ++ return rev; ++ } ++ ++ /** ++ * Sets the value of the rev property. ++ * ++ */ ++ public void setRev(int value) { ++ this.rev = value; ++ } ++ ++ public boolean isSetRev() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTSystemColor.java index 0000000000,0000000000..adf0d16b2e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTSystemColor.java @@@ -1,0 -1,0 +1,219 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import java.util.ArrayList; ++import java.util.List; ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElementRef; ++import javax.xml.bind.annotation.XmlElementRefs; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; ++import javax.xml.bind.annotation.adapters.HexBinaryAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++ ++ ++/** ++ *

Java class for CT_SystemColor complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_SystemColor">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <group ref="{http://schemas.openxmlformats.org/drawingml/2006/main}EG_ColorTransform" maxOccurs="unbounded" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="val" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_SystemColorVal" />
++ *       <attribute name="lastClr" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_HexBinary3" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_SystemColor", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "egColorTransform" ++}) ++public class CTSystemColor { ++ ++ @XmlElementRefs({ ++ @XmlElementRef(name = "alphaMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lum", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "sat", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "red", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "invGamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "comp", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "lumOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "greenOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alphaOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "green", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "inv", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "alpha", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "shade", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "blue", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "redMod", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "hueOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gray", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "gamma", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "tint", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false), ++ @XmlElementRef(name = "satOff", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", type = JAXBElement.class, required = false) ++ }) ++ protected List> egColorTransform; ++ @XmlAttribute(name = "val", required = true) ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String val; ++ @XmlAttribute(name = "lastClr") ++ @XmlJavaTypeAdapter(HexBinaryAdapter.class) ++ protected byte[] lastClr; ++ ++ /** ++ * Gets the value of the egColorTransform property. ++ * ++ *

++ * This accessor method returns a reference to the live list, ++ * not a snapshot. Therefore any modification you make to the ++ * returned list will be present inside the JAXB object. ++ * This is why there is not a set method for the egColorTransform property. ++ * ++ *

++ * For example, to add a new item, do as follows: ++ *

++     *    getEGColorTransform().add(newItem);
++     * 
++ * ++ * ++ *

++ * Objects of the following type(s) are allowed in the list ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTAngle }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPercentage }{@code >} ++ * {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >} ++ * ++ * ++ */ ++ public List> getEGColorTransform() { ++ if (egColorTransform == null) { ++ egColorTransform = new ArrayList>(); ++ } ++ return this.egColorTransform; ++ } ++ ++ public boolean isSetEGColorTransform() { ++ return ((this.egColorTransform!= null)&&(!this.egColorTransform.isEmpty())); ++ } ++ ++ public void unsetEGColorTransform() { ++ this.egColorTransform = null; ++ } ++ ++ /** ++ * Gets the value of the val property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getVal() { ++ return val; ++ } ++ ++ /** ++ * Sets the value of the val property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setVal(String value) { ++ this.val = value; ++ } ++ ++ public boolean isSetVal() { ++ return (this.val!= null); ++ } ++ ++ /** ++ * Gets the value of the lastClr property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public byte[] getLastClr() { ++ return lastClr; ++ } ++ ++ /** ++ * Sets the value of the lastClr property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setLastClr(byte[] value) { ++ this.lastClr = value; ++ } ++ ++ public boolean isSetLastClr() { ++ return (this.lastClr!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTTransform2D.java index 0000000000,0000000000..38ec50e654 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTTransform2D.java @@@ -1,0 -1,0 +1,232 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Transform2D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Transform2D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="off" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Point2D" minOccurs="0"/>
++ *         <element name="ext" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_PositiveSize2D" minOccurs="0"/>
++ *       </sequence>
++ *       <attribute name="rot" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Angle" default="0" />
++ *       <attribute name="flipH" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *       <attribute name="flipV" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Transform2D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "off", ++ "ext" ++}) ++public class CTTransform2D { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPoint2D off; ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++ protected CTPositiveSize2D ext; ++ @XmlAttribute(name = "rot") ++ protected Integer rot; ++ @XmlAttribute(name = "flipH") ++ protected Boolean flipH; ++ @XmlAttribute(name = "flipV") ++ protected Boolean flipV; ++ ++ /** ++ * Gets the value of the off property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public CTPoint2D getOff() { ++ return off; ++ } ++ ++ /** ++ * Sets the value of the off property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPoint2D } ++ * ++ */ ++ public void setOff(CTPoint2D value) { ++ this.off = value; ++ } ++ ++ public boolean isSetOff() { ++ return (this.off!= null); ++ } ++ ++ /** ++ * Gets the value of the ext property. ++ * ++ * @return ++ * possible object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public CTPositiveSize2D getExt() { ++ return ext; ++ } ++ ++ /** ++ * Sets the value of the ext property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTPositiveSize2D } ++ * ++ */ ++ public void setExt(CTPositiveSize2D value) { ++ this.ext = value; ++ } ++ ++ public boolean isSetExt() { ++ return (this.ext!= null); ++ } ++ ++ /** ++ * Gets the value of the rot property. ++ * ++ * @return ++ * possible object is ++ * {@link Integer } ++ * ++ */ ++ public int getRot() { ++ if (rot == null) { ++ return 0; ++ } else { ++ return rot; ++ } ++ } ++ ++ /** ++ * Sets the value of the rot property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Integer } ++ * ++ */ ++ public void setRot(int value) { ++ this.rot = value; ++ } ++ ++ public boolean isSetRot() { ++ return (this.rot!= null); ++ } ++ ++ public void unsetRot() { ++ this.rot = null; ++ } ++ ++ /** ++ * Gets the value of the flipH property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isFlipH() { ++ if (flipH == null) { ++ return false; ++ } else { ++ return flipH; ++ } ++ } ++ ++ /** ++ * Sets the value of the flipH property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setFlipH(boolean value) { ++ this.flipH = value; ++ } ++ ++ public boolean isSetFlipH() { ++ return (this.flipH!= null); ++ } ++ ++ public void unsetFlipH() { ++ this.flipH = null; ++ } ++ ++ /** ++ * Gets the value of the flipV property. ++ * ++ * @return ++ * possible object is ++ * {@link Boolean } ++ * ++ */ ++ public boolean isFlipV() { ++ if (flipV == null) { ++ return false; ++ } else { ++ return flipV; ++ } ++ } ++ ++ /** ++ * Sets the value of the flipV property. ++ * ++ * @param value ++ * allowed object is ++ * {@link Boolean } ++ * ++ */ ++ public void setFlipV(boolean value) { ++ this.flipV = value; ++ } ++ ++ public boolean isSetFlipV() { ++ return (this.flipV!= null); ++ } ++ ++ public void unsetFlipV() { ++ this.flipV = null; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTVector3D.java index 0000000000,0000000000..03c5fb8e44 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTVector3D.java @@@ -1,0 -1,0 +1,116 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for CT_Vector3D complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_Vector3D">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <attribute name="dx" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *       <attribute name="dy" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *       <attribute name="dz" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_Coordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_Vector3D", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++public class CTVector3D { ++ ++ @XmlAttribute(name = "dx", required = true) ++ protected long dx; ++ @XmlAttribute(name = "dy", required = true) ++ protected long dy; ++ @XmlAttribute(name = "dz", required = true) ++ protected long dz; ++ ++ /** ++ * Gets the value of the dx property. ++ * ++ */ ++ public long getDx() { ++ return dx; ++ } ++ ++ /** ++ * Sets the value of the dx property. ++ * ++ */ ++ public void setDx(long value) { ++ this.dx = value; ++ } ++ ++ public boolean isSetDx() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the dy property. ++ * ++ */ ++ public long getDy() { ++ return dy; ++ } ++ ++ /** ++ * Sets the value of the dy property. ++ * ++ */ ++ public void setDy(long value) { ++ this.dy = value; ++ } ++ ++ public boolean isSetDy() { ++ return true; ++ } ++ ++ /** ++ * Gets the value of the dz property. ++ * ++ */ ++ public long getDz() { ++ return dz; ++ } ++ ++ /** ++ * Sets the value of the dz property. ++ * ++ */ ++ public void setDz(long value) { ++ this.dz = value; ++ } ++ ++ public boolean isSetDz() { ++ return true; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/CTXYAdjustHandle.java index 0000000000,0000000000..85c30bac54 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/CTXYAdjustHandle.java @@@ -1,0 -1,0 +1,273 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlAccessType; ++import javax.xml.bind.annotation.XmlAccessorType; ++import javax.xml.bind.annotation.XmlAttribute; ++import javax.xml.bind.annotation.XmlElement; ++import javax.xml.bind.annotation.XmlType; ++import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; ++import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ++ ++ ++/** ++ *

Java class for CT_XYAdjustHandle complex type. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ * ++ *

++ * <complexType name="CT_XYAdjustHandle">
++ *   <complexContent>
++ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
++ *       <sequence>
++ *         <element name="pos" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AdjPoint2D"/>
++ *       </sequence>
++ *       <attribute name="gdRefX" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideName" />
++ *       <attribute name="minX" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="maxX" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="gdRefY" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_GeomGuideName" />
++ *       <attribute name="minY" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *       <attribute name="maxY" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
++ *     </restriction>
++ *   </complexContent>
++ * </complexType>
++ * 
++ * ++ * ++ */ ++@XmlAccessorType(XmlAccessType.FIELD) ++@XmlType(name = "CT_XYAdjustHandle", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", propOrder = { ++ "pos" ++}) ++public class CTXYAdjustHandle { ++ ++ @XmlElement(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", required = true) ++ protected CTAdjPoint2D pos; ++ @XmlAttribute(name = "gdRefX") ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String gdRefX; ++ @XmlAttribute(name = "minX") ++ protected String minX; ++ @XmlAttribute(name = "maxX") ++ protected String maxX; ++ @XmlAttribute(name = "gdRefY") ++ @XmlJavaTypeAdapter(CollapsedStringAdapter.class) ++ protected String gdRefY; ++ @XmlAttribute(name = "minY") ++ protected String minY; ++ @XmlAttribute(name = "maxY") ++ protected String maxY; ++ ++ /** ++ * Gets the value of the pos property. ++ * ++ * @return ++ * possible object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D getPos() { ++ return pos; ++ } ++ ++ /** ++ * Sets the value of the pos property. ++ * ++ * @param value ++ * allowed object is ++ * {@link CTAdjPoint2D } ++ * ++ */ ++ public void setPos(CTAdjPoint2D value) { ++ this.pos = value; ++ } ++ ++ public boolean isSetPos() { ++ return (this.pos!= null); ++ } ++ ++ /** ++ * Gets the value of the gdRefX property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getGdRefX() { ++ return gdRefX; ++ } ++ ++ /** ++ * Sets the value of the gdRefX property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setGdRefX(String value) { ++ this.gdRefX = value; ++ } ++ ++ public boolean isSetGdRefX() { ++ return (this.gdRefX!= null); ++ } ++ ++ /** ++ * Gets the value of the minX property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMinX() { ++ return minX; ++ } ++ ++ /** ++ * Sets the value of the minX property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMinX(String value) { ++ this.minX = value; ++ } ++ ++ public boolean isSetMinX() { ++ return (this.minX!= null); ++ } ++ ++ /** ++ * Gets the value of the maxX property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMaxX() { ++ return maxX; ++ } ++ ++ /** ++ * Sets the value of the maxX property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMaxX(String value) { ++ this.maxX = value; ++ } ++ ++ public boolean isSetMaxX() { ++ return (this.maxX!= null); ++ } ++ ++ /** ++ * Gets the value of the gdRefY property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getGdRefY() { ++ return gdRefY; ++ } ++ ++ /** ++ * Sets the value of the gdRefY property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setGdRefY(String value) { ++ this.gdRefY = value; ++ } ++ ++ public boolean isSetGdRefY() { ++ return (this.gdRefY!= null); ++ } ++ ++ /** ++ * Gets the value of the minY property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMinY() { ++ return minY; ++ } ++ ++ /** ++ * Sets the value of the minY property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMinY(String value) { ++ this.minY = value; ++ } ++ ++ public boolean isSetMinY() { ++ return (this.minY!= null); ++ } ++ ++ /** ++ * Gets the value of the maxY property. ++ * ++ * @return ++ * possible object is ++ * {@link String } ++ * ++ */ ++ public String getMaxY() { ++ return maxY; ++ } ++ ++ /** ++ * Sets the value of the maxY property. ++ * ++ * @param value ++ * allowed object is ++ * {@link String } ++ * ++ */ ++ public void setMaxY(String value) { ++ this.maxY = value; ++ } ++ ++ public boolean isSetMaxY() { ++ return (this.maxY!= null); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/ObjectFactory.java index 0000000000,0000000000..8c6f9c217c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/ObjectFactory.java @@@ -1,0 -1,0 +1,2023 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.JAXBElement; ++import javax.xml.bind.annotation.XmlElementDecl; ++import javax.xml.bind.annotation.XmlRegistry; ++import javax.xml.namespace.QName; ++ ++ ++/** ++ * This object contains factory methods for each ++ * Java content interface and Java element interface ++ * generated in the org.apache.poi.sl.draw.binding package. ++ *

An ObjectFactory allows you to programatically ++ * construct new instances of the Java representation ++ * for XML content. The Java representation of XML ++ * content can consist of schema derived interfaces ++ * and classes representing the binding of schema ++ * type definitions, element declarations and model ++ * groups. Factory methods for each of these are ++ * provided in this class. ++ * ++ */ ++@XmlRegistry ++public class ObjectFactory { ++ ++ private final static QName _CTSRgbColorAlpha_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "alpha"); ++ private final static QName _CTSRgbColorLum_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "lum"); ++ private final static QName _CTSRgbColorGamma_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "gamma"); ++ private final static QName _CTSRgbColorInvGamma_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "invGamma"); ++ private final static QName _CTSRgbColorAlphaMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "alphaMod"); ++ private final static QName _CTSRgbColorRedOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "redOff"); ++ private final static QName _CTSRgbColorAlphaOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "alphaOff"); ++ private final static QName _CTSRgbColorGreenOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "greenOff"); ++ private final static QName _CTSRgbColorHue_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "hue"); ++ private final static QName _CTSRgbColorRedMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "redMod"); ++ private final static QName _CTSRgbColorSatOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "satOff"); ++ private final static QName _CTSRgbColorGreenMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "greenMod"); ++ private final static QName _CTSRgbColorSat_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "sat"); ++ private final static QName _CTSRgbColorBlue_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "blue"); ++ private final static QName _CTSRgbColorRed_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "red"); ++ private final static QName _CTSRgbColorSatMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "satMod"); ++ private final static QName _CTSRgbColorBlueMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "blueMod"); ++ private final static QName _CTSRgbColorHueOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "hueOff"); ++ private final static QName _CTSRgbColorShade_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "shade"); ++ private final static QName _CTSRgbColorLumMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "lumMod"); ++ private final static QName _CTSRgbColorInv_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "inv"); ++ private final static QName _CTSRgbColorLumOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "lumOff"); ++ private final static QName _CTSRgbColorTint_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tint"); ++ private final static QName _CTSRgbColorGreen_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "green"); ++ private final static QName _CTSRgbColorComp_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "comp"); ++ private final static QName _CTSRgbColorBlueOff_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "blueOff"); ++ private final static QName _CTSRgbColorHueMod_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "hueMod"); ++ private final static QName _CTSRgbColorGray_QNAME = new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "gray"); ++ ++ /** ++ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.poi.sl.draw.binding ++ * ++ */ ++ public ObjectFactory() { ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DQuadBezierTo } ++ * ++ */ ++ public CTPath2DQuadBezierTo createCTPath2DQuadBezierTo() { ++ return new CTPath2DQuadBezierTo(); ++ } ++ ++ /** ++ * Create an instance of {@link CTCustomGeometry2D } ++ * ++ */ ++ public CTCustomGeometry2D createCTCustomGeometry2D() { ++ return new CTCustomGeometry2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPolarAdjustHandle } ++ * ++ */ ++ public CTPolarAdjustHandle createCTPolarAdjustHandle() { ++ return new CTPolarAdjustHandle(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DClose } ++ * ++ */ ++ public CTPath2DClose createCTPath2DClose() { ++ return new CTPath2DClose(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPoint2D } ++ * ++ */ ++ public CTPoint2D createCTPoint2D() { ++ return new CTPoint2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTInverseTransform } ++ * ++ */ ++ public CTInverseTransform createCTInverseTransform() { ++ return new CTInverseTransform(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPercentage } ++ * ++ */ ++ public CTPercentage createCTPercentage() { ++ return new CTPercentage(); ++ } ++ ++ /** ++ * Create an instance of {@link CTSystemColor } ++ * ++ */ ++ public CTSystemColor createCTSystemColor() { ++ return new CTSystemColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTConnectionSite } ++ * ++ */ ++ public CTConnectionSite createCTConnectionSite() { ++ return new CTConnectionSite(); ++ } ++ ++ /** ++ * Create an instance of {@link CTColor } ++ * ++ */ ++ public CTColor createCTColor() { ++ return new CTColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPositiveFixedAngle } ++ * ++ */ ++ public CTPositiveFixedAngle createCTPositiveFixedAngle() { ++ return new CTPositiveFixedAngle(); ++ } ++ ++ /** ++ * Create an instance of {@link CTFixedPercentage } ++ * ++ */ ++ public CTFixedPercentage createCTFixedPercentage() { ++ return new CTFixedPercentage(); ++ } ++ ++ /** ++ * Create an instance of {@link CTHslColor } ++ * ++ */ ++ public CTHslColor createCTHslColor() { ++ return new CTHslColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTConnection } ++ * ++ */ ++ public CTConnection createCTConnection() { ++ return new CTConnection(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DLineTo } ++ * ++ */ ++ public CTPath2DLineTo createCTPath2DLineTo() { ++ return new CTPath2DLineTo(); ++ } ++ ++ /** ++ * Create an instance of {@link CTTransform2D } ++ * ++ */ ++ public CTTransform2D createCTTransform2D() { ++ return new CTTransform2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPositivePercentage } ++ * ++ */ ++ public CTPositivePercentage createCTPositivePercentage() { ++ return new CTPositivePercentage(); ++ } ++ ++ /** ++ * Create an instance of {@link CTVector3D } ++ * ++ */ ++ public CTVector3D createCTVector3D() { ++ return new CTVector3D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTSphereCoords } ++ * ++ */ ++ public CTSphereCoords createCTSphereCoords() { ++ return new CTSphereCoords(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2D } ++ * ++ */ ++ public CTPath2D createCTPath2D() { ++ return new CTPath2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGroupTransform2D } ++ * ++ */ ++ public CTGroupTransform2D createCTGroupTransform2D() { ++ return new CTGroupTransform2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGrayscaleTransform } ++ * ++ */ ++ public CTGrayscaleTransform createCTGrayscaleTransform() { ++ return new CTGrayscaleTransform(); ++ } ++ ++ /** ++ * Create an instance of {@link CTRatio } ++ * ++ */ ++ public CTRatio createCTRatio() { ++ return new CTRatio(); ++ } ++ ++ /** ++ * Create an instance of {@link CTSRgbColor } ++ * ++ */ ++ public CTSRgbColor createCTSRgbColor() { ++ return new CTSRgbColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGeomGuideList } ++ * ++ */ ++ public CTGeomGuideList createCTGeomGuideList() { ++ return new CTGeomGuideList(); ++ } ++ ++ /** ++ * Create an instance of {@link CTComplementTransform } ++ * ++ */ ++ public CTComplementTransform createCTComplementTransform() { ++ return new CTComplementTransform(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DCubicBezierTo } ++ * ++ */ ++ public CTPath2DCubicBezierTo createCTPath2DCubicBezierTo() { ++ return new CTPath2DCubicBezierTo(); ++ } ++ ++ /** ++ * Create an instance of {@link CTXYAdjustHandle } ++ * ++ */ ++ public CTXYAdjustHandle createCTXYAdjustHandle() { ++ return new CTXYAdjustHandle(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPresetColor } ++ * ++ */ ++ public CTPresetColor createCTPresetColor() { ++ return new CTPresetColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTOfficeArtExtension } ++ * ++ */ ++ public CTOfficeArtExtension createCTOfficeArtExtension() { ++ return new CTOfficeArtExtension(); ++ } ++ ++ /** ++ * Create an instance of {@link CTSchemeColor } ++ * ++ */ ++ public CTSchemeColor createCTSchemeColor() { ++ return new CTSchemeColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTConnectionSiteList } ++ * ++ */ ++ public CTConnectionSiteList createCTConnectionSiteList() { ++ return new CTConnectionSiteList(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DArcTo } ++ * ++ */ ++ public CTPath2DArcTo createCTPath2DArcTo() { ++ return new CTPath2DArcTo(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DList } ++ * ++ */ ++ public CTPath2DList createCTPath2DList() { ++ return new CTPath2DList(); ++ } ++ ++ /** ++ * Create an instance of {@link CTAngle } ++ * ++ */ ++ public CTAngle createCTAngle() { ++ return new CTAngle(); ++ } ++ ++ /** ++ * Create an instance of {@link CTScale2D } ++ * ++ */ ++ public CTScale2D createCTScale2D() { ++ return new CTScale2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPositiveSize2D } ++ * ++ */ ++ public CTPositiveSize2D createCTPositiveSize2D() { ++ return new CTPositiveSize2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTOfficeArtExtensionList } ++ * ++ */ ++ public CTOfficeArtExtensionList createCTOfficeArtExtensionList() { ++ return new CTOfficeArtExtensionList(); ++ } ++ ++ /** ++ * Create an instance of {@link CTHyperlink } ++ * ++ */ ++ public CTHyperlink createCTHyperlink() { ++ return new CTHyperlink(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPoint3D } ++ * ++ */ ++ public CTPoint3D createCTPoint3D() { ++ return new CTPoint3D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTInverseGammaTransform } ++ * ++ */ ++ public CTInverseGammaTransform createCTInverseGammaTransform() { ++ return new CTInverseGammaTransform(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPositiveFixedPercentage } ++ * ++ */ ++ public CTPositiveFixedPercentage createCTPositiveFixedPercentage() { ++ return new CTPositiveFixedPercentage(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGeomRect } ++ * ++ */ ++ public CTGeomRect createCTGeomRect() { ++ return new CTGeomRect(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPresetTextShape } ++ * ++ */ ++ public CTPresetTextShape createCTPresetTextShape() { ++ return new CTPresetTextShape(); ++ } ++ ++ /** ++ * Create an instance of {@link CTColorMRU } ++ * ++ */ ++ public CTColorMRU createCTColorMRU() { ++ return new CTColorMRU(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPath2DMoveTo } ++ * ++ */ ++ public CTPath2DMoveTo createCTPath2DMoveTo() { ++ return new CTPath2DMoveTo(); ++ } ++ ++ /** ++ * Create an instance of {@link CTEmbeddedWAVAudioFile } ++ * ++ */ ++ public CTEmbeddedWAVAudioFile createCTEmbeddedWAVAudioFile() { ++ return new CTEmbeddedWAVAudioFile(); ++ } ++ ++ /** ++ * Create an instance of {@link CTScRgbColor } ++ * ++ */ ++ public CTScRgbColor createCTScRgbColor() { ++ return new CTScRgbColor(); ++ } ++ ++ /** ++ * Create an instance of {@link CTPresetGeometry2D } ++ * ++ */ ++ public CTPresetGeometry2D createCTPresetGeometry2D() { ++ return new CTPresetGeometry2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGeomGuide } ++ * ++ */ ++ public CTGeomGuide createCTGeomGuide() { ++ return new CTGeomGuide(); ++ } ++ ++ /** ++ * Create an instance of {@link CTRelativeRect } ++ * ++ */ ++ public CTRelativeRect createCTRelativeRect() { ++ return new CTRelativeRect(); ++ } ++ ++ /** ++ * Create an instance of {@link CTAdjustHandleList } ++ * ++ */ ++ public CTAdjustHandleList createCTAdjustHandleList() { ++ return new CTAdjustHandleList(); ++ } ++ ++ /** ++ * Create an instance of {@link CTAdjPoint2D } ++ * ++ */ ++ public CTAdjPoint2D createCTAdjPoint2D() { ++ return new CTAdjPoint2D(); ++ } ++ ++ /** ++ * Create an instance of {@link CTGammaTransform } ++ * ++ */ ++ public CTGammaTransform createCTGammaTransform() { ++ return new CTGammaTransform(); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSRgbColor.class) ++ public JAXBElement createCTSRgbColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSchemeColor.class) ++ public JAXBElement createCTSchemeColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSchemeColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTScRgbColor.class) ++ public JAXBElement createCTScRgbColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTScRgbColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSystemColor.class) ++ public JAXBElement createCTSystemColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSystemColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTHslColor.class) ++ public JAXBElement createCTHslColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTHslColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorAlpha(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorLum(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLum_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorGamma(CTGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseGammaTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorInvGamma(CTInverseGammaTransform value) { ++ return new JAXBElement(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorAlphaMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorRedOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorAlphaOff(CTFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorGreenOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorHue(CTPositiveFixedAngle value) { ++ return new JAXBElement(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorRedMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorSatOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorGreenMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorSat(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSat_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorBlue(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorRed(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorRed_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorSatMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorBlueMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTAngle }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorHueOff(CTAngle value) { ++ return new JAXBElement(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorShade(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorLumMod(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTInverseTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorInv(CTInverseTransform value) { ++ return new JAXBElement(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorLumOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositiveFixedPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorTint(CTPositiveFixedPercentage value) { ++ return new JAXBElement(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorGreen(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTComplementTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorComp(CTComplementTransform value) { ++ return new JAXBElement(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorBlueOff(CTPercentage value) { ++ return new JAXBElement(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTPositivePercentage }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorHueMod(CTPositivePercentage value) { ++ return new JAXBElement(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value); ++ } ++ ++ /** ++ * Create an instance of {@link JAXBElement }{@code <}{@link CTGrayscaleTransform }{@code >}} ++ * ++ */ ++ @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTPresetColor.class) ++ public JAXBElement createCTPresetColorGray(CTGrayscaleTransform value) { ++ return new JAXBElement(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTPresetColor.class, value); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STBlackWhiteMode.java index 0000000000,0000000000..27262d6060 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STBlackWhiteMode.java @@@ -1,0 -1,0 +1,149 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_BlackWhiteMode. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_BlackWhiteMode">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="clr"/>
++ *     <enumeration value="auto"/>
++ *     <enumeration value="gray"/>
++ *     <enumeration value="ltGray"/>
++ *     <enumeration value="invGray"/>
++ *     <enumeration value="grayWhite"/>
++ *     <enumeration value="blackGray"/>
++ *     <enumeration value="blackWhite"/>
++ *     <enumeration value="black"/>
++ *     <enumeration value="white"/>
++ *     <enumeration value="hidden"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_BlackWhiteMode", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STBlackWhiteMode { ++ ++ ++ /** ++ * Color ++ * ++ */ ++ @XmlEnumValue("clr") ++ CLR("clr"), ++ ++ /** ++ * Automatic ++ * ++ */ ++ @XmlEnumValue("auto") ++ AUTO("auto"), ++ ++ /** ++ * Gray ++ * ++ */ ++ @XmlEnumValue("gray") ++ GRAY("gray"), ++ ++ /** ++ * Light Gray ++ * ++ */ ++ @XmlEnumValue("ltGray") ++ LT_GRAY("ltGray"), ++ ++ /** ++ * Inverse Gray ++ * ++ */ ++ @XmlEnumValue("invGray") ++ INV_GRAY("invGray"), ++ ++ /** ++ * Gray and White ++ * ++ */ ++ @XmlEnumValue("grayWhite") ++ GRAY_WHITE("grayWhite"), ++ ++ /** ++ * Black and Gray ++ * ++ */ ++ @XmlEnumValue("blackGray") ++ BLACK_GRAY("blackGray"), ++ ++ /** ++ * Black and White ++ * ++ */ ++ @XmlEnumValue("blackWhite") ++ BLACK_WHITE("blackWhite"), ++ ++ /** ++ * Black ++ * ++ */ ++ @XmlEnumValue("black") ++ BLACK("black"), ++ ++ /** ++ * White ++ * ++ */ ++ @XmlEnumValue("white") ++ WHITE("white"), ++ ++ /** ++ * Hidden ++ * ++ */ ++ @XmlEnumValue("hidden") ++ HIDDEN("hidden"); ++ private final String value; ++ ++ STBlackWhiteMode(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STBlackWhiteMode fromValue(String v) { ++ for (STBlackWhiteMode c: STBlackWhiteMode.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STPathFillMode.java index 0000000000,0000000000..8a26458f02 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STPathFillMode.java @@@ -1,0 -1,0 +1,109 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_PathFillMode. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_PathFillMode">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="none"/>
++ *     <enumeration value="norm"/>
++ *     <enumeration value="lighten"/>
++ *     <enumeration value="lightenLess"/>
++ *     <enumeration value="darken"/>
++ *     <enumeration value="darkenLess"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_PathFillMode", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STPathFillMode { ++ ++ ++ /** ++ * No Path Fill ++ * ++ */ ++ @XmlEnumValue("none") ++ NONE("none"), ++ ++ /** ++ * Normal Path Fill ++ * ++ */ ++ @XmlEnumValue("norm") ++ NORM("norm"), ++ ++ /** ++ * Lighten Path Fill ++ * ++ */ ++ @XmlEnumValue("lighten") ++ LIGHTEN("lighten"), ++ ++ /** ++ * Lighten Path Fill Less ++ * ++ */ ++ @XmlEnumValue("lightenLess") ++ LIGHTEN_LESS("lightenLess"), ++ ++ /** ++ * Darken Path Fill ++ * ++ */ ++ @XmlEnumValue("darken") ++ DARKEN("darken"), ++ ++ /** ++ * Darken Path Fill Less ++ * ++ */ ++ @XmlEnumValue("darkenLess") ++ DARKEN_LESS("darkenLess"); ++ private final String value; ++ ++ STPathFillMode(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STPathFillMode fromValue(String v) { ++ for (STPathFillMode c: STPathFillMode.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STPresetColorVal.java index 0000000000,0000000000..7450ac656c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STPresetColorVal.java @@@ -1,0 -1,0 +1,1181 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_PresetColorVal. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_PresetColorVal">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="aliceBlue"/>
++ *     <enumeration value="antiqueWhite"/>
++ *     <enumeration value="aqua"/>
++ *     <enumeration value="aquamarine"/>
++ *     <enumeration value="azure"/>
++ *     <enumeration value="beige"/>
++ *     <enumeration value="bisque"/>
++ *     <enumeration value="black"/>
++ *     <enumeration value="blanchedAlmond"/>
++ *     <enumeration value="blue"/>
++ *     <enumeration value="blueViolet"/>
++ *     <enumeration value="brown"/>
++ *     <enumeration value="burlyWood"/>
++ *     <enumeration value="cadetBlue"/>
++ *     <enumeration value="chartreuse"/>
++ *     <enumeration value="chocolate"/>
++ *     <enumeration value="coral"/>
++ *     <enumeration value="cornflowerBlue"/>
++ *     <enumeration value="cornsilk"/>
++ *     <enumeration value="crimson"/>
++ *     <enumeration value="cyan"/>
++ *     <enumeration value="dkBlue"/>
++ *     <enumeration value="dkCyan"/>
++ *     <enumeration value="dkGoldenrod"/>
++ *     <enumeration value="dkGray"/>
++ *     <enumeration value="dkGreen"/>
++ *     <enumeration value="dkKhaki"/>
++ *     <enumeration value="dkMagenta"/>
++ *     <enumeration value="dkOliveGreen"/>
++ *     <enumeration value="dkOrange"/>
++ *     <enumeration value="dkOrchid"/>
++ *     <enumeration value="dkRed"/>
++ *     <enumeration value="dkSalmon"/>
++ *     <enumeration value="dkSeaGreen"/>
++ *     <enumeration value="dkSlateBlue"/>
++ *     <enumeration value="dkSlateGray"/>
++ *     <enumeration value="dkTurquoise"/>
++ *     <enumeration value="dkViolet"/>
++ *     <enumeration value="deepPink"/>
++ *     <enumeration value="deepSkyBlue"/>
++ *     <enumeration value="dimGray"/>
++ *     <enumeration value="dodgerBlue"/>
++ *     <enumeration value="firebrick"/>
++ *     <enumeration value="floralWhite"/>
++ *     <enumeration value="forestGreen"/>
++ *     <enumeration value="fuchsia"/>
++ *     <enumeration value="gainsboro"/>
++ *     <enumeration value="ghostWhite"/>
++ *     <enumeration value="gold"/>
++ *     <enumeration value="goldenrod"/>
++ *     <enumeration value="gray"/>
++ *     <enumeration value="green"/>
++ *     <enumeration value="greenYellow"/>
++ *     <enumeration value="honeydew"/>
++ *     <enumeration value="hotPink"/>
++ *     <enumeration value="indianRed"/>
++ *     <enumeration value="indigo"/>
++ *     <enumeration value="ivory"/>
++ *     <enumeration value="khaki"/>
++ *     <enumeration value="lavender"/>
++ *     <enumeration value="lavenderBlush"/>
++ *     <enumeration value="lawnGreen"/>
++ *     <enumeration value="lemonChiffon"/>
++ *     <enumeration value="ltBlue"/>
++ *     <enumeration value="ltCoral"/>
++ *     <enumeration value="ltCyan"/>
++ *     <enumeration value="ltGoldenrodYellow"/>
++ *     <enumeration value="ltGray"/>
++ *     <enumeration value="ltGreen"/>
++ *     <enumeration value="ltPink"/>
++ *     <enumeration value="ltSalmon"/>
++ *     <enumeration value="ltSeaGreen"/>
++ *     <enumeration value="ltSkyBlue"/>
++ *     <enumeration value="ltSlateGray"/>
++ *     <enumeration value="ltSteelBlue"/>
++ *     <enumeration value="ltYellow"/>
++ *     <enumeration value="lime"/>
++ *     <enumeration value="limeGreen"/>
++ *     <enumeration value="linen"/>
++ *     <enumeration value="magenta"/>
++ *     <enumeration value="maroon"/>
++ *     <enumeration value="medAquamarine"/>
++ *     <enumeration value="medBlue"/>
++ *     <enumeration value="medOrchid"/>
++ *     <enumeration value="medPurple"/>
++ *     <enumeration value="medSeaGreen"/>
++ *     <enumeration value="medSlateBlue"/>
++ *     <enumeration value="medSpringGreen"/>
++ *     <enumeration value="medTurquoise"/>
++ *     <enumeration value="medVioletRed"/>
++ *     <enumeration value="midnightBlue"/>
++ *     <enumeration value="mintCream"/>
++ *     <enumeration value="mistyRose"/>
++ *     <enumeration value="moccasin"/>
++ *     <enumeration value="navajoWhite"/>
++ *     <enumeration value="navy"/>
++ *     <enumeration value="oldLace"/>
++ *     <enumeration value="olive"/>
++ *     <enumeration value="oliveDrab"/>
++ *     <enumeration value="orange"/>
++ *     <enumeration value="orangeRed"/>
++ *     <enumeration value="orchid"/>
++ *     <enumeration value="paleGoldenrod"/>
++ *     <enumeration value="paleGreen"/>
++ *     <enumeration value="paleTurquoise"/>
++ *     <enumeration value="paleVioletRed"/>
++ *     <enumeration value="papayaWhip"/>
++ *     <enumeration value="peachPuff"/>
++ *     <enumeration value="peru"/>
++ *     <enumeration value="pink"/>
++ *     <enumeration value="plum"/>
++ *     <enumeration value="powderBlue"/>
++ *     <enumeration value="purple"/>
++ *     <enumeration value="red"/>
++ *     <enumeration value="rosyBrown"/>
++ *     <enumeration value="royalBlue"/>
++ *     <enumeration value="saddleBrown"/>
++ *     <enumeration value="salmon"/>
++ *     <enumeration value="sandyBrown"/>
++ *     <enumeration value="seaGreen"/>
++ *     <enumeration value="seaShell"/>
++ *     <enumeration value="sienna"/>
++ *     <enumeration value="silver"/>
++ *     <enumeration value="skyBlue"/>
++ *     <enumeration value="slateBlue"/>
++ *     <enumeration value="slateGray"/>
++ *     <enumeration value="snow"/>
++ *     <enumeration value="springGreen"/>
++ *     <enumeration value="steelBlue"/>
++ *     <enumeration value="tan"/>
++ *     <enumeration value="teal"/>
++ *     <enumeration value="thistle"/>
++ *     <enumeration value="tomato"/>
++ *     <enumeration value="turquoise"/>
++ *     <enumeration value="violet"/>
++ *     <enumeration value="wheat"/>
++ *     <enumeration value="white"/>
++ *     <enumeration value="whiteSmoke"/>
++ *     <enumeration value="yellow"/>
++ *     <enumeration value="yellowGreen"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_PresetColorVal", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STPresetColorVal { ++ ++ ++ /** ++ * Alice Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("aliceBlue") ++ ALICE_BLUE("aliceBlue"), ++ ++ /** ++ * Antique White Preset Color ++ * ++ */ ++ @XmlEnumValue("antiqueWhite") ++ ANTIQUE_WHITE("antiqueWhite"), ++ ++ /** ++ * Aqua Preset Color ++ * ++ */ ++ @XmlEnumValue("aqua") ++ AQUA("aqua"), ++ ++ /** ++ * Aquamarine Preset Color ++ * ++ */ ++ @XmlEnumValue("aquamarine") ++ AQUAMARINE("aquamarine"), ++ ++ /** ++ * Azure Preset Color ++ * ++ */ ++ @XmlEnumValue("azure") ++ AZURE("azure"), ++ ++ /** ++ * Beige Preset Color ++ * ++ */ ++ @XmlEnumValue("beige") ++ BEIGE("beige"), ++ ++ /** ++ * Bisque Preset Color ++ * ++ */ ++ @XmlEnumValue("bisque") ++ BISQUE("bisque"), ++ ++ /** ++ * Black Preset Color ++ * ++ */ ++ @XmlEnumValue("black") ++ BLACK("black"), ++ ++ /** ++ * Blanched Almond Preset Color ++ * ++ */ ++ @XmlEnumValue("blanchedAlmond") ++ BLANCHED_ALMOND("blanchedAlmond"), ++ ++ /** ++ * Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("blue") ++ BLUE("blue"), ++ ++ /** ++ * Blue Violet Preset Color ++ * ++ */ ++ @XmlEnumValue("blueViolet") ++ BLUE_VIOLET("blueViolet"), ++ ++ /** ++ * Brown Preset Color ++ * ++ */ ++ @XmlEnumValue("brown") ++ BROWN("brown"), ++ ++ /** ++ * Burly Wood Preset Color ++ * ++ */ ++ @XmlEnumValue("burlyWood") ++ BURLY_WOOD("burlyWood"), ++ ++ /** ++ * Cadet Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("cadetBlue") ++ CADET_BLUE("cadetBlue"), ++ ++ /** ++ * Chartreuse Preset Color ++ * ++ */ ++ @XmlEnumValue("chartreuse") ++ CHARTREUSE("chartreuse"), ++ ++ /** ++ * Chocolate Preset Color ++ * ++ */ ++ @XmlEnumValue("chocolate") ++ CHOCOLATE("chocolate"), ++ ++ /** ++ * Coral Preset Color ++ * ++ */ ++ @XmlEnumValue("coral") ++ CORAL("coral"), ++ ++ /** ++ * Cornflower Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("cornflowerBlue") ++ CORNFLOWER_BLUE("cornflowerBlue"), ++ ++ /** ++ * Cornsilk Preset Color ++ * ++ */ ++ @XmlEnumValue("cornsilk") ++ CORNSILK("cornsilk"), ++ ++ /** ++ * Crimson Preset Color ++ * ++ */ ++ @XmlEnumValue("crimson") ++ CRIMSON("crimson"), ++ ++ /** ++ * Cyan Preset Color ++ * ++ */ ++ @XmlEnumValue("cyan") ++ CYAN("cyan"), ++ ++ /** ++ * Dark Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("dkBlue") ++ DK_BLUE("dkBlue"), ++ ++ /** ++ * Dark Cyan Preset Color ++ * ++ */ ++ @XmlEnumValue("dkCyan") ++ DK_CYAN("dkCyan"), ++ ++ /** ++ * Dark Goldenrod Preset Color ++ * ++ */ ++ @XmlEnumValue("dkGoldenrod") ++ DK_GOLDENROD("dkGoldenrod"), ++ ++ /** ++ * Dark Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("dkGray") ++ DK_GRAY("dkGray"), ++ ++ /** ++ * Dark Green Preset Color ++ * ++ */ ++ @XmlEnumValue("dkGreen") ++ DK_GREEN("dkGreen"), ++ ++ /** ++ * Dark Khaki Preset Color ++ * ++ */ ++ @XmlEnumValue("dkKhaki") ++ DK_KHAKI("dkKhaki"), ++ ++ /** ++ * Dark Magenta Preset Color ++ * ++ */ ++ @XmlEnumValue("dkMagenta") ++ DK_MAGENTA("dkMagenta"), ++ ++ /** ++ * Dark Olive Green Preset Color ++ * ++ */ ++ @XmlEnumValue("dkOliveGreen") ++ DK_OLIVE_GREEN("dkOliveGreen"), ++ ++ /** ++ * Dark Orange Preset Color ++ * ++ */ ++ @XmlEnumValue("dkOrange") ++ DK_ORANGE("dkOrange"), ++ ++ /** ++ * Dark Orchid Preset Color ++ * ++ */ ++ @XmlEnumValue("dkOrchid") ++ DK_ORCHID("dkOrchid"), ++ ++ /** ++ * Dark Red Preset Color ++ * ++ */ ++ @XmlEnumValue("dkRed") ++ DK_RED("dkRed"), ++ ++ /** ++ * Dark Salmon Preset Color ++ * ++ */ ++ @XmlEnumValue("dkSalmon") ++ DK_SALMON("dkSalmon"), ++ ++ /** ++ * Dark Sea Green Preset Color ++ * ++ */ ++ @XmlEnumValue("dkSeaGreen") ++ DK_SEA_GREEN("dkSeaGreen"), ++ ++ /** ++ * Dark Slate Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("dkSlateBlue") ++ DK_SLATE_BLUE("dkSlateBlue"), ++ ++ /** ++ * Dark Slate Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("dkSlateGray") ++ DK_SLATE_GRAY("dkSlateGray"), ++ ++ /** ++ * Dark Turquoise Preset Color ++ * ++ */ ++ @XmlEnumValue("dkTurquoise") ++ DK_TURQUOISE("dkTurquoise"), ++ ++ /** ++ * Dark Violet Preset Color ++ * ++ */ ++ @XmlEnumValue("dkViolet") ++ DK_VIOLET("dkViolet"), ++ ++ /** ++ * Deep Pink Preset Color ++ * ++ */ ++ @XmlEnumValue("deepPink") ++ DEEP_PINK("deepPink"), ++ ++ /** ++ * Deep Sky Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("deepSkyBlue") ++ DEEP_SKY_BLUE("deepSkyBlue"), ++ ++ /** ++ * Dim Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("dimGray") ++ DIM_GRAY("dimGray"), ++ ++ /** ++ * Dodger Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("dodgerBlue") ++ DODGER_BLUE("dodgerBlue"), ++ ++ /** ++ * Firebrick Preset Color ++ * ++ */ ++ @XmlEnumValue("firebrick") ++ FIREBRICK("firebrick"), ++ ++ /** ++ * Floral White Preset Color ++ * ++ */ ++ @XmlEnumValue("floralWhite") ++ FLORAL_WHITE("floralWhite"), ++ ++ /** ++ * Forest Green Preset Color ++ * ++ */ ++ @XmlEnumValue("forestGreen") ++ FOREST_GREEN("forestGreen"), ++ ++ /** ++ * Fuchsia Preset Color ++ * ++ */ ++ @XmlEnumValue("fuchsia") ++ FUCHSIA("fuchsia"), ++ ++ /** ++ * Gainsboro Preset Color ++ * ++ */ ++ @XmlEnumValue("gainsboro") ++ GAINSBORO("gainsboro"), ++ ++ /** ++ * Ghost White Preset Color ++ * ++ */ ++ @XmlEnumValue("ghostWhite") ++ GHOST_WHITE("ghostWhite"), ++ ++ /** ++ * Gold Preset Color ++ * ++ */ ++ @XmlEnumValue("gold") ++ GOLD("gold"), ++ ++ /** ++ * Goldenrod Preset Color ++ * ++ */ ++ @XmlEnumValue("goldenrod") ++ GOLDENROD("goldenrod"), ++ ++ /** ++ * Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("gray") ++ GRAY("gray"), ++ ++ /** ++ * Green Preset Color ++ * ++ */ ++ @XmlEnumValue("green") ++ GREEN("green"), ++ ++ /** ++ * Green Yellow Preset Color ++ * ++ */ ++ @XmlEnumValue("greenYellow") ++ GREEN_YELLOW("greenYellow"), ++ ++ /** ++ * Honeydew Preset Color ++ * ++ */ ++ @XmlEnumValue("honeydew") ++ HONEYDEW("honeydew"), ++ ++ /** ++ * Hot Pink Preset Color ++ * ++ */ ++ @XmlEnumValue("hotPink") ++ HOT_PINK("hotPink"), ++ ++ /** ++ * Indian Red Preset Color ++ * ++ */ ++ @XmlEnumValue("indianRed") ++ INDIAN_RED("indianRed"), ++ ++ /** ++ * Indigo Preset Color ++ * ++ */ ++ @XmlEnumValue("indigo") ++ INDIGO("indigo"), ++ ++ /** ++ * Ivory Preset Color ++ * ++ */ ++ @XmlEnumValue("ivory") ++ IVORY("ivory"), ++ ++ /** ++ * Khaki Preset Color ++ * ++ */ ++ @XmlEnumValue("khaki") ++ KHAKI("khaki"), ++ ++ /** ++ * Lavender Preset Color ++ * ++ */ ++ @XmlEnumValue("lavender") ++ LAVENDER("lavender"), ++ ++ /** ++ * Lavender Blush Preset Color ++ * ++ */ ++ @XmlEnumValue("lavenderBlush") ++ LAVENDER_BLUSH("lavenderBlush"), ++ ++ /** ++ * Lawn Green Preset Color ++ * ++ */ ++ @XmlEnumValue("lawnGreen") ++ LAWN_GREEN("lawnGreen"), ++ ++ /** ++ * Lemon Chiffon Preset Color ++ * ++ */ ++ @XmlEnumValue("lemonChiffon") ++ LEMON_CHIFFON("lemonChiffon"), ++ ++ /** ++ * Light Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("ltBlue") ++ LT_BLUE("ltBlue"), ++ ++ /** ++ * Light Coral Preset Color ++ * ++ */ ++ @XmlEnumValue("ltCoral") ++ LT_CORAL("ltCoral"), ++ ++ /** ++ * Light Cyan Preset Color ++ * ++ */ ++ @XmlEnumValue("ltCyan") ++ LT_CYAN("ltCyan"), ++ ++ /** ++ * Light Goldenrod Yellow Preset Color ++ * ++ */ ++ @XmlEnumValue("ltGoldenrodYellow") ++ LT_GOLDENROD_YELLOW("ltGoldenrodYellow"), ++ ++ /** ++ * Light Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("ltGray") ++ LT_GRAY("ltGray"), ++ ++ /** ++ * Light Green Preset Color ++ * ++ */ ++ @XmlEnumValue("ltGreen") ++ LT_GREEN("ltGreen"), ++ ++ /** ++ * Light Pink Preset Color ++ * ++ */ ++ @XmlEnumValue("ltPink") ++ LT_PINK("ltPink"), ++ ++ /** ++ * Light Salmon Preset Color ++ * ++ */ ++ @XmlEnumValue("ltSalmon") ++ LT_SALMON("ltSalmon"), ++ ++ /** ++ * Light Sea Green Preset Color ++ * ++ */ ++ @XmlEnumValue("ltSeaGreen") ++ LT_SEA_GREEN("ltSeaGreen"), ++ ++ /** ++ * Light Sky Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("ltSkyBlue") ++ LT_SKY_BLUE("ltSkyBlue"), ++ ++ /** ++ * Light Slate Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("ltSlateGray") ++ LT_SLATE_GRAY("ltSlateGray"), ++ ++ /** ++ * Light Steel Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("ltSteelBlue") ++ LT_STEEL_BLUE("ltSteelBlue"), ++ ++ /** ++ * Light Yellow Preset Color ++ * ++ */ ++ @XmlEnumValue("ltYellow") ++ LT_YELLOW("ltYellow"), ++ ++ /** ++ * Lime Preset Color ++ * ++ */ ++ @XmlEnumValue("lime") ++ LIME("lime"), ++ ++ /** ++ * Lime Green Preset Color ++ * ++ */ ++ @XmlEnumValue("limeGreen") ++ LIME_GREEN("limeGreen"), ++ ++ /** ++ * Linen Preset Color ++ * ++ */ ++ @XmlEnumValue("linen") ++ LINEN("linen"), ++ ++ /** ++ * Magenta Preset Color ++ * ++ */ ++ @XmlEnumValue("magenta") ++ MAGENTA("magenta"), ++ ++ /** ++ * Maroon Preset Color ++ * ++ */ ++ @XmlEnumValue("maroon") ++ MAROON("maroon"), ++ ++ /** ++ * Medium Aquamarine Preset Color ++ * ++ */ ++ @XmlEnumValue("medAquamarine") ++ MED_AQUAMARINE("medAquamarine"), ++ ++ /** ++ * Medium Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("medBlue") ++ MED_BLUE("medBlue"), ++ ++ /** ++ * Medium Orchid Preset Color ++ * ++ */ ++ @XmlEnumValue("medOrchid") ++ MED_ORCHID("medOrchid"), ++ ++ /** ++ * Medium Purple Preset Color ++ * ++ */ ++ @XmlEnumValue("medPurple") ++ MED_PURPLE("medPurple"), ++ ++ /** ++ * Medium Sea Green Preset Color ++ * ++ */ ++ @XmlEnumValue("medSeaGreen") ++ MED_SEA_GREEN("medSeaGreen"), ++ ++ /** ++ * Medium Slate Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("medSlateBlue") ++ MED_SLATE_BLUE("medSlateBlue"), ++ ++ /** ++ * Medium Spring Green Preset Color ++ * ++ */ ++ @XmlEnumValue("medSpringGreen") ++ MED_SPRING_GREEN("medSpringGreen"), ++ ++ /** ++ * Medium Turquoise Preset Color ++ * ++ */ ++ @XmlEnumValue("medTurquoise") ++ MED_TURQUOISE("medTurquoise"), ++ ++ /** ++ * Medium Violet Red Preset Color ++ * ++ */ ++ @XmlEnumValue("medVioletRed") ++ MED_VIOLET_RED("medVioletRed"), ++ ++ /** ++ * Midnight Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("midnightBlue") ++ MIDNIGHT_BLUE("midnightBlue"), ++ ++ /** ++ * Mint Cream Preset Color ++ * ++ */ ++ @XmlEnumValue("mintCream") ++ MINT_CREAM("mintCream"), ++ ++ /** ++ * Misty Rose Preset Color ++ * ++ */ ++ @XmlEnumValue("mistyRose") ++ MISTY_ROSE("mistyRose"), ++ ++ /** ++ * Moccasin Preset Color ++ * ++ */ ++ @XmlEnumValue("moccasin") ++ MOCCASIN("moccasin"), ++ ++ /** ++ * Navajo White Preset Color ++ * ++ */ ++ @XmlEnumValue("navajoWhite") ++ NAVAJO_WHITE("navajoWhite"), ++ ++ /** ++ * Navy Preset Color ++ * ++ */ ++ @XmlEnumValue("navy") ++ NAVY("navy"), ++ ++ /** ++ * Old Lace Preset Color ++ * ++ */ ++ @XmlEnumValue("oldLace") ++ OLD_LACE("oldLace"), ++ ++ /** ++ * Olive Preset Color ++ * ++ */ ++ @XmlEnumValue("olive") ++ OLIVE("olive"), ++ ++ /** ++ * Olive Drab Preset Color ++ * ++ */ ++ @XmlEnumValue("oliveDrab") ++ OLIVE_DRAB("oliveDrab"), ++ ++ /** ++ * Orange Preset Color ++ * ++ */ ++ @XmlEnumValue("orange") ++ ORANGE("orange"), ++ ++ /** ++ * Orange Red Preset Color ++ * ++ */ ++ @XmlEnumValue("orangeRed") ++ ORANGE_RED("orangeRed"), ++ ++ /** ++ * Orchid Preset Color ++ * ++ */ ++ @XmlEnumValue("orchid") ++ ORCHID("orchid"), ++ ++ /** ++ * Pale Goldenrod Preset Color ++ * ++ */ ++ @XmlEnumValue("paleGoldenrod") ++ PALE_GOLDENROD("paleGoldenrod"), ++ ++ /** ++ * Pale Green Preset Color ++ * ++ */ ++ @XmlEnumValue("paleGreen") ++ PALE_GREEN("paleGreen"), ++ ++ /** ++ * Pale Turquoise Preset Color ++ * ++ */ ++ @XmlEnumValue("paleTurquoise") ++ PALE_TURQUOISE("paleTurquoise"), ++ ++ /** ++ * Pale Violet Red Preset Color ++ * ++ */ ++ @XmlEnumValue("paleVioletRed") ++ PALE_VIOLET_RED("paleVioletRed"), ++ ++ /** ++ * Papaya Whip Preset Color ++ * ++ */ ++ @XmlEnumValue("papayaWhip") ++ PAPAYA_WHIP("papayaWhip"), ++ ++ /** ++ * Peach Puff Preset Color ++ * ++ */ ++ @XmlEnumValue("peachPuff") ++ PEACH_PUFF("peachPuff"), ++ ++ /** ++ * Peru Preset Color ++ * ++ */ ++ @XmlEnumValue("peru") ++ PERU("peru"), ++ ++ /** ++ * Pink Preset Color ++ * ++ */ ++ @XmlEnumValue("pink") ++ PINK("pink"), ++ ++ /** ++ * Plum Preset Color ++ * ++ */ ++ @XmlEnumValue("plum") ++ PLUM("plum"), ++ ++ /** ++ * Powder Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("powderBlue") ++ POWDER_BLUE("powderBlue"), ++ ++ /** ++ * Purple Preset Color ++ * ++ */ ++ @XmlEnumValue("purple") ++ PURPLE("purple"), ++ ++ /** ++ * Red Preset Color ++ * ++ */ ++ @XmlEnumValue("red") ++ RED("red"), ++ ++ /** ++ * Rosy Brown Preset Color ++ * ++ */ ++ @XmlEnumValue("rosyBrown") ++ ROSY_BROWN("rosyBrown"), ++ ++ /** ++ * Royal Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("royalBlue") ++ ROYAL_BLUE("royalBlue"), ++ ++ /** ++ * Saddle Brown Preset Color ++ * ++ */ ++ @XmlEnumValue("saddleBrown") ++ SADDLE_BROWN("saddleBrown"), ++ ++ /** ++ * Salmon Preset Color ++ * ++ */ ++ @XmlEnumValue("salmon") ++ SALMON("salmon"), ++ ++ /** ++ * Sandy Brown Preset Color ++ * ++ */ ++ @XmlEnumValue("sandyBrown") ++ SANDY_BROWN("sandyBrown"), ++ ++ /** ++ * Sea Green Preset Color ++ * ++ */ ++ @XmlEnumValue("seaGreen") ++ SEA_GREEN("seaGreen"), ++ ++ /** ++ * Sea Shell Preset Color ++ * ++ */ ++ @XmlEnumValue("seaShell") ++ SEA_SHELL("seaShell"), ++ ++ /** ++ * Sienna Preset Color ++ * ++ */ ++ @XmlEnumValue("sienna") ++ SIENNA("sienna"), ++ ++ /** ++ * Silver Preset Color ++ * ++ */ ++ @XmlEnumValue("silver") ++ SILVER("silver"), ++ ++ /** ++ * Sky Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("skyBlue") ++ SKY_BLUE("skyBlue"), ++ ++ /** ++ * Slate Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("slateBlue") ++ SLATE_BLUE("slateBlue"), ++ ++ /** ++ * Slate Gray Preset Color ++ * ++ */ ++ @XmlEnumValue("slateGray") ++ SLATE_GRAY("slateGray"), ++ ++ /** ++ * Snow Preset Color ++ * ++ */ ++ @XmlEnumValue("snow") ++ SNOW("snow"), ++ ++ /** ++ * Spring Green Preset Color ++ * ++ */ ++ @XmlEnumValue("springGreen") ++ SPRING_GREEN("springGreen"), ++ ++ /** ++ * Steel Blue Preset Color ++ * ++ */ ++ @XmlEnumValue("steelBlue") ++ STEEL_BLUE("steelBlue"), ++ ++ /** ++ * Tan Preset Color ++ * ++ */ ++ @XmlEnumValue("tan") ++ TAN("tan"), ++ ++ /** ++ * Teal Preset Color ++ * ++ */ ++ @XmlEnumValue("teal") ++ TEAL("teal"), ++ ++ /** ++ * Thistle Preset Color ++ * ++ */ ++ @XmlEnumValue("thistle") ++ THISTLE("thistle"), ++ ++ /** ++ * Tomato Preset Color ++ * ++ */ ++ @XmlEnumValue("tomato") ++ TOMATO("tomato"), ++ ++ /** ++ * Turquoise Preset Color ++ * ++ */ ++ @XmlEnumValue("turquoise") ++ TURQUOISE("turquoise"), ++ ++ /** ++ * Violet Preset Color ++ * ++ */ ++ @XmlEnumValue("violet") ++ VIOLET("violet"), ++ ++ /** ++ * Wheat Preset Color ++ * ++ */ ++ @XmlEnumValue("wheat") ++ WHEAT("wheat"), ++ ++ /** ++ * White Preset Color ++ * ++ */ ++ @XmlEnumValue("white") ++ WHITE("white"), ++ ++ /** ++ * White Smoke Preset Color ++ * ++ */ ++ @XmlEnumValue("whiteSmoke") ++ WHITE_SMOKE("whiteSmoke"), ++ ++ /** ++ * Yellow Preset Color ++ * ++ */ ++ @XmlEnumValue("yellow") ++ YELLOW("yellow"), ++ ++ /** ++ * Yellow Green Preset Color ++ * ++ */ ++ @XmlEnumValue("yellowGreen") ++ YELLOW_GREEN("yellowGreen"); ++ private final String value; ++ ++ STPresetColorVal(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STPresetColorVal fromValue(String v) { ++ for (STPresetColorVal c: STPresetColorVal.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STRectAlignment.java index 0000000000,0000000000..688a166baf new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STRectAlignment.java @@@ -1,0 -1,0 +1,133 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_RectAlignment. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_RectAlignment">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="tl"/>
++ *     <enumeration value="t"/>
++ *     <enumeration value="tr"/>
++ *     <enumeration value="l"/>
++ *     <enumeration value="ctr"/>
++ *     <enumeration value="r"/>
++ *     <enumeration value="bl"/>
++ *     <enumeration value="b"/>
++ *     <enumeration value="br"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_RectAlignment", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STRectAlignment { ++ ++ ++ /** ++ * Rectangle Alignment Enum ( Top Left ) ++ * ++ */ ++ @XmlEnumValue("tl") ++ TL("tl"), ++ ++ /** ++ * Rectangle Alignment Enum ( Top ) ++ * ++ */ ++ @XmlEnumValue("t") ++ T("t"), ++ ++ /** ++ * Rectangle Alignment Enum ( Top Right ) ++ * ++ */ ++ @XmlEnumValue("tr") ++ TR("tr"), ++ ++ /** ++ * Rectangle Alignment Enum ( Left ) ++ * ++ */ ++ @XmlEnumValue("l") ++ L("l"), ++ ++ /** ++ * Rectangle Alignment Enum ( Center ) ++ * ++ */ ++ @XmlEnumValue("ctr") ++ CTR("ctr"), ++ ++ /** ++ * Rectangle Alignment Enum ( Right ) ++ * ++ */ ++ @XmlEnumValue("r") ++ R("r"), ++ ++ /** ++ * Rectangle Alignment Enum ( Bottom Left ) ++ * ++ */ ++ @XmlEnumValue("bl") ++ BL("bl"), ++ ++ /** ++ * Rectangle Alignment Enum ( Bottom ) ++ * ++ */ ++ @XmlEnumValue("b") ++ B("b"), ++ ++ /** ++ * Rectangle Alignment Enum ( Bottom Right ) ++ * ++ */ ++ @XmlEnumValue("br") ++ BR("br"); ++ private final String value; ++ ++ STRectAlignment(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STRectAlignment fromValue(String v) { ++ for (STRectAlignment c: STRectAlignment.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STSchemeColorVal.java index 0000000000,0000000000..84b88075f1 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STSchemeColorVal.java @@@ -1,0 -1,0 +1,197 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_SchemeColorVal. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_SchemeColorVal">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="bg1"/>
++ *     <enumeration value="tx1"/>
++ *     <enumeration value="bg2"/>
++ *     <enumeration value="tx2"/>
++ *     <enumeration value="accent1"/>
++ *     <enumeration value="accent2"/>
++ *     <enumeration value="accent3"/>
++ *     <enumeration value="accent4"/>
++ *     <enumeration value="accent5"/>
++ *     <enumeration value="accent6"/>
++ *     <enumeration value="hlink"/>
++ *     <enumeration value="folHlink"/>
++ *     <enumeration value="phClr"/>
++ *     <enumeration value="dk1"/>
++ *     <enumeration value="lt1"/>
++ *     <enumeration value="dk2"/>
++ *     <enumeration value="lt2"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_SchemeColorVal", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STSchemeColorVal { ++ ++ ++ /** ++ * Background Color 1 ++ * ++ */ ++ @XmlEnumValue("bg1") ++ BG_1("bg1"), ++ ++ /** ++ * Text Color 1 ++ * ++ */ ++ @XmlEnumValue("tx1") ++ TX_1("tx1"), ++ ++ /** ++ * Background Color 2 ++ * ++ */ ++ @XmlEnumValue("bg2") ++ BG_2("bg2"), ++ ++ /** ++ * Text Color 2 ++ * ++ */ ++ @XmlEnumValue("tx2") ++ TX_2("tx2"), ++ ++ /** ++ * Accent Color 1 ++ * ++ */ ++ @XmlEnumValue("accent1") ++ ACCENT_1("accent1"), ++ ++ /** ++ * Accent Color 2 ++ * ++ */ ++ @XmlEnumValue("accent2") ++ ACCENT_2("accent2"), ++ ++ /** ++ * Accent Color 3 ++ * ++ */ ++ @XmlEnumValue("accent3") ++ ACCENT_3("accent3"), ++ ++ /** ++ * Accent Color 4 ++ * ++ */ ++ @XmlEnumValue("accent4") ++ ACCENT_4("accent4"), ++ ++ /** ++ * Accent Color 5 ++ * ++ */ ++ @XmlEnumValue("accent5") ++ ACCENT_5("accent5"), ++ ++ /** ++ * Accent Color 6 ++ * ++ */ ++ @XmlEnumValue("accent6") ++ ACCENT_6("accent6"), ++ ++ /** ++ * Hyperlink Color ++ * ++ */ ++ @XmlEnumValue("hlink") ++ HLINK("hlink"), ++ ++ /** ++ * Followed Hyperlink Color ++ * ++ */ ++ @XmlEnumValue("folHlink") ++ FOL_HLINK("folHlink"), ++ ++ /** ++ * Style Color ++ * ++ */ ++ @XmlEnumValue("phClr") ++ PH_CLR("phClr"), ++ ++ /** ++ * Dark Color 1 ++ * ++ */ ++ @XmlEnumValue("dk1") ++ DK_1("dk1"), ++ ++ /** ++ * Light Color 1 ++ * ++ */ ++ @XmlEnumValue("lt1") ++ LT_1("lt1"), ++ ++ /** ++ * Dark Color 2 ++ * ++ */ ++ @XmlEnumValue("dk2") ++ DK_2("dk2"), ++ ++ /** ++ * Light Color 2 ++ * ++ */ ++ @XmlEnumValue("lt2") ++ LT_2("lt2"); ++ private final String value; ++ ++ STSchemeColorVal(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STSchemeColorVal fromValue(String v) { ++ for (STSchemeColorVal c: STSchemeColorVal.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STShapeType.java index 0000000000,0000000000..559b0a1591 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STShapeType.java @@@ -1,0 -1,0 +1,1557 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_ShapeType. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_ShapeType">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="line"/>
++ *     <enumeration value="lineInv"/>
++ *     <enumeration value="triangle"/>
++ *     <enumeration value="rtTriangle"/>
++ *     <enumeration value="rect"/>
++ *     <enumeration value="diamond"/>
++ *     <enumeration value="parallelogram"/>
++ *     <enumeration value="trapezoid"/>
++ *     <enumeration value="nonIsoscelesTrapezoid"/>
++ *     <enumeration value="pentagon"/>
++ *     <enumeration value="hexagon"/>
++ *     <enumeration value="heptagon"/>
++ *     <enumeration value="octagon"/>
++ *     <enumeration value="decagon"/>
++ *     <enumeration value="dodecagon"/>
++ *     <enumeration value="star4"/>
++ *     <enumeration value="star5"/>
++ *     <enumeration value="star6"/>
++ *     <enumeration value="star7"/>
++ *     <enumeration value="star8"/>
++ *     <enumeration value="star10"/>
++ *     <enumeration value="star12"/>
++ *     <enumeration value="star16"/>
++ *     <enumeration value="star24"/>
++ *     <enumeration value="star32"/>
++ *     <enumeration value="roundRect"/>
++ *     <enumeration value="round1Rect"/>
++ *     <enumeration value="round2SameRect"/>
++ *     <enumeration value="round2DiagRect"/>
++ *     <enumeration value="snipRoundRect"/>
++ *     <enumeration value="snip1Rect"/>
++ *     <enumeration value="snip2SameRect"/>
++ *     <enumeration value="snip2DiagRect"/>
++ *     <enumeration value="plaque"/>
++ *     <enumeration value="ellipse"/>
++ *     <enumeration value="teardrop"/>
++ *     <enumeration value="homePlate"/>
++ *     <enumeration value="chevron"/>
++ *     <enumeration value="pieWedge"/>
++ *     <enumeration value="pie"/>
++ *     <enumeration value="blockArc"/>
++ *     <enumeration value="donut"/>
++ *     <enumeration value="noSmoking"/>
++ *     <enumeration value="rightArrow"/>
++ *     <enumeration value="leftArrow"/>
++ *     <enumeration value="upArrow"/>
++ *     <enumeration value="downArrow"/>
++ *     <enumeration value="stripedRightArrow"/>
++ *     <enumeration value="notchedRightArrow"/>
++ *     <enumeration value="bentUpArrow"/>
++ *     <enumeration value="leftRightArrow"/>
++ *     <enumeration value="upDownArrow"/>
++ *     <enumeration value="leftUpArrow"/>
++ *     <enumeration value="leftRightUpArrow"/>
++ *     <enumeration value="quadArrow"/>
++ *     <enumeration value="leftArrowCallout"/>
++ *     <enumeration value="rightArrowCallout"/>
++ *     <enumeration value="upArrowCallout"/>
++ *     <enumeration value="downArrowCallout"/>
++ *     <enumeration value="leftRightArrowCallout"/>
++ *     <enumeration value="upDownArrowCallout"/>
++ *     <enumeration value="quadArrowCallout"/>
++ *     <enumeration value="bentArrow"/>
++ *     <enumeration value="uturnArrow"/>
++ *     <enumeration value="circularArrow"/>
++ *     <enumeration value="leftCircularArrow"/>
++ *     <enumeration value="leftRightCircularArrow"/>
++ *     <enumeration value="curvedRightArrow"/>
++ *     <enumeration value="curvedLeftArrow"/>
++ *     <enumeration value="curvedUpArrow"/>
++ *     <enumeration value="curvedDownArrow"/>
++ *     <enumeration value="swooshArrow"/>
++ *     <enumeration value="cube"/>
++ *     <enumeration value="can"/>
++ *     <enumeration value="lightningBolt"/>
++ *     <enumeration value="heart"/>
++ *     <enumeration value="sun"/>
++ *     <enumeration value="moon"/>
++ *     <enumeration value="smileyFace"/>
++ *     <enumeration value="irregularSeal1"/>
++ *     <enumeration value="irregularSeal2"/>
++ *     <enumeration value="foldedCorner"/>
++ *     <enumeration value="bevel"/>
++ *     <enumeration value="frame"/>
++ *     <enumeration value="halfFrame"/>
++ *     <enumeration value="corner"/>
++ *     <enumeration value="diagStripe"/>
++ *     <enumeration value="chord"/>
++ *     <enumeration value="arc"/>
++ *     <enumeration value="leftBracket"/>
++ *     <enumeration value="rightBracket"/>
++ *     <enumeration value="leftBrace"/>
++ *     <enumeration value="rightBrace"/>
++ *     <enumeration value="bracketPair"/>
++ *     <enumeration value="bracePair"/>
++ *     <enumeration value="straightConnector1"/>
++ *     <enumeration value="bentConnector2"/>
++ *     <enumeration value="bentConnector3"/>
++ *     <enumeration value="bentConnector4"/>
++ *     <enumeration value="bentConnector5"/>
++ *     <enumeration value="curvedConnector2"/>
++ *     <enumeration value="curvedConnector3"/>
++ *     <enumeration value="curvedConnector4"/>
++ *     <enumeration value="curvedConnector5"/>
++ *     <enumeration value="callout1"/>
++ *     <enumeration value="callout2"/>
++ *     <enumeration value="callout3"/>
++ *     <enumeration value="accentCallout1"/>
++ *     <enumeration value="accentCallout2"/>
++ *     <enumeration value="accentCallout3"/>
++ *     <enumeration value="borderCallout1"/>
++ *     <enumeration value="borderCallout2"/>
++ *     <enumeration value="borderCallout3"/>
++ *     <enumeration value="accentBorderCallout1"/>
++ *     <enumeration value="accentBorderCallout2"/>
++ *     <enumeration value="accentBorderCallout3"/>
++ *     <enumeration value="wedgeRectCallout"/>
++ *     <enumeration value="wedgeRoundRectCallout"/>
++ *     <enumeration value="wedgeEllipseCallout"/>
++ *     <enumeration value="cloudCallout"/>
++ *     <enumeration value="cloud"/>
++ *     <enumeration value="ribbon"/>
++ *     <enumeration value="ribbon2"/>
++ *     <enumeration value="ellipseRibbon"/>
++ *     <enumeration value="ellipseRibbon2"/>
++ *     <enumeration value="leftRightRibbon"/>
++ *     <enumeration value="verticalScroll"/>
++ *     <enumeration value="horizontalScroll"/>
++ *     <enumeration value="wave"/>
++ *     <enumeration value="doubleWave"/>
++ *     <enumeration value="plus"/>
++ *     <enumeration value="flowChartProcess"/>
++ *     <enumeration value="flowChartDecision"/>
++ *     <enumeration value="flowChartInputOutput"/>
++ *     <enumeration value="flowChartPredefinedProcess"/>
++ *     <enumeration value="flowChartInternalStorage"/>
++ *     <enumeration value="flowChartDocument"/>
++ *     <enumeration value="flowChartMultidocument"/>
++ *     <enumeration value="flowChartTerminator"/>
++ *     <enumeration value="flowChartPreparation"/>
++ *     <enumeration value="flowChartManualInput"/>
++ *     <enumeration value="flowChartManualOperation"/>
++ *     <enumeration value="flowChartConnector"/>
++ *     <enumeration value="flowChartPunchedCard"/>
++ *     <enumeration value="flowChartPunchedTape"/>
++ *     <enumeration value="flowChartSummingJunction"/>
++ *     <enumeration value="flowChartOr"/>
++ *     <enumeration value="flowChartCollate"/>
++ *     <enumeration value="flowChartSort"/>
++ *     <enumeration value="flowChartExtract"/>
++ *     <enumeration value="flowChartMerge"/>
++ *     <enumeration value="flowChartOfflineStorage"/>
++ *     <enumeration value="flowChartOnlineStorage"/>
++ *     <enumeration value="flowChartMagneticTape"/>
++ *     <enumeration value="flowChartMagneticDisk"/>
++ *     <enumeration value="flowChartMagneticDrum"/>
++ *     <enumeration value="flowChartDisplay"/>
++ *     <enumeration value="flowChartDelay"/>
++ *     <enumeration value="flowChartAlternateProcess"/>
++ *     <enumeration value="flowChartOffpageConnector"/>
++ *     <enumeration value="actionButtonBlank"/>
++ *     <enumeration value="actionButtonHome"/>
++ *     <enumeration value="actionButtonHelp"/>
++ *     <enumeration value="actionButtonInformation"/>
++ *     <enumeration value="actionButtonForwardNext"/>
++ *     <enumeration value="actionButtonBackPrevious"/>
++ *     <enumeration value="actionButtonEnd"/>
++ *     <enumeration value="actionButtonBeginning"/>
++ *     <enumeration value="actionButtonReturn"/>
++ *     <enumeration value="actionButtonDocument"/>
++ *     <enumeration value="actionButtonSound"/>
++ *     <enumeration value="actionButtonMovie"/>
++ *     <enumeration value="gear6"/>
++ *     <enumeration value="gear9"/>
++ *     <enumeration value="funnel"/>
++ *     <enumeration value="mathPlus"/>
++ *     <enumeration value="mathMinus"/>
++ *     <enumeration value="mathMultiply"/>
++ *     <enumeration value="mathDivide"/>
++ *     <enumeration value="mathEqual"/>
++ *     <enumeration value="mathNotEqual"/>
++ *     <enumeration value="cornerTabs"/>
++ *     <enumeration value="squareTabs"/>
++ *     <enumeration value="plaqueTabs"/>
++ *     <enumeration value="chartX"/>
++ *     <enumeration value="chartStar"/>
++ *     <enumeration value="chartPlus"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_ShapeType", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STShapeType { ++ ++ ++ /** ++ * Line Shape ++ * ++ */ ++ @XmlEnumValue("line") ++ LINE("line"), ++ ++ /** ++ * Line Inverse Shape ++ * ++ */ ++ @XmlEnumValue("lineInv") ++ LINE_INV("lineInv"), ++ ++ /** ++ * Triangle Shape ++ * ++ */ ++ @XmlEnumValue("triangle") ++ TRIANGLE("triangle"), ++ ++ /** ++ * Right Triangle Shape ++ * ++ */ ++ @XmlEnumValue("rtTriangle") ++ RT_TRIANGLE("rtTriangle"), ++ ++ /** ++ * Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("rect") ++ RECT("rect"), ++ ++ /** ++ * Diamond Shape ++ * ++ */ ++ @XmlEnumValue("diamond") ++ DIAMOND("diamond"), ++ ++ /** ++ * Parallelogram Shape ++ * ++ */ ++ @XmlEnumValue("parallelogram") ++ PARALLELOGRAM("parallelogram"), ++ ++ /** ++ * Trapezoid Shape ++ * ++ */ ++ @XmlEnumValue("trapezoid") ++ TRAPEZOID("trapezoid"), ++ ++ /** ++ * Non-Isosceles Trapezoid Shape ++ * ++ */ ++ @XmlEnumValue("nonIsoscelesTrapezoid") ++ NON_ISOSCELES_TRAPEZOID("nonIsoscelesTrapezoid"), ++ ++ /** ++ * Pentagon Shape ++ * ++ */ ++ @XmlEnumValue("pentagon") ++ PENTAGON("pentagon"), ++ ++ /** ++ * Hexagon Shape ++ * ++ */ ++ @XmlEnumValue("hexagon") ++ HEXAGON("hexagon"), ++ ++ /** ++ * Heptagon Shape ++ * ++ */ ++ @XmlEnumValue("heptagon") ++ HEPTAGON("heptagon"), ++ ++ /** ++ * Octagon Shape ++ * ++ */ ++ @XmlEnumValue("octagon") ++ OCTAGON("octagon"), ++ ++ /** ++ * Decagon Shape ++ * ++ */ ++ @XmlEnumValue("decagon") ++ DECAGON("decagon"), ++ ++ /** ++ * Dodecagon Shape ++ * ++ */ ++ @XmlEnumValue("dodecagon") ++ DODECAGON("dodecagon"), ++ ++ /** ++ * Four Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star4") ++ STAR_4("star4"), ++ ++ /** ++ * Five Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star5") ++ STAR_5("star5"), ++ ++ /** ++ * Six Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star6") ++ STAR_6("star6"), ++ ++ /** ++ * Seven Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star7") ++ STAR_7("star7"), ++ ++ /** ++ * Eight Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star8") ++ STAR_8("star8"), ++ ++ /** ++ * Ten Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star10") ++ STAR_10("star10"), ++ ++ /** ++ * Twelve Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star12") ++ STAR_12("star12"), ++ ++ /** ++ * Sixteen Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star16") ++ STAR_16("star16"), ++ ++ /** ++ * Twenty Four Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star24") ++ STAR_24("star24"), ++ ++ /** ++ * Thirty Two Pointed Star Shape ++ * ++ */ ++ @XmlEnumValue("star32") ++ STAR_32("star32"), ++ ++ /** ++ * Round Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("roundRect") ++ ROUND_RECT("roundRect"), ++ ++ /** ++ * One Round Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("round1Rect") ++ ROUND_1_RECT("round1Rect"), ++ ++ /** ++ * Two Same-side Round Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("round2SameRect") ++ ROUND_2_SAME_RECT("round2SameRect"), ++ ++ /** ++ * Two Diagonal Round Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("round2DiagRect") ++ ROUND_2_DIAG_RECT("round2DiagRect"), ++ ++ /** ++ * One Snip One Round Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("snipRoundRect") ++ SNIP_ROUND_RECT("snipRoundRect"), ++ ++ /** ++ * One Snip Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("snip1Rect") ++ SNIP_1_RECT("snip1Rect"), ++ ++ /** ++ * Two Same-side Snip Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("snip2SameRect") ++ SNIP_2_SAME_RECT("snip2SameRect"), ++ ++ /** ++ * Two Diagonal Snip Corner Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("snip2DiagRect") ++ SNIP_2_DIAG_RECT("snip2DiagRect"), ++ ++ /** ++ * Plaque Shape ++ * ++ */ ++ @XmlEnumValue("plaque") ++ PLAQUE("plaque"), ++ ++ /** ++ * Ellipse Shape ++ * ++ */ ++ @XmlEnumValue("ellipse") ++ ELLIPSE("ellipse"), ++ ++ /** ++ * Teardrop Shape ++ * ++ */ ++ @XmlEnumValue("teardrop") ++ TEARDROP("teardrop"), ++ ++ /** ++ * Home Plate Shape ++ * ++ */ ++ @XmlEnumValue("homePlate") ++ HOME_PLATE("homePlate"), ++ ++ /** ++ * Chevron Shape ++ * ++ */ ++ @XmlEnumValue("chevron") ++ CHEVRON("chevron"), ++ ++ /** ++ * Pie Wedge Shape ++ * ++ */ ++ @XmlEnumValue("pieWedge") ++ PIE_WEDGE("pieWedge"), ++ ++ /** ++ * Pie Shape ++ * ++ */ ++ @XmlEnumValue("pie") ++ PIE("pie"), ++ ++ /** ++ * Block Arc Shape ++ * ++ */ ++ @XmlEnumValue("blockArc") ++ BLOCK_ARC("blockArc"), ++ ++ /** ++ * Donut Shape ++ * ++ */ ++ @XmlEnumValue("donut") ++ DONUT("donut"), ++ ++ /** ++ * No Smoking Shape ++ * ++ */ ++ @XmlEnumValue("noSmoking") ++ NO_SMOKING("noSmoking"), ++ ++ /** ++ * Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("rightArrow") ++ RIGHT_ARROW("rightArrow"), ++ ++ /** ++ * Left Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftArrow") ++ LEFT_ARROW("leftArrow"), ++ ++ /** ++ * Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("upArrow") ++ UP_ARROW("upArrow"), ++ ++ /** ++ * Down Arrow Shape ++ * ++ */ ++ @XmlEnumValue("downArrow") ++ DOWN_ARROW("downArrow"), ++ ++ /** ++ * Striped Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("stripedRightArrow") ++ STRIPED_RIGHT_ARROW("stripedRightArrow"), ++ ++ /** ++ * Notched Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("notchedRightArrow") ++ NOTCHED_RIGHT_ARROW("notchedRightArrow"), ++ ++ /** ++ * Bent Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("bentUpArrow") ++ BENT_UP_ARROW("bentUpArrow"), ++ ++ /** ++ * Left Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftRightArrow") ++ LEFT_RIGHT_ARROW("leftRightArrow"), ++ ++ /** ++ * Up Down Arrow Shape ++ * ++ */ ++ @XmlEnumValue("upDownArrow") ++ UP_DOWN_ARROW("upDownArrow"), ++ ++ /** ++ * Left Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftUpArrow") ++ LEFT_UP_ARROW("leftUpArrow"), ++ ++ /** ++ * Left Right Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftRightUpArrow") ++ LEFT_RIGHT_UP_ARROW("leftRightUpArrow"), ++ ++ /** ++ * Quad-Arrow Shape ++ * ++ */ ++ @XmlEnumValue("quadArrow") ++ QUAD_ARROW("quadArrow"), ++ ++ /** ++ * Callout Left Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftArrowCallout") ++ LEFT_ARROW_CALLOUT("leftArrowCallout"), ++ ++ /** ++ * Callout Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("rightArrowCallout") ++ RIGHT_ARROW_CALLOUT("rightArrowCallout"), ++ ++ /** ++ * Callout Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("upArrowCallout") ++ UP_ARROW_CALLOUT("upArrowCallout"), ++ ++ /** ++ * Callout Down Arrow Shape ++ * ++ */ ++ @XmlEnumValue("downArrowCallout") ++ DOWN_ARROW_CALLOUT("downArrowCallout"), ++ ++ /** ++ * Callout Left Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftRightArrowCallout") ++ LEFT_RIGHT_ARROW_CALLOUT("leftRightArrowCallout"), ++ ++ /** ++ * Callout Up Down Arrow Shape ++ * ++ */ ++ @XmlEnumValue("upDownArrowCallout") ++ UP_DOWN_ARROW_CALLOUT("upDownArrowCallout"), ++ ++ /** ++ * Callout Quad-Arrow Shape ++ * ++ */ ++ @XmlEnumValue("quadArrowCallout") ++ QUAD_ARROW_CALLOUT("quadArrowCallout"), ++ ++ /** ++ * Bent Arrow Shape ++ * ++ */ ++ @XmlEnumValue("bentArrow") ++ BENT_ARROW("bentArrow"), ++ ++ /** ++ * U-Turn Arrow Shape ++ * ++ */ ++ @XmlEnumValue("uturnArrow") ++ UTURN_ARROW("uturnArrow"), ++ ++ /** ++ * Circular Arrow Shape ++ * ++ */ ++ @XmlEnumValue("circularArrow") ++ CIRCULAR_ARROW("circularArrow"), ++ ++ /** ++ * Left Circular Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftCircularArrow") ++ LEFT_CIRCULAR_ARROW("leftCircularArrow"), ++ ++ /** ++ * Left Right Circular Arrow Shape ++ * ++ */ ++ @XmlEnumValue("leftRightCircularArrow") ++ LEFT_RIGHT_CIRCULAR_ARROW("leftRightCircularArrow"), ++ ++ /** ++ * Curved Right Arrow Shape ++ * ++ */ ++ @XmlEnumValue("curvedRightArrow") ++ CURVED_RIGHT_ARROW("curvedRightArrow"), ++ ++ /** ++ * Curved Left Arrow Shape ++ * ++ */ ++ @XmlEnumValue("curvedLeftArrow") ++ CURVED_LEFT_ARROW("curvedLeftArrow"), ++ ++ /** ++ * Curved Up Arrow Shape ++ * ++ */ ++ @XmlEnumValue("curvedUpArrow") ++ CURVED_UP_ARROW("curvedUpArrow"), ++ ++ /** ++ * Curved Down Arrow Shape ++ * ++ */ ++ @XmlEnumValue("curvedDownArrow") ++ CURVED_DOWN_ARROW("curvedDownArrow"), ++ ++ /** ++ * Swoosh Arrow Shape ++ * ++ */ ++ @XmlEnumValue("swooshArrow") ++ SWOOSH_ARROW("swooshArrow"), ++ ++ /** ++ * Cube Shape ++ * ++ */ ++ @XmlEnumValue("cube") ++ CUBE("cube"), ++ ++ /** ++ * Can Shape ++ * ++ */ ++ @XmlEnumValue("can") ++ CAN("can"), ++ ++ /** ++ * Lightning Bolt Shape ++ * ++ */ ++ @XmlEnumValue("lightningBolt") ++ LIGHTNING_BOLT("lightningBolt"), ++ ++ /** ++ * Heart Shape ++ * ++ */ ++ @XmlEnumValue("heart") ++ HEART("heart"), ++ ++ /** ++ * Sun Shape ++ * ++ */ ++ @XmlEnumValue("sun") ++ SUN("sun"), ++ ++ /** ++ * Moon Shape ++ * ++ */ ++ @XmlEnumValue("moon") ++ MOON("moon"), ++ ++ /** ++ * Smiley Face Shape ++ * ++ */ ++ @XmlEnumValue("smileyFace") ++ SMILEY_FACE("smileyFace"), ++ ++ /** ++ * Irregular Seal 1 Shape ++ * ++ */ ++ @XmlEnumValue("irregularSeal1") ++ IRREGULAR_SEAL_1("irregularSeal1"), ++ ++ /** ++ * Irregular Seal 2 Shape ++ * ++ */ ++ @XmlEnumValue("irregularSeal2") ++ IRREGULAR_SEAL_2("irregularSeal2"), ++ ++ /** ++ * Folded Corner Shape ++ * ++ */ ++ @XmlEnumValue("foldedCorner") ++ FOLDED_CORNER("foldedCorner"), ++ ++ /** ++ * Bevel Shape ++ * ++ */ ++ @XmlEnumValue("bevel") ++ BEVEL("bevel"), ++ ++ /** ++ * Frame Shape ++ * ++ */ ++ @XmlEnumValue("frame") ++ FRAME("frame"), ++ ++ /** ++ * Half Frame Shape ++ * ++ */ ++ @XmlEnumValue("halfFrame") ++ HALF_FRAME("halfFrame"), ++ ++ /** ++ * Corner Shape ++ * ++ */ ++ @XmlEnumValue("corner") ++ CORNER("corner"), ++ ++ /** ++ * Diagonal Stripe Shape ++ * ++ */ ++ @XmlEnumValue("diagStripe") ++ DIAG_STRIPE("diagStripe"), ++ ++ /** ++ * Chord Shape ++ * ++ */ ++ @XmlEnumValue("chord") ++ CHORD("chord"), ++ ++ /** ++ * Curved Arc Shape ++ * ++ */ ++ @XmlEnumValue("arc") ++ ARC("arc"), ++ ++ /** ++ * Left Bracket Shape ++ * ++ */ ++ @XmlEnumValue("leftBracket") ++ LEFT_BRACKET("leftBracket"), ++ ++ /** ++ * Right Bracket Shape ++ * ++ */ ++ @XmlEnumValue("rightBracket") ++ RIGHT_BRACKET("rightBracket"), ++ ++ /** ++ * Left Brace Shape ++ * ++ */ ++ @XmlEnumValue("leftBrace") ++ LEFT_BRACE("leftBrace"), ++ ++ /** ++ * Right Brace Shape ++ * ++ */ ++ @XmlEnumValue("rightBrace") ++ RIGHT_BRACE("rightBrace"), ++ ++ /** ++ * Bracket Pair Shape ++ * ++ */ ++ @XmlEnumValue("bracketPair") ++ BRACKET_PAIR("bracketPair"), ++ ++ /** ++ * Brace Pair Shape ++ * ++ */ ++ @XmlEnumValue("bracePair") ++ BRACE_PAIR("bracePair"), ++ ++ /** ++ * Straight Connector 1 Shape ++ * ++ */ ++ @XmlEnumValue("straightConnector1") ++ STRAIGHT_CONNECTOR_1("straightConnector1"), ++ ++ /** ++ * Bent Connector 2 Shape ++ * ++ */ ++ @XmlEnumValue("bentConnector2") ++ BENT_CONNECTOR_2("bentConnector2"), ++ ++ /** ++ * Bent Connector 3 Shape ++ * ++ */ ++ @XmlEnumValue("bentConnector3") ++ BENT_CONNECTOR_3("bentConnector3"), ++ ++ /** ++ * Bent Connector 4 Shape ++ * ++ */ ++ @XmlEnumValue("bentConnector4") ++ BENT_CONNECTOR_4("bentConnector4"), ++ ++ /** ++ * Bent Connector 5 Shape ++ * ++ */ ++ @XmlEnumValue("bentConnector5") ++ BENT_CONNECTOR_5("bentConnector5"), ++ ++ /** ++ * Curved Connector 2 Shape ++ * ++ */ ++ @XmlEnumValue("curvedConnector2") ++ CURVED_CONNECTOR_2("curvedConnector2"), ++ ++ /** ++ * Curved Connector 3 Shape ++ * ++ */ ++ @XmlEnumValue("curvedConnector3") ++ CURVED_CONNECTOR_3("curvedConnector3"), ++ ++ /** ++ * Curved Connector 4 Shape ++ * ++ */ ++ @XmlEnumValue("curvedConnector4") ++ CURVED_CONNECTOR_4("curvedConnector4"), ++ ++ /** ++ * Curved Connector 5 Shape ++ * ++ */ ++ @XmlEnumValue("curvedConnector5") ++ CURVED_CONNECTOR_5("curvedConnector5"), ++ ++ /** ++ * Callout 1 Shape ++ * ++ */ ++ @XmlEnumValue("callout1") ++ CALLOUT_1("callout1"), ++ ++ /** ++ * Callout 2 Shape ++ * ++ */ ++ @XmlEnumValue("callout2") ++ CALLOUT_2("callout2"), ++ ++ /** ++ * Callout 3 Shape ++ * ++ */ ++ @XmlEnumValue("callout3") ++ CALLOUT_3("callout3"), ++ ++ /** ++ * Callout 1 Shape ++ * ++ */ ++ @XmlEnumValue("accentCallout1") ++ ACCENT_CALLOUT_1("accentCallout1"), ++ ++ /** ++ * Callout 2 Shape ++ * ++ */ ++ @XmlEnumValue("accentCallout2") ++ ACCENT_CALLOUT_2("accentCallout2"), ++ ++ /** ++ * Callout 3 Shape ++ * ++ */ ++ @XmlEnumValue("accentCallout3") ++ ACCENT_CALLOUT_3("accentCallout3"), ++ ++ /** ++ * Callout 1 with Border Shape ++ * ++ */ ++ @XmlEnumValue("borderCallout1") ++ BORDER_CALLOUT_1("borderCallout1"), ++ ++ /** ++ * Callout 2 with Border Shape ++ * ++ */ ++ @XmlEnumValue("borderCallout2") ++ BORDER_CALLOUT_2("borderCallout2"), ++ ++ /** ++ * Callout 3 with Border Shape ++ * ++ */ ++ @XmlEnumValue("borderCallout3") ++ BORDER_CALLOUT_3("borderCallout3"), ++ ++ /** ++ * Callout 1 with Border and Accent Shape ++ * ++ */ ++ @XmlEnumValue("accentBorderCallout1") ++ ACCENT_BORDER_CALLOUT_1("accentBorderCallout1"), ++ ++ /** ++ * Callout 2 with Border and Accent Shape ++ * ++ */ ++ @XmlEnumValue("accentBorderCallout2") ++ ACCENT_BORDER_CALLOUT_2("accentBorderCallout2"), ++ ++ /** ++ * Callout 3 with Border and Accent Shape ++ * ++ */ ++ @XmlEnumValue("accentBorderCallout3") ++ ACCENT_BORDER_CALLOUT_3("accentBorderCallout3"), ++ ++ /** ++ * Callout Wedge Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("wedgeRectCallout") ++ WEDGE_RECT_CALLOUT("wedgeRectCallout"), ++ ++ /** ++ * Callout Wedge Round Rectangle Shape ++ * ++ */ ++ @XmlEnumValue("wedgeRoundRectCallout") ++ WEDGE_ROUND_RECT_CALLOUT("wedgeRoundRectCallout"), ++ ++ /** ++ * Callout Wedge Ellipse Shape ++ * ++ */ ++ @XmlEnumValue("wedgeEllipseCallout") ++ WEDGE_ELLIPSE_CALLOUT("wedgeEllipseCallout"), ++ ++ /** ++ * Callout Cloud Shape ++ * ++ */ ++ @XmlEnumValue("cloudCallout") ++ CLOUD_CALLOUT("cloudCallout"), ++ ++ /** ++ * Cloud Shape ++ * ++ */ ++ @XmlEnumValue("cloud") ++ CLOUD("cloud"), ++ ++ /** ++ * Ribbon Shape ++ * ++ */ ++ @XmlEnumValue("ribbon") ++ RIBBON("ribbon"), ++ ++ /** ++ * Ribbon 2 Shape ++ * ++ */ ++ @XmlEnumValue("ribbon2") ++ RIBBON_2("ribbon2"), ++ ++ /** ++ * Ellipse Ribbon Shape ++ * ++ */ ++ @XmlEnumValue("ellipseRibbon") ++ ELLIPSE_RIBBON("ellipseRibbon"), ++ ++ /** ++ * Ellipse Ribbon 2 Shape ++ * ++ */ ++ @XmlEnumValue("ellipseRibbon2") ++ ELLIPSE_RIBBON_2("ellipseRibbon2"), ++ ++ /** ++ * Left Right Ribbon Shape ++ * ++ */ ++ @XmlEnumValue("leftRightRibbon") ++ LEFT_RIGHT_RIBBON("leftRightRibbon"), ++ ++ /** ++ * Vertical Scroll Shape ++ * ++ */ ++ @XmlEnumValue("verticalScroll") ++ VERTICAL_SCROLL("verticalScroll"), ++ ++ /** ++ * Horizontal Scroll Shape ++ * ++ */ ++ @XmlEnumValue("horizontalScroll") ++ HORIZONTAL_SCROLL("horizontalScroll"), ++ ++ /** ++ * Wave Shape ++ * ++ */ ++ @XmlEnumValue("wave") ++ WAVE("wave"), ++ ++ /** ++ * Double Wave Shape ++ * ++ */ ++ @XmlEnumValue("doubleWave") ++ DOUBLE_WAVE("doubleWave"), ++ ++ /** ++ * Plus Shape ++ * ++ */ ++ @XmlEnumValue("plus") ++ PLUS("plus"), ++ ++ /** ++ * Process Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartProcess") ++ FLOW_CHART_PROCESS("flowChartProcess"), ++ ++ /** ++ * Decision Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartDecision") ++ FLOW_CHART_DECISION("flowChartDecision"), ++ ++ /** ++ * Input Output Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartInputOutput") ++ FLOW_CHART_INPUT_OUTPUT("flowChartInputOutput"), ++ ++ /** ++ * Predefined Process Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartPredefinedProcess") ++ FLOW_CHART_PREDEFINED_PROCESS("flowChartPredefinedProcess"), ++ ++ /** ++ * Internal Storage Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartInternalStorage") ++ FLOW_CHART_INTERNAL_STORAGE("flowChartInternalStorage"), ++ ++ /** ++ * Document Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartDocument") ++ FLOW_CHART_DOCUMENT("flowChartDocument"), ++ ++ /** ++ * Multi-Document Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartMultidocument") ++ FLOW_CHART_MULTIDOCUMENT("flowChartMultidocument"), ++ ++ /** ++ * Terminator Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartTerminator") ++ FLOW_CHART_TERMINATOR("flowChartTerminator"), ++ ++ /** ++ * Preparation Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartPreparation") ++ FLOW_CHART_PREPARATION("flowChartPreparation"), ++ ++ /** ++ * Manual Input Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartManualInput") ++ FLOW_CHART_MANUAL_INPUT("flowChartManualInput"), ++ ++ /** ++ * Manual Operation Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartManualOperation") ++ FLOW_CHART_MANUAL_OPERATION("flowChartManualOperation"), ++ ++ /** ++ * Connector Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartConnector") ++ FLOW_CHART_CONNECTOR("flowChartConnector"), ++ ++ /** ++ * Punched Card Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartPunchedCard") ++ FLOW_CHART_PUNCHED_CARD("flowChartPunchedCard"), ++ ++ /** ++ * Punched Tape Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartPunchedTape") ++ FLOW_CHART_PUNCHED_TAPE("flowChartPunchedTape"), ++ ++ /** ++ * Summing Junction Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartSummingJunction") ++ FLOW_CHART_SUMMING_JUNCTION("flowChartSummingJunction"), ++ ++ /** ++ * Or Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartOr") ++ FLOW_CHART_OR("flowChartOr"), ++ ++ /** ++ * Collate Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartCollate") ++ FLOW_CHART_COLLATE("flowChartCollate"), ++ ++ /** ++ * Sort Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartSort") ++ FLOW_CHART_SORT("flowChartSort"), ++ ++ /** ++ * Extract Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartExtract") ++ FLOW_CHART_EXTRACT("flowChartExtract"), ++ ++ /** ++ * Merge Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartMerge") ++ FLOW_CHART_MERGE("flowChartMerge"), ++ ++ /** ++ * Offline Storage Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartOfflineStorage") ++ FLOW_CHART_OFFLINE_STORAGE("flowChartOfflineStorage"), ++ ++ /** ++ * Online Storage Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartOnlineStorage") ++ FLOW_CHART_ONLINE_STORAGE("flowChartOnlineStorage"), ++ ++ /** ++ * Magnetic Tape Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartMagneticTape") ++ FLOW_CHART_MAGNETIC_TAPE("flowChartMagneticTape"), ++ ++ /** ++ * Magnetic Disk Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartMagneticDisk") ++ FLOW_CHART_MAGNETIC_DISK("flowChartMagneticDisk"), ++ ++ /** ++ * Magnetic Drum Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartMagneticDrum") ++ FLOW_CHART_MAGNETIC_DRUM("flowChartMagneticDrum"), ++ ++ /** ++ * Display Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartDisplay") ++ FLOW_CHART_DISPLAY("flowChartDisplay"), ++ ++ /** ++ * Delay Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartDelay") ++ FLOW_CHART_DELAY("flowChartDelay"), ++ ++ /** ++ * Alternate Process Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartAlternateProcess") ++ FLOW_CHART_ALTERNATE_PROCESS("flowChartAlternateProcess"), ++ ++ /** ++ * Off-Page Connector Flow Shape ++ * ++ */ ++ @XmlEnumValue("flowChartOffpageConnector") ++ FLOW_CHART_OFFPAGE_CONNECTOR("flowChartOffpageConnector"), ++ ++ /** ++ * Blank Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonBlank") ++ ACTION_BUTTON_BLANK("actionButtonBlank"), ++ ++ /** ++ * Home Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonHome") ++ ACTION_BUTTON_HOME("actionButtonHome"), ++ ++ /** ++ * Help Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonHelp") ++ ACTION_BUTTON_HELP("actionButtonHelp"), ++ ++ /** ++ * Information Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonInformation") ++ ACTION_BUTTON_INFORMATION("actionButtonInformation"), ++ ++ /** ++ * Forward or Next Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonForwardNext") ++ ACTION_BUTTON_FORWARD_NEXT("actionButtonForwardNext"), ++ ++ /** ++ * Back or Previous Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonBackPrevious") ++ ACTION_BUTTON_BACK_PREVIOUS("actionButtonBackPrevious"), ++ ++ /** ++ * End Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonEnd") ++ ACTION_BUTTON_END("actionButtonEnd"), ++ ++ /** ++ * Beginning Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonBeginning") ++ ACTION_BUTTON_BEGINNING("actionButtonBeginning"), ++ ++ /** ++ * Return Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonReturn") ++ ACTION_BUTTON_RETURN("actionButtonReturn"), ++ ++ /** ++ * Document Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonDocument") ++ ACTION_BUTTON_DOCUMENT("actionButtonDocument"), ++ ++ /** ++ * Sound Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonSound") ++ ACTION_BUTTON_SOUND("actionButtonSound"), ++ ++ /** ++ * Movie Button Shape ++ * ++ */ ++ @XmlEnumValue("actionButtonMovie") ++ ACTION_BUTTON_MOVIE("actionButtonMovie"), ++ ++ /** ++ * Gear 6 Shape ++ * ++ */ ++ @XmlEnumValue("gear6") ++ GEAR_6("gear6"), ++ ++ /** ++ * Gear 9 Shape ++ * ++ */ ++ @XmlEnumValue("gear9") ++ GEAR_9("gear9"), ++ ++ /** ++ * Funnel Shape ++ * ++ */ ++ @XmlEnumValue("funnel") ++ FUNNEL("funnel"), ++ ++ /** ++ * Plus Math Shape ++ * ++ */ ++ @XmlEnumValue("mathPlus") ++ MATH_PLUS("mathPlus"), ++ ++ /** ++ * Minus Math Shape ++ * ++ */ ++ @XmlEnumValue("mathMinus") ++ MATH_MINUS("mathMinus"), ++ ++ /** ++ * Multiply Math Shape ++ * ++ */ ++ @XmlEnumValue("mathMultiply") ++ MATH_MULTIPLY("mathMultiply"), ++ ++ /** ++ * Divide Math Shape ++ * ++ */ ++ @XmlEnumValue("mathDivide") ++ MATH_DIVIDE("mathDivide"), ++ ++ /** ++ * Equal Math Shape ++ * ++ */ ++ @XmlEnumValue("mathEqual") ++ MATH_EQUAL("mathEqual"), ++ ++ /** ++ * Not Equal Math Shape ++ * ++ */ ++ @XmlEnumValue("mathNotEqual") ++ MATH_NOT_EQUAL("mathNotEqual"), ++ ++ /** ++ * Corner Tabs Shape ++ * ++ */ ++ @XmlEnumValue("cornerTabs") ++ CORNER_TABS("cornerTabs"), ++ ++ /** ++ * Square Tabs Shape ++ * ++ */ ++ @XmlEnumValue("squareTabs") ++ SQUARE_TABS("squareTabs"), ++ ++ /** ++ * Plaque Tabs Shape ++ * ++ */ ++ @XmlEnumValue("plaqueTabs") ++ PLAQUE_TABS("plaqueTabs"), ++ ++ /** ++ * Chart X Shape ++ * ++ */ ++ @XmlEnumValue("chartX") ++ CHART_X("chartX"), ++ ++ /** ++ * Chart Star Shape ++ * ++ */ ++ @XmlEnumValue("chartStar") ++ CHART_STAR("chartStar"), ++ ++ /** ++ * Chart Plus Shape ++ * ++ */ ++ @XmlEnumValue("chartPlus") ++ CHART_PLUS("chartPlus"); ++ private final String value; ++ ++ STShapeType(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STShapeType fromValue(String v) { ++ for (STShapeType c: STShapeType.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/binding/STTextShapeType.java index 0000000000,0000000000..f3ed4b0cf7 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/binding/STTextShapeType.java @@@ -1,0 -1,0 +1,389 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.draw.binding; ++ ++import javax.xml.bind.annotation.XmlEnum; ++import javax.xml.bind.annotation.XmlEnumValue; ++import javax.xml.bind.annotation.XmlType; ++ ++ ++/** ++ *

Java class for ST_TextShapeType. ++ * ++ *

The following schema fragment specifies the expected content contained within this class. ++ *

++ *

++ * <simpleType name="ST_TextShapeType">
++ *   <restriction base="{http://www.w3.org/2001/XMLSchema}token">
++ *     <enumeration value="textNoShape"/>
++ *     <enumeration value="textPlain"/>
++ *     <enumeration value="textStop"/>
++ *     <enumeration value="textTriangle"/>
++ *     <enumeration value="textTriangleInverted"/>
++ *     <enumeration value="textChevron"/>
++ *     <enumeration value="textChevronInverted"/>
++ *     <enumeration value="textRingInside"/>
++ *     <enumeration value="textRingOutside"/>
++ *     <enumeration value="textArchUp"/>
++ *     <enumeration value="textArchDown"/>
++ *     <enumeration value="textCircle"/>
++ *     <enumeration value="textButton"/>
++ *     <enumeration value="textArchUpPour"/>
++ *     <enumeration value="textArchDownPour"/>
++ *     <enumeration value="textCirclePour"/>
++ *     <enumeration value="textButtonPour"/>
++ *     <enumeration value="textCurveUp"/>
++ *     <enumeration value="textCurveDown"/>
++ *     <enumeration value="textCanUp"/>
++ *     <enumeration value="textCanDown"/>
++ *     <enumeration value="textWave1"/>
++ *     <enumeration value="textWave2"/>
++ *     <enumeration value="textDoubleWave1"/>
++ *     <enumeration value="textWave4"/>
++ *     <enumeration value="textInflate"/>
++ *     <enumeration value="textDeflate"/>
++ *     <enumeration value="textInflateBottom"/>
++ *     <enumeration value="textDeflateBottom"/>
++ *     <enumeration value="textInflateTop"/>
++ *     <enumeration value="textDeflateTop"/>
++ *     <enumeration value="textDeflateInflate"/>
++ *     <enumeration value="textDeflateInflateDeflate"/>
++ *     <enumeration value="textFadeRight"/>
++ *     <enumeration value="textFadeLeft"/>
++ *     <enumeration value="textFadeUp"/>
++ *     <enumeration value="textFadeDown"/>
++ *     <enumeration value="textSlantUp"/>
++ *     <enumeration value="textSlantDown"/>
++ *     <enumeration value="textCascadeUp"/>
++ *     <enumeration value="textCascadeDown"/>
++ *   </restriction>
++ * </simpleType>
++ * 
++ * ++ */ ++@XmlType(name = "ST_TextShapeType", namespace = "http://schemas.openxmlformats.org/drawingml/2006/main") ++@XmlEnum ++public enum STTextShapeType { ++ ++ ++ /** ++ * No Text Shape ++ * ++ */ ++ @XmlEnumValue("textNoShape") ++ TEXT_NO_SHAPE("textNoShape"), ++ ++ /** ++ * Plain Text Shape ++ * ++ */ ++ @XmlEnumValue("textPlain") ++ TEXT_PLAIN("textPlain"), ++ ++ /** ++ * Stop Sign Text Shape ++ * ++ */ ++ @XmlEnumValue("textStop") ++ TEXT_STOP("textStop"), ++ ++ /** ++ * Triangle Text Shape ++ * ++ */ ++ @XmlEnumValue("textTriangle") ++ TEXT_TRIANGLE("textTriangle"), ++ ++ /** ++ * Inverted Triangle Text Shape ++ * ++ */ ++ @XmlEnumValue("textTriangleInverted") ++ TEXT_TRIANGLE_INVERTED("textTriangleInverted"), ++ ++ /** ++ * Chevron Text Shape ++ * ++ */ ++ @XmlEnumValue("textChevron") ++ TEXT_CHEVRON("textChevron"), ++ ++ /** ++ * Inverted Chevron Text Shape ++ * ++ */ ++ @XmlEnumValue("textChevronInverted") ++ TEXT_CHEVRON_INVERTED("textChevronInverted"), ++ ++ /** ++ * Inside Ring Text Shape ++ * ++ */ ++ @XmlEnumValue("textRingInside") ++ TEXT_RING_INSIDE("textRingInside"), ++ ++ /** ++ * Outside Ring Text Shape ++ * ++ */ ++ @XmlEnumValue("textRingOutside") ++ TEXT_RING_OUTSIDE("textRingOutside"), ++ ++ /** ++ * Upward Arch Text Shape ++ * ++ */ ++ @XmlEnumValue("textArchUp") ++ TEXT_ARCH_UP("textArchUp"), ++ ++ /** ++ * Downward Arch Text Shape ++ * ++ */ ++ @XmlEnumValue("textArchDown") ++ TEXT_ARCH_DOWN("textArchDown"), ++ ++ /** ++ * Circle Text Shape ++ * ++ */ ++ @XmlEnumValue("textCircle") ++ TEXT_CIRCLE("textCircle"), ++ ++ /** ++ * Button Text Shape ++ * ++ */ ++ @XmlEnumValue("textButton") ++ TEXT_BUTTON("textButton"), ++ ++ /** ++ * Upward Pour Arch Text Shape ++ * ++ */ ++ @XmlEnumValue("textArchUpPour") ++ TEXT_ARCH_UP_POUR("textArchUpPour"), ++ ++ /** ++ * Downward Pour Arch Text Shape ++ * ++ */ ++ @XmlEnumValue("textArchDownPour") ++ TEXT_ARCH_DOWN_POUR("textArchDownPour"), ++ ++ /** ++ * Circle Pour Text Shape ++ * ++ */ ++ @XmlEnumValue("textCirclePour") ++ TEXT_CIRCLE_POUR("textCirclePour"), ++ ++ /** ++ * Button Pour Text Shape ++ * ++ */ ++ @XmlEnumValue("textButtonPour") ++ TEXT_BUTTON_POUR("textButtonPour"), ++ ++ /** ++ * Upward Curve Text Shape ++ * ++ */ ++ @XmlEnumValue("textCurveUp") ++ TEXT_CURVE_UP("textCurveUp"), ++ ++ /** ++ * Downward Curve Text Shape ++ * ++ */ ++ @XmlEnumValue("textCurveDown") ++ TEXT_CURVE_DOWN("textCurveDown"), ++ ++ /** ++ * Upward Can Text Shape ++ * ++ */ ++ @XmlEnumValue("textCanUp") ++ TEXT_CAN_UP("textCanUp"), ++ ++ /** ++ * Downward Can Text Shape ++ * ++ */ ++ @XmlEnumValue("textCanDown") ++ TEXT_CAN_DOWN("textCanDown"), ++ ++ /** ++ * Wave 1 Text Shape ++ * ++ */ ++ @XmlEnumValue("textWave1") ++ TEXT_WAVE_1("textWave1"), ++ ++ /** ++ * Wave 2 Text Shape ++ * ++ */ ++ @XmlEnumValue("textWave2") ++ TEXT_WAVE_2("textWave2"), ++ ++ /** ++ * Double Wave 1 Text Shape ++ * ++ */ ++ @XmlEnumValue("textDoubleWave1") ++ TEXT_DOUBLE_WAVE_1("textDoubleWave1"), ++ ++ /** ++ * Wave 4 Text Shape ++ * ++ */ ++ @XmlEnumValue("textWave4") ++ TEXT_WAVE_4("textWave4"), ++ ++ /** ++ * Inflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textInflate") ++ TEXT_INFLATE("textInflate"), ++ ++ /** ++ * Deflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textDeflate") ++ TEXT_DEFLATE("textDeflate"), ++ ++ /** ++ * Bottom Inflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textInflateBottom") ++ TEXT_INFLATE_BOTTOM("textInflateBottom"), ++ ++ /** ++ * Bottom Deflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textDeflateBottom") ++ TEXT_DEFLATE_BOTTOM("textDeflateBottom"), ++ ++ /** ++ * Top Inflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textInflateTop") ++ TEXT_INFLATE_TOP("textInflateTop"), ++ ++ /** ++ * Top Deflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textDeflateTop") ++ TEXT_DEFLATE_TOP("textDeflateTop"), ++ ++ /** ++ * Deflate-Inflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textDeflateInflate") ++ TEXT_DEFLATE_INFLATE("textDeflateInflate"), ++ ++ /** ++ * Deflate-Inflate-Deflate Text Shape ++ * ++ */ ++ @XmlEnumValue("textDeflateInflateDeflate") ++ TEXT_DEFLATE_INFLATE_DEFLATE("textDeflateInflateDeflate"), ++ ++ /** ++ * Right Fade Text Shape ++ * ++ */ ++ @XmlEnumValue("textFadeRight") ++ TEXT_FADE_RIGHT("textFadeRight"), ++ ++ /** ++ * Left Fade Text Shape ++ * ++ */ ++ @XmlEnumValue("textFadeLeft") ++ TEXT_FADE_LEFT("textFadeLeft"), ++ ++ /** ++ * Upward Fade Text Shape ++ * ++ */ ++ @XmlEnumValue("textFadeUp") ++ TEXT_FADE_UP("textFadeUp"), ++ ++ /** ++ * Downward Fade Text Shape ++ * ++ */ ++ @XmlEnumValue("textFadeDown") ++ TEXT_FADE_DOWN("textFadeDown"), ++ ++ /** ++ * Upward Slant Text Shape ++ * ++ */ ++ @XmlEnumValue("textSlantUp") ++ TEXT_SLANT_UP("textSlantUp"), ++ ++ /** ++ * Downward Slant Text Shape ++ * ++ */ ++ @XmlEnumValue("textSlantDown") ++ TEXT_SLANT_DOWN("textSlantDown"), ++ ++ /** ++ * Upward Cascade Text Shape ++ * ++ */ ++ @XmlEnumValue("textCascadeUp") ++ TEXT_CASCADE_UP("textCascadeUp"), ++ ++ /** ++ * Downward Cascade Text Shape ++ * ++ */ ++ @XmlEnumValue("textCascadeDown") ++ TEXT_CASCADE_DOWN("textCascadeDown"); ++ private final String value; ++ ++ STTextShapeType(String v) { ++ value = v; ++ } ++ ++ public String value() { ++ return value; ++ } ++ ++ public static STTextShapeType fromValue(String v) { ++ for (STTextShapeType c: STTextShapeType.values()) { ++ if (c.value.equals(v)) { ++ return c; ++ } ++ } ++ throw new IllegalArgumentException(v); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/AbsExpression.java index 0000000000,0000000000..0f94e14b6a new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/AbsExpression.java @@@ -1,0 -1,0 +1,41 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Absolute Value Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class AbsExpression implements Expression { ++ private String arg; ++ ++ AbsExpression(Matcher m){ ++ arg = m.group(1); ++ } ++ ++ public double evaluate(Context ctx){ ++ double val = ctx.getValue(arg); ++ return Math.abs(val); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/AddDivideExpression.java index 0000000000,0000000000..2a01de449e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/AddDivideExpression.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Add Divide Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class AddDivideExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ AddDivideExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return (x + y ) / z; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/AddSubtractExpression.java index 0000000000,0000000000..5d5f1e6357 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/AddSubtractExpression.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Add Subtract Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class AddSubtractExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ AddSubtractExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return (x + y ) - z; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/AdjustValue.java index 0000000000,0000000000..8a2f0a4566 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/AdjustValue.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTGeomGuide; ++ ++/** ++ * Represents a shape adjust values (see section 20.1.9.5 in the spec) ++ * ++ * @author Yegor Kozlov ++ */ ++public class AdjustValue extends Guide { ++ ++ public AdjustValue(CTGeomGuide gd) { ++ super(gd.getName(), gd.getFmla()); ++ } ++ ++ @Override ++ public double evaluate(Context ctx){ ++ String name = getName(); ++ Guide adj = ctx.getAdjustValue(name); ++ if(adj != null) { ++ return adj.evaluate(ctx); ++ } ++ return super.evaluate(ctx); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/ArcTanExpression.java index 0000000000,0000000000..9044e8ad3a new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/ArcTanExpression.java @@@ -1,0 -1,0 +1,43 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class ArcTanExpression implements Expression { ++ private String arg1, arg2; ++ ++ ArcTanExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ return Math.atan(y / x); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/ArcToCommand.java index 0000000000,0000000000..0382d7f997 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/ArcToCommand.java @@@ -1,0 -1,0 +1,68 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTPath2DArcTo; ++ ++import java.awt.geom.Arc2D; ++import java.awt.geom.GeneralPath; ++import java.awt.geom.Point2D; ++ ++/** ++ * ArcTo command within a shape path in DrawingML: ++ * ++ * ++ * ++ * Where wr and wh are the height and width radiuses ++ * of the supposed circle being used to draw the arc. This gives the circle ++ * a total height of (2 * hR) and a total width of (2 * wR) ++ * ++ * stAng is the start angle and swAng is the swing angle ++ * ++ * @author Yegor Kozlov ++ */ ++public class ArcToCommand implements PathCommand { ++ private String hr, wr, stAng, swAng; ++ ++ ArcToCommand(CTPath2DArcTo arc){ ++ hr = arc.getHR().toString(); ++ wr = arc.getWR().toString(); ++ stAng = arc.getStAng().toString(); ++ swAng = arc.getSwAng().toString(); ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ double rx = ctx.getValue(wr); ++ double ry = ctx.getValue(hr); ++ double start = ctx.getValue(stAng) / 60000; ++ double extent = ctx.getValue(swAng) / 60000; ++ Point2D pt = path.getCurrentPoint(); ++ double x0 = pt.getX() - rx - rx * Math.cos(Math.toRadians(start)); ++ double y0 = pt.getY() - ry - ry * Math.sin(Math.toRadians(start)); ++ ++ Arc2D arc = new Arc2D.Double( ++ x0, ++ y0, ++ 2 * rx, 2 * ry, ++ -start, -extent, ++ Arc2D.OPEN); ++ path.append(arc, true); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/ClosePathCommand.java index 0000000000,0000000000..9d29062806 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/ClosePathCommand.java @@@ -1,0 -1,0 +1,37 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * Date: 10/25/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class ClosePathCommand implements PathCommand { ++ ++ ClosePathCommand(){ ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ path.closePath(); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Context.java index 0000000000,0000000000..8fd5147ed2 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Context.java @@@ -1,0 -1,0 +1,74 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.geom.Rectangle2D; ++import java.util.HashMap; ++import java.util.Map; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class Context { ++ final Map _ctx = new HashMap(); ++ final IAdjustableShape _props; ++ final Rectangle2D _anchor; ++ ++ public Context(CustomGeometry geom, Rectangle2D anchor, IAdjustableShape props){ ++ _props = props; ++ _anchor = anchor; ++ for(Guide gd : geom.adjusts) evaluate(gd); ++ for(Guide gd : geom.guides) evaluate(gd); ++ } ++ ++ public Rectangle2D getShapeAnchor(){ ++ return _anchor; ++ } ++ ++ public Guide getAdjustValue(String name){ ++ return _props.getAdjustValue(name); ++ } ++ ++ public double getValue(String key){ ++ if(key.matches("(\\+|-)?\\d+")){ ++ return Double.parseDouble(key); ++ } ++ ++ Formula builtIn = Formula.builtInFormulas.get(key); ++ if(builtIn != null){ ++ return builtIn.evaluate(this); ++ } ++ ++ if(!_ctx.containsKey(key)) { ++ throw new RuntimeException("undefined variable: " + key); ++ } ++ ++ return _ctx.get(key); ++ } ++ ++ public double evaluate(Formula fmla){ ++ double result = fmla.evaluate(this); ++ String key = fmla.getName(); ++ if(key != null) _ctx.put(key, result); ++ return result; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/CosExpression.java index 0000000000,0000000000..56373d9193 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/CosExpression.java @@@ -1,0 -1,0 +1,43 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class CosExpression implements Expression { ++ private String arg1, arg2; ++ ++ CosExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2)/ 60000; ++ return x * Math.cos(Math.toRadians(y)); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/CosineArcTanExpression.java index 0000000000,0000000000..4bed9b72d1 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/CosineArcTanExpression.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class CosineArcTanExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ CosineArcTanExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return x*Math.cos(Math.atan(z / y)); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/CurveToCommand.java index 0000000000,0000000000..02eeb2953e new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/CurveToCommand.java @@@ -1,0 -1,0 +1,52 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTAdjPoint2D; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * Date: 10/25/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class CurveToCommand implements PathCommand { ++ private String arg1, arg2, arg3, arg4, arg5, arg6; ++ ++ CurveToCommand(CTAdjPoint2D pt1, CTAdjPoint2D pt2, CTAdjPoint2D pt3){ ++ arg1 = pt1.getX().toString(); ++ arg2 = pt1.getY().toString(); ++ arg3 = pt2.getX().toString(); ++ arg4 = pt2.getY().toString(); ++ arg5 = pt3.getX().toString(); ++ arg6 = pt3.getY().toString(); ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ double x1 = ctx.getValue(arg1); ++ double y1 = ctx.getValue(arg2); ++ double x2 = ctx.getValue(arg3); ++ double y2 = ctx.getValue(arg4); ++ double x3 = ctx.getValue(arg5); ++ double y3 = ctx.getValue(arg6); ++ path.curveTo((float)x1, (float)y1, (float)x2, (float)y2, (float)x3, (float)y3); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java index 0000000000,0000000000..ce1b26c498 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java @@@ -1,0 -1,0 +1,82 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.*; ++ ++import org.apache.poi.sl.draw.binding.*; ++ ++/** ++ * Definition of a custom geometric shape ++ * ++ * @author Yegor Kozlov ++ */ ++public class CustomGeometry implements Iterable{ ++ List adjusts = new ArrayList(); ++ List guides = new ArrayList(); ++ List paths = new ArrayList(); ++ Path textBounds; ++ ++ public CustomGeometry(CTCustomGeometry2D geom) { ++ CTGeomGuideList avLst = geom.getAvLst(); ++ if(avLst != null) { ++ for(CTGeomGuide gd : avLst.getGd()){ ++ adjusts.add(new AdjustValue(gd)); ++ } ++ } ++ ++ CTGeomGuideList gdLst = geom.getGdLst(); ++ if(gdLst != null) { ++ for(CTGeomGuide gd : gdLst.getGd()){ ++ guides.add(new Guide(gd)); ++ } ++ } ++ ++ CTPath2DList pathLst = geom.getPathLst(); ++ if(pathLst != null) { ++ for(CTPath2D spPath : pathLst.getPath()){ ++ paths.add(new Path(spPath)); ++ } ++ } ++ ++ CTGeomRect rect = geom.getRect(); ++ if(rect != null) { ++ textBounds = new Path(); ++ textBounds.addCommand( ++ new MoveToCommand(rect.getL().toString(), rect.getT().toString())); ++ textBounds.addCommand( ++ new LineToCommand(rect.getR().toString(), rect.getT().toString())); ++ textBounds.addCommand( ++ new LineToCommand(rect.getR().toString(), rect.getB().toString())); ++ textBounds.addCommand( ++ new LineToCommand(rect.getL().toString(), rect.getB().toString())); ++ textBounds.addCommand( ++ new ClosePathCommand()); ++ } ++ } ++ ++ public Iterator iterator() { ++ return paths.iterator(); ++ } ++ ++ public Path getTextBounds(){ ++ return textBounds; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Expression.java index 0000000000,0000000000..2403c85a05 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Expression.java @@@ -1,0 -1,0 +1,31 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public interface Expression { ++ ++ double evaluate(Context ctx); ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/ExpressionParser.java index 0000000000,0000000000..f1f0193a89 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/ExpressionParser.java @@@ -1,0 -1,0 +1,69 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.HashMap; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; ++ ++/** ++ * A simple regexp-based parser of shape guide formulas in DrawingML ++ * ++ * @author Yegor Kozlov ++ */ ++public class ExpressionParser { ++ static final HashMap impls = new HashMap(); ++ static { ++ impls.put("\\*/ +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", MultiplyDivideExpression.class); ++ impls.put("\\+- +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)( 0)?", AddSubtractExpression.class); ++ impls.put("\\+/ +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", AddDivideExpression.class); ++ impls.put("\\?: +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", IfElseExpression.class); ++ impls.put("val +([\\-\\w]+)", LiteralValueExpression.class); ++ impls.put("abs +([\\-\\w]+)", AbsExpression.class); ++ impls.put("sqrt +([\\-\\w]+)", SqrtExpression.class); ++ impls.put("max +([\\-\\w]+) +([\\-\\w]+)", MaxExpression.class); ++ impls.put("min +([\\-\\w]+) +([\\-\\w]+)", MinExpression.class); ++ impls.put("at2 +([\\-\\w]+) +([\\-\\w]+)", ArcTanExpression.class); ++ impls.put("sin +([\\-\\w]+) +([\\-\\w]+)", SinExpression.class); ++ impls.put("cos +([\\-\\w]+) +([\\-\\w]+)", CosExpression.class); ++ impls.put("tan +([\\-\\w]+) +([\\-\\w]+)", TanExpression.class); ++ impls.put("cat2 +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", CosineArcTanExpression.class); ++ impls.put("sat2 +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", SinArcTanExpression.class); ++ impls.put("pin +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", PinExpression.class); ++ impls.put("mod +([\\-\\w]+) +([\\-\\w]+) +([\\-\\w]+)", ModExpression.class); ++ ++ } ++ ++ public static Expression parse(String str){ ++ for(String regexp : impls.keySet()) { ++ Pattern ptrn = Pattern.compile(regexp); ++ Matcher m = ptrn.matcher(str); ++ if(m.matches()) { ++ Class c = impls.get(regexp); ++ try { ++ return (Expression)c.getDeclaredConstructor(Matcher.class).newInstance(m); ++ } catch (Exception e){ ++ throw new RuntimeException(e); ++ } ++ } ++ } ++ throw new RuntimeException("Unsupported formula: " + str); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Formula.java index 0000000000,0000000000..47453475af new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Formula.java @@@ -1,0 -1,0 +1,385 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.geom.Rectangle2D; ++import java.util.HashMap; ++import java.util.Map; ++ ++/** ++ * A guide formula in DrawingML. ++ * This is a base class for adjust values, geometric guides and bilt-in guides ++ * ++ * @author Yegor Kozlov ++ */ ++public abstract class Formula { ++ ++ String getName(){ ++ return null; ++ } ++ ++ abstract double evaluate(Context ctx); ++ ++ static Map builtInFormulas = new HashMap(); ++ static { ++ // 3 x 360 / 4 = 270 ++ builtInFormulas.put("3cd4", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 270 * 60000; ++ } ++ ++ }); ++ ++ // 3 x 360 / 8 = 135 ++ builtInFormulas.put("3cd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 135 * 60000; ++ } ++ ++ }); ++ ++ // 5 x 360 / 8 = 225 ++ builtInFormulas.put("5cd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 270 * 60000; ++ } ++ ++ }); ++ ++ // 7 x 360 / 8 = 315 ++ builtInFormulas.put("7cd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 270 * 60000; ++ } ++ ++ }); ++ ++ // bottom ++ builtInFormulas.put("b", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getY() + anchor.getHeight(); ++ } ++ ++ }); ++ ++ // 360 / 2 = 180 ++ builtInFormulas.put("cd2", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 180 * 60000; ++ } ++ ++ }); ++ ++ // 360 / 4 = 90 ++ builtInFormulas.put("cd4", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 90 * 60000; ++ } ++ ++ }); ++ ++ // 360 / 8 = 45 ++ builtInFormulas.put("cd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return 45 * 60000; ++ } ++ ++ }); ++ ++ // horizontal center ++ builtInFormulas.put("hc", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getX() + anchor.getWidth()/2; ++ } ++ ++ }); ++ ++ // height ++ builtInFormulas.put("h", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight(); ++ } ++ ++ }); ++ ++ // height / 2 ++ builtInFormulas.put("hd2", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/2; ++ } ++ ++ }); ++ ++ // height / 3 ++ builtInFormulas.put("hd3", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/3; ++ } ++ ++ }); ++ ++ // height / 4 ++ builtInFormulas.put("hd4", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/4; ++ } ++ ++ }); ++ ++ // height / 5 ++ builtInFormulas.put("hd5", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/5; ++ } ++ ++ }); ++ ++ // height / 6 ++ builtInFormulas.put("hd6", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/6; ++ } ++ ++ }); ++ ++ // height / 8 ++ builtInFormulas.put("hd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getHeight()/8; ++ } ++ ++ }); ++ ++ // left ++ builtInFormulas.put("l", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getX(); ++ } ++ ++ }); ++ ++ // long side ++ builtInFormulas.put("ls", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return Math.max(anchor.getWidth(), anchor.getHeight()); ++ } ++ ++ }); ++ ++ // right ++ builtInFormulas.put("r", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getX() + anchor.getWidth(); ++ } ++ ++ }); ++ ++ // short side ++ builtInFormulas.put("ss", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return Math.min(anchor.getWidth(), anchor.getHeight()); ++ } ++ ++ }); ++ ++ // short side / 2 ++ builtInFormulas.put("ssd2", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 2; ++ } ++ }); ++ ++ // short side / 4 ++ builtInFormulas.put("ssd4", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 4; ++ } ++ }); ++ ++ // short side / 6 ++ builtInFormulas.put("ssd6", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 6; ++ } ++ }); ++ ++ // short side / 8 ++ builtInFormulas.put("ssd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 8; ++ } ++ }); ++ ++ // short side / 16 ++ builtInFormulas.put("ssd16", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 16; ++ } ++ }); ++ ++ // short side / 32 ++ builtInFormulas.put("ssd32", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ double ss = Math.min(anchor.getWidth(), anchor.getHeight()); ++ return ss / 32; ++ } ++ }); ++ ++ // top ++ builtInFormulas.put("t", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getY(); ++ } ++ }); ++ ++ // vertical center ++ builtInFormulas.put("vc", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ Rectangle2D anchor = ctx.getShapeAnchor(); ++ return anchor.getY() + anchor.getHeight()/2; ++ } ++ }); ++ ++ // width ++ builtInFormulas.put("w", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth(); ++ } ++ }); ++ ++ // width / 2 ++ builtInFormulas.put("wd2", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/2; ++ } ++ }); ++ ++ // width / 3 ++ builtInFormulas.put("wd3", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/3; ++ } ++ }); ++ ++ // width / 4 ++ builtInFormulas.put("wd4", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/4; ++ } ++ }); ++ ++ // width / 5 ++ builtInFormulas.put("wd5", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/5; ++ } ++ }); ++ ++ // width / 6 ++ builtInFormulas.put("wd6", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/6; ++ } ++ }); ++ ++ // width / 8 ++ builtInFormulas.put("wd8", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/8; ++ } ++ }); ++ ++ // width / 10 ++ builtInFormulas.put("wd10", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/10; ++ } ++ }); ++ ++ // width / 32 ++ builtInFormulas.put("wd32", new Formula(){ ++ @Override ++ double evaluate(Context ctx){ ++ return ctx.getShapeAnchor().getWidth()/32; ++ } ++ }); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Guide.java index 0000000000,0000000000..f14213244b new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Guide.java @@@ -1,0 -1,0 +1,58 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTGeomGuide; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class Guide extends Formula { ++ private String name, fmla; ++ private Expression expr; ++ ++ public Guide(CTGeomGuide gd) { ++ this(gd.getName(), gd.getFmla()); ++ } ++ ++ public Guide(String nm, String fm){ ++ name = nm; ++ fmla = fm; ++ expr = ExpressionParser.parse(fm); ++ } ++ ++ ++ String getName(){ ++ return name; ++ } ++ ++ String getFormula(){ ++ return fmla; ++ } ++ ++ @Override ++ public double evaluate(Context ctx){ ++ return expr.evaluate(ctx); ++ } ++ ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/IAdjustableShape.java index 0000000000,0000000000..920acb82d6 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/IAdjustableShape.java @@@ -1,0 -1,0 +1,37 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++ ++/** ++ * A bridge to the consumer application. ++ * ++ * To get a shape geometry one needs to pass shape bounds and adjust values. ++ * ++ * @author Yegor Kozlov ++ */ ++public interface IAdjustableShape { ++ /** ++ * ++ * @param name name of a adjust value, e.g. adj1 ++ * @return adjust guide defined in the shape or null ++ */ ++ Guide getAdjustValue(String name); ++} diff --cc src/java/org/apache/poi/sl/draw/geom/IfElseExpression.java index 0000000000,0000000000..443115a780 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/IfElseExpression.java @@@ -1,0 -1,0 +1,50 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * If Else Formula: ++ *

++ * Arguments: 3 (fmla="?: x y z") ++ * Usage: "?: x y z" = if (x > 0), then y = value of this guide, ++ * else z = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class IfElseExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ IfElseExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return x > 0 ? y : z; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/LineToCommand.java index 0000000000,0000000000..99c5a6b20c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/LineToCommand.java @@@ -1,0 -1,0 +1,49 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTAdjPoint2D; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * Date: 10/25/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class LineToCommand implements PathCommand { ++ private String arg1, arg2; ++ ++ LineToCommand(CTAdjPoint2D pt){ ++ arg1 = pt.getX().toString(); ++ arg2 = pt.getY().toString(); ++ } ++ ++ LineToCommand(String s1, String s2){ ++ arg1 = s1; ++ arg2 = s2; ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ path.lineTo((float)x, (float)y); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/LiteralValueExpression.java index 0000000000,0000000000..ab3abc7fd5 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/LiteralValueExpression.java @@@ -1,0 -1,0 +1,40 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Date: 10/24/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class LiteralValueExpression implements Expression { ++ private String arg; ++ ++ LiteralValueExpression(Matcher m){ ++ arg = m.group(1); ++ } ++ ++ public double evaluate(Context ctx){ ++ return ctx.getValue(arg); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/MaxExpression.java index 0000000000,0000000000..88a9c60472 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/MaxExpression.java @@@ -1,0 -1,0 +1,43 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Maximum Value Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class MaxExpression implements Expression { ++ private String arg1, arg2; ++ ++ MaxExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ return Math.max(x, y); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/MinExpression.java index 0000000000,0000000000..8c1864c5a4 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/MinExpression.java @@@ -1,0 -1,0 +1,43 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Minimum Value Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class MinExpression implements Expression { ++ private String arg1, arg2; ++ ++ MinExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ return Math.min(x, y); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/ModExpression.java index 0000000000,0000000000..ff20fc20f6 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/ModExpression.java @@@ -1,0 -1,0 +1,49 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Modulo Formula: ++ *

++ * Arguments: 3 (fmla="mod x y z") ++ * Usage: "mod x y z" = sqrt(x^2 + b^2 + c^2) = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class ModExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ ModExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return Math.sqrt(x*x + y*y + z*z); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/MoveToCommand.java index 0000000000,0000000000..22ccd54092 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/MoveToCommand.java @@@ -1,0 -1,0 +1,49 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTAdjPoint2D; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * Date: 10/25/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class MoveToCommand implements PathCommand { ++ private String arg1, arg2; ++ ++ MoveToCommand(CTAdjPoint2D pt){ ++ arg1 = pt.getX().toString(); ++ arg2 = pt.getY().toString(); ++ } ++ ++ MoveToCommand(String s1, String s2){ ++ arg1 = s1; ++ arg2 = s2; ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ path.moveTo((float)x, (float)y); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/MultiplyDivideExpression.java index 0000000000,0000000000..5af0ff12c0 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/MultiplyDivideExpression.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Multiply Divide Formula ++ * ++ * @author Yegor Kozlov ++ */ ++public class MultiplyDivideExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ MultiplyDivideExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return (x * y ) / z; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Outline.java index 0000000000,0000000000..b4ffc42573 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Outline.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.Shape; ++ ++/** ++* Date: 11/6/11 ++* ++* @author Yegor Kozlov ++*/ ++public class Outline { ++ private Shape shape; ++ private Path path; ++ ++ public Outline(Shape shape, Path path){ ++ this.shape = shape; ++ this.path = path; ++ } ++ ++ public Path getPath(){ ++ return path; ++ } ++ ++ public Shape getOutline(){ ++ return shape; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/Path.java index 0000000000,0000000000..b496e9fc96 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/Path.java @@@ -1,0 -1,0 +1,117 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.geom.GeneralPath; ++import java.util.ArrayList; ++import java.util.List; ++ ++import org.apache.poi.sl.draw.binding.*; ++ ++/** ++ * Specifies a creation path consisting of a series of moves, lines and curves ++ * that when combined forms a geometric shape ++ * ++ * @author Yegor Kozlov ++ */ ++public class Path { ++ private final List commands; ++ boolean _fill, _stroke; ++ long _w, _h; ++ ++ public Path(){ ++ this(true, true); ++ } ++ ++ public Path(boolean fill, boolean stroke){ ++ commands = new ArrayList(); ++ _w = -1; ++ _h = -1; ++ _fill = fill; ++ _stroke = stroke; ++ } ++ ++ public Path(CTPath2D spPath){ ++ _fill = spPath.getFill() != STPathFillMode.NONE; ++ _stroke = spPath.isStroke(); ++ _w = spPath.isSetW() ? spPath.getW() : -1; ++ _h = spPath.isSetH() ? spPath.getH() : -1; ++ ++ commands = new ArrayList(); ++ ++ for(Object ch : spPath.getCloseOrMoveToOrLnTo()){ ++ if(ch instanceof CTPath2DMoveTo){ ++ CTAdjPoint2D pt = ((CTPath2DMoveTo)ch).getPt(); ++ commands.add(new MoveToCommand(pt)); ++ } else if (ch instanceof CTPath2DLineTo){ ++ CTAdjPoint2D pt = ((CTPath2DLineTo)ch).getPt(); ++ commands.add(new LineToCommand(pt)); ++ } else if (ch instanceof CTPath2DArcTo){ ++ CTPath2DArcTo arc = (CTPath2DArcTo)ch; ++ commands.add(new ArcToCommand(arc)); ++ } else if (ch instanceof CTPath2DQuadBezierTo){ ++ CTPath2DQuadBezierTo bez = ((CTPath2DQuadBezierTo)ch); ++ CTAdjPoint2D pt1 = bez.getPt().get(0); ++ CTAdjPoint2D pt2 = bez.getPt().get(1); ++ commands.add(new QuadToCommand(pt1, pt2)); ++ } else if (ch instanceof CTPath2DCubicBezierTo){ ++ CTPath2DCubicBezierTo bez = ((CTPath2DCubicBezierTo)ch); ++ CTAdjPoint2D pt1 = bez.getPt().get(0); ++ CTAdjPoint2D pt2 = bez.getPt().get(1); ++ CTAdjPoint2D pt3 = bez.getPt().get(2); ++ commands.add(new CurveToCommand(pt1, pt2, pt3)); ++ } else if (ch instanceof CTPath2DClose){ ++ commands.add(new ClosePathCommand()); ++ } else { ++ throw new IllegalStateException("Unsupported path segment: " + ch); ++ } ++ } ++ } ++ ++ public void addCommand(PathCommand cmd){ ++ commands.add(cmd); ++ } ++ ++ /** ++ * Convert the internal represenation to java.awt.GeneralPath ++ */ ++ public GeneralPath getPath(Context ctx) { ++ GeneralPath path = new GeneralPath(); ++ for(PathCommand cmd : commands) ++ cmd.execute(path, ctx); ++ return path; ++ } ++ ++ public boolean isStroked(){ ++ return _stroke; ++ } ++ ++ public boolean isFilled(){ ++ return _fill; ++ } ++ ++ public long getW(){ ++ return _w; ++ } ++ ++ public long getH(){ ++ return _h; ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/PathCommand.java index 0000000000,0000000000..3063ab81bc new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/PathCommand.java @@@ -1,0 -1,0 +1,45 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * A path command in DrawingML. One of: ++ * ++ * - arcTo ++ * - moveTo ++ * - lineTo ++ * - cubicBezTo ++ * - quadBezTo ++ * - close ++ * ++ * ++ * @author Yegor Kozlov ++ */ ++public interface PathCommand { ++ /** ++ * Execute the command an append a segment to the specified path ++ * ++ * @param path the path to append the result to ++ * @param ctx the context to lookup variables ++ */ ++ void execute(GeneralPath path, Context ctx); ++} diff --cc src/java/org/apache/poi/sl/draw/geom/PinExpression.java index 0000000000,0000000000..ee0d4e5107 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/PinExpression.java @@@ -1,0 -1,0 +1,54 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Pin To Formula: ++ * ++ * ++ *

++ * Usage: "pin x y z" = if (y < x), then x = value of this guide ++ * else if (y > z), then z = value of this guide ++ * else y = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class PinExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ PinExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ if(y < x) return x; ++ else if (y > z) return z; ++ else return y; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java index 0000000000,0000000000..e2caa084dd new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java @@@ -1,0 -1,0 +1,113 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.io.InputStream; ++import java.util.LinkedHashMap; ++ ++import javax.xml.bind.*; ++import javax.xml.stream.*; ++import javax.xml.stream.events.StartElement; ++import javax.xml.stream.events.XMLEvent; ++ ++import org.apache.poi.sl.draw.binding.CTCustomGeometry2D; ++import org.apache.poi.util.POILogFactory; ++import org.apache.poi.util.POILogger; ++ ++/** ++ * ++ */ ++public class PresetGeometries extends LinkedHashMap { ++ private final static POILogger LOG = POILogFactory.getLogger(PresetGeometries.class); ++ protected final static String BINDING_PACKAGE = "org.apache.poi.sl.draw.binding"; ++ ++ protected static PresetGeometries _inst; ++ ++ protected PresetGeometries(){} ++ ++ @SuppressWarnings("unused") ++ public void init(InputStream is) throws XMLStreamException, JAXBException { ++ // Reader xml = new InputStreamReader( is, Charset.forName("UTF-8") ); ++ ++ ++ // StAX: ++ EventFilter startElementFilter = new EventFilter() { ++ @Override ++ public boolean accept(XMLEvent event) { ++ return event.isStartElement(); ++ } ++ }; ++ ++ long cntElem = 0; ++ XMLInputFactory staxFactory = XMLInputFactory.newInstance(); ++ XMLEventReader staxReader = staxFactory.createXMLEventReader(is); ++ XMLEventReader staxFiltRd = staxFactory.createFilteredReader(staxReader, startElementFilter); ++ // ignore StartElement: ++ XMLEvent evDoc = staxFiltRd.nextEvent(); ++ // JAXB: ++ JAXBContext jaxbContext = JAXBContext.newInstance(BINDING_PACKAGE); ++ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); ++ ++ while (staxFiltRd.peek() != null) { ++ StartElement evRoot = (StartElement)staxFiltRd.peek(); ++ String name = evRoot.getName().getLocalPart(); ++ JAXBElement el = unmarshaller.unmarshal(staxReader, CTCustomGeometry2D.class); ++ CTCustomGeometry2D cus = el.getValue(); ++ cntElem++; ++ ++ if(containsKey(name)) { ++ LOG.log(POILogger.WARN, "Duplicate definoition of " + name); ++ } ++ put(name, new CustomGeometry(cus)); ++ } ++ } ++ ++ /** ++ * Convert a single CustomGeometry object, i.e. from xmlbeans ++ */ ++ public static CustomGeometry convertCustomGeometry(XMLStreamReader staxReader) { ++ try { ++ JAXBContext jaxbContext = JAXBContext.newInstance(BINDING_PACKAGE); ++ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); ++ JAXBElement el = unmarshaller.unmarshal(staxReader, CTCustomGeometry2D.class); ++ return new CustomGeometry(el.getValue()); ++ } catch (JAXBException e) { ++ LOG.log(POILogger.ERROR, "Unable to parse single custom geometry", e); ++ return null; ++ } ++ } ++ ++ public static synchronized PresetGeometries getInstance(){ ++ if(_inst == null) { ++ _inst = new PresetGeometries(); ++ try { ++ InputStream is = PresetGeometries.class. ++ getResourceAsStream("presetShapeDefinitions.xml"); ++ _inst.init(is); ++ is.close(); ++ } catch (Exception e){ ++ throw new RuntimeException(e); ++ } ++ } ++ ++ return _inst; ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/QuadToCommand.java index 0000000000,0000000000..e9a9364b2d new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/QuadToCommand.java @@@ -1,0 -1,0 +1,48 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import org.apache.poi.sl.draw.binding.CTAdjPoint2D; ++ ++import java.awt.geom.GeneralPath; ++ ++/** ++ * Date: 10/25/11 ++ * ++ * @author Yegor Kozlov ++ */ ++public class QuadToCommand implements PathCommand { ++ private String arg1, arg2, arg3, arg4; ++ ++ QuadToCommand(CTAdjPoint2D pt1, CTAdjPoint2D pt2){ ++ arg1 = pt1.getX().toString(); ++ arg2 = pt1.getY().toString(); ++ arg3 = pt2.getX().toString(); ++ arg4 = pt2.getY().toString(); ++ } ++ ++ public void execute(GeneralPath path, Context ctx){ ++ double x1 = ctx.getValue(arg1); ++ double y1 = ctx.getValue(arg2); ++ double x2 = ctx.getValue(arg3); ++ double y2 = ctx.getValue(arg4); ++ path.quadTo((float)x1, (float)y1, (float)x2, (float)y2); ++ } ++} diff --cc src/java/org/apache/poi/sl/draw/geom/SinArcTanExpression.java index 0000000000,0000000000..e14acb9e60 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/SinArcTanExpression.java @@@ -1,0 -1,0 +1,51 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Sine ArcTan Formula: ++ * ++ * ++ *

++ * Arguments: 3 (fmla="sat2 x y z") ++ * Usage: "sat2 x y z" = (x*sin(arctan(z / y))) = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class SinArcTanExpression implements Expression { ++ private String arg1, arg2, arg3; ++ ++ SinArcTanExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ arg3 = m.group(3); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ double z = ctx.getValue(arg3); ++ return x*Math.sin(Math.atan(z / y)); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/SinExpression.java index 0000000000,0000000000..ca0c110ce5 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/SinExpression.java @@@ -1,0 -1,0 +1,49 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Sine Formula: ++ * ++ * ++ *

++ * Arguments: 2 (fmla="sin x y") ++ * Usage: "sin x y" = (x * sin( y )) = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class SinExpression implements Expression { ++ private String arg1, arg2; ++ ++ SinExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2) / 60000; ++ return x * Math.sin(Math.toRadians(y)); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/SqrtExpression.java index 0000000000,0000000000..5cdd67cc57 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/SqrtExpression.java @@@ -1,0 -1,0 +1,46 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Square Root Formula: ++ * ++ * ++ *

++ * Arguments: 1 (fmla="sqrt x") ++ * Usage: "sqrt x" = sqrt(x) = value of this guide ++ *

++ * @author Yegor Kozlov ++ */ ++public class SqrtExpression implements Expression { ++ private String arg; ++ ++ SqrtExpression(Matcher m){ ++ arg =m.group(1); ++ } ++ ++ public double evaluate(Context ctx){ ++ double val = ctx.getValue(arg); ++ return Math.sqrt(val); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/draw/geom/TanExpression.java index 0000000000,0000000000..7eebdcedfa new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/draw/geom/TanExpression.java @@@ -1,0 -1,0 +1,50 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++ ++package org.apache.poi.sl.draw.geom; ++ ++import java.util.regex.Matcher; ++ ++/** ++ * Tangent Formula: ++ * ++ * ++ * ++ *

++ * Arguments: 2 (fmla="tan x y") ++ * Usage: "tan x y" = (x * tan( y )) = value of this guide ++ *

++ * ++ * @author Yegor Kozlov ++ */ ++public class TanExpression implements Expression { ++ private String arg1, arg2; ++ ++ TanExpression(Matcher m){ ++ arg1 = m.group(1); ++ arg2 = m.group(2); ++ } ++ ++ public double evaluate(Context ctx){ ++ double x = ctx.getValue(arg1); ++ double y = ctx.getValue(arg2); ++ return x * Math.tan(Math.toRadians(y / 60000)); ++ } ++ ++} diff --cc src/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java index 0000000000,0000000000..3a68313499 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/AutoNumberingScheme.java @@@ -1,0 -1,0 +1,287 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public enum AutoNumberingScheme { ++ /** Lowercase alphabetic character enclosed in parentheses. Example: (a), (b), (c), ... */ ++ alphaLcParenBoth(0x0008, 1), ++ /** Uppercase alphabetic character enclosed in parentheses. Example: (A), (B), (C), ... */ ++ alphaUcParenBoth(0x000A, 2), ++ /** Lowercase alphabetic character followed by a closing parenthesis. Example: a), b), c), ... */ ++ alphaLcParenRight(0x0009, 3), ++ /** Uppercase alphabetic character followed by a closing parenthesis. Example: A), B), C), ... */ ++ alphaUcParenRight(0x000B, 4), ++ /** Lowercase Latin character followed by a period. Example: a., b., c., ... */ ++ alphaLcPeriod(0x0000, 5), ++ /** Uppercase Latin character followed by a period. Example: A., B., C., ... */ ++ alphaUcPeriod(0x0001, 6), ++ /** Arabic numeral enclosed in parentheses. Example: (1), (2), (3), ... */ ++ arabicParenBoth(0x000C, 7), ++ /** Arabic numeral followed by a closing parenthesis. Example: 1), 2), 3), ... */ ++ arabicParenRight(0x0002, 8), ++ /** Arabic numeral followed by a period. Example: 1., 2., 3., ... */ ++ arabicPeriod(0x0003, 9), ++ /** Arabic numeral. Example: 1, 2, 3, ... */ ++ arabicPlain(0x000D, 10), ++ /** Lowercase Roman numeral enclosed in parentheses. Example: (i), (ii), (iii), ... */ ++ romanLcParenBoth(0x0004, 11), ++ /** Uppercase Roman numeral enclosed in parentheses. Example: (I), (II), (III), ... */ ++ romanUcParenBoth(0x000E, 12), ++ /** Lowercase Roman numeral followed by a closing parenthesis. Example: i), ii), iii), ... */ ++ romanLcParenRight(0x0005, 13), ++ /** Uppercase Roman numeral followed by a closing parenthesis. Example: I), II), III), .... */ ++ romanUcParenRight(0x000F, 14), ++ /** Lowercase Roman numeral followed by a period. Example: i., ii., iii., ... */ ++ romanLcPeriod(0x0006, 15), ++ /** Uppercase Roman numeral followed by a period. Example: I., II., III., ... */ ++ romanUcPeriod(0x0007, 16), ++ /** Double byte circle numbers. */ ++ circleNumDbPlain(0x0012, 17), ++ /** Wingdings black circle numbers. */ ++ circleNumWdBlackPlain(0x0014, 18), ++ /** Wingdings white circle numbers. */ ++ circleNumWdWhitePlain(0x0013, 19), ++ /** Double-byte Arabic numbers with double-byte period. */ ++ arabicDbPeriod(0x001D, 20), ++ /** Double-byte Arabic numbers. */ ++ arabicDbPlain(0x001C, 21), ++ /** Simplified Chinese with single-byte period. */ ++ ea1ChsPeriod(0x0011, 22), ++ /** Simplified Chinese. */ ++ ea1ChsPlain(0x0010, 23), ++ /** Traditional Chinese with single-byte period. */ ++ ea1ChtPeriod(0x0015, 24), ++ /** Traditional Chinese. */ ++ ea1ChtPlain(0x0014, 25), ++ /** Japanese with double-byte period. */ ++ ea1JpnChsDbPeriod(0x0026, 26), ++ /** Japanese/Korean. */ ++ ea1JpnKorPlain(0x001A, 27), ++ /** Japanese/Korean with single-byte period. */ ++ ea1JpnKorPeriod(0x001B, 28), ++ /** Bidi Arabic 1 (AraAlpha) with ANSI minus symbol. */ ++ arabic1Minus(0x0017, 29), ++ /** Bidi Arabic 2 (AraAbjad) with ANSI minus symbol. */ ++ arabic2Minus(0x0018, 30), ++ /** Bidi Hebrew 2 with ANSI minus symbol. */ ++ hebrew2Minus(0x0019, 31), ++ /** Thai alphabetic character followed by a period. */ ++ thaiAlphaPeriod(0x001E, 32), ++ /** Thai alphabetic character followed by a closing parenthesis. */ ++ thaiAlphaParenRight(0x001F, 33), ++ /** Thai alphabetic character enclosed by parentheses. */ ++ thaiAlphaParenBoth(0x0020, 34), ++ /** Thai numeral followed by a period. */ ++ thaiNumPeriod(0x0021, 35), ++ /** Thai numeral followed by a closing parenthesis. */ ++ thaiNumParenRight(0x0022, 36), ++ /** Thai numeral enclosed in parentheses. */ ++ thaiNumParenBoth(0x0023, 37), ++ /** Hindi alphabetic character followed by a period. */ ++ hindiAlphaPeriod(0x0024, 38), ++ /** Hindi numeric character followed by a period. */ ++ hindiNumPeriod(0x0025, 39), ++ /** Hindi numeric character followed by a closing parenthesis. */ ++ hindiNumParenRight(0x0027, 40), ++ /** Hindi alphabetic character followed by a period. */ ++ hindiAlpha1Period(0x0027, 41); ++ ++ public final int nativeId, ooxmlId; ++ ++ AutoNumberingScheme(int nativeId, int ooxmlId) { ++ this.nativeId = nativeId; ++ this.ooxmlId = ooxmlId; ++ } ++ ++ public static AutoNumberingScheme forNativeID(int nativeId) { ++ for (AutoNumberingScheme ans : values()) { ++ if (ans.nativeId == nativeId) return ans; ++ } ++ return null; ++ } ++ ++ public static AutoNumberingScheme forOoxmlID(int ooxmlId) { ++ for (AutoNumberingScheme ans : values()) { ++ if (ans.ooxmlId == ooxmlId) return ans; ++ } ++ return null; ++ } ++ ++ public String getDescription() { ++ switch (this) { ++ case alphaLcPeriod : return "Lowercase Latin character followed by a period. Example: a., b., c., ..."; ++ case alphaUcPeriod : return "Uppercase Latin character followed by a period. Example: A., B., C., ..."; ++ case arabicParenRight : return "Arabic numeral followed by a closing parenthesis. Example: 1), 2), 3), ..."; ++ case arabicPeriod : return "Arabic numeral followed by a period. Example: 1., 2., 3., ..."; ++ case romanLcParenBoth : return "Lowercase Roman numeral enclosed in parentheses. Example: (i), (ii), (iii), ..."; ++ case romanLcParenRight : return "Lowercase Roman numeral followed by a closing parenthesis. Example: i), ii), iii), ..."; ++ case romanLcPeriod : return "Lowercase Roman numeral followed by a period. Example: i., ii., iii., ..."; ++ case romanUcPeriod : return "Uppercase Roman numeral followed by a period. Example: I., II., III., ..."; ++ case alphaLcParenBoth : return "Lowercase alphabetic character enclosed in parentheses. Example: (a), (b), (c), ..."; ++ case alphaLcParenRight : return "Lowercase alphabetic character followed by a closing parenthesis. Example: a), b), c), ..."; ++ case alphaUcParenBoth : return "Uppercase alphabetic character enclosed in parentheses. Example: (A), (B), (C), ..."; ++ case alphaUcParenRight : return "Uppercase alphabetic character followed by a closing parenthesis. Example: A), B), C), ..."; ++ case arabicParenBoth : return "Arabic numeral enclosed in parentheses. Example: (1), (2), (3), ..."; ++ case arabicPlain : return "Arabic numeral. Example: 1, 2, 3, ..."; ++ case romanUcParenBoth : return "Uppercase Roman numeral enclosed in parentheses. Example: (I), (II), (III), ..."; ++ case romanUcParenRight : return "Uppercase Roman numeral followed by a closing parenthesis. Example: I), II), III), ..."; ++ case ea1ChsPlain : return "Simplified Chinese."; ++ case ea1ChsPeriod : return "Simplified Chinese with single-byte period."; ++ case circleNumDbPlain : return "Double byte circle numbers."; ++ case circleNumWdWhitePlain : return "Wingdings white circle numbers."; ++ case circleNumWdBlackPlain : return "Wingdings black circle numbers."; ++ case ea1ChtPlain : return "Traditional Chinese."; ++ case ea1ChtPeriod : return "Traditional Chinese with single-byte period."; ++ case arabic1Minus : return "Bidi Arabic 1 (AraAlpha) with ANSI minus symbol."; ++ case arabic2Minus : return "Bidi Arabic 2 (AraAbjad) with ANSI minus symbol."; ++ case hebrew2Minus : return "Bidi Hebrew 2 with ANSI minus symbol."; ++ case ea1JpnKorPlain : return "Japanese/Korean."; ++ case ea1JpnKorPeriod : return "Japanese/Korean with single-byte period."; ++ case arabicDbPlain : return "Double-byte Arabic numbers."; ++ case arabicDbPeriod : return "Double-byte Arabic numbers with double-byte period."; ++ case thaiAlphaPeriod : return "Thai alphabetic character followed by a period."; ++ case thaiAlphaParenRight : return "Thai alphabetic character followed by a closing parenthesis."; ++ case thaiAlphaParenBoth : return "Thai alphabetic character enclosed by parentheses."; ++ case thaiNumPeriod : return "Thai numeral followed by a period."; ++ case thaiNumParenRight : return "Thai numeral followed by a closing parenthesis."; ++ case thaiNumParenBoth : return "Thai numeral enclosed in parentheses."; ++ case hindiAlphaPeriod : return "Hindi alphabetic character followed by a period."; ++ case hindiNumPeriod : return "Hindi numeric character followed by a period."; ++ case ea1JpnChsDbPeriod : return "Japanese with double-byte period."; ++ case hindiNumParenRight : return "Hindi numeric character followed by a closing parenthesis."; ++ case hindiAlpha1Period : return "Hindi alphabetic character followed by a period."; ++ default : return "Unknown Numbered Scheme"; ++ } ++ } ++ ++ public String format(int value) { ++ String index = formatIndex(value); ++ String cased = formatCase(index); ++ String seperated = formatSeperator(cased); ++ return seperated; ++ } ++ ++ private String formatSeperator(String cased) { ++ String name = name().toLowerCase(); ++ if (name.contains("plain")) return cased; ++ if (name.contains("parenright")) return cased+")"; ++ if (name.contains("parenboth")) return "("+cased+")"; ++ if (name.contains("period")) return cased+"."; ++ if (name.contains("minus")) return cased+"-"; // ??? ++ return cased; ++ } ++ ++ private String formatCase(String index) { ++ String name = name().toLowerCase(); ++ if (name.contains("lc")) return index.toLowerCase(); ++ if (name.contains("uc")) return index.toUpperCase(); ++ return index; ++ } ++ ++ private static final String ARABIC_LIST = "0123456789"; ++ private static final String ALPHA_LIST = "abcdefghijklmnopqrstuvwxyz"; ++ private static final String WINGDINGS_WHITE_LIST = ++ "\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087\u0088\u0089"; ++ private static final String WINGDINGS_BLACK_LIST = ++ "\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094"; ++ private static final String CIRCLE_DB_LIST = ++ "\u2776\u2777\u2778\u2779\u277A\u277B\u277C\u277D\u277E"; ++ ++ private String formatIndex(int value) { ++ String name = name().toLowerCase(); ++ if (name.startsWith("roman")) { ++ return formatRomanIndex(value); ++ } else if (name.startsWith("arabic") && !name.contains("db")) { ++ return getIndexedList(value, ARABIC_LIST, false); ++ } else if (name.startsWith("alpha")) { ++ return getIndexedList(value, ALPHA_LIST, true); ++ } else if (name.contains("WdWhite")) { ++ return (value == 10) ? "\u008A" ++ : getIndexedList(value, WINGDINGS_WHITE_LIST, false); ++ } else if (name.contains("WdBlack")) { ++ return (value == 10) ? "\u0095" ++ : getIndexedList(value, WINGDINGS_BLACK_LIST, false); ++ } else if (name.contains("NumDb")) { ++ return (value == 10) ? "\u277F" ++ : getIndexedList(value, CIRCLE_DB_LIST, true); ++ } else { ++ return "?"; ++ } ++ } ++ ++ private static String getIndexedList(int val, String list, boolean oneBased) { ++ StringBuilder sb = new StringBuilder(); ++ addIndexedChar(val, list, oneBased, sb); ++ return sb.toString(); ++ } ++ ++ private static void addIndexedChar(int val, String list, boolean oneBased, StringBuilder sb) { ++ if (oneBased) val -= 1; ++ final int len = list.length(); ++ if (val >= len) { ++ addIndexedChar(val/len, list, oneBased, sb); ++ } ++ sb.append(list.charAt(val%len)); ++ } ++ ++ ++ private String formatRomanIndex(int value) { ++ //M (1000), CM (900), D (500), CD (400), C (100), XC (90), L (50), XL (40), X (10), IX (9), V (5), IV (4) and I (1). ++ final int[] VALUES = new int[]{1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; ++ final String[] ROMAN = new String[]{"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; ++ final String conciseList[][] = { ++ {"XLV", "VL"}, //45 ++ {"XCV", "VC"}, //95 ++ {"CDL", "LD"}, //450 ++ {"CML", "LM"}, //950 ++ {"CMVC", "LMVL"}, //995 ++ {"CDXC", "LDXL"}, //490 ++ {"CDVC", "LDVL"}, //495 ++ {"CMXC", "LMXL"}, //990 ++ {"XCIX", "VCIV"}, //99 ++ {"XLIX", "VLIV"}, //49 ++ {"XLIX", "IL"}, //49 ++ {"XCIX", "IC"}, //99 ++ {"CDXC", "XD"}, //490 ++ {"CDVC", "XDV"}, //495 ++ {"CDIC", "XDIX"}, //499 ++ {"LMVL", "XMV"}, //995 ++ {"CMIC", "XMIX"}, //999 ++ {"CMXC", "XM"}, // 990 ++ {"XDV", "VD"}, //495 ++ {"XDIX", "VDIV"}, //499 ++ {"XMV", "VM"}, // 995 ++ {"XMIX", "VMIV"}, //999 ++ {"VDIV", "ID"}, //499 ++ {"VMIV", "IM"} //999 ++ }; ++ ++ StringBuilder sb = new StringBuilder(); ++ for (int i = 0; i < 13; i++) { ++ while (value >= VALUES[i]) { ++ value -= VALUES[i]; ++ sb.append(ROMAN[i]); ++ } ++ } ++ String result = sb.toString(); ++ for (String cc[] : conciseList) { ++ result = result.replace(cc[0], cc[1]); ++ } ++ return result; ++ } ++} diff --cc src/java/org/apache/poi/sl/usermodel/AutoShape.java index 0000000000,ae2fb7c7da..1bf073dfbb mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/AutoShape.java +++ b/src/java/org/apache/poi/sl/usermodel/AutoShape.java @@@ -1,0 -1,22 +1,21 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface AutoShape extends SimpleShape { - public TextRun getTextRun(); ++public interface AutoShape> extends TextShape { + } diff --cc src/java/org/apache/poi/sl/usermodel/Background.java index 0000000000,f67c57b95a..8d868b8600 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Background.java +++ b/src/java/org/apache/poi/sl/usermodel/Background.java @@@ -1,0 -1,22 +1,22 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + + public interface Background extends Shape { - ++ FillStyle getFillStyle(); + } diff --cc src/java/org/apache/poi/sl/usermodel/ColorStyle.java index 0000000000,0000000000..9be847b36c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/ColorStyle.java @@@ -1,0 -1,0 +1,69 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.Color; ++ ++ ++public interface ColorStyle { ++ Color getColor(); ++ ++ /** ++ * the opacity as expressed by a percentage value ++ * ++ * @return opacity in percents in the range [0..100000] ++ * or -1 if the value is not set ++ */ ++ int getAlpha(); ++ ++ /** ++ * the luminance shift as expressed by a percentage relative to the input color ++ * ++ * @return luminance shift in percents in the range [0..100000] ++ * or -1 if the value is not set ++ */ ++ int getLumOff(); ++ ++ /** ++ * the luminance as expressed by a percentage relative to the input color ++ * ++ * @return luminance in percents in the range [0..100000] ++ * or -1 if the value is not set ++ */ ++ int getLumMod(); ++ ++ /** ++ * specifies a darker version of its input color. ++ * A 10% shade is 10% of the input color combined with 90% black. ++ * ++ * @return the value of the shade specified as percents in the range [0..100000] ++ * with 0% indicating minimal shade and 100% indicating maximum ++ * or -1 if the value is not set ++ */ ++ int getShade(); ++ ++ /** ++ * specifies a lighter version of its input color. ++ * A 10% tint is 10% of the input color combined with 90% white. ++ * ++ * @return the value of the tint specified as percents in the range [0..100000] ++ * with 0% indicating minimal tint and 100% indicating maximum ++ * or -1 if the value is not set ++ */ ++ int getTint(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/ConnectorShape.java index 0000000000,0000000000..7e2bbf065c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/ConnectorShape.java @@@ -1,0 -1,0 +1,22 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface ConnectorShape extends SimpleShape { ++ ++} diff --cc src/java/org/apache/poi/sl/usermodel/FillStyle.java index 0000000000,0000000000..8414000b8b new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/FillStyle.java @@@ -1,0 -1,0 +1,22 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface FillStyle { ++ PaintStyle getPaint(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/FreeformShape.java index 0000000000,0000000000..e0843a11a1 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/FreeformShape.java @@@ -1,0 -1,0 +1,22 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface FreeformShape> extends AutoShape { ++ ++} diff --cc src/java/org/apache/poi/sl/usermodel/GroupShape.java index 0000000000,0000000000..d71bb253fe new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/GroupShape.java @@@ -1,0 -1,0 +1,39 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.geom.Rectangle2D; ++ ++public interface GroupShape extends Shape, ShapeContainer, PlaceableShape { ++ ++ /** ++ * Gets the coordinate space of this group. All children are constrained ++ * to these coordinates. ++ * ++ * @param anchor the coordinate space of this group ++ */ ++ Rectangle2D getInteriorAnchor(); ++ ++ /** ++ * Sets the coordinate space of this group. All children are constrained ++ * to these coordinates. ++ * ++ * @param anchor the coordinate space of this group ++ */ ++ void setInteriorAnchor(Rectangle2D anchor); ++} diff --cc src/java/org/apache/poi/sl/usermodel/Insets2D.java index 0000000000,0000000000..04b4d77cf4 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/Insets2D.java @@@ -1,0 -1,0 +1,146 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.Insets; ++ ++/** ++ * This is a replacement for {@link java.awt.Insets} which works on doubles ++ * instead of ints ++ */ ++public class Insets2D { ++ ++ /** ++ * The inset from the top. ++ * This value is added to the Top of the rectangle ++ * to yield a new location for the Top. ++ */ ++ public double top; ++ ++ /** ++ * The inset from the left. ++ * This value is added to the Left of the rectangle ++ * to yield a new location for the Left edge. ++ */ ++ public double left; ++ ++ /** ++ * The inset from the bottom. ++ * This value is subtracted from the Bottom of the rectangle ++ * to yield a new location for the Bottom. ++ */ ++ public double bottom; ++ ++ /** ++ * The inset from the right. ++ * This value is subtracted from the Right of the rectangle ++ * to yield a new location for the Right edge. ++ */ ++ public double right; ++ ++ /** ++ * Creates and initializes a new Insets object with the ++ * specified top, left, bottom, and right insets. ++ * @param top the inset from the top. ++ * @param left the inset from the left. ++ * @param bottom the inset from the bottom. ++ * @param right the inset from the right. ++ */ ++ public Insets2D(double top, double left, double bottom, double right) { ++ this.top = top; ++ this.left = left; ++ this.bottom = bottom; ++ this.right = right; ++ } ++ ++ /** ++ * Set top, left, bottom, and right to the specified values ++ * ++ * @param top the inset from the top. ++ * @param left the inset from the left. ++ * @param bottom the inset from the bottom. ++ * @param right the inset from the right. ++ * @since 1.5 ++ */ ++ public void set(double top, double left, double bottom, double right) { ++ this.top = top; ++ this.left = left; ++ this.bottom = bottom; ++ this.right = right; ++ } ++ ++ /** ++ * Checks whether two insets objects are equal. Two instances ++ * of Insets are equal if the four integer values ++ * of the fields top, left, ++ * bottom, and right are all equal. ++ * @return true if the two insets are equal; ++ * otherwise false. ++ * @since JDK1.1 ++ */ ++ public boolean equals(Object obj) { ++ if (obj instanceof Insets) { ++ Insets insets = (Insets)obj; ++ return ((top == insets.top) && (left == insets.left) && ++ (bottom == insets.bottom) && (right == insets.right)); ++ } ++ return false; ++ } ++ ++ /** ++ * Returns the hash code for this Insets. ++ * ++ * @return a hash code for this Insets. ++ */ ++ public int hashCode() { ++ double sum1 = left + bottom; ++ double sum2 = right + top; ++ double val1 = sum1 * (sum1 + 1)/2 + left; ++ double val2 = sum2 * (sum2 + 1)/2 + top; ++ double sum3 = val1 + val2; ++ return (int)(sum3 * (sum3 + 1)/2 + val2); ++ } ++ ++ /** ++ * Returns a string representation of this Insets object. ++ * This method is intended to be used only for debugging purposes, and ++ * the content and format of the returned string may vary between ++ * implementations. The returned string may be empty but may not be ++ * null. ++ * ++ * @return a string representation of this Insets object. ++ */ ++ public String toString() { ++ return getClass().getName() + "[top=" + top + ",left=" + left + ",bottom=" + bottom + ",right=" + right + "]"; ++ } ++ ++ /** ++ * Create a copy of this object. ++ * @return a copy of this Insets2D object. ++ */ ++ public Object clone() { ++ try { ++ return super.clone(); ++ } catch (CloneNotSupportedException e) { ++ // this shouldn't happen, since we are Cloneable ++ throw new InternalError(); ++ } ++ } ++ ++ ++} diff --cc src/java/org/apache/poi/sl/usermodel/Line.java index 0000000000,630c37de45..b06764e54d mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Line.java +++ b/src/java/org/apache/poi/sl/usermodel/Line.java @@@ -1,0 -1,22 +1,22 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface Line extends AutoShape { ++public interface Line> extends AutoShape { + + } diff --cc src/java/org/apache/poi/sl/usermodel/LineDecoration.java index 0000000000,0000000000..e95551c9e7 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/LineDecoration.java @@@ -1,0 -1,0 +1,95 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface LineDecoration { ++ /** ++ * Represents the shape decoration that appears at the ends of lines. ++ */ ++ enum DecorationShape { ++ NONE(1), ++ TRIANGLE(2), ++ STEALTH(3), ++ DIAMOND(4), ++ OVAL(5), ++ ARROW(6); ++ ++ public final int ooxmlId; ++ ++ DecorationShape(int ooxmlId) { ++ this.ooxmlId = ooxmlId; ++ } ++ ++ public static DecorationShape fromOoxmlId(int ooxmlId) { ++ for (DecorationShape ds : values()) { ++ if (ds.ooxmlId == ooxmlId) return ds; ++ } ++ return null; ++ } ++ } ++ ++ enum DecorationSize { ++ SMALL(1), ++ MEDIUM(2), ++ LARGE(3); ++ ++ public final int ooxmlId; ++ ++ DecorationSize(int ooxmlId) { ++ this.ooxmlId = ooxmlId; ++ } ++ ++ public static DecorationSize fromOoxmlId(int ooxmlId) { ++ for (DecorationSize ds : values()) { ++ if (ds.ooxmlId == ooxmlId) return ds; ++ } ++ return null; ++ } ++ } ++ ++ /** ++ * @return the line start shape ++ */ ++ DecorationShape getHeadShape(); ++ ++ /** ++ * @return the width of the start shape ++ */ ++ DecorationSize getHeadWidth(); ++ ++ /** ++ * @return the length of the start shape ++ */ ++ DecorationSize getHeadLength(); ++ ++ /** ++ * @return the line end shape ++ */ ++ DecorationShape getTailShape(); ++ ++ /** ++ * @return the width of the end shape ++ */ ++ DecorationSize getTailWidth(); ++ ++ /** ++ * @return the length of the end shape ++ */ ++ DecorationSize getTailLength(); ++ ++} diff --cc src/java/org/apache/poi/sl/usermodel/MasterSheet.java index 0000000000,61792cd5bb..727217d3fa mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/MasterSheet.java +++ b/src/java/org/apache/poi/sl/usermodel/MasterSheet.java @@@ -1,0 -1,22 +1,22 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface MasterSheet extends Sheet { ++public interface MasterSheet extends Sheet { + + } diff --cc src/java/org/apache/poi/sl/usermodel/Notes.java index 0000000000,5d5ba98e7e..3e4b924721 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Notes.java +++ b/src/java/org/apache/poi/sl/usermodel/Notes.java @@@ -1,0 -1,22 +1,24 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface Notes extends Sheet { - public TextRun getTextRun(); ++import java.util.List; ++ ++public interface Notes extends Sheet { ++ List>> getTextParagraphs(); + } diff --cc src/java/org/apache/poi/sl/usermodel/PaintStyle.java index 0000000000,0000000000..2551201692 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/PaintStyle.java @@@ -1,0 -1,0 +1,63 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.Color; ++import java.io.InputStream; ++ ++import org.apache.poi.sl.draw.DrawPaint; ++ ++ ++ ++public interface PaintStyle { ++ public interface SolidPaint extends PaintStyle { ++ ColorStyle getSolidColor(); ++ } ++ ++ public interface GradientPaint extends PaintStyle { ++ enum GradientType { linear, circular, shape } ++ ++ /** ++ * @return the angle of the gradient ++ */ ++ double getGradientAngle(); ++ ColorStyle[] getGradientColors(); ++ float[] getGradientFractions(); ++ boolean isRotatedWithShape(); ++ GradientType getGradientType(); ++ } ++ ++ public interface TexturePaint extends PaintStyle { ++ /** ++ * @return the raw image stream ++ */ ++ InputStream getImageData(); ++ ++ /** ++ * @return the content type of the image data ++ */ ++ String getContentType(); ++ ++ /** ++ * @return the alpha mask in percents [0..100000] ++ */ ++ int getAlpha(); ++ } ++ ++ SolidPaint TRANSPARENT_PAINT = DrawPaint.createSolidPaint(new Color(0xFF, 0xFF, 0xFF, 0)); ++} diff --cc src/java/org/apache/poi/sl/usermodel/PictureData.java index 0000000000,e325e5a8db..8697d33965 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/PictureData.java +++ b/src/java/org/apache/poi/sl/usermodel/PictureData.java @@@ -1,0 -1,26 +1,27 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + ++import java.io.IOException; ++ + public interface PictureData { - public int getType(); - public byte[] getUID(); ++ public String getContentType(); + + public byte[] getData(); - public void setData(byte[] data); ++ public void setData(byte[] data) throws IOException; + } diff --cc src/java/org/apache/poi/sl/usermodel/PictureShape.java index 0000000000,0000000000..a2c0824e0c new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/PictureShape.java @@@ -1,0 -1,0 +1,37 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.Insets; ++ ++public interface PictureShape extends SimpleShape { ++ /** ++ * Returns the picture data for this picture. ++ * ++ * @return the picture data for this picture. ++ */ ++ PictureData getPictureData(); ++ ++ /** ++ * Returns the clipping values as percent ratio relatively to the image size. ++ * The clipping are returned as insets converted/scaled to 100000 (=100%). ++ * ++ * @return the clipping rectangle, which is given in percent in relation to the image width/height ++ */ ++ Insets getClipping(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/PlaceableShape.java index 0000000000,0000000000..f81a344b17 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/PlaceableShape.java @@@ -1,0 -1,0 +1,84 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.geom.Rectangle2D; ++ ++public interface PlaceableShape { ++ ShapeContainer getParent(); ++ ++ /** ++ * @return the position of this shape within the drawing canvas. ++ * The coordinates are expressed in points ++ */ ++ Rectangle2D getAnchor(); ++ ++ /** ++ * @param anchor the position of this shape within the drawing canvas. ++ * The coordinates are expressed in points ++ */ ++ void setAnchor(Rectangle2D anchor); ++ ++ /** ++ * Rotation angle in degrees ++ *

++ * Positive angles are clockwise (i.e., towards the positive y axis); ++ * negative angles are counter-clockwise (i.e., towards the negative y axis). ++ *

++ * ++ * @return rotation angle in degrees ++ */ ++ double getRotation(); ++ ++ /** ++ * Rotate this shape. ++ *

++ * Positive angles are clockwise (i.e., towards the positive y axis); ++ * negative angles are counter-clockwise (i.e., towards the negative y axis). ++ *

++ * ++ * @param theta the rotation angle in degrees. ++ */ ++ void setRotation(double theta); ++ ++ /** ++ * @param flip whether the shape is horizontally flipped ++ */ ++ void setFlipHorizontal(boolean flip); ++ ++ /** ++ * Whether the shape is vertically flipped ++ * ++ * @param flip whether the shape is vertically flipped ++ */ ++ void setFlipVertical(boolean flip); ++ ++ /** ++ * Whether the shape is horizontally flipped ++ * ++ * @return whether the shape is horizontally flipped ++ */ ++ boolean getFlipHorizontal(); ++ ++ /** ++ * Whether the shape is vertically flipped ++ * ++ * @return whether the shape is vertically flipped ++ */ ++ boolean getFlipVertical(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/Shadow.java index 0000000000,0000000000..430dbe3840 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/Shadow.java @@@ -1,0 -1,0 +1,50 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import org.apache.poi.sl.usermodel.PaintStyle.SolidPaint; ++ ++ ++ ++public interface Shadow { ++ SimpleShape getShadowParent(); ++ ++ /** ++ * @return the offset of this shadow in points ++ */ ++ double getDistance(); ++ ++ /** ++ * ++ * @return the direction to offset the shadow in angles ++ */ ++ double getAngle(); ++ ++ /** ++ * ++ * @return the blur radius of the shadow ++ * TODO: figure out how to make sense of this property when rendering shadows ++ */ ++ double getBlur(); ++ ++ /** ++ * @return the color of this shadow. ++ * Depending whether the parent shape is filled or stroked, this color is used to fill or stroke this shadow ++ */ ++ SolidPaint getFillStyle(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/Shape.java index 0000000000,11c0bf6251..4de645d41f mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Shape.java +++ b/src/java/org/apache/poi/sl/usermodel/Shape.java @@@ -1,0 -1,31 +1,29 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -import java.awt.geom.Rectangle2D; + + public interface Shape { - public int getShapeType(); - - public Rectangle2D getAnchor(); - public void setAnchor(Rectangle2D anchor); - - public void moveTo(float x, float y); - - public Shape getParent(); ++ ShapeContainer getParent(); ++ ++ /** ++ * ++ * @return the sheet this shape belongs to ++ */ ++ Sheet getSheet(); + } diff --cc src/java/org/apache/poi/sl/usermodel/ShapeContainer.java index 0000000000,cabcf4bc89..1741a732d3 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/ShapeContainer.java +++ b/src/java/org/apache/poi/sl/usermodel/ShapeContainer.java @@@ -1,0 -1,24 +1,46 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface ShapeContainer { - public Shape[] getShapes(); - public void addShape(Shape shape); - public boolean removeShape(Shape shape); ++import java.util.List; ++ ++ ++public interface ShapeContainer extends Iterable { ++ /** ++ * Returns an list containing all of the elements in this container in proper ++ * sequence (from first to last element). ++ * ++ * @return an list containing all of the elements in this container in proper ++ * sequence ++ */ ++ List getShapes(); ++ ++ void addShape(T shape); ++ ++ /** ++ * Removes the specified shape from this sheet, if it is present ++ * (optional operation). If this sheet does not contain the element, ++ * it is unchanged. ++ * ++ * @param xShape shape to be removed from this sheet, if present ++ * @return true if this sheet contained the specified element ++ * @throws IllegalArgumentException if the type of the specified shape ++ * is incompatible with this sheet (optional) ++ */ ++ boolean removeShape(T shape); + } diff --cc src/java/org/apache/poi/sl/usermodel/ShapeType.java index 0000000000,0000000000..91974b79df new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/ShapeType.java @@@ -1,0 -1,0 +1,316 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++/** ++ * known preset shape geometries in PresentationML ++ */ ++public enum ShapeType { ++ NOT_PRIMITIVE(-1, 0, "NotPrimitive"), ++ LINE(1, 20, "Line"), ++ LINE_INV(2, -1, null), ++ TRIANGLE(3, 5, "IsocelesTriangle"), ++ RT_TRIANGLE(4, 6, "RightTriangle"), ++ RECT(5, 1, "Rectangle"), ++ DIAMOND(6, 4, "Diamond"), ++ PARALLELOGRAM(7, 7, "Parallelogram"), ++ TRAPEZOID(8, 8, "Trapezoid"), ++ NON_ISOSCELES_TRAPEZOID(9, -1, null), ++ PENTAGON(10, 56, "Pentagon"), ++ HEXAGON(11, 9, "Hexagon"), ++ HEPTAGON(12, -1, null), ++ OCTAGON(13, 10, "Octagon"), ++ DECAGON(14, -1, null), ++ DODECAGON(15, -1, null), ++ STAR_4(16, 187, "Star4"), ++ STAR_5(17, 12, "Star"), // aka star in native ++ STAR_6(18, -1, null), ++ STAR_7(19, -1, null), ++ STAR_8(20, 58, "Star8"), ++ STAR_10(21, -1, null), ++ STAR_12(22, -1, null), ++ STAR_16(23, 59, "Star16"), ++ SEAL(23, 18, "Seal"), // same as star_16, but twice in native ++ STAR_24(24, 92, "Star24"), ++ STAR_32(25, 60, "Star32"), ++ ROUND_RECT(26, 2, "RoundRectangle"), ++ ROUND_1_RECT(27, -1, null), ++ ROUND_2_SAME_RECT(28, -1, null), ++ ROUND_2_DIAG_RECT(29, -1, null), ++ SNIP_ROUND_RECT(30, -1, null), ++ SNIP_1_RECT(31, -1, null), ++ SNIP_2_SAME_RECT(32, -1, null), ++ SNIP_2_DIAG_RECT(33, -1, null), ++ PLAQUE(34, 21, "Plaque"), ++ ELLIPSE(35, 3, "Ellipse"), ++ TEARDROP(36, -1, null), ++ HOME_PLATE(37, 15, "HomePlate"), ++ CHEVRON(38, 55, "Chevron"), ++ PIE_WEDGE(39, -1, null), ++ PIE(40, -1, null), ++ BLOCK_ARC(41, 95, "BlockArc"), ++ DONUT(42, 23, "Donut"), ++ NO_SMOKING(43, 57, "NoSmoking"), ++ RIGHT_ARROW(44, 13, "Arrow"), // aka arrow in native ++ LEFT_ARROW(45, 66, "LeftArrow"), ++ UP_ARROW(46, 68, "UpArrow"), ++ DOWN_ARROW(47, 67, "DownArrow"), ++ STRIPED_RIGHT_ARROW(48, 93, "StripedRightArrow"), ++ NOTCHED_RIGHT_ARROW(49, 94, "NotchedRightArrow"), ++ BENT_UP_ARROW(50, 90, "BentUpArrow"), ++ LEFT_RIGHT_ARROW(51, 69, "LeftRightArrow"), ++ UP_DOWN_ARROW(52, 70, "UpDownArrow"), ++ LEFT_UP_ARROW(53, 89, "LeftUpArrow"), ++ LEFT_RIGHT_UP_ARROW(54, 182, "LeftRightUpArrow"), ++ QUAD_ARROW(55, 76, "QuadArrow"), ++ LEFT_ARROW_CALLOUT(56, 77, "LeftArrowCallout"), ++ RIGHT_ARROW_CALLOUT(57, 78, "RightArrowCallout"), ++ UP_ARROW_CALLOUT(58, 79, "UpArrowCallout"), ++ DOWN_ARROW_CALLOUT(59, 80, "DownArrowCallout"), ++ LEFT_RIGHT_ARROW_CALLOUT(60, 81, "LeftRightArrowCallout"), ++ UP_DOWN_ARROW_CALLOUT(61, 82, "UpDownArrowCallout"), ++ QUAD_ARROW_CALLOUT(62, 83, "QuadArrowCallout"), ++ BENT_ARROW(63, 91, "BentArrow"), ++ UTURN_ARROW(64, 101, "UturnArrow"), ++ CIRCULAR_ARROW(65, 99, "CircularArrow"), ++ LEFT_CIRCULAR_ARROW(66, -1, null), ++ LEFT_RIGHT_CIRCULAR_ARROW(67, -1, null), ++ CURVED_RIGHT_ARROW(68, 102, "CurvedRightArrow"), ++ CURVED_LEFT_ARROW(69, 103, "CurvedLeftArrow"), ++ CURVED_UP_ARROW(70, 104, "CurvedUpArrow"), ++ CURVED_DOWN_ARROW(71, 105, "CurvedDownArrow"), ++ SWOOSH_ARROW(72, -1, null), ++ CUBE(73, 16, "Cube"), ++ CAN(74, 22, "Can"), ++ LIGHTNING_BOLT(75, 73, "LightningBolt"), ++ HEART(76, 74, "Heart"), ++ SUN(77, 183, "Sun"), ++ MOON(78, 184, "Moon"), ++ SMILEY_FACE(79, 96, "SmileyFace"), ++ IRREGULAR_SEAL_1(80, 71, "IrregularSeal1"), ++ IRREGULAR_SEAL_2(81, 72, "IrregularSeal2"), ++ FOLDED_CORNER(82, 65, "FoldedCorner"), ++ BEVEL(83, 84, "Bevel"), ++ FRAME(84, 75, "PictureFrame"), ++ HALF_FRAME(85, -1, null), ++ CORNER(86, -1, null), ++ DIAG_STRIPE(87, -1, null), ++ CHORD(88, -1, null), ++ ARC(89, 19, "Arc"), ++ LEFT_BRACKET(90, 85, "LeftBracket"), ++ RIGHT_BRACKET(91, 86, "RightBracket"), ++ LEFT_BRACE(92, 87, "LeftBrace"), ++ RIGHT_BRACE(93, 88, "RightBrace"), ++ BRACKET_PAIR(94, 185, "BracketPair"), ++ BRACE_PAIR(95, 186, "BracePair"), ++ STRAIGHT_CONNECTOR_1(96, 32, "StraightConnector1"), ++ BENT_CONNECTOR_2(97, 33, "BentConnector2"), ++ BENT_CONNECTOR_3(98, 34, "BentConnector3"), ++ BENT_CONNECTOR_4(99, 35, "BentConnector4"), ++ BENT_CONNECTOR_5(100, 36, "BentConnector5"), ++ CURVED_CONNECTOR_2(101, 37, "CurvedConnector2"), ++ CURVED_CONNECTOR_3(102, 38, "CurvedConnector3"), ++ CURVED_CONNECTOR_4(103, 39, "CurvedConnector4"), ++ CURVED_CONNECTOR_5(104, 40, "CurvedConnector5"), ++ CALLOUT_1(105, 41, "Callout1"), ++ CALLOUT_2(106, 42, "Callout2"), ++ CALLOUT_3(107, 43, "Callout3"), ++ ACCENT_CALLOUT_1(108, 44, "AccentCallout1"), ++ ACCENT_CALLOUT_2(109, 45, "AccentCallout2"), ++ ACCENT_CALLOUT_3(110, 46, "AccentCallout3"), ++ BORDER_CALLOUT_1(111, 47, "BorderCallout1"), ++ BORDER_CALLOUT_2(112, 48, "BorderCallout2"), ++ BORDER_CALLOUT_3(113, 49, "BorderCallout3"), ++ ACCENT_BORDER_CALLOUT_1(114, 50, "AccentBorderCallout1"), ++ ACCENT_BORDER_CALLOUT_2(115, 51, "AccentBorderCallout2"), ++ ACCENT_BORDER_CALLOUT_3(116, 52, "AccentBorderCallout3"), ++ WEDGE_RECT_CALLOUT(117, 61, "WedgeRectCallout"), ++ WEDGE_ROUND_RECT_CALLOUT(118, 62, "WedgeRRectCallout"), ++ WEDGE_ELLIPSE_CALLOUT(119, 63, "WedgeEllipseCallout"), ++ CLOUD_CALLOUT(120, 106, "CloudCallout"), ++ CLOUD(121, -1, null), ++ RIBBON(122, 53, "Ribbon"), ++ RIBBON_2(123, 54, "Ribbon2"), ++ ELLIPSE_RIBBON(124, 107, "EllipseRibbon"), ++ ELLIPSE_RIBBON_2(125, 108, "EllipseRibbon2"), ++ LEFT_RIGHT_RIBBON(126, -1, null), ++ VERTICAL_SCROLL(127, 97, "VerticalScroll"), ++ HORIZONTAL_SCROLL(128, 98, "HorizontalScroll"), ++ WAVE(129, 64, "Wave"), ++ DOUBLE_WAVE(130, 188, "DoubleWave"), ++ PLUS(131, 11, "Plus"), ++ FLOW_CHART_PROCESS(132, 109, "FlowChartProcess"), ++ FLOW_CHART_DECISION(133, 110, "FlowChartDecision"), ++ FLOW_CHART_INPUT_OUTPUT(134, 111, "FlowChartInputOutput"), ++ FLOW_CHART_PREDEFINED_PROCESS(135, 112, "FlowChartPredefinedProcess"), ++ FLOW_CHART_INTERNAL_STORAGE(136, 113, "FlowChartInternalStorage"), ++ FLOW_CHART_DOCUMENT(137, 114, "FlowChartDocument"), ++ FLOW_CHART_MULTIDOCUMENT(138, 115, "FlowChartMultidocument"), ++ FLOW_CHART_TERMINATOR(139, 116, "FlowChartTerminator"), ++ FLOW_CHART_PREPARATION(140, 117, "FlowChartPreparation"), ++ FLOW_CHART_MANUAL_INPUT(141, 118, "FlowChartManualInput"), ++ FLOW_CHART_MANUAL_OPERATION(142, 119, "FlowChartManualOperation"), ++ FLOW_CHART_CONNECTOR(143, 120, "FlowChartConnector"), ++ FLOW_CHART_PUNCHED_CARD(144, 121, "FlowChartPunchedCard"), ++ FLOW_CHART_PUNCHED_TAPE(145, 122, "FlowChartPunchedTape"), ++ FLOW_CHART_SUMMING_JUNCTION(146, 123, "FlowChartSummingJunction"), ++ FLOW_CHART_OR(147, 124, "FlowChartOr"), ++ FLOW_CHART_COLLATE(148, 125, "FlowChartCollate"), ++ FLOW_CHART_SORT(149, 126, "FlowChartSort"), ++ FLOW_CHART_EXTRACT(150, 127, "FlowChartExtract"), ++ FLOW_CHART_MERGE(151, 128, "FlowChartMerge"), ++ FLOW_CHART_OFFLINE_STORAGE(152, 129, "FlowChartOfflineStorage"), ++ FLOW_CHART_ONLINE_STORAGE(153, 130, "FlowChartOnlineStorage"), ++ FLOW_CHART_MAGNETIC_TAPE(154, 131, "FlowChartMagneticTape"), ++ FLOW_CHART_MAGNETIC_DISK(155, 132, "FlowChartMagneticDisk"), ++ FLOW_CHART_MAGNETIC_DRUM(156, 133, "FlowChartMagneticDrum"), ++ FLOW_CHART_DISPLAY(157, 134, "FlowChartDisplay"), ++ FLOW_CHART_DELAY(158, 135, "FlowChartDelay"), ++ FLOW_CHART_ALTERNATE_PROCESS(159, 176, "FlowChartAlternateProcess"), ++ FLOW_CHART_OFFPAGE_CONNECTOR(160, 177, "FlowChartOffpageConnector"), ++ ACTION_BUTTON_BLANK(161, 189, "ActionButtonBlank"), ++ ACTION_BUTTON_HOME(162, 190, "ActionButtonHome"), ++ ACTION_BUTTON_HELP(163, 191, "ActionButtonHelp"), ++ ACTION_BUTTON_INFORMATION(164, 192, "ActionButtonInformation"), ++ ACTION_BUTTON_FORWARD_NEXT(165, 193, "ActionButtonForwardNext"), ++ ACTION_BUTTON_BACK_PREVIOUS(166, 194, "ActionButtonBackPrevious"), ++ ACTION_BUTTON_END(167, 195, "ActionButtonEnd"), ++ ACTION_BUTTON_BEGINNING(168, 196, "ActionButtonBeginning"), ++ ACTION_BUTTON_RETURN(169, 197, "ActionButtonReturn"), ++ ACTION_BUTTON_DOCUMENT(170, 198, "ActionButtonDocument"), ++ ACTION_BUTTON_SOUND(171, 199, "ActionButtonSound"), ++ ACTION_BUTTON_MOVIE(172, 200, "ActionButtonMovie"), ++ GEAR_6(173, -1, null), ++ GEAR_9(174, -1, null), ++ FUNNEL(175, -1, null), ++ MATH_PLUS(176, -1, null), ++ MATH_MINUS(177, -1, null), ++ MATH_MULTIPLY(178, -1, null), ++ MATH_DIVIDE(179, -1, null), ++ MATH_EQUAL(180, -1, null), ++ MATH_NOT_EQUAL(181, -1, null), ++ CORNER_TABS(182, -1, null), ++ SQUARE_TABS(183, -1, null), ++ PLAQUE_TABS(184, -1, null), ++ CHART_X(185, -1, null), ++ CHART_STAR(186, -1, null), ++ CHART_PLUS(187, -1, null), ++ // below are shape types only found in native ++ NOTCHED_CIRCULAR_ARROW(-1, 100, "NotchedCircularArrow"), ++ THICK_ARROW(-1, 14, "ThickArrow"), ++ BALLOON(-1, 17, "Balloon"), ++ TEXT_SIMPLE(-1, 24, "TextSimple"), ++ TEXT_OCTAGON(-1, 25, "TextOctagon"), ++ TEXT_HEXAGON(-1, 26, "TextHexagon"), ++ TEXT_CURVE(-1, 27, "TextCurve"), ++ TEXT_WAVE(-1, 28, "TextWave"), ++ TEXT_RING(-1, 29, "TextRing"), ++ TEXT_ON_CURVE(-1, 30, "TextOnCurve"), ++ TEXT_ON_RING(-1, 31, "TextOnRing"), ++ TEXT_PLAIN_TEXT(-1, 136, "TextPlainText"), ++ TEXT_STOP(-1, 137, "TextStop"), ++ TEXT_TRIANGLE(-1, 138, "TextTriangle"), ++ TEXT_TRIANGLE_INVERTED(-1, 139, "TextTriangleInverted"), ++ TEXT_CHEVRON(-1, 140, "TextChevron"), ++ TEXT_CHEVRON_INVERTED(-1, 141, "TextChevronInverted"), ++ TEXT_RING_INSIDE(-1, 142, "TextRingInside"), ++ TEXT_RING_OUTSIDE(-1, 143, "TextRingOutside"), ++ TEXT_ARCH_UP_CURVE(-1, 144, "TextArchUpCurve"), ++ TEXT_ARCH_DOWN_CURVE(-1, 145, "TextArchDownCurve"), ++ TEXT_CIRCLE_CURVE(-1, 146, "TextCircleCurve"), ++ TEXT_BUTTON_CURVE(-1, 147, "TextButtonCurve"), ++ TEXT_ARCH_UP_POUR(-1, 148, "TextArchUpPour"), ++ TEXT_ARCH_DOWN_POUR(-1, 149, "TextArchDownPour"), ++ TEXT_CIRCLE_POUR(-1, 150, "TextCirclePour"), ++ TEXT_BUTTON_POUR(-1, 151, "TextButtonPour"), ++ TEXT_CURVE_UP(-1, 152, "TextCurveUp"), ++ TEXT_CURVE_DOWN(-1, 153, "TextCurveDown"), ++ TEXT_CASCADE_UP(-1, 154, "TextCascadeUp"), ++ TEXT_CASCADE_DOWN(-1, 155, "TextCascadeDown"), ++ TEXT_WAVE_1(-1, 156, "TextWave1"), ++ TEXT_WAVE_2(-1, 157, "TextWave2"), ++ TEXT_WAVE_3(-1, 158, "TextWave3"), ++ TEXT_WAVE_4(-1, 159, "TextWave4"), ++ TEXT_INFLATE(-1, 160, "TextInflate"), ++ TEXT_DEFLATE(-1, 161, "TextDeflate"), ++ TEXT_INFLATE_BOTTOM(-1, 162, "TextInflateBottom"), ++ TEXT_DEFLATE_BOTTOM(-1, 163, "TextDeflateBottom"), ++ TEXT_INFLATE_TOP(-1, 164, "TextInflateTop"), ++ TEXT_DEFLATE_TOP(-1, 165, "TextDeflateTop"), ++ TEXT_DEFLATE_INFLATE(-1, 166, "TextDeflateInflate"), ++ TEXT_DEFLATE_INFLATE_DEFLATE(-1, 167, "TextDeflateInflateDeflate"), ++ TEXT_FADE_RIGHT(-1, 168, "TextFadeRight"), ++ TEXT_FADE_LEFT(-1, 169, "TextFadeLeft"), ++ TEXT_FADE_UP(-1, 170, "TextFadeUp"), ++ TEXT_FADE_DOWN(-1, 171, "TextFadeDown"), ++ TEXT_SLANT_UP(-1, 172, "TextSlantUp"), ++ TEXT_SLANT_DOWN(-1, 173, "TextSlantDown"), ++ TEXT_CAN_UP(-1, 174, "TextCanUp"), ++ TEXT_CAN_DOWN(-1, 175, "TextCanDown"), ++ CALLOUT_90(-1, 178, "Callout90"), ++ ACCENT_CALLOUT_90(-1, 179, "AccentCallout90"), ++ BORDER_CALLOUT_90(-1, 180, "BorderCallout90"), ++ ACCENT_BORDER_CALLOUT_90(-1, 181, "AccentBorderCallout90"), ++ HOST_CONTROL(-1, 201, "HostControl"), ++ TEXT_BOX(-1, 202, "TextBox") ++ ; ++ ++ /** Preset-ID for XML-based shapes */ ++ public final int ooxmlId; ++ ++ /** Preset-ID for binary-based shapes */ ++ public final int nativeId; ++ ++ /** POI-specific name for the binary-based type */ ++ public final String nativeName; ++ ++ ShapeType(int ooxmlId, int nativeId, String nativeName){ ++ this.ooxmlId = ooxmlId; ++ this.nativeId = nativeId; ++ this.nativeName = nativeName; ++ } ++ ++ /** name of the presetShapeDefinit(i)on entry */ ++ public String getOoxmlName() { ++ if (this == SEAL) return STAR_16.getOoxmlName(); ++ if (ooxmlId == -1) { ++ return (name().startsWith("TEXT")) ? RECT.getOoxmlName() : null; ++ } ++ ++ StringBuilder sb = new StringBuilder(); ++ boolean toLower = true; ++ for (char ch : name().toCharArray()) { ++ if (ch == '_') { ++ toLower = false; ++ continue; ++ } ++ sb.append(toLower ? Character.toLowerCase(ch) : Character.toUpperCase(ch)); ++ toLower = true; ++ } ++ ++ return sb.toString(); ++ } ++ ++ public static ShapeType forId(int id, boolean isOoxmlId){ ++ for(ShapeType t : values()){ ++ if((isOoxmlId && t.ooxmlId == id) || ++ (!isOoxmlId && t.nativeId == id)) return t; ++ } ++ throw new IllegalArgumentException("Unknown shape type: " + id); ++ } ++} diff --cc src/java/org/apache/poi/sl/usermodel/Sheet.java index 0000000000,7959838cc1..f94b7727a7 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Sheet.java +++ b/src/java/org/apache/poi/sl/usermodel/Sheet.java @@@ -1,0 -1,29 +1,46 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + ++import java.awt.Graphics2D; ++ ++ + /** + * Common parent of Slides, Notes and Masters + */ -public interface Sheet extends ShapeContainer { - public SlideShow getSlideShow(); ++public interface Sheet extends ShapeContainer { ++ SS getSlideShow(); + - public MasterSheet getMasterSheet(); ++ /** ++ * @return whether shapes on the master sheet should be shown. By default master graphics is turned off. ++ * Sheets that support the notion of master (slide, slideLayout) should override it and ++ * check this setting in the sheet XML ++ */ ++ boolean getFollowMasterGraphics(); ++ ++ MasterSheet getMasterSheet(); + - public Background getBackground(); ++ Background getBackground(); ++ ++ /** ++ * Convenience method to draw a sheet to a graphics context ++ * ++ * @param graphics ++ */ ++ void draw(Graphics2D graphics); + } diff --cc src/java/org/apache/poi/sl/usermodel/SimpleShape.java index 0000000000,449433a7e8..e4e8efe3a1 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/SimpleShape.java +++ b/src/java/org/apache/poi/sl/usermodel/SimpleShape.java @@@ -1,0 -1,26 +1,36 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface SimpleShape extends Shape { - public Fill getFill(); - public LineStyle getLineStyle(); ++import org.apache.poi.sl.draw.geom.CustomGeometry; ++import org.apache.poi.sl.draw.geom.IAdjustableShape; + - public Hyperlink getHyperlink(); - public void setHyperlink(Hyperlink hyperlink); ++ ++public interface SimpleShape extends Shape, IAdjustableShape, PlaceableShape { ++ FillStyle getFillStyle(); ++ LineDecoration getLineDecoration(); ++ StrokeStyle getStrokeStyle(); ++ ++ CustomGeometry getGeometry(); ++ ++ ShapeType getShapeType(); ++ ++ boolean isPlaceholder(); ++ ++ Shadow getShadow(); + } diff --cc src/java/org/apache/poi/sl/usermodel/Slide.java index 0000000000,d3c4af25a4..7b238de176 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/Slide.java +++ b/src/java/org/apache/poi/sl/usermodel/Slide.java @@@ -1,0 -1,32 +1,37 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface Slide extends Sheet { - public Notes getNotes(); - public void setNotes(Notes notes); ++public interface Slide> extends Sheet { ++ N getNotes(); ++ void setNotes(N notes); + - public boolean getFollowMasterBackground(); - public void setFollowMasterBackground(boolean follow); ++ boolean getFollowMasterBackground(); ++ void setFollowMasterBackground(boolean follow); + - public boolean getFollowMasterColourScheme(); - public void setFollowMasterColourScheme(boolean follow); ++ boolean getFollowMasterColourScheme(); ++ void setFollowMasterColourScheme(boolean follow); + - public boolean getFollowMasterObjects(); - public void setFollowMasterObjects(boolean follow); ++ boolean getFollowMasterObjects(); ++ void setFollowMasterObjects(boolean follow); ++ ++ /** ++ * @return the 1-based slide no. ++ */ ++ int getSlideNumber(); + } diff --cc src/java/org/apache/poi/sl/usermodel/SlideShow.java index 0000000000,8239bb91ff..ca0ddf3918 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/SlideShow.java +++ b/src/java/org/apache/poi/sl/usermodel/SlideShow.java @@@ -1,0 -1,30 +1,45 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + ++import java.awt.Dimension; + import java.io.IOException; ++import java.util.List; + + public interface SlideShow { - public Slide createSlide() throws IOException; - public MasterSheet createMasterSheet() throws IOException; ++ Slide> createSlide() throws IOException; + - public Slide[] getSlides(); - public MasterSheet[] getMasterSheet(); ++ List>> getSlides(); + - public Resources getResources(); ++ MasterSheet createMasterSheet() throws IOException; ++ ++ /** ++ * Returns all slide masters. ++ * This doesn't include notes master and other arbitrary masters. ++ */ ++ List> getSlideMasters(); ++ ++ Resources getResources(); ++ ++ /** ++ * Returns the current page size ++ * ++ * @return the page size ++ */ ++ Dimension getPageSize(); + } diff --cc src/java/org/apache/poi/sl/usermodel/StrokeStyle.java index 0000000000,0000000000..244173fed4 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/StrokeStyle.java @@@ -1,0 -1,0 +1,129 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface StrokeStyle { ++ enum LineCap { ++ /** Rounded ends */ ++ ROUND(1), ++ /** Square protrudes by half line width */ ++ SQUARE(2), ++ /** Line ends at end point*/ ++ FLAT(3); ++ ++ public final int ooxmlId; ++ ++ LineCap(int ooxmlId) { ++ this.ooxmlId = ooxmlId; ++ } ++ ++ public static LineCap fromOoxmlId(int ooxmlId) { ++ for (LineCap lc : values()) { ++ if (lc.ooxmlId == ooxmlId) return lc; ++ } ++ return null; ++ } ++ } ++ ++ /** ++ * The line dash with pattern. ++ * The pattern is derived empirically on PowerPoint 2010 and needs to be multiplied ++ * with actual line width ++ */ ++ enum LineDash { ++ /** Solid (continuous) pen - native 1 */ ++ SOLID(1, 1, null), ++ /** square dot style - native 6 */ ++ DOT(6, 2, 1,1), ++ /** dash style - native 7 */ ++ DASH(7, 3, 3,4), ++ /** dash short dash - native 9*/ ++ DASH_DOT(9, 5, 4,3,1,3), ++ /** long dash style - native 8 */ ++ LG_DASH(8, 4, 8,3), ++ /** long dash short dash - native 10 */ ++ LG_DASH_DOT(10, 6, 8,3,1,3), ++ /** long dash short dash short dash - native 11 */ ++ LG_DASH_DOT_DOT(11, 7, 8,3,1,3,1,3), ++ /** PS_DASH system dash style - native 2 */ ++ SYS_DASH(2, 8, 2,2), ++ /** PS_DOT system dash style - native 3 */ ++ SYS_DOT(3, 9, 1,1), ++ /** PS_DASHDOT system dash style - native 4 */ ++ SYS_DASH_DOT(4, 10, 2,2,1,1), ++ /** PS_DASHDOTDOT system dash style / native 5 */ ++ SYS_DASH_DOT_DOT(5, 11, 2,2,1,1,1,1); ++ ++ public final int pattern[]; ++ public final int nativeId; ++ public final int ooxmlId; ++ ++ LineDash(int nativeId, int ooxmlId, int... pattern) { ++ this.nativeId = nativeId; ++ this.ooxmlId = ooxmlId; ++ this.pattern = (pattern == null || pattern.length == 0) ? null : pattern; ++ } ++ ++ public static LineDash fromNativeId(int nativeId) { ++ for (LineDash ld : values()) { ++ if (ld.nativeId == nativeId) return ld; ++ } ++ return null; ++ } ++ ++ public static LineDash fromOoxmlId(int ooxmlId) { ++ for (LineDash ld : values()) { ++ if (ld.ooxmlId == ooxmlId) return ld; ++ } ++ return null; ++ } ++ } ++ ++ enum LineCompound { ++ /** Single line (of width lineWidth) - native 0 / ooxml default */ ++ SINGLE(0), ++ /** Double lines of equal width - native 1 / ooxml "dbl" */ ++ DOUBLE(1), ++ /** Double lines, one thick, one thin - native 2 / ooxml "thickThin" */ ++ THICK_THIN(2), ++ /** Double lines, reverse order - native 3 / ooxml "thinThick" */ ++ THIN_THICK(3), ++ /** Three lines, thin, thick, thin - native 4 / ooxml "tri" */ ++ TRIPLE(4); ++ ++ public final int nativeId; ++ ++ LineCompound(int nativeId) { ++ this.nativeId = nativeId; ++ } ++ ++ public static LineCompound fromNativeId(int nativeId) { ++ for (LineCompound lc : values()) { ++ if (lc.nativeId == nativeId) return lc; ++ } ++ return null; ++ } ++ } ++ ++ ++ PaintStyle getPaint(); ++ LineCap getLineCap(); ++ LineDash getLineDash(); ++ LineCompound getLineCompound(); ++ double getLineWidth(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/TableShape.java index 0000000000,0000000000..4fda40f2df new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/TableShape.java @@@ -1,0 -1,0 +1,22 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++public interface TableShape extends Shape, PlaceableShape { ++ // to be defined ... ++} diff --cc src/java/org/apache/poi/sl/usermodel/TextBox.java index 0000000000,5a88815ee7..3fa3bbe20d mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/TextBox.java +++ b/src/java/org/apache/poi/sl/usermodel/TextBox.java @@@ -1,0 -1,21 +1,21 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + -public interface TextBox extends AutoShape { ++public interface TextBox> extends AutoShape { + } diff --cc src/java/org/apache/poi/sl/usermodel/TextParagraph.java index 0000000000,0000000000..a914dd7cb3 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/TextParagraph.java @@@ -1,0 -1,0 +1,324 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import java.awt.Color; ++ ++ ++public interface TextParagraph extends Iterable { ++ ++ /** ++ * Specifies a list of text alignment types ++ */ ++ public enum TextAlign { ++ /** ++ * For horizontal text, left aligned. ++ * For vertical text, top aligned. ++ */ ++ LEFT, ++ ++ /** ++ * For horizontal text, centered. ++ * For vertical text, middle aligned. ++ */ ++ CENTER, ++ ++ /** ++ * For horizontal text, right aligned. ++ * For vertical text, bottom aligned. ++ */ ++ RIGHT, ++ ++ /** ++ * Align text so that it is justified across the whole line. It ++ * is smart in the sense that it will not justify sentences ++ * which are short ++ * ++ * For horizontal text, flush left and right. ++ * For vertical text, flush top and bottom. ++ */ ++ JUSTIFY, ++ ++ /** ++ * Kashida justify low. ++ */ ++ JUSTIFY_LOW, ++ ++ /** ++ * Distribute space between characters. ++ */ ++ DIST, ++ ++ /** ++ * Thai distribution justification. ++ */ ++ THAI_DIST ++ } ++ ++ /** ++ * ++ */ ++ public enum FontAlign { ++ AUTO, ++ ++ /** ++ * Characters hang from top of line height. ++ * Also known as "Hanging" ++ */ ++ TOP, ++ ++ /** ++ * Characters centered within line height. ++ */ ++ CENTER, ++ ++ /** ++ * Place characters on font baseline. ++ * Also known as "Roman" ++ */ ++ BASELINE, ++ ++ /** ++ * Characters are anchored to the very bottom of a single line. ++ * This is different than BASELINE because of letters such as "g", "q", and "y". ++ * Also known as "UpholdFixed" ++ */ ++ BOTTOM; ++ } ++ ++ public interface BulletStyle { ++ String getBulletCharacter(); ++ String getBulletFont(); ++ ++ /** ++ * The bullet point font size ++ * If bulletFontSize >= 0, then space is a percentage of normal line height. ++ * If bulletFontSize < 0, the absolute value in points ++ * ++ * @return the bullet point font size ++ */ ++ Double getBulletFontSize(); ++ Color getBulletFontColor(); ++ ++ AutoNumberingScheme getAutoNumberingScheme(); ++ /** ++ * Index (1-based) of the first auto number value, or null if auto numbering scheme ++ * wasn't assigned. ++ */ ++ Integer getAutoNumberingStartAt(); ++ } ++ ++ /** ++ * The amount of vertical white space before the paragraph ++ * This may be specified in two different ways, percentage spacing and font point spacing: ++ *

++ * If spaceBefore >= 0, then space is a percentage of normal line height. ++ * If spaceBefore < 0, the absolute value in points ++ *

++ * ++ * @return the vertical white space before the paragraph, or null if unset ++ */ ++ Double getSpaceBefore(); ++ ++ /** ++ * Set the amount of vertical white space that will be present before the paragraph. ++ * This space is specified in either percentage or points: ++ *

++ * If spaceBefore >= 0, then space is a percentage of normal line height. ++ * If spaceBefore < 0, the absolute value of linespacing is the spacing in points ++ *

++ * Examples: ++ *

++     *      // The paragraph will be formatted to have a spacing before the paragraph text.
++     *      // The spacing will be 200% of the size of the largest text on each line
++     *      paragraph.setSpaceBefore(200);
++     *
++     *      // The spacing will be a size of 48 points
++     *      paragraph.setSpaceBefore(-48.0);
++     * 
++ * ++ * @param spaceBefore the vertical white space before the paragraph, null to unset ++ */ ++ void setSpaceBefore(Double spaceBefore); ++ ++ /** ++ * The amount of vertical white space after the paragraph ++ * This may be specified in two different ways, percentage spacing and font point spacing: ++ *

++ * If spaceBefore >= 0, then space is a percentage of normal line height. ++ * If spaceBefore < 0, the absolute value of linespacing is the spacing in points ++ *

++ * ++ * @return the vertical white space after the paragraph or null, if unset ++ */ ++ Double getSpaceAfter(); ++ ++ /** ++ * Set the amount of vertical white space that will be present after the paragraph. ++ * This space is specified in either percentage or points: ++ *

++ * If spaceAfter >= 0, then space is a percentage of normal line height. ++ * If spaceAfter < 0, the absolute value of linespacing is the spacing in points ++ *

++ * Examples: ++ *

++     *      // The paragraph will be formatted to have a spacing after the paragraph text.
++     *      // The spacing will be 200% of the size of the largest text on each line
++     *      paragraph.setSpaceAfter(200);
++     *
++     *      // The spacing will be a size of 48 points
++     *      paragraph.setSpaceAfter(-48.0);
++     * 
++ * ++ * @param spaceAfter the vertical white space after the paragraph, null to unset ++ */ ++ public void setSpaceAfter(Double spaceAfter); ++ ++ /** ++ * @return the left margin (in points) of the paragraph or null, if unset ++ */ ++ Double getLeftMargin(); ++ ++ /** ++ * Specifies the left margin of the paragraph. This is specified in addition to the text body ++ * inset and applies only to this text paragraph. That is the text body Inset and the LeftMargin ++ * attributes are additive with respect to the text position. ++ * ++ * @param leftMargin the left margin (in points) or null to unset ++ */ ++ void setLeftMargin(Double leftMargin); ++ ++ ++ /** ++ * Specifies the right margin of the paragraph. This is specified in addition to the text body ++ * inset and applies only to this text paragraph. That is the text body Inset and the RightMargin ++ * attributes are additive with respect to the text position. ++ * ++ * The right margin is not support and therefore ignored by the HSLF implementation. ++ * ++ * @return the right margin (in points) of the paragraph or null, if unset ++ */ ++ Double getRightMargin(); ++ ++ /** ++ * @param rightMargin the right margin (in points) of the paragraph ++ */ ++ void setRightMargin(Double rightMargin); ++ ++ /** ++ * @return the indent (in points) applied to the first line of text in the paragraph. ++ * or null, if unset ++ */ ++ Double getIndent(); ++ ++ /** ++ * Specifies the indent size that will be applied to the first line of text in the paragraph. ++ * ++ * @param indent the indent (in points) applied to the first line of text in the paragraph ++ */ ++ void setIndent(Double indent); ++ ++ ++ /** ++ * @return the text level of this paragraph (0-based). Default is 0. ++ */ ++ int getIndentLevel(); ++ ++ /** ++ * Specifies the particular level text properties that this paragraph will follow. ++ * The value for this attribute formats the text according to the corresponding level ++ * paragraph properties defined in the SlideMaster. ++ * ++ * @param level the level (0 ... 4) ++ */ ++ void setIndentLevel(int level); ++ ++ /** ++ * Returns the vertical line spacing that is to be used within a paragraph. ++ * This may be specified in two different ways, percentage spacing and font point spacing: ++ *

++ * If linespacing >= 0, then linespacing is a percentage of normal line height. ++ * If linespacing < 0, the absolute value of linespacing is the spacing in points ++ *

++ * ++ * @return the vertical line spacing or null, if unset ++ */ ++ Double getLineSpacing(); ++ ++ /** ++ * This element specifies the vertical line spacing that is to be used within a paragraph. ++ * This may be specified in two different ways, percentage spacing and font point spacing: ++ *

++ * If linespacing >= 0, then linespacing is a percentage of normal line height ++ * If linespacing < 0, the absolute value of linespacing is the spacing in points ++ *

++ * Examples: ++ *

++     *      // spacing will be 120% of the size of the largest text on each line
++     *      paragraph.setLineSpacing(120);
++     *
++     *      // spacing will be 200% of the size of the largest text on each line
++     *      paragraph.setLineSpacing(200);
++     *
++     *      // spacing will be 48 points
++     *      paragraph.setLineSpacing(-48.0);
++     * 
++ * ++ * @param linespacing the vertical line spacing ++ */ ++ void setLineSpacing(Double lineSpacing); ++ ++ String getDefaultFontFamily(); ++ ++ /** ++ * @return the default font size, in case its not set in the textrun or null, if unset ++ */ ++ Double getDefaultFontSize(); ++ ++ /** ++ * Returns the alignment that is applied to the paragraph. ++ * ++ * If this attribute is omitted, then a value of left is implied. ++ * @return ??? alignment that is applied to the paragraph ++ */ ++ TextAlign getTextAlign(); ++ ++ ++ /** ++ * Returns the font alignment that is applied to the paragraph. ++ * ++ * If this attribute is omitted, then null is return, ++ * user code can imply the a value of {@link FontAlign#AUTO} ++ * ++ * @return alignment that is applied to the paragraph ++ */ ++ FontAlign getFontAlign(); ++ ++ /** ++ * @return the bullet style of the paragraph, if {@code null} then no bullets are used ++ */ ++ BulletStyle getBulletStyle(); ++ ++ /** ++ * @return the default size for a tab character within this paragraph in points, null if unset ++ */ ++ Double getDefaultTabSize(); ++ ++ ++ TextShape> getParentShape(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/TextRun.java index 0000000000,ae1a134771..946bfc3217 mode 000000,100644..100644 --- a/src/java/org/apache/poi/sl/usermodel/TextRun.java +++ b/src/java/org/apache/poi/sl/usermodel/TextRun.java @@@ -1,0 -1,30 +1,63 @@@ + /* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== */ + + package org.apache.poi.sl.usermodel; + ++import java.awt.Color; ++ + /** + * Some text. - * - * TODO - decide on how we do rich text stuff + */ + public interface TextRun { - public String getText(); - public void setText(String text); ++ enum TextCap { ++ NONE, ++ SMALL, ++ ALL ++ } ++ ++ String getRawText(); ++ void setText(String text); ++ ++ TextCap getTextCap(); ++ ++ Color getFontColor(); ++ void setFontColor(Color color); ++ ++ ++ /** ++ * @return font size in points or null if font size is not set. ++ */ ++ Double getFontSize(); + - // TODO - rich text formatting stuff ++ /** ++ * @param fontSize font size in points, if null the underlying fontsize will be unset ++ */ ++ void setFontSize(Double fontSize); ++ String getFontFamily(); ++ ++ boolean isBold(); ++ boolean isItalic(); ++ boolean isUnderlined(); ++ boolean isStrikethrough(); ++ boolean isSubscript(); ++ boolean isSuperscript(); ++ ++ /** ++ * @return the pitch and family id or -1 if not applicable ++ */ ++ byte getPitchAndFamily(); + } diff --cc src/java/org/apache/poi/sl/usermodel/TextShape.java index 0000000000,0000000000..927fdf1f9d new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/TextShape.java @@@ -1,0 -1,0 +1,128 @@@ ++/* ==================================================================== ++ Licensed to the Apache Software Foundation (ASF) under one or more ++ contributor license agreements. See the NOTICE file distributed with ++ this work for additional information regarding copyright ownership. ++ The ASF licenses this file to You under the Apache License, Version 2.0 ++ (the "License"); you may not use this file except in compliance with ++ the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++==================================================================== */ ++ ++package org.apache.poi.sl.usermodel; ++ ++import org.apache.poi.ss.usermodel.HorizontalAlignment; ++ ++ ++ ++public interface TextShape> extends SimpleShape, Iterable { ++ /** ++ * Vertical Text Types ++ */ ++ public enum TextDirection { ++ /** ++ * Horizontal text. This should be default. ++ */ ++ HORIZONTAL, ++ /** ++ * Vertical orientation. ++ * (each line is 90 degrees rotated clockwise, so it goes ++ * from top to bottom; each next line is to the left from ++ * the previous one). ++ */ ++ VERTICAL, ++ /** ++ * Vertical orientation. ++ * (each line is 270 degrees rotated clockwise, so it goes ++ * from bottom to top; each next line is to the right from ++ * the previous one). ++ */ ++ VERTICAL_270, ++ /** ++ * Determines if all of the text is vertical ++ * ("one letter on top of another"). ++ */ ++ STACKED; ++ } ++ ++ /** ++ * Specifies alist of auto-fit types. ++ *

++ * Autofit specofies that a shape should be auto-fit to fully contain the text described within it. ++ * Auto-fitting is when text within a shape is scaled in order to contain all the text inside ++ *

++ */ ++ public enum TextAutofit { ++ /** ++ * Specifies that text within the text body should not be auto-fit to the bounding box. ++ * Auto-fitting is when text within a text box is scaled in order to remain inside ++ * the text box. ++ */ ++ NONE, ++ /** ++ * Specifies that text within the text body should be normally auto-fit to the bounding box. ++ * Autofitting is when text within a text box is scaled in order to remain inside the text box. ++ * ++ *

++ * Example: Consider the situation where a user is building a diagram and needs ++ * to have the text for each shape that they are using stay within the bounds of the shape. ++ * An easy way this might be done is by using NORMAL autofit ++ *

++ */ ++ NORMAL, ++ /** ++ * Specifies that a shape should be auto-fit to fully contain the text described within it. ++ * Auto-fitting is when text within a shape is scaled in order to contain all the text inside. ++ * ++ *

++ * Example: Consider the situation where a user is building a diagram and needs to have ++ * the text for each shape that they are using stay within the bounds of the shape. ++ * An easy way this might be done is by using SHAPE autofit ++ *

++ */ ++ SHAPE ++ } ++ ++ /** ++ * @return text shape margin ++ */ ++ Insets2D getInsets(); ++ ++ /** ++ * Compute the cumulative height occupied by the text ++ */ ++ double getTextHeight(); ++ ++ /** ++ * Returns the type of vertical alignment for the text. ++ * ++ * @return the type of vertical alignment ++ */ ++ VerticalAlignment getVerticalAlignment(); ++ ++ /** ++ * Returns if the text is centered. ++ * If true and if the individual paragraph settings allow it, ++ * the whole text block will be displayed centered, i.e. its left and right ++ * margin will be maximized while still keeping the alignment of the paragraphs ++ * ++ * @return true, if the text anchor is horizontal centered ++ */ ++ boolean isHorizontalCentered(); ++ ++ /** ++ * @return whether to wrap words within the bounding rectangle ++ */ ++ boolean getWordWrap(); ++ ++ /** ++ * @return vertical orientation of the text ++ */ ++ TextDirection getTextDirection(); ++} diff --cc src/java/org/apache/poi/sl/usermodel/VerticalAlignment.java index 0000000000,0000000000..540bf2ed51 new file mode 100644 --- /dev/null +++ b/src/java/org/apache/poi/sl/usermodel/VerticalAlignment.java @@@ -1,0 -1,0 +1,71 @@@ ++/* ++ * ==================================================================== ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ==================================================================== ++ */ ++package org.apache.poi.sl.usermodel; ++ ++/** ++ * Specifies a list of available anchoring types for text ++ * ++ * @author Yegor Kozlov ++ */ ++public enum VerticalAlignment { ++ /** ++ * Anchor the text at the top of the bounding rectangle ++ */ ++ TOP, ++ ++ /** ++ * Anchor the text at the middle of the bounding rectangle ++ */ ++ MIDDLE, ++ ++ /** ++ * Anchor the text at the bottom of the bounding rectangle. ++ */ ++ BOTTOM, ++ ++ /** ++ * Anchor the text so that it is justified vertically. ++ *

++ * When text is horizontal, this spaces out the actual lines of ++ * text and is almost always identical in behavior to ++ * {@link #DISTRIBUTED} (special case: if only 1 line, then anchored at top). ++ *

++ *

++ * When text is vertical, then it justifies the letters ++ * vertically. This is different than {@link #DISTRIBUTED}, ++ * because in some cases such as very little text in a line, ++ * it will not justify. ++ *

++ */ ++ JUSTIFIED, ++ ++ /** ++ * Anchor the text so that it is distributed vertically. ++ *

++ * When text is horizontal, this spaces out the actual lines ++ * of text and is almost always identical in behavior to ++ * {@link #JUSTIFIED} (special case: if only 1 line, then anchored in middle). ++ *

++ *

++ * When text is vertical, then it distributes the letters vertically. ++ * This is different than {@link #JUSTIFIED}, because it always forces distribution ++ * of the words, even if there are only one or two words in a line. ++ */ ++ DISTRIBUTED ++} diff --cc src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java index 6d66caefe0,8cf3aca1b6..35f30a36d0 --- a/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java @@@ -259,6 -259,107 +259,107 @@@ public class TestXSLFBugs ss.setSlideOrder(slide, 2); validateSlides(ss, true, "Slide1","Slide2","New slide"); } + + /** + * When working with >9 images, make sure the sorting ensures + * that image10.foo isn't between image1.foo and image2.foo + */ + @Test + public void test57552() throws Exception { + XMLSlideShow ss = new XMLSlideShow(); + for (String s : new String[]{"Slide1","Slide2"}) { + ss.createSlide().createTextBox().setText(s); + } + + // Slide starts with just layout relation - XSLFSlide slide = ss.getSlides()[0]; ++ XSLFSlide slide = ss.getSlides().get(0); + assertEquals(0, ss.getAllPictures().size()); - assertEquals(1, slide.getShapes().length); ++ assertEquals(1, slide.getShapes().size()); + + assertEquals(1, slide.getRelations().size()); + assertRelationEquals(XSLFRelation.SLIDE_LAYOUT, slide.getRelations().get(0)); + + // Some dummy pictures + byte[][] pics = new byte[15][3]; + for (int i=0; i0x3D40 + * EMF signature is {@code 0x3D40} or {@code 0x3D50} * - * @return EMF signature (0x3D40) + * @return EMF signature ({@code 0x3D40} or {@code 0x3D50}) */ - public int getSignature() { + public int getSignature(){ - return 0x3D40; + return (uidInstanceCount == 1 ? 0x3D40 : 0x3D50); + } + + /** + * Sets the EMF signature - either {@code 0x3D40} or {@code 0x3D50} + */ + public void setSignature(int signature) { + switch (signature) { + case 0x3D40: + uidInstanceCount = 1; + break; + case 0x3D50: + uidInstanceCount = 2; + break; + default: + throw new IllegalArgumentException(signature+" is not a valid instance/signature value for EMF"); + } } + + public String getContentType() { + return "image/x-emf"; + } } diff --cc src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java index 08ba5ceb98,836a7b9c8f..ed436beb28 --- a/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java @@@ -26,24 -26,60 +26,64 @@@ import org.apache.poi.hslf.usermodel.HS */ public final class JPEG extends Bitmap { + public enum ColorSpace { rgb, cymk }; + + private ColorSpace colorSpace = ColorSpace.rgb; + /** * @return type of this picture - * @see org.apache.poi.hslf.model.Picture#JPEG + * @see org.apache.poi.hslf.usermodel.HSLFPictureShape#JPEG */ public int getType(){ - return Picture.JPEG; + return HSLFPictureShape.JPEG; } + public ColorSpace getColorSpace() { + return colorSpace; + } + + public void setColorSpace(ColorSpace colorSpace) { + this.colorSpace = colorSpace; + } + /** - * JPEG signature is 0x46A0 + * JPEG signature is one of {@code 0x46A0, 0x46B0, 0x6E20, 0x6E30} * - * @return JPEG signature (0x46A0) + * @return JPEG signature ({@code 0x46A0, 0x46B0, 0x6E20, 0x6E30}) */ public int getSignature(){ - return 0x46A0; + return (colorSpace == ColorSpace.rgb) + ? (uidInstanceCount == 1 ? 0x46A0 : 0x46B0) + : (uidInstanceCount == 1 ? 0x6E20 : 0x6E30); + } + + /** + * Sets the PICT signature - either {@code 0x5420} or {@code 0x5430} + */ + public void setSignature(int signature) { + switch (signature) { + case 0x46A0: + uidInstanceCount = 1; + colorSpace = ColorSpace.rgb; + break; + case 0x46B0: + uidInstanceCount = 2; + colorSpace = ColorSpace.rgb; + break; + case 0x6E20: + uidInstanceCount = 1; + colorSpace = ColorSpace.cymk; + break; + case 0x6E30: + uidInstanceCount = 2; + colorSpace = ColorSpace.cymk; + break; + default: + throw new IllegalArgumentException(signature+" is not a valid instance/signature value for JPEG"); + } - } + } + + public String getContentType() { + return "image/jpeg"; + } } diff --cc src/scratchpad/src/org/apache/poi/hslf/blip/PICT.java index 016c50f875,848d994422..bebbcf450f --- a/src/scratchpad/src/org/apache/poi/hslf/blip/PICT.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/PICT.java @@@ -109,16 -105,27 +105,32 @@@ public final class PICT extends Metafil } /** - * PICT signature is 0x5430 + * PICT signature is {@code 0x5420} or {@code 0x5430} * - * @return PICT signature (0x5430) + * @return PICT signature ({@code 0x5420} or {@code 0x5430}) */ public int getSignature(){ - return 0x5430; + return (uidInstanceCount == 1 ? 0x5420 : 0x5430); + } + + /** + * Sets the PICT signature - either {@code 0x5420} or {@code 0x5430} + */ + public void setSignature(int signature) { + switch (signature) { + case 0x5420: + uidInstanceCount = 1; + break; + case 0x5430: + uidInstanceCount = 2; + break; + default: + throw new IllegalArgumentException(signature+" is not a valid instance/signature value for PICT"); + } } + + public String getContentType() { + return "image/x-pict"; + } + } diff --cc src/scratchpad/src/org/apache/poi/hslf/blip/PNG.java index 114b736bfa,b0a08d3a5e..cd61a9bd6a --- a/src/scratchpad/src/org/apache/poi/hslf/blip/PNG.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/PNG.java @@@ -53,15 -53,27 +53,31 @@@ public final class PNG extends Bitmap } /** - * PNG signature is 0x6E00 + * PNG signature is {@code 0x6E00} or {@code 0x6E10} * - * @return PNG signature (0x6E00) + * @return PNG signature ({@code 0x6E00} or {@code 0x6E10}) */ public int getSignature(){ - return 0x6E00; + return (uidInstanceCount == 1 ? 0x6E00 : 0x6E10); + } + + /** + * Sets the PNG signature - either {@code 0x6E00} or {@code 0x6E10} + */ + public void setSignature(int signature) { + switch (signature) { + case 0x6E00: + uidInstanceCount = 1; + break; + case 0x6E10: + uidInstanceCount = 2; + break; + default: + throw new IllegalArgumentException(signature+" is not a valid instance/signature value for PNG"); + } } + + public String getContentType() { + return "image/png"; + } } diff --cc src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java index 3954f6b487,5e122d94ef..e098d4083f --- a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java +++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java @@@ -17,13 -17,17 +17,19 @@@ package org.apache.poi.hslf.dev; - import java.io.*; - - import org.apache.poi.poifs.filesystem.POIFSFileSystem; + import java.io.File; + import java.io.IOException; + import java.io.InputStream; + + import org.apache.poi.ddf.DefaultEscherRecordFactory; + import org.apache.poi.ddf.EscherContainerRecord; + import org.apache.poi.ddf.EscherRecord; + import org.apache.poi.ddf.EscherTextboxRecord; + import org.apache.poi.hslf.record.RecordTypes; import org.apache.poi.poifs.filesystem.DocumentEntry; - import org.apache.poi.ddf.*; + import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; +import org.apache.poi.hslf.record.HSLFEscherRecordFactory; +import org.apache.poi.hslf.record.RecordTypes; import org.apache.poi.util.LittleEndian; /** diff --cc src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java index 260eebd60f,45ca0ce631..8396ae1234 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java @@@ -17,15 -17,22 +17,18 @@@ package org.apache.poi.hslf.extractor; +import java.io.*; + import java.io.File; + import java.io.IOException; + import java.io.InputStream; import java.util.ArrayList; import java.util.List; -import org.apache.poi.hslf.model.TextRun; -import org.apache.poi.hslf.record.CString; -import org.apache.poi.hslf.record.Record; -import org.apache.poi.hslf.record.RecordTypes; -import org.apache.poi.hslf.record.StyleTextPropAtom; -import org.apache.poi.hslf.record.TextBytesAtom; -import org.apache.poi.hslf.record.TextCharsAtom; -import org.apache.poi.hslf.record.TextHeaderAtom; +import org.apache.poi.hslf.record.*; +import org.apache.poi.hslf.usermodel.HSLFTextParagraph; +import org.apache.poi.hslf.usermodel.HSLFTextShape; import org.apache.poi.poifs.filesystem.DocumentEntry; - import org.apache.poi.poifs.filesystem.POIFSFileSystem; + import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; import org.apache.poi.util.LittleEndian; /** diff --cc src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java index 230a6401d2,0000000000..aa7e8a32eb mode 100644,000000..100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java @@@ -1,220 -1,0 +1,234 @@@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hslf.usermodel; + +import java.io.IOException; +import java.io.OutputStream; +import java.security.MessageDigest; + +import org.apache.poi.hslf.blip.*; +import org.apache.poi.poifs.crypt.CryptoFunctions; +import org.apache.poi.poifs.crypt.HashAlgorithm; +import org.apache.poi.sl.usermodel.PictureData; +import org.apache.poi.util.*; + +/** + * A class that represents image data contained in a slide show. + * + * @author Yegor Kozlov + */ +public abstract class HSLFPictureData implements PictureData { + + protected POILogger logger = POILogFactory.getLogger(this.getClass()); + + /** + * Size of the image checksum calculated using MD5 algorithm. + */ + protected static final int CHECKSUM_SIZE = 16; + + /** + * Binary data of the picture + */ + private byte[] rawdata; + /** + * The offset to the picture in the stream + */ + protected int offset; + ++ /** ++ * The instance type/signatures defines if one or two UID instances will be included ++ */ ++ protected int uidInstanceCount = 1; ++ + /** + * Returns type of this picture. + * Must be one of the static constants defined in the Picture class. + * + * @return type of this picture. + */ + public abstract int getType(); + + + /** + * Returns content type (mime type) of this picture. + * + * @return content type of this picture. + */ + public abstract String getContentType(); + + /** + * Returns the binary data of this Picture + * @return picture data + */ + public abstract byte[] getData(); + + /** + * Set picture data + */ + public abstract void setData(byte[] data) throws IOException; + + /** + * Blip signature. + */ + protected abstract int getSignature(); + ++ public abstract void setSignature(int signature); ++ ++ /** ++ * The instance type/signatures defines if one or two UID instances will be included ++ */ ++ protected int getUIDInstanceCount() { ++ return uidInstanceCount; ++ } ++ + /** + * Returns the raw binary data of this Picture excluding the first 8 bytes + * which hold image signature and size of the image data. + * + * @return picture data + */ + public byte[] getRawData(){ + return rawdata; + } + + public void setRawData(byte[] data){ + rawdata = data; + } + + /** + * File offset in the 'Pictures' stream + * + * @return offset in the 'Pictures' stream + */ + public int getOffset(){ + return offset; + } + + /** + * Set offset of this picture in the 'Pictures' stream. + * We need to set it when a new picture is created. + * + * @param offset in the 'Pictures' stream + */ + public void setOffset(int offset){ + this.offset = offset; + } + + /** + * Returns 16-byte checksum of this picture + */ + public byte[] getUID(){ + byte[] uid = new byte[16]; + System.arraycopy(rawdata, 0, uid, 0, uid.length); + return uid; + } + + + /** + * Compute 16-byte checksum of this picture using MD5 algorithm. + */ + public static byte[] getChecksum(byte[] data) { + MessageDigest md5 = CryptoFunctions.getMessageDigest(HashAlgorithm.md5); + md5.update(data); + return md5.digest(); + } + + /** + * Write this picture into OutputStream + */ + public void write(OutputStream out) throws IOException { + byte[] data; + + data = new byte[LittleEndian.SHORT_SIZE]; + LittleEndian.putUShort(data, 0, getSignature()); + out.write(data); + + data = new byte[LittleEndian.SHORT_SIZE]; + LittleEndian.putUShort(data, 0, getType() + 0xF018); + out.write(data); + + byte[] rawdata = getRawData(); + + data = new byte[LittleEndian.INT_SIZE]; + LittleEndian.putInt(data, 0, rawdata.length); + out.write(data); + + out.write(rawdata); + } + + /** + * Create an instance of PictureData by type. + * + * @param type type of the picture data. + * Must be one of the static constants defined in the Picture class. + * @return concrete instance of PictureData + */ + public static HSLFPictureData create(int type){ + HSLFPictureData pict; + switch (type){ + case HSLFPictureShape.EMF: + pict = new EMF(); + break; + case HSLFPictureShape.WMF: + pict = new WMF(); + break; + case HSLFPictureShape.PICT: + pict = new PICT(); + break; + case HSLFPictureShape.JPEG: + pict = new JPEG(); + break; + case HSLFPictureShape.PNG: + pict = new PNG(); + break; + case HSLFPictureShape.DIB: + pict = new DIB(); + break; + default: + throw new IllegalArgumentException("Unsupported picture type: " + type); + } + return pict; + } + + /** + * Return 24 byte header which preceeds the actual picture data. + *

+ * The header consists of 2-byte signature, 2-byte type, + * 4-byte image size and 16-byte checksum of the image data. + *

+ * + * @return the 24 byte header which preceeds the actual picture data. + */ + public byte[] getHeader() { + byte[] header = new byte[16 + 8]; + LittleEndian.putInt(header, 0, getSignature()); + LittleEndian.putInt(header, 4, getRawData().length); + System.arraycopy(rawdata, 0, header, 8, 16); + return header; + } + + /** + * Return image size in bytes + * + * @return the size of the picture in bytes + * @deprecated Use getData().length instead. + */ + public int getSize(){ + return getData().length; + } +} diff --cc src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShape.java index 9288052c66,0000000000..2ecb7efe91 mode 100644,000000..100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShape.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShape.java @@@ -1,514 -1,0 +1,515 @@@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hslf.usermodel; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.geom.Rectangle2D; +import java.util.Iterator; + +import org.apache.poi.ddf.*; +import org.apache.poi.hslf.record.ColorSchemeAtom; +import org.apache.poi.hslf.record.RecordTypes; +import org.apache.poi.sl.usermodel.*; +import org.apache.poi.util.*; + +/** + *

+ * Represents a Shape which is the elemental object that composes a drawing. + * This class is a wrapper around EscherSpContainer which holds all information + * about a shape in PowerPoint document. + *

+ *

+ * When you add a shape, you usually specify the dimensions of the shape and the position + * of the upper'left corner of the bounding box for the shape relative to the upper'left + * corner of the page, worksheet, or slide. Distances in the drawing layer are measured + * in points (72 points = 1 inch). + *

+ *

+ * + * @author Yegor Kozlov + */ +public abstract class HSLFShape implements Shape { + + // For logging + protected POILogger logger = POILogFactory.getLogger(this.getClass()); + + /** + * In Escher absolute distances are specified in + * English Metric Units (EMUs), occasionally referred to as A units; + * there are 360000 EMUs per centimeter, 914400 EMUs per inch, 12700 EMUs per point. + */ + public static final int EMU_PER_INCH = 914400; + public static final int EMU_PER_POINT = 12700; + public static final int EMU_PER_CENTIMETER = 360000; + + /** + * Master DPI (576 pixels per inch). + * Used by the reference coordinate system in PowerPoint. + */ + public static final int MASTER_DPI = 576; + + /** + * Pixels DPI (96 pixels per inch) + */ + public static final int PIXEL_DPI = 96; + + /** + * Points DPI (72 pixels per inch) + */ + public static final int POINT_DPI = 72; + + /** + * Either EscherSpContainer or EscheSpgrContainer record + * which holds information about this shape. + */ + protected EscherContainerRecord _escherContainer; + + /** + * Parent of this shape. + * null for the topmost shapes. + */ + protected ShapeContainer _parent; + + /** + * The Sheet this shape belongs to + */ + protected HSLFSheet _sheet; + + /** + * Fill + */ + protected HSLFFill _fill; + + /** + * Create a Shape object. This constructor is used when an existing Shape is read from from a PowerPoint document. + * + * @param escherRecord EscherSpContainer container which holds information about this shape + * @param parent the parent of this Shape + */ + protected HSLFShape(EscherContainerRecord escherRecord, ShapeContainer parent){ + _escherContainer = escherRecord; + _parent = parent; + } + + /** + * Creates the lowerlevel escher records for this shape. + */ + protected abstract EscherContainerRecord createSpContainer(boolean isChild); + + /** + * @return the parent of this shape + */ + public ShapeContainer getParent(){ + return _parent; + } + + /** + * @return name of the shape. + */ + public String getShapeName(){ + return getShapeType().nativeName; + } + + /** + * @return type of the shape. + * @see org.apache.poi.hslf.record.RecordTypes + */ + public ShapeType getShapeType(){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + return ShapeType.forId(spRecord.getShapeType(), false); + } + + /** + * @param type type of the shape. + * @see org.apache.poi.hslf.record.RecordTypes + */ + public void setShapeType(ShapeType type){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + spRecord.setShapeType( (short) type.nativeId ); + spRecord.setVersion( (short) 0x2 ); + } + + /** + * Returns the anchor (the bounding box rectangle) of this shape. + * All coordinates are expressed in points (72 dpi). + * + * @return the anchor of this shape + */ + public java.awt.Rectangle getAnchor(){ + Rectangle2D anchor2d = getAnchor2D(); + return anchor2d.getBounds(); + } + + /** + * Returns the anchor (the bounding box rectangle) of this shape. + * All coordinates are expressed in points (72 dpi). + * + * @return the anchor of this shape + */ + public Rectangle2D getAnchor2D(){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + int flags = spRecord.getFlags(); + int x,y,w,h; + EscherChildAnchorRecord childRec = getEscherChild(EscherChildAnchorRecord.RECORD_ID); + boolean useChildRec = ((flags & EscherSpRecord.FLAG_CHILD) != 0); + if (useChildRec && childRec != null){ + x = childRec.getDx1(); + y = childRec.getDy1(); + w = childRec.getDx2()-childRec.getDx1(); + h = childRec.getDy2()-childRec.getDy1(); + } else { + if (useChildRec) { + logger.log(POILogger.WARN, "EscherSpRecord.FLAG_CHILD is set but EscherChildAnchorRecord was not found"); + } + EscherClientAnchorRecord clientRec = getEscherChild(EscherClientAnchorRecord.RECORD_ID); + x = clientRec.getFlag(); + y = clientRec.getCol1(); + w = clientRec.getDx1()-clientRec.getFlag(); + h = clientRec.getRow1()-clientRec.getCol1(); + } + ++ // TODO: find out where this -1 value comes from at #57820 (link to ms docs?) + Rectangle2D anchor = new Rectangle2D.Float( - (float)Units.masterToPoints(x), - (float)Units.masterToPoints(y), - (float)Units.masterToPoints(w), - (float)Units.masterToPoints(h) ++ (float)(x == -1 ? -1 : Units.masterToPoints(x)), ++ (float)(y == -1 ? -1 : Units.masterToPoints(y)), ++ (float)(w == -1 ? -1 : Units.masterToPoints(w)), ++ (float)(h == -1 ? -1 : Units.masterToPoints(h)) + ); + + return anchor; + } + + /** + * Sets the anchor (the bounding box rectangle) of this shape. + * All coordinates should be expressed in points (72 dpi). + * + * @param anchor new anchor + */ + public void setAnchor(Rectangle2D anchor){ + int x = Units.pointsToMaster(anchor.getX()); + int y = Units.pointsToMaster(anchor.getY()); + int w = Units.pointsToMaster(anchor.getWidth() + anchor.getX()); + int h = Units.pointsToMaster(anchor.getHeight() + anchor.getY()); + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + int flags = spRecord.getFlags(); + if ((flags & EscherSpRecord.FLAG_CHILD) != 0){ + EscherChildAnchorRecord rec = (EscherChildAnchorRecord)getEscherChild(EscherChildAnchorRecord.RECORD_ID); + rec.setDx1(x); + rec.setDy1(y); + rec.setDx2(w); + rec.setDy2(h); + } else { + EscherClientAnchorRecord rec = (EscherClientAnchorRecord)getEscherChild(EscherClientAnchorRecord.RECORD_ID); + rec.setFlag((short)x); + rec.setCol1((short)y); + rec.setDx1((short)w); + rec.setRow1((short)h); + } + + } + + /** + * Moves the top left corner of the shape to the specified point. + * + * @param x the x coordinate of the top left corner of the shape + * @param y the y coordinate of the top left corner of the shape + */ + public void moveTo(float x, float y){ + Rectangle2D anchor = getAnchor2D(); + anchor.setRect(x, y, anchor.getWidth(), anchor.getHeight()); + setAnchor(anchor); + } + + /** + * Helper method to return escher child by record ID + * + * @return escher record or null if not found. + */ + public static T getEscherChild(EscherContainerRecord owner, int recordId){ + return owner.getChildById((short)recordId); + } + + public T getEscherChild(int recordId){ + return _escherContainer.getChildById((short)recordId); + } + + /** + * Returns escher property by id. + * + * @return escher property or null if not found. + */ + public static T getEscherProperty(EscherOptRecord opt, int propId){ + if (opt == null) return null; + return opt.lookup(propId); + } + + /** + * Set an escher property for this shape. + * + * @param opt The opt record to set the properties to. + * @param propId The id of the property. One of the constants defined in EscherOptRecord. + * @param value value of the property. If value = -1 then the property is removed. + */ + public static void setEscherProperty(EscherOptRecord opt, short propId, int value){ + java.util.List props = opt.getEscherProperties(); + for ( Iterator iterator = props.iterator(); iterator.hasNext(); ) { + if (iterator.next().getPropertyNumber() == propId){ + iterator.remove(); + break; + } + } + if (value != -1) { + opt.addEscherProperty(new EscherSimpleProperty(propId, value)); + opt.sortProperties(); + } + } + + /** + * Set an simple escher property for this shape. + * + * @param propId The id of the property. One of the constants defined in EscherOptRecord. + * @param value value of the property. If value = -1 then the property is removed. + */ + public void setEscherProperty(short propId, int value){ + EscherOptRecord opt = getEscherOptRecord(); + setEscherProperty(opt, propId, value); + } + + /** + * Get the value of a simple escher property for this shape. + * + * @param propId The id of the property. One of the constants defined in EscherOptRecord. + */ + public int getEscherProperty(short propId){ + EscherOptRecord opt = getEscherOptRecord(); + EscherSimpleProperty prop = getEscherProperty(opt, propId); + return prop == null ? 0 : prop.getPropertyValue(); + } + + /** + * Get the value of a simple escher property for this shape. + * + * @param propId The id of the property. One of the constants defined in EscherOptRecord. + */ + public int getEscherProperty(short propId, int defaultValue){ + EscherOptRecord opt = getEscherOptRecord(); + EscherSimpleProperty prop = getEscherProperty(opt, propId); + return prop == null ? defaultValue : prop.getPropertyValue(); + } + + /** + * @return The shape container and it's children that can represent this + * shape. + */ + public EscherContainerRecord getSpContainer(){ + return _escherContainer; + } + + /** + * Event which fires when a shape is inserted in the sheet. + * In some cases we need to propagate changes to upper level containers. + *
+ * Default implementation does nothing. + * + * @param sh - owning shape + */ + protected void afterInsert(HSLFSheet sh){ + if(_fill != null) { + _fill.afterInsert(sh); + } + } + + /** + * @return the SlideShow this shape belongs to + */ + public HSLFSheet getSheet(){ + return _sheet; + } + + /** + * Assign the SlideShow this shape belongs to + * + * @param sheet owner of this shape + */ + public void setSheet(HSLFSheet sheet){ + _sheet = sheet; + } + + Color getColor(short colorProperty, short opacityProperty, int defaultColor){ + EscherOptRecord opt = getEscherOptRecord(); + EscherSimpleProperty p = getEscherProperty(opt, colorProperty); + if(p == null && defaultColor == -1) return null; + + int val = (p == null) ? defaultColor : p.getPropertyValue(); + + EscherColorRef ecr = new EscherColorRef(val); + + boolean fPaletteIndex = ecr.hasPaletteIndexFlag(); + boolean fPaletteRGB = ecr.hasPaletteRGBFlag(); + boolean fSystemRGB = ecr.hasSystemRGBFlag(); + boolean fSchemeIndex = ecr.hasSchemeIndexFlag(); + boolean fSysIndex = ecr.hasSysIndexFlag(); + + int rgb[] = ecr.getRGB(); + + HSLFSheet sheet = getSheet(); + if (fSchemeIndex && sheet != null) { + //red is the index to the color scheme + ColorSchemeAtom ca = sheet.getColorScheme(); + int schemeColor = ca.getColor(ecr.getSchemeIndex()); + + rgb[0] = (schemeColor >> 0) & 0xFF; + rgb[1] = (schemeColor >> 8) & 0xFF; + rgb[2] = (schemeColor >> 16) & 0xFF; + } else if (fPaletteIndex){ + //TODO + } else if (fPaletteRGB){ + //TODO + } else if (fSystemRGB){ + //TODO + } else if (fSysIndex){ + //TODO + } + + double alpha = getAlpha(opacityProperty); + return new Color(rgb[0], rgb[1], rgb[2], (int)(alpha*255.0)); + } + + double getAlpha(short opacityProperty) { + EscherOptRecord opt = getEscherOptRecord(); + EscherSimpleProperty op = getEscherProperty(opt, opacityProperty); + int defaultOpacity = 0x00010000; + int opacity = (op == null) ? defaultOpacity : op.getPropertyValue(); + return Units.fixedPointToDouble(opacity); + } + + Color toRGB(int val){ + int a = (val >> 24) & 0xFF; + int b = (val >> 16) & 0xFF; + int g = (val >> 8) & 0xFF; + int r = (val >> 0) & 0xFF; + + if(a == 0xFE){ + // Color is an sRGB value specified by red, green, and blue fields. + } else if (a == 0xFF){ + // Color is undefined. + } else { + // index in the color scheme + ColorSchemeAtom ca = getSheet().getColorScheme(); + int schemeColor = ca.getColor(a); + + r = (schemeColor >> 0) & 0xFF; + g = (schemeColor >> 8) & 0xFF; + b = (schemeColor >> 16) & 0xFF; + } + return new Color(r, g, b); + } + + /** + * @return id for the shape. + */ + public int getShapeId(){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + return spRecord == null ? 0 : spRecord.getShapeId(); + } + + /** + * Sets shape ID + * + * @param id of the shape + */ + public void setShapeId(int id){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + if(spRecord != null) spRecord.setShapeId(id); + } + + /** + * Fill properties of this shape + * + * @return fill properties of this shape + */ + public HSLFFill getFill(){ + if(_fill == null) { + _fill = new HSLFFill(this); + } + return _fill; + } + + public FillStyle getFillStyle() { + return getFill().getFillStyle(); + } + + /** + * Returns the hyperlink assigned to this shape + * + * @return the hyperlink assigned to this shape + * or null if not found. + */ + public HSLFHyperlink getHyperlink(){ + return HSLFHyperlink.find(this); + } + + public void draw(Graphics2D graphics){ + logger.log(POILogger.INFO, "Rendering " + getShapeName()); + } + + public EscherOptRecord getEscherOptRecord() { + EscherOptRecord opt = getEscherChild(EscherOptRecord.RECORD_ID); + if (opt == null) { + opt = getEscherChild(RecordTypes.EscherUserDefined); + } + return opt; + } + + public boolean getFlipHorizontal(){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + return (spRecord.getFlags()& EscherSpRecord.FLAG_FLIPHORIZ) != 0; + } + + public void setFlipHorizontal(boolean flip) { + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + int flag = spRecord.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ; + spRecord.setFlags(flag); + } + + public boolean getFlipVertical(){ + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + return (spRecord.getFlags()& EscherSpRecord.FLAG_FLIPVERT) != 0; + } + + public void setFlipVertical(boolean flip) { + EscherSpRecord spRecord = getEscherChild(EscherSpRecord.RECORD_ID); + int flag = spRecord.getFlags() | EscherSpRecord.FLAG_FLIPVERT; + spRecord.setFlags(flag); + } + + public double getRotation(){ + int rot = getEscherProperty(EscherProperties.TRANSFORM__ROTATION); + return Units.fixedPointToDouble(rot); + } + + public void setRotation(double theta){ + int rot = Units.doubleToFixedPoint(theta % 360.0); + setEscherProperty(EscherProperties.TRANSFORM__ROTATION, rot); + } + + public boolean isPlaceholder() { + return false; + } +} diff --cc src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java index ec5f735d17,0000000000..34638f6309 mode 100644,000000..100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java @@@ -1,806 -1,0 +1,798 @@@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hslf.usermodel; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.security.GeneralSecurityException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; +import java.util.NavigableMap; +import java.util.TreeMap; + +import org.apache.poi.POIDocument; +import org.apache.poi.hpsf.PropertySet; +import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException; +import org.apache.poi.hslf.exceptions.HSLFException; +import org.apache.poi.hslf.record.CurrentUserAtom; +import org.apache.poi.hslf.record.DocumentEncryptionAtom; +import org.apache.poi.hslf.record.ExOleObjStg; +import org.apache.poi.hslf.record.PersistPtrHolder; +import org.apache.poi.hslf.record.PersistRecord; +import org.apache.poi.hslf.record.PositionDependentRecord; +import org.apache.poi.hslf.record.Record; +import org.apache.poi.hslf.record.RecordTypes; +import org.apache.poi.hslf.record.UserEditAtom; +import org.apache.poi.poifs.crypt.cryptoapi.CryptoAPIEncryptor; +import org.apache.poi.poifs.filesystem.DirectoryNode; +import org.apache.poi.poifs.filesystem.DocumentEntry; +import org.apache.poi.poifs.filesystem.DocumentInputStream; +import org.apache.poi.poifs.filesystem.EntryUtils; +import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; +import org.apache.poi.util.LittleEndian; +import org.apache.poi.util.POILogFactory; +import org.apache.poi.util.POILogger; + +/** + * This class contains the main functionality for the Powerpoint file + * "reader". It is only a very basic class for now + * + * @author Nick Burch + */ +public final class HSLFSlideShowImpl extends POIDocument { + public static final int UNSET_OFFSET = -1; + + // For logging + private POILogger logger = POILogFactory.getLogger(this.getClass()); + + // Holds metadata on where things are in our document + private CurrentUserAtom currentUser; + + // Low level contents of the file + private byte[] _docstream; + + // Low level contents + private Record[] _records; + + // Raw Pictures contained in the pictures stream + private List _pictures; + + // Embedded objects stored in storage records in the document stream, lazily populated. + private HSLFObjectData[] _objects; + - /** - * Returns the underlying POIFSFileSystem for the document - * that is open. - */ - protected POIFSFileSystem getPOIFSFileSystem() { - return directory.getFileSystem(); - } - + /** + * Returns the directory in the underlying POIFSFileSystem for the + * document that is open. + */ + protected DirectoryNode getPOIFSDirectory() { + return directory; + } + + /** + * Constructs a Powerpoint document from fileName. Parses the document + * and places all the important stuff into data structures. + * + * @param fileName The name of the file to read. + * @throws IOException if there is a problem while parsing the document. + */ + public HSLFSlideShowImpl(String fileName) throws IOException + { + this(new FileInputStream(fileName)); + } + + /** + * Constructs a Powerpoint document from an input stream. Parses the + * document and places all the important stuff into data structures. + * + * @param inputStream the source of the data + * @throws IOException if there is a problem while parsing the document. + */ + public HSLFSlideShowImpl(InputStream inputStream) throws IOException { + //do Ole stuff + this(new POIFSFileSystem(inputStream)); + } + + /** + * Constructs a Powerpoint document from a POIFS Filesystem. Parses the + * document and places all the important stuff into data structures. + * + * @param filesystem the POIFS FileSystem to read from + * @throws IOException if there is a problem while parsing the document. + */ + public HSLFSlideShowImpl(POIFSFileSystem filesystem) throws IOException + { + this(filesystem.getRoot()); + } + + /** + * Constructs a Powerpoint document from a POIFS Filesystem. Parses the + * document and places all the important stuff into data structures. + * + * @param filesystem the POIFS FileSystem to read from + * @throws IOException if there is a problem while parsing the document. + */ + public HSLFSlideShowImpl(NPOIFSFileSystem filesystem) throws IOException + { + this(filesystem.getRoot()); + } + + /** + * Constructs a Powerpoint document from a specific point in a + * POIFS Filesystem. Parses the document and places all the + * important stuff into data structures. + * + * @deprecated Use {@link #HSLFSlideShow(DirectoryNode)} instead + * @param dir the POIFS directory to read from + * @param filesystem the POIFS FileSystem to read from + * @throws IOException if there is a problem while parsing the document. + */ + @Deprecated + public HSLFSlideShowImpl(DirectoryNode dir, POIFSFileSystem filesystem) throws IOException + { + this(dir); + } + + /** + * Constructs a Powerpoint document from a specific point in a + * POIFS Filesystem. Parses the document and places all the + * important stuff into data structures. + * + * @param dir the POIFS directory to read from + * @throws IOException if there is a problem while parsing the document. + */ + public HSLFSlideShowImpl(DirectoryNode dir) throws IOException { + super(handleDualStorage(dir)); + + // First up, grab the "Current User" stream + // We need this before we can detect Encrypted Documents + readCurrentUserStream(); + + // Next up, grab the data that makes up the + // PowerPoint stream + readPowerPointStream(); + + // Now, build records based on the PowerPoint stream + buildRecords(); + + // Look for any other streams + readOtherStreams(); + } + + private static DirectoryNode handleDualStorage(DirectoryNode dir) throws IOException { + // when there's a dual storage entry, use it, as the outer document can't be read quite probably ... + String dualName = "PP97_DUALSTORAGE"; + if (!dir.hasEntry(dualName)) return dir; + dir = (DirectoryNode)dir.getEntry(dualName); + return dir; + } + + /** + * Constructs a new, empty, Powerpoint document. + */ + public static final HSLFSlideShowImpl create() { + InputStream is = HSLFSlideShowImpl.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt"); + if (is == null) { + throw new RuntimeException("Missing resource 'empty.ppt'"); + } + try { + return new HSLFSlideShowImpl(is); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + /** + * Extracts the main PowerPoint document stream from the + * POI file, ready to be passed + * + * @throws IOException + */ + private void readPowerPointStream() throws IOException + { + // Get the main document stream + DocumentEntry docProps = + (DocumentEntry)directory.getEntry("PowerPoint Document"); + + // Grab the document stream + _docstream = new byte[docProps.getSize()]; + directory.createDocumentInputStream("PowerPoint Document").read(_docstream); + } + + /** + * Builds the list of records, based on the contents + * of the PowerPoint stream + */ + private void buildRecords() + { + // The format of records in a powerpoint file are: + // + // + // + // If it has a zero length, following it will be another record + // + // If it has a length, depending on its type it may have children or data + // If it has children, these will follow straight away + // > + // If it has data, this will come straigh after, and run for the length + // + // All lengths given exclude the 8 byte record header + // (Data records are known as Atoms) + + // Document should start with: + // 0F 00 E8 03 ## ## ## ## + // (type 1000 = document, info 00 0f is normal, rest is document length) + // 01 00 E9 03 28 00 00 00 + // (type 1001 = document atom, info 00 01 normal, 28 bytes long) + // 80 16 00 00 E0 10 00 00 xx xx xx xx xx xx xx xx + // 05 00 00 00 0A 00 00 00 xx xx xx + // (the contents of the document atom, not sure what it means yet) + // (records then follow) + + // When parsing a document, look to see if you know about that type + // of the current record. If you know it's a type that has children, + // process the record's data area looking for more records + // If you know about the type and it doesn't have children, either do + // something with the data (eg TextRun) or skip over it + // If you don't know about the type, play safe and skip over it (using + // its length to know where the next record will start) + // + + _records = read(_docstream, (int)currentUser.getCurrentEditOffset()); + } + + private Record[] read(byte[] docstream, int usrOffset){ + //sort found records by offset. + //(it is not necessary but SlideShow.findMostRecentCoreRecords() expects them sorted) + NavigableMap records = new TreeMap(); // offset -> record + Map persistIds = new HashMap(); // offset -> persistId + initRecordOffsets(docstream, usrOffset, records, persistIds); + HSLFSlideShowEncrypted decryptData = new HSLFSlideShowEncrypted(docstream, records); + + for (Map.Entry entry : records.entrySet()) { + Integer offset = entry.getKey(); + Record record = entry.getValue(); + Integer persistId = persistIds.get(offset); + if (record == null) { + // all plain records have been already added, + // only new records need to be decrypted (tbd #35897) + decryptData.decryptRecord(docstream, persistId, offset); + record = Record.buildRecordAtOffset(docstream, offset); + entry.setValue(record); + } + + if (record instanceof PersistRecord) { + ((PersistRecord)record).setPersistId(persistId); + } + } + + return records.values().toArray(new Record[records.size()]); + } + + private void initRecordOffsets(byte[] docstream, int usrOffset, NavigableMap recordMap, Map offset2id) { + while (usrOffset != 0){ + UserEditAtom usr = (UserEditAtom) Record.buildRecordAtOffset(docstream, usrOffset); + recordMap.put(usrOffset, usr); + + int psrOffset = usr.getPersistPointersOffset(); + PersistPtrHolder ptr = (PersistPtrHolder)Record.buildRecordAtOffset(docstream, psrOffset); + recordMap.put(psrOffset, ptr); + + for(Map.Entry entry : ptr.getSlideLocationsLookup().entrySet()) { + Integer offset = entry.getValue(); + Integer id = entry.getKey(); + recordMap.put(offset, null); // reserve a slot for the record + offset2id.put(offset, id); + } + + usrOffset = usr.getLastUserEditAtomOffset(); + + // check for corrupted user edit atom and try to repair it + // if the next user edit atom offset is already known, we would go into an endless loop + if (usrOffset > 0 && recordMap.containsKey(usrOffset)) { + // a user edit atom is usually located 36 byte before the smallest known record offset + usrOffset = recordMap.firstKey()-36; + // check that we really are located on a user edit atom + int ver_inst = LittleEndian.getUShort(docstream, usrOffset); + int type = LittleEndian.getUShort(docstream, usrOffset+2); + int len = LittleEndian.getInt(docstream, usrOffset+4); + if (ver_inst == 0 && type == 4085 && (len == 0x1C || len == 0x20)) { + logger.log(POILogger.WARN, "Repairing invalid user edit atom"); + usr.setLastUserEditAtomOffset(usrOffset); + } else { + throw new CorruptPowerPointFileException("Powerpoint document contains invalid user edit atom"); + } + } + } + } + + public DocumentEncryptionAtom getDocumentEncryptionAtom() { + for (Record r : _records) { + if (r instanceof DocumentEncryptionAtom) { + return (DocumentEncryptionAtom)r; + } + } + return null; + } + + + /** + * Find the "Current User" stream, and load it + */ + private void readCurrentUserStream() { + try { + currentUser = new CurrentUserAtom(directory); + } catch(IOException ie) { + logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie); + currentUser = new CurrentUserAtom(); + } + } + + /** + * Find any other streams from the filesystem, and load them + */ + private void readOtherStreams() { + // Currently, there aren't any + } + + /** + * Find and read in pictures contained in this presentation. + * This is lazily called as and when we want to touch pictures. + */ + @SuppressWarnings("unused") + private void readPictures() throws IOException { + _pictures = new ArrayList(); + + // if the presentation doesn't contain pictures - will use a null set instead + if (!directory.hasEntry("Pictures")) return; + + HSLFSlideShowEncrypted decryptData = new HSLFSlideShowEncrypted(getDocumentEncryptionAtom()); + + DocumentEntry entry = (DocumentEntry)directory.getEntry("Pictures"); + byte[] pictstream = new byte[entry.getSize()]; + DocumentInputStream is = directory.createDocumentInputStream(entry); + is.read(pictstream); + is.close(); + + + int pos = 0; + // An empty picture record (length 0) will take up 8 bytes + while (pos <= (pictstream.length-8)) { + int offset = pos; + + decryptData.decryptPicture(pictstream, offset); + + // Image signature + int signature = LittleEndian.getUShort(pictstream, pos); + pos += LittleEndian.SHORT_SIZE; + // Image type + 0xF018 + int type = LittleEndian.getUShort(pictstream, pos); + pos += LittleEndian.SHORT_SIZE; + // Image size (excluding the 8 byte header) + int imgsize = LittleEndian.getInt(pictstream, pos); + pos += LittleEndian.INT_SIZE; + + // When parsing the BStoreDelay stream, [MS-ODRAW] says that we + // should terminate if the type isn't 0xf007 or 0xf018->0xf117 + if (!((type == 0xf007) || (type >= 0xf018 && type <= 0xf117))) + break; + + // The image size must be 0 or greater + // (0 is allowed, but odd, since we do wind on by the header each + // time, so we won't get stuck) + if(imgsize < 0) { + throw new CorruptPowerPointFileException("The file contains a picture, at position " + _pictures.size() + ", which has a negatively sized data length, so we can't trust any of the picture data"); + } + + // If they type (including the bonus 0xF018) is 0, skip it + if(type == 0) { + logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length " + imgsize + ".\nYou document will probably become corrupted if you save it!"); + logger.log(POILogger.ERROR, "" + pos); + } else { + // Build the PictureData object from the data + try { + HSLFPictureData pict = HSLFPictureData.create(type - 0xF018); + + // Copy the data, ready to pass to PictureData + byte[] imgdata = new byte[imgsize]; + System.arraycopy(pictstream, pos, imgdata, 0, imgdata.length); + pict.setRawData(imgdata); + + pict.setOffset(offset); + _pictures.add(pict); + } catch(IllegalArgumentException e) { + logger.log(POILogger.ERROR, "Problem reading picture: " + e + "\nYou document will probably become corrupted if you save it!"); + } + } + + pos += imgsize; + } + } + + /** + * remove duplicated UserEditAtoms and merge PersistPtrHolder, i.e. + * remove document edit history + */ + public void normalizeRecords() { + try { + updateAndWriteDependantRecords(null, null); + } catch (IOException e) { + throw new CorruptPowerPointFileException(e); + } + _records = HSLFSlideShowEncrypted.normalizeRecords(_records); + } + + + /** + * This is a helper functions, which is needed for adding new position dependent records + * or finally write the slideshow to a file. + * + * @param os the stream to write to, if null only the references are updated + * @param interestingRecords a map of interesting records (PersistPtrHolder and UserEditAtom) + * referenced by their RecordType. Only the very last of each type will be saved to the map. + * May be null, if not needed. + * @throws IOException + */ + public void updateAndWriteDependantRecords(OutputStream os, Map interestingRecords) + throws IOException { + // For position dependent records, hold where they were and now are + // As we go along, update, and hand over, to any Position Dependent + // records we happen across + Hashtable oldToNewPositions = new Hashtable(); + + // First pass - figure out where all the position dependent + // records are going to end up, in the new scheme + // (Annoyingly, some powerpoint files have PersistPtrHolders + // that reference slides after the PersistPtrHolder) + UserEditAtom usr = null; + PersistPtrHolder ptr = null; + CountingOS cos = new CountingOS(); + for (Record record : _records) { + // all top level records are position dependent + assert(record instanceof PositionDependentRecord); + PositionDependentRecord pdr = (PositionDependentRecord)record; + int oldPos = pdr.getLastOnDiskOffset(); + int newPos = cos.size(); + pdr.setLastOnDiskOffset(newPos); + if (oldPos != UNSET_OFFSET) { + // new records don't need a mapping, as they aren't in a relation yet + oldToNewPositions.put(oldPos,newPos); + } + + // Grab interesting records as they come past + // this will only save the very last record of each type + RecordTypes.Type saveme = null; + int recordType = (int)record.getRecordType(); + if (recordType == RecordTypes.PersistPtrIncrementalBlock.typeID) { + saveme = RecordTypes.PersistPtrIncrementalBlock; + ptr = (PersistPtrHolder)pdr; + } else if (recordType == RecordTypes.UserEditAtom.typeID) { + saveme = RecordTypes.UserEditAtom; + usr = (UserEditAtom)pdr; + } + if (interestingRecords != null && saveme != null) { + interestingRecords.put(saveme,pdr); + } + + // Dummy write out, so the position winds on properly + record.writeOut(cos); + } + + assert(usr != null && ptr != null); + + Map persistIds = new HashMap(); + for (Map.Entry entry : ptr.getSlideLocationsLookup().entrySet()) { + persistIds.put(oldToNewPositions.get(entry.getValue()), entry.getKey()); + } + + HSLFSlideShowEncrypted encData = new HSLFSlideShowEncrypted(getDocumentEncryptionAtom()); + + for (Record record : _records) { + assert(record instanceof PositionDependentRecord); + // We've already figured out their new location, and + // told them that + // Tell them of the positions of the other records though + PositionDependentRecord pdr = (PositionDependentRecord)record; + Integer persistId = persistIds.get(pdr.getLastOnDiskOffset()); + if (persistId == null) persistId = 0; + + // For now, we're only handling PositionDependentRecord's that + // happen at the top level. + // In future, we'll need the handle them everywhere, but that's + // a bit trickier + pdr.updateOtherRecordReferences(oldToNewPositions); + + // Whatever happens, write out that record tree + if (os != null) { + record.writeOut(encData.encryptRecord(os, persistId, record)); + } + } + + // Update and write out the Current User atom + int oldLastUserEditAtomPos = (int)currentUser.getCurrentEditOffset(); + Integer newLastUserEditAtomPos = oldToNewPositions.get(oldLastUserEditAtomPos); + if(usr == null || newLastUserEditAtomPos == null || usr.getLastOnDiskOffset() != newLastUserEditAtomPos) { + throw new HSLFException("Couldn't find the new location of the last UserEditAtom that used to be at " + oldLastUserEditAtomPos); + } + currentUser.setCurrentEditOffset(usr.getLastOnDiskOffset()); + } + + /** + * Writes out the slideshow file the is represented by an instance + * of this class. + * It will write out the common OLE2 streams. If you require all + * streams to be written out, pass in preserveNodes + * @param out The OutputStream to write to. + * @throws IOException If there is an unexpected IOException from + * the passed in OutputStream + */ + public void write(OutputStream out) throws IOException { + // Write out, but only the common streams + write(out,false); + } + /** + * Writes out the slideshow file the is represented by an instance + * of this class. + * If you require all streams to be written out (eg Marcos, embeded + * documents), then set preserveNodes to true + * @param out The OutputStream to write to. + * @param preserveNodes Should all OLE2 streams be written back out, or only the common ones? + * @throws IOException If there is an unexpected IOException from + * the passed in OutputStream + */ + public void write(OutputStream out, boolean preserveNodes) throws IOException { + // read properties and pictures, with old encryption settings where appropriate + if(_pictures == null) { + readPictures(); + } + getDocumentSummaryInformation(); + + // set new encryption settings + HSLFSlideShowEncrypted encryptedSS = new HSLFSlideShowEncrypted(getDocumentEncryptionAtom()); + _records = encryptedSS.updateEncryptionRecord(_records); + + // Get a new Filesystem to write into + POIFSFileSystem outFS = new POIFSFileSystem(); + + // The list of entries we've written out + List writtenEntries = new ArrayList(1); + + // Write out the Property Streams + writeProperties(outFS, writtenEntries); + + BufAccessBAOS baos = new BufAccessBAOS(); + + // For position dependent records, hold where they were and now are + // As we go along, update, and hand over, to any Position Dependent + // records we happen across + updateAndWriteDependantRecords(baos, null); + + // Update our cached copy of the bytes that make up the PPT stream + _docstream = new byte[baos.size()]; + System.arraycopy(baos.getBuf(), 0, _docstream, 0, baos.size()); + + // Write the PPT stream into the POIFS layer + ByteArrayInputStream bais = new ByteArrayInputStream(_docstream); + outFS.createDocument(bais,"PowerPoint Document"); + writtenEntries.add("PowerPoint Document"); + + currentUser.setEncrypted(encryptedSS.getDocumentEncryptionAtom() != null); + currentUser.writeToFS(outFS); + writtenEntries.add("Current User"); + + + if (_pictures.size() > 0) { + BufAccessBAOS pict = new BufAccessBAOS(); + for (HSLFPictureData p : _pictures) { + int offset = pict.size(); + p.write(pict); + encryptedSS.encryptPicture(pict.getBuf(), offset); + } + outFS.createDocument( + new ByteArrayInputStream(pict.getBuf(), 0, pict.size()), "Pictures" + ); + writtenEntries.add("Pictures"); + } + + // If requested, write out any other streams we spot + if(preserveNodes) { + EntryUtils.copyNodes(directory.getFileSystem(), outFS, writtenEntries); + } + + // Send the POIFSFileSystem object out to the underlying stream + outFS.writeFilesystem(out); + } + + /** + * For a given named property entry, either return it or null if + * if it wasn't found + * + * @param setName The property to read + * @return The value of the given property or null if it wasn't found. + */ + protected PropertySet getPropertySet(String setName) { + DocumentEncryptionAtom dea = getDocumentEncryptionAtom(); + return (dea == null) + ? super.getPropertySet(setName) + : super.getPropertySet(setName, dea.getEncryptionInfo()); + } + + /** + * Writes out the standard Documment Information Properties (HPSF) + * @param outFS the POIFSFileSystem to write the properties into + * @param writtenEntries a list of POIFS entries to add the property names too + * + * @throws IOException if an error when writing to the + * {@link POIFSFileSystem} occurs + */ + protected void writeProperties(POIFSFileSystem outFS, List writtenEntries) throws IOException { + super.writeProperties(outFS, writtenEntries); + DocumentEncryptionAtom dea = getDocumentEncryptionAtom(); + if (dea != null) { + CryptoAPIEncryptor enc = (CryptoAPIEncryptor)dea.getEncryptionInfo().getEncryptor(); + try { + enc.getDataStream(outFS.getRoot()); // ignore OutputStream + } catch (IOException e) { + throw e; + } catch (GeneralSecurityException e) { + throw new IOException(e); + } + } + } + + /* ******************* adding methods follow ********************* */ + + /** + * Adds a new root level record, at the end, but before the last + * PersistPtrIncrementalBlock. + */ + public synchronized int appendRootLevelRecord(Record newRecord) { + int addedAt = -1; + Record[] r = new Record[_records.length+1]; + boolean added = false; + for(int i=(_records.length-1); i>=0; i--) { + if(added) { + // Just copy over + r[i] = _records[i]; + } else { + r[(i+1)] = _records[i]; + if(_records[i] instanceof PersistPtrHolder) { + r[i] = newRecord; + added = true; + addedAt = i; + } + } + } + _records = r; + return addedAt; + } + + /** + * Add a new picture to this presentation. + * + * @return offset of this picture in the Pictures stream + */ + public int addPicture(HSLFPictureData img) { + // Process any existing pictures if we haven't yet + if(_pictures == null) { + try { + readPictures(); + } catch(IOException e) { + throw new CorruptPowerPointFileException(e.getMessage()); + } + } + + // Add the new picture in + int offset = 0; + if(_pictures.size() > 0) { + HSLFPictureData prev = _pictures.get(_pictures.size() - 1); + offset = prev.getOffset() + prev.getRawData().length + 8; + } + img.setOffset(offset); + _pictures.add(img); + return offset; + } + + /* ******************* fetching methods follow ********************* */ + + + /** + * Returns an array of all the records found in the slideshow + */ + public Record[] getRecords() { return _records; } + + /** + * Returns an array of the bytes of the file. Only correct after a + * call to open or write - at all other times might be wrong! + */ + public byte[] getUnderlyingBytes() { return _docstream; } + + /** + * Fetch the Current User Atom of the document + */ + public CurrentUserAtom getCurrentUserAtom() { return currentUser; } + + /** + * Return array of pictures contained in this presentation + * + * @return array with the read pictures or null if the + * presentation doesn't contain pictures. + */ + public HSLFPictureData[] getPictures() { + if(_pictures == null) { + try { + readPictures(); + } catch(IOException e) { + throw new CorruptPowerPointFileException(e.getMessage()); + } + } + + return _pictures.toArray(new HSLFPictureData[_pictures.size()]); + } + + /** + * Gets embedded object data from the slide show. + * + * @return the embedded objects. + */ + public HSLFObjectData[] getEmbeddedObjects() { + if (_objects == null) { + List objects = new ArrayList(); + for (Record r : _records) { + if (r instanceof ExOleObjStg) { + objects.add(new HSLFObjectData((ExOleObjStg)r)); + } + } + _objects = objects.toArray(new HSLFObjectData[objects.size()]); + } + return _objects; + } + + + private static class BufAccessBAOS extends ByteArrayOutputStream { + public byte[] getBuf() { + return buf; + } + } + + private static class CountingOS extends OutputStream { + int count = 0; + public void write(int b) throws IOException { + count++; + } + + public void write(byte[] b) throws IOException { + count += b.length; + } + + public void write(byte[] b, int off, int len) throws IOException { + count += len; + } + + public int size() { + return count; + } + } +} diff --cc src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java index 29fdee2dc5,0000000000..d9f5b11ebe mode 100644,000000..100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java @@@ -1,362 -1,0 +1,362 @@@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hslf.usermodel; + +import org.apache.poi.ddf.*; +import org.apache.poi.hslf.model.Line; +import org.apache.poi.hslf.usermodel.*; +import org.apache.poi.sl.usermodel.ShapeContainer; +import org.apache.poi.sl.usermodel.TableShape; +import org.apache.poi.util.LittleEndian; + +import java.util.*; +import java.util.List; +import java.awt.*; + +/** + * Represents a table in a PowerPoint presentation + * + * @author Yegor Kozlov + */ +public final class HSLFTable extends HSLFGroupShape implements TableShape { + + protected static final int BORDER_TOP = 1; + protected static final int BORDER_RIGHT = 2; + protected static final int BORDER_BOTTOM = 3; + protected static final int BORDER_LEFT = 4; + + protected static final int BORDERS_ALL = 5; + protected static final int BORDERS_OUTSIDE = 6; + protected static final int BORDERS_INSIDE = 7; + protected static final int BORDERS_NONE = 8; + + + protected HSLFTableCell[][] cells; + + /** + * Create a new Table of the given number of rows and columns + * + * @param numrows the number of rows + * @param numcols the number of columns + */ + public HSLFTable(int numrows, int numcols) { + super(); + + if(numrows < 1) throw new IllegalArgumentException("The number of rows must be greater than 1"); + if(numcols < 1) throw new IllegalArgumentException("The number of columns must be greater than 1"); + + int x=0, y=0, tblWidth=0, tblHeight=0; + cells = new HSLFTableCell[numrows][numcols]; + for (int i = 0; i < cells.length; i++) { + x = 0; + for (int j = 0; j < cells[i].length; j++) { + cells[i][j] = new HSLFTableCell(this); + Rectangle anchor = new Rectangle(x, y, HSLFTableCell.DEFAULT_WIDTH, HSLFTableCell.DEFAULT_HEIGHT); + cells[i][j].setAnchor(anchor); + x += HSLFTableCell.DEFAULT_WIDTH; + } + y += HSLFTableCell.DEFAULT_HEIGHT; + } + tblWidth = x; + tblHeight = y; + setAnchor(new Rectangle(0, 0, tblWidth, tblHeight)); + + EscherContainerRecord spCont = (EscherContainerRecord) getSpContainer().getChild(0); + EscherOptRecord opt = new EscherOptRecord(); + opt.setRecordId((short)0xF122); + opt.addEscherProperty(new EscherSimpleProperty((short)0x39F, 1)); + EscherArrayProperty p = new EscherArrayProperty((short)(0x4000 | 0x3A0), false, null); + p.setSizeOfElements(0x0004); + p.setNumberOfElementsInArray(numrows); + p.setNumberOfElementsInMemory(numrows); + opt.addEscherProperty(p); + List lst = spCont.getChildRecords(); + lst.add(lst.size()-1, opt); + spCont.setChildRecords(lst); + } + + /** + * Create a Table object and initilize it from the supplied Record container. + * + * @param escherRecord EscherSpContainer container which holds information about this shape + * @param parent the parent of the shape + */ + public HSLFTable(EscherContainerRecord escherRecord, ShapeContainer parent) { + super(escherRecord, parent); + } + + /** + * Gets a cell + * + * @param row the row index (0-based) + * @param col the column index (0-based) + * @return the cell + */ + public HSLFTableCell getCell(int row, int col) { + return cells[row][col]; + } + + public int getNumberOfColumns() { + return cells[0].length; + } + public int getNumberOfRows() { + return cells.length; + } + + protected void afterInsert(HSLFSheet sh){ + super.afterInsert(sh); + + EscherContainerRecord spCont = (EscherContainerRecord) getSpContainer().getChild(0); + List lst = spCont.getChildRecords(); + EscherOptRecord opt = (EscherOptRecord)lst.get(lst.size()-2); + EscherArrayProperty p = opt.lookup(0x3A0); + for (int i = 0; i < cells.length; i++) { + HSLFTableCell cell = cells[i][0]; + int rowHeight = cell.getAnchor().height*MASTER_DPI/POINT_DPI; + byte[] val = new byte[4]; + LittleEndian.putInt(val, 0, rowHeight); + p.setElement(i, val); + for (int j = 0; j < cells[i].length; j++) { + HSLFTableCell c = cells[i][j]; + addShape(c); + + Line bt = c.getBorderTop(); + if(bt != null) addShape(bt); + + Line br = c.getBorderRight(); + if(br != null) addShape(br); + + Line bb = c.getBorderBottom(); + if(bb != null) addShape(bb); + + Line bl = c.getBorderLeft(); + if(bl != null) addShape(bl); + + } + } + + } + + protected void initTable(){ + List shapeList = getShapeList(); + + Iterator shapeIter = shapeList.iterator(); + while (shapeIter.hasNext()) { + HSLFShape shape = shapeIter.next(); + if (shape instanceof HSLFAutoShape) { + HSLFAutoShape autoShape = (HSLFAutoShape)shape; + EscherTextboxRecord etr = autoShape.getEscherChild(EscherTextboxRecord.RECORD_ID); + if (etr != null) continue; + } + shapeIter.remove(); + } + + Collections.sort(shapeList, new Comparator(){ + public int compare( HSLFShape o1, HSLFShape o2 ) { + Rectangle anchor1 = o1.getAnchor(); + Rectangle anchor2 = o2.getAnchor(); + int delta = anchor1.y - anchor2.y; + if (delta == 0) delta = anchor1.x - anchor2.x; + // descending size + if (delta == 0) delta = (anchor2.width*anchor2.height)-(anchor1.width*anchor1.height); + return delta; + } + }); + - int y0 = -1; ++ int y0 = (shapeList.isEmpty()) ? -1 : shapeList.get(0).getAnchor().y - 1; + int maxrowlen = 0; + List> lst = new ArrayList>(); + List row = null; + for (HSLFShape sh : shapeList) { + if(sh instanceof HSLFTextShape){ + Rectangle anchor = sh.getAnchor(); + if(anchor.y != y0){ + y0 = anchor.y; + row = new ArrayList(); + lst.add(row); + } + row.add(sh); + maxrowlen = Math.max(maxrowlen, row.size()); + } + } + cells = new HSLFTableCell[lst.size()][maxrowlen]; + for (int i = 0; i < lst.size(); i++) { + row = lst.get(i); + for (int j = 0; j < row.size(); j++) { + HSLFTextShape tx = (HSLFTextShape)row.get(j); + cells[i][j] = new HSLFTableCell(tx.getSpContainer(), getParent()); + cells[i][j].setSheet(tx.getSheet()); + } + } + } + + /** + * Assign the SlideShow this shape belongs to + * + * @param sheet owner of this shape + */ + public void setSheet(HSLFSheet sheet){ + super.setSheet(sheet); + if(cells == null) initTable(); + } + + /** + * Sets the row height. + * + * @param row the row index (0-based) + * @param height the height to set (in pixels) + */ + public void setRowHeight(int row, int height){ + int currentHeight = cells[row][0].getAnchor().height; + int dy = height - currentHeight; + + for (int i = row; i < cells.length; i++) { + for (int j = 0; j < cells[i].length; j++) { + Rectangle anchor = cells[i][j].getAnchor(); + if(i == row) anchor.height = height; + else anchor.y += dy; + cells[i][j].setAnchor(anchor); + } + } + Rectangle tblanchor = getAnchor(); + tblanchor.height += dy; + setAnchor(tblanchor); + + } + + /** + * Sets the column width. + * + * @param col the column index (0-based) + * @param width the width to set (in pixels) + */ + public void setColumnWidth(int col, int width){ + int currentWidth = cells[0][col].getAnchor().width; + int dx = width - currentWidth; + for (int i = 0; i < cells.length; i++) { + Rectangle anchor = cells[i][col].getAnchor(); + anchor.width = width; + cells[i][col].setAnchor(anchor); + + if(col < cells[i].length - 1) for (int j = col+1; j < cells[i].length; j++) { + anchor = cells[i][j].getAnchor(); + anchor.x += dx; + cells[i][j].setAnchor(anchor); + } + } + Rectangle tblanchor = getAnchor(); + tblanchor.width += dx; + setAnchor(tblanchor); + } + + /** + * Format the table and apply the specified Line to all cell boundaries, + * both outside and inside + * + * @param line the border line + */ + public void setAllBorders(Line line){ + for (int i = 0; i < cells.length; i++) { + for (int j = 0; j < cells[i].length; j++) { + HSLFTableCell cell = cells[i][j]; + cell.setBorderTop(cloneBorder(line)); + cell.setBorderLeft(cloneBorder(line)); + if(j == cells[i].length - 1) cell.setBorderRight(cloneBorder(line)); + if(i == cells.length - 1) cell.setBorderBottom(cloneBorder(line)); + } + } + } + + /** + * Format the outside border using the specified Line object + * + * @param line the border line + */ + public void setOutsideBorders(Line line){ + for (int i = 0; i < cells.length; i++) { + for (int j = 0; j < cells[i].length; j++) { + HSLFTableCell cell = cells[i][j]; + + if(j == 0) cell.setBorderLeft(cloneBorder(line)); + if(j == cells[i].length - 1) cell.setBorderRight(cloneBorder(line)); + else { + cell.setBorderLeft(null); + cell.setBorderLeft(null); + } + + if(i == 0) cell.setBorderTop(cloneBorder(line)); + else if(i == cells.length - 1) cell.setBorderBottom(cloneBorder(line)); + else { + cell.setBorderTop(null); + cell.setBorderBottom(null); + } + } + } + } + + /** + * Format the inside border using the specified Line object + * + * @param line the border line + */ + public void setInsideBorders(Line line){ + for (int i = 0; i < cells.length; i++) { + for (int j = 0; j < cells[i].length; j++) { + HSLFTableCell cell = cells[i][j]; + + if(j != cells[i].length - 1) + cell.setBorderRight(cloneBorder(line)); + else { + cell.setBorderLeft(null); + cell.setBorderLeft(null); + } + if(i != cells.length - 1) cell.setBorderBottom(cloneBorder(line)); + else { + cell.setBorderTop(null); + cell.setBorderBottom(null); + } + } + } + } + + private Line cloneBorder(Line line){ + Line border = createBorder(); + border.setLineWidth(line.getLineWidth()); + border.setLineDashing(line.getLineDashing()); + border.setLineColor(line.getLineColor()); + border.setLineCompound(line.getLineCompound()); + return border; + } + + /** + * Create a border to format this table + * + * @return the created border + */ + public Line createBorder(){ + Line line = new Line(this); + + EscherOptRecord opt = getEscherOptRecord(); + setEscherProperty(opt, EscherProperties.GEOMETRY__SHAPEPATH, -1); + setEscherProperty(opt, EscherProperties.GEOMETRY__FILLOK, -1); + setEscherProperty(opt, EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x20000); + setEscherProperty(opt, EscherProperties.THREED__LIGHTFACE, 0x80000); + + return line; + } +} diff --cc src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java index 3337d58c36,1740b46b40..fb49dbb1c4 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java @@@ -17,14 -17,17 +17,27 @@@ package org.apache.poi.hslf.model; - import static org.junit.Assert.*; ++import static org.junit.Assert.assertEquals; ++import static org.junit.Assert.assertNotNull; ++import static org.junit.Assert.assertSame; ++import static org.junit.Assert.assertTrue; ++import static org.junit.Assert.fail; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import junit.framework.TestCase; +import java.util.List; + import org.apache.poi.POIDataSamples; -import org.apache.poi.hslf.HSLFSlideShow; -import org.apache.poi.hslf.extractor.PowerPointExtractor; import org.apache.poi.hslf.record.TextHeaderAtom; - import org.apache.poi.hslf.usermodel.*; -import org.apache.poi.hslf.usermodel.SlideShow; ++import org.apache.poi.hslf.usermodel.HSLFShape; ++import org.apache.poi.hslf.usermodel.HSLFSlide; ++import org.apache.poi.hslf.usermodel.HSLFSlideShow; ++import org.apache.poi.hslf.usermodel.HSLFTable; ++import org.apache.poi.hslf.usermodel.HSLFTableCell; ++import org.apache.poi.sl.usermodel.Shape; ++import org.apache.poi.sl.usermodel.Slide; ++import org.apache.poi.sl.usermodel.SlideShow; ++import org.apache.poi.sl.usermodel.TableShape; import org.junit.Test; /** @@@ -32,7 -35,8 +45,8 @@@ * * @author Yegor Kozlov */ -public final class TestTable extends TestCase { +public final class TestTable { + private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); /** * Test that ShapeFactory works properly and returns Table @@@ -105,4 -106,30 +119,31 @@@ } } + + /** + * Bug 57820: initTable throws NullPointerException + * when the table is positioned with its top at -1 + */ + @Test + public void test57820() throws Exception { - SlideShow ppt = new SlideShow(new HSLFSlideShow(_slTests.openResourceAsStream("bug57820-initTableNullRefrenceException.ppt"))); ++ SlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("bug57820-initTableNullRefrenceException.ppt")); + - Slide[] slides = ppt.getSlides(); - assertEquals(1, slides.length); ++ List> slides = ppt.getSlides(); ++ assertEquals(1, slides.size()); + - Shape[] shapes = slides[0].getShapes(); //throws NullPointerException ++ List shapes = slides.get(0).getShapes(); //throws NullPointerException + - Table tbl = null; - for(int idx = 0; idx < shapes.length; idx++) { - if(shapes[idx] instanceof Table) { - tbl = (Table)shapes[idx]; ++ TableShape tbl = null; ++ for(Shape s : shapes) { ++ if(s instanceof TableShape) { ++ tbl = (TableShape)s; + break; + } + } + + assertNotNull(tbl); + - assertEquals(-1, tbl.getAnchor().y); ++ // handling changed in common sl, so it evaluates to 0 now ++ assertEquals(0, tbl.getAnchor().getY(), 0); + } } diff --cc src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java index 14200d5018,0000000000..5ede8b094d mode 100644,000000..100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java @@@ -1,200 -1,0 +1,201 @@@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hslf.usermodel; + +import static org.junit.Assert.*; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.*; +import java.lang.reflect.Constructor; +import java.util.*; + +import javax.imageio.ImageIO; + +import org.apache.poi.POIDataSamples; +import org.apache.poi.ddf.EscherBSERecord; +import org.apache.poi.hssf.usermodel.DummyGraphics2d; +import org.apache.poi.sl.draw.Drawable; +import org.apache.poi.sl.usermodel.Slide; +import org.apache.poi.sl.usermodel.SlideShow; +import org.apache.poi.util.JvmBugs; ++import org.junit.Ignore; +import org.junit.Test; + +/** + * Test Picture shape. + * + * @author Yegor Kozlov + */ +public final class TestPicture { + private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); + + /** + * Test that the reference count of a blip is incremented every time the picture is inserted. + * This is important when the same image appears multiple times in a slide show. + * + */ + @Test + public void multiplePictures() throws Exception { + HSLFSlideShow ppt = new HSLFSlideShow(); + + HSLFSlide s = ppt.createSlide(); + HSLFSlide s2 = ppt.createSlide(); + HSLFSlide s3 = ppt.createSlide(); + + int idx = ppt.addPicture(_slTests.readFile("clock.jpg"), HSLFPictureShape.JPEG); + HSLFPictureShape pict = new HSLFPictureShape(idx); + HSLFPictureShape pict2 = new HSLFPictureShape(idx); + HSLFPictureShape pict3 = new HSLFPictureShape(idx); + + pict.setAnchor(new Rectangle(10,10,100,100)); + s.addShape(pict); + EscherBSERecord bse1 = pict.getEscherBSERecord(); + assertEquals(1, bse1.getRef()); + + pict2.setAnchor(new Rectangle(10,10,100,100)); + s2.addShape(pict2); + EscherBSERecord bse2 = pict.getEscherBSERecord(); + assertSame(bse1, bse2); + assertEquals(2, bse1.getRef()); + + pict3.setAnchor(new Rectangle(10,10,100,100)); + s3.addShape(pict3); + EscherBSERecord bse3 = pict.getEscherBSERecord(); + assertSame(bse2, bse3); + assertEquals(3, bse1.getRef()); + } + + /** + * Picture#getEscherBSERecord threw NullPointerException if EscherContainerRecord.BSTORE_CONTAINER + * was not found. The correct behaviour is to return null. + */ + @Test + public void bug46122() { + HSLFSlideShow ppt = new HSLFSlideShow(); + HSLFSlide slide = ppt.createSlide(); + + HSLFPictureShape pict = new HSLFPictureShape(-1); //index to non-existing picture data + pict.setSheet(slide); + HSLFPictureData data = pict.getPictureData(); + assertNull(data); + + BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); + Graphics2D graphics = img.createGraphics(); + pict.draw(graphics); + } + + @Test + public void macImages() throws Exception { + HSLFSlideShowImpl hss = new HSLFSlideShowImpl(_slTests.openResourceAsStream("53446.ppt")); + + HSLFPictureData[] pictures = hss.getPictures(); + assertEquals(15, pictures.length); + + int[][] expectedSizes = { + null, // WMF + { 427, 428 }, // PNG + { 371, 370 }, // PNG + { 288, 183 }, // PNG + { 285, 97 }, // PNG + { 288, 168 }, // PNG + null, // WMF + null, // WMF + { 199, 259 }, // PNG + { 432, 244 }, // PNG + { 261, 258 }, // PNG + null, // WMF + null, // WMF + null, // WMF + null // EMF + }; + + for (int i = 0; i < pictures.length; i++) { + BufferedImage image = ImageIO.read(new ByteArrayInputStream(pictures[i].getData())); + + if (pictures[i].getType() != HSLFPictureShape.WMF && pictures[i].getType() != HSLFPictureShape.EMF) { + assertNotNull(image); + + int[] dimensions = expectedSizes[i]; + assertEquals(dimensions[0], image.getWidth()); + assertEquals(dimensions[1], image.getHeight()); + } + } + } + + @Test - // @Ignore("Just for visual validation - antialiasing is different on various systems") ++ @Ignore("Just for visual validation - antialiasing is different on various systems") + public void bug54541() throws Exception { + String files[] = { +// "sample_pptx_grouping_issues.pptx", +// "54542_cropped_bitmap.pptx", +// "54541_cropped_bitmap.ppt", +// "54541_cropped_bitmap2.ppt", + "alterman_security.ppt", +// "alterman_security3.pptx", + }; + + BitSet pages = new BitSet(); + pages.set(2); + + for (String file : files) { + InputStream is = _slTests.openResourceAsStream(file); + SlideShow ss; + if (file.endsWith("pptx")) { + Class cls = Class.forName("org.apache.poi.xslf.usermodel.XMLSlideShow"); + Constructor ct = cls.getDeclaredConstructor(InputStream.class); + ss = (SlideShow)ct.newInstance(is); + } else { + ss = new HSLFSlideShow(is); + } + is.close(); + + boolean debugOut = false; + Dimension pg = ss.getPageSize(); + for (Slide slide : ss.getSlides()) { + int slideNo = slide.getSlideNumber(); + if (!pages.get(slideNo-1)) { + if (pages.nextSetBit(slideNo-1) == -1) break; else continue; + } + if (debugOut) { + DummyGraphics2d graphics = new DummyGraphics2d(); + slide.draw(graphics); + } else { + BufferedImage img = new BufferedImage(pg.width, pg.height, BufferedImage.TYPE_INT_ARGB); + Graphics2D graphics = img.createGraphics(); + fixFonts(graphics); + slide.draw(graphics); + graphics.setColor(Color.BLACK); + graphics.setStroke(new BasicStroke(1)); + graphics.drawRect(0, 0, (int)pg.getWidth()-1, (int)pg.getHeight()-1); + ImageIO.write(img, "PNG", new File(file.replaceFirst(".pptx?", "-")+slideNo+".png")); + } + } + } + } + + @SuppressWarnings("unchecked") + private void fixFonts(Graphics2D graphics) { + if (!JvmBugs.hasLineBreakMeasurerBug()) return; + Map fontMap = (Map)graphics.getRenderingHint(Drawable.FONT_MAP); + if (fontMap == null) fontMap = new HashMap(); + fontMap.put("Calibri", "Lucida Sans"); + fontMap.put("Cambria", "Lucida Bright"); + graphics.setRenderingHint(Drawable.FONT_MAP, fontMap); + } +} diff --cc src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java index 8ad3ba6d79,a71b72a28b..ce49cd55da --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java @@@ -392,36 -411,36 +392,32 @@@ public final class TestRichTextRun * Checks that the supplied slideshow still matches the bytes * of slideshow c */ - private static void assertMatchesFileC(SlideShow s) throws Exception { - if (true) { // TODO - test is disabled, pending fix of bug #39800 - // System.err.println("Skipping test, as would be marked as failed due to bug #39800"); // - return; - } -if(false) { + private static void assertMatchesFileC(HSLFSlideShow s) throws Exception { // Grab the bytes of the file - FileInputStream fin = new FileInputStream(filenameC); - ByteArrayOutputStream fb = new ByteArrayOutputStream(); - byte[] b = new byte[4096]; - int read = 0; - while(read != -1) { - read = fin.read(b); - if(read > 0) { - fb.write(b, 0, read); - } - } - byte[] raw_file = fb.toByteArray(); + NPOIFSFileSystem fs = new NPOIFSFileSystem(_slTests.getFile(filenameC)); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + InputStream is = fs.createDocumentInputStream("PowerPoint Document"); + IOUtils.copy(is, baos); + is.close(); + fs.close(); + byte[] raw_file = baos.toByteArray(); // Now write out the slideshow - ByteArrayOutputStream baos = new ByteArrayOutputStream(); + baos.reset(); s.write(baos); + fs = new NPOIFSFileSystem(new ByteArrayInputStream(baos.toByteArray())); + baos.reset(); + is = fs.createDocumentInputStream("PowerPoint Document"); + IOUtils.copy(is, baos); + is.close(); + fs.close(); byte[] raw_ss = baos.toByteArray(); - + - FileOutputStream fos = new FileOutputStream("PowerPoint Document.new.stream"); - fos.write(raw_ss); - fos.close(); - + // different paragraph mask, because of sanitizing + raw_ss[169030] = 0x0a; + // Ensure they're the same - assertEquals(raw_file.length, raw_ss.length); - for(int i=0; i