Dear All,

for adding notes to slides I have to duplicate any current theme (e.g.
theme1.xml => theme2.xml).


I do it this way:

in XMLSlideShow:

Integer themeIndex = 0;
for (POIXMLDocumentPart p : getRelations()) {
    if (p instanceof XSLFTheme) {                                   
        themeIndex++;
    }
}

// create a new theme with the calculated index (but it is not ensured it is
unique)
XSLFTheme theme = (XSLFTheme) createRelationship(XSLFRelation.THEME, 
        XSLFFactory.getInstance(), themeIndex + 1);

// import the complete content of the first slide theme.
theme.importTheme(getSlides()[0].getTheme());


in XSLFTheme

public void importTheme(XSLFTheme theme) {
  _theme = theme.getXmlObject();
  _schemeColors = theme._schemeColors;
}


Or is there a better way?

Thanks, Jan





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to