Package org.openxmlformats.schemas.drawingml.x2006.main

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference


            CTShapeStyle style = shape.addNewStyle();
            CTSchemeColor scheme = style.addNewLnRef().addNewSchemeClr();
            scheme.setVal(STSchemeColorVal.ACCENT_1);
            style.getLnRef().setIdx(1);

            CTStyleMatrixReference fillref = style.addNewFillRef();
            fillref.setIdx(0);
            fillref.addNewSchemeClr().setVal(STSchemeColorVal.ACCENT_1);

            CTStyleMatrixReference effectRef = style.addNewEffectRef();
            effectRef.setIdx(0);
            effectRef.addNewSchemeClr().setVal(STSchemeColorVal.ACCENT_1);

            CTFontReference fontRef = style.addNewFontRef();
            fontRef.setIdx(STFontCollectionIndex.MINOR);
            fontRef.addNewSchemeClr().setVal(STSchemeColorVal.TX_1);
View Full Code Here


            CTSchemeColor scheme = style.addNewLnRef().addNewSchemeClr();
            scheme.setVal(STSchemeColorVal.ACCENT_1);
            scheme.addNewShade().setVal(50000);
            style.getLnRef().setIdx(2);

            CTStyleMatrixReference fillref = style.addNewFillRef();
            fillref.setIdx(1);
            fillref.addNewSchemeClr().setVal(STSchemeColorVal.ACCENT_1);

            CTStyleMatrixReference effectRef = style.addNewEffectRef();
            effectRef.setIdx(0);
            effectRef.addNewSchemeClr().setVal(STSchemeColorVal.ACCENT_1);

            CTFontReference fontRef = style.addNewFontRef();
            fontRef.setIdx(STFontCollectionIndex.MINOR);
            fontRef.addNewSchemeClr().setVal(STSchemeColorVal.LT_1);
View Full Code Here

        CTBackground bg = (CTBackground)getXmlObject();
        if(bg.isSetBgPr()){
            XmlObject spPr = bg.getBgPr();
            fill = rShape.getPaint(graphics, spPr, null);
        } else if (bg.isSetBgRef()){
            CTStyleMatrixReference bgRef= bg.getBgRef();
            CTSchemeColor phClr = bgRef.getSchemeClr();

            int idx = (int)bgRef.getIdx() - 1001;
            XSLFTheme theme = getSheet().getTheme();
            CTBackgroundFillStyleList bgStyles =
                    theme.getXmlObject().getThemeElements().getFmtScheme().getBgFillStyleLst();

            XmlObject bgStyle = bgStyles.selectPath("*")[idx];
 
View Full Code Here

        if (paint == null) {
            // fill color was not found, check if it is defined in the theme
            CTShapeStyle style = _shape.getSpStyle();
            if (style != null) {
                // get a reference to a fill style within the style matrix.
                CTStyleMatrixReference fillRef = style.getFillRef();
                // The idx attribute refers to the index of a fill style or
                // background fill style within the presentation's style matrix, defined by the fmtScheme element.
                // value of 0 or 1000 indicates no background,
                // values 1-999 refer to the index of a fill style within the fillStyleLst element
                // values 1001 and above refer to the index of a background fill style within the bgFillStyleLst element.
                int idx = (int)fillRef.getIdx();
                CTSchemeColor phClr = fillRef.getSchemeClr();
                XSLFSheet sheet = _shape.getSheet();
                XSLFTheme theme = sheet.getTheme();
                XmlObject fillProps = null;
                if(idx >= 1 && idx <= 999){
                    fillProps = theme.getXmlObject().
View Full Code Here

        if (paint == null) {
            // line color was not found, check if it is defined in the theme
            CTShapeStyle style = _shape.getSpStyle();
            if (style != null) {
                // get a reference to a line style within the style matrix.
                CTStyleMatrixReference lnRef = style.getLnRef();
                int idx = (int)lnRef.getIdx();
                CTSchemeColor phClr = lnRef.getSchemeClr();
                if(idx > 0){
                    XSLFTheme theme = _shape.getSheet().getTheme();
                    XmlObject lnProps = theme.getXmlObject().
                            getThemeElements().getFmtScheme().getLnStyleLst().selectPath("*")[idx - 1];
                    paint = getPaint(graphics, lnProps, phClr);
View Full Code Here

        if (paint == null) {
            // fill color was not found, check if it is defined in the theme
            CTShapeStyle style = _shape.getSpStyle();
            if (style != null) {
                // get a reference to a fill style within the style matrix.
                CTStyleMatrixReference fillRef = style.getFillRef();
                // The idx attribute refers to the index of a fill style or
                // background fill style within the presentation's style matrix, defined by the fmtScheme element.
                // value of 0 or 1000 indicates no background,
                // values 1-999 refer to the index of a fill style within the fillStyleLst element
                // values 1001 and above refer to the index of a background fill style within the bgFillStyleLst element.
                int idx = (int)fillRef.getIdx();
                CTSchemeColor phClr = fillRef.getSchemeClr();
                XSLFSheet sheet = _shape.getSheet();
                XSLFTheme theme = sheet.getTheme();
                XmlObject fillProps = null;
                if(idx >= 1 && idx <= 999){
                    fillProps = theme.getXmlObject().
View Full Code Here

        if (paint == null) {
            // line color was not found, check if it is defined in the theme
            CTShapeStyle style = _shape.getSpStyle();
            if (style != null) {
                // get a reference to a line style within the style matrix.
                CTStyleMatrixReference lnRef = style.getLnRef();
                int idx = (int)lnRef.getIdx();
                CTSchemeColor phClr = lnRef.getSchemeClr();
                if(idx > 0){
                    XSLFTheme theme = _shape.getSheet().getTheme();
                    XmlObject lnProps = theme.getXmlObject().
                            getThemeElements().getFmtScheme().getLnStyleLst().selectPath("*")[idx - 1];
                    paint = getPaint(graphics, lnProps, phClr);
View Full Code Here

  }

  private void extractShapeContent(StringBuilder buffy, CTGroupShape gs) {
    CTShape[] shapes = gs.getSpArray();
    for (CTShape shape : shapes) {
      CTTextBody textBody = shape.getTxBody();
      if (textBody != null) {
        CTTextParagraph[] paras = textBody.getPArray();
        for (CTTextParagraph textParagraph : paras) {
          CTRegularTextRun[] textRuns = textParagraph.getRArray();
          for (CTRegularTextRun textRun : textRuns) {
            buffy.append(textRun.getT()).append(' ');
          }
View Full Code Here

    private void extractShapeContent(CTGroupShape gs, XHTMLContentHandler xhtml)
            throws SAXException {
        CTShape[] shapes = gs.getSpArray();
        for (CTShape shape : shapes) {
            CTTextBody textBody = shape.getTxBody();
            if (textBody != null) {
                CTTextParagraph[] paras = textBody.getPArray();
                for (CTTextParagraph textParagraph : paras) {
                    CTRegularTextRun[] textRuns = textParagraph.getRArray();
                    for (CTRegularTextRun textRun : textRuns) {
                        xhtml.element("p", textRun.getT());
                    }
View Full Code Here

      CTNonVisualDrawingProps props = nvGraphic.addNewCNvPr();
      props.setId(0);
      props.setName("Diagramm 1");
      nvGraphic.addNewCNvGraphicFramePr();

      CTTransform2D transform = graphicFrame.addNewXfrm();
      CTPositiveSize2D extPoint = transform.addNewExt();
      CTPoint2D offPoint = transform.addNewOff();

      extPoint.setCx(0);
      extPoint.setCy(0);
      offPoint.setX(0);
      offPoint.setY(0);
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.