private void initialize(){ CTBaseStyles elems = _theme.getThemeElements(); CTColorScheme scheme = elems.getClrScheme(); // The color scheme is responsible for defining a list of twelve colors. _schemeColors = new HashMap<>(12); for(XmlObject o : scheme.selectPath("*")){ CTColor c = (CTColor)o; String name = c.getDomNode().getLocalName(); _schemeColors.put(name, c); } }
/** * @return typeface of the minor font to use in a document. * Typically the monor font is used for normal text or paragraph areas. * */ @SuppressWarnings("WeakerAccess") public String getMinorFont(){ return _theme.getThemeElements().getFontScheme().getMinorFont().getLatin().getTypeface(); } }
/** * @return typeface of the major font to use in a document. * Typically the major font is used for heading areas of a document. * */ @SuppressWarnings("WeakerAccess") public String getMajorFont(){ return _theme.getThemeElements().getFontScheme().getMajorFont().getLatin().getTypeface(); }
PaintStyle getThemePaint(CTShapeStyle style, PackagePart pp) { // get a reference to a line style within the style matrix. CTStyleMatrixReference lnRef = style.getLnRef(); if (lnRef == null) { return null; } int idx = (int)lnRef.getIdx(); CTSchemeColor phClr = lnRef.getSchemeClr(); if(idx <= 0){ return null; } CTLineProperties props = theme.getXmlObject().getThemeElements().getFmtScheme().getLnStyleLst().getLnArray(idx - 1); XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(props); return selectPaint(fp, phClr, pp, theme, hasPlaceholder); } };
CTFontScheme fontTheme = theme.getXmlObject().getThemeElements().getFontScheme(); CTFontCollection coll = typeface.startsWith("+mj-") ? fontTheme.getMajorFont() : fontTheme.getMinorFont();
return null; CTBaseStyles styles = theme.getXmlObject().getThemeElements(); if (styles == null) { return null;
CTStyleMatrix styleMatrix = getSheet().getTheme().getXmlObject().getThemeElements().getFmtScheme(); CTEffectStyleItem ef = styleMatrix.getEffectStyleLst().getEffectStyleArray(idx - 1); obj = ef.getEffectLst().getOuterShdw();
CTStyleMatrix matrix = theme.getXmlObject().getThemeElements().getFmtScheme(); final XmlObject styleLst; int childIdx;
CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme(); CTColor ctColor; switch (ThemeElement.byId(idx)) {
private void initialize(){ CTBaseStyles elems = _theme.getThemeElements(); CTColorScheme scheme = elems.getClrScheme(); // The color scheme is responsible for defining a list of twelve colors. _schemeColors = new HashMap<>(12); for(XmlObject o : scheme.selectPath("*")){ CTColor c = (CTColor)o; String name = c.getDomNode().getLocalName(); _schemeColors.put(name, c); } }
private void initialize(){ CTBaseStyles elems = _theme.getThemeElements(); CTColorScheme scheme = elems.getClrScheme(); // The color scheme is responsible for defining a list of twelve colors. _schemeColors = new HashMap<String, CTColor>(12); for(XmlObject o : scheme.selectPath("*")){ CTColor c = (CTColor)o; String name = c.getDomNode().getLocalName(); _schemeColors.put(name, c); } }
private CTFontCollection getFontCollection( ThemeDocument themeDocument, Enum asciiTheme ) { CTFontScheme fontScheme = themeDocument.getTheme().getThemeElements().getFontScheme(); if ( fontScheme != null ) { if ( asciiTheme.equals( STTheme.MINOR_ASCII ) || asciiTheme.equals( STTheme.MINOR_BIDI ) || asciiTheme.equals( STTheme.MINOR_EAST_ASIA ) || asciiTheme.equals( STTheme.MINOR_H_ANSI ) ) { return fontScheme.getMinorFont(); } return fontScheme.getMajorFont(); } return null; }
private CTFontCollection getFontCollection( ThemeDocument themeDocument, Enum asciiTheme ) { CTFontScheme fontScheme = themeDocument.getTheme().getThemeElements().getFontScheme(); if ( fontScheme != null ) { if ( asciiTheme.equals( STTheme.MINOR_ASCII ) || asciiTheme.equals( STTheme.MINOR_BIDI ) || asciiTheme.equals( STTheme.MINOR_EAST_ASIA ) || asciiTheme.equals( STTheme.MINOR_H_ANSI ) ) { return fontScheme.getMinorFont(); } return fontScheme.getMajorFont(); } return null; }
private CTFontCollection getFontCollection( ThemeDocument themeDocument, Enum asciiTheme ) { CTFontScheme fontScheme = themeDocument.getTheme().getThemeElements().getFontScheme(); if ( fontScheme != null ) { if ( asciiTheme.equals( STTheme.MINOR_ASCII ) || asciiTheme.equals( STTheme.MINOR_BIDI ) || asciiTheme.equals( STTheme.MINOR_EAST_ASIA ) || asciiTheme.equals( STTheme.MINOR_H_ANSI ) ) { return fontScheme.getMinorFont(); } return fontScheme.getMajorFont(); } return null; }
private CTFontCollection getFontCollection( ThemeDocument themeDocument, Enum asciiTheme ) { CTFontScheme fontScheme = themeDocument.getTheme().getThemeElements().getFontScheme(); if ( fontScheme != null ) { if ( asciiTheme.equals( STTheme.MINOR_ASCII ) || asciiTheme.equals( STTheme.MINOR_BIDI ) || asciiTheme.equals( STTheme.MINOR_EAST_ASIA ) || asciiTheme.equals( STTheme.MINOR_H_ANSI ) ) { return fontScheme.getMinorFont(); } return fontScheme.getMajorFont(); } return null; }
/** * @return typeface of the major font to use in a document. * Typically the major font is used for heading areas of a document. * */ public String getMajorFont(){ return _theme.getThemeElements().getFontScheme().getMajorFont().getLatin().getTypeface(); }
/** * @return typeface of the minor font to use in a document. * Typically the monor font is used for normal text or paragraph areas. * */ public String getMinorFont(){ return _theme.getThemeElements().getFontScheme().getMinorFont().getLatin().getTypeface(); }
/** * @return typeface of the minor font to use in a document. * Typically the monor font is used for normal text or paragraph areas. * */ @SuppressWarnings("WeakerAccess") public String getMinorFont(){ return _theme.getThemeElements().getFontScheme().getMinorFont().getLatin().getTypeface(); } }
/** * @return typeface of the major font to use in a document. * Typically the major font is used for heading areas of a document. * */ @SuppressWarnings("WeakerAccess") public String getMajorFont(){ return _theme.getThemeElements().getFontScheme().getMajorFont().getLatin().getTypeface(); }
PaintStyle getThemePaint(CTShapeStyle style, PackagePart pp) { // get a reference to a line style within the style matrix. CTStyleMatrixReference lnRef = style.getLnRef(); if (lnRef == null) { return null; } int idx = (int)lnRef.getIdx(); CTSchemeColor phClr = lnRef.getSchemeClr(); if(idx <= 0){ return null; } CTLineProperties props = theme.getXmlObject().getThemeElements().getFmtScheme().getLnStyleLst().getLnArray(idx - 1); XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(props); return selectPaint(fp, phClr, pp, theme, hasPlaceholder); } };