private void setSlideLayout(DrawPageElement page,
OdfSlide.SlideLayout slideLayout) {
if (slideLayout == null) {
slideLayout = OdfSlide.SlideLayout.BLANK;
}
OdfOfficeStyles styles = getOrCreateDocumentStyles();
String layoutName;
if (slideLayout.toString().equals(OdfSlide.SlideLayout.TITLE_ONLY.toString())) {
layoutName = "AL1T" + makeUniqueName();
try {
StylePresentationPageLayoutElement layout = styles.newStylePresentationPageLayoutElement(layoutName);
layout.newPresentationPlaceholderElement("title", "2.058cm", "1.743cm", "23.91cm", "3.507cm");
} catch (Exception e1) {
Logger.getLogger(OdfPresentationDocument.class.getName()).log(Level.SEVERE, null, e1);
}
page.setPresentationPresentationPageLayoutNameAttribute(layoutName);
DrawFrameElement frame1 = page.newDrawFrameElement();
frame1.setProperty(StyleGraphicPropertiesElement.StyleShadow, "true");
frame1.setProperty(StyleGraphicPropertiesElement.AutoGrowHeight, "true");
frame1.setProperty(StyleGraphicPropertiesElement.MinHeight, "3.507");
frame1.setPresentationStyleNameAttribute(frame1.getStyleName());
frame1.setDrawLayerAttribute("layout");
frame1.setSvgHeightAttribute("3.006cm");
frame1.setSvgWidthAttribute("24.299cm");
frame1.setSvgXAttribute("1.35cm");
frame1.setSvgYAttribute("0.717cm");
frame1.setPresentationClassAttribute(PresentationClassAttribute.Value.TITLE.toString());
frame1.setPresentationPlaceholderAttribute(true);
frame1.newDrawTextBoxElement();
} else if (slideLayout.toString().equals(OdfSlide.SlideLayout.TITLE_OUTLINE.toString())) {
layoutName = makeUniqueName();
try {
styles = super.getStylesDom().getOfficeStyles();
if (styles == null) {
styles = super.getStylesDom().newOdfElement(OdfOfficeStyles.class);
}
StylePresentationPageLayoutElement layout = styles.newStylePresentationPageLayoutElement(layoutName);
layout.newPresentationPlaceholderElement("title", "2.058cm", "1.743cm", "23.91cm", "3.507cm");
layout.newPresentationPlaceholderElement("outline", "2.058cm", "1.743cm", "23.91cm", "3.507cm");
} catch (Exception e1) {
Logger.getLogger(OdfPresentationDocument.class.getName()).log(Level.SEVERE, null, e1);
}
page.setPresentationPresentationPageLayoutNameAttribute(layoutName);
DrawFrameElement frame1 = page.newDrawFrameElement();
frame1.setProperty(StyleGraphicPropertiesElement.StyleShadow, "true");
frame1.setProperty(StyleGraphicPropertiesElement.AutoGrowHeight, "true");
frame1.setProperty(StyleGraphicPropertiesElement.MinHeight, "3.507");
frame1.setPresentationStyleNameAttribute(frame1.getStyleName());
frame1.setDrawLayerAttribute("layout");
frame1.setSvgHeightAttribute("3.006cm");
frame1.setSvgWidthAttribute("24.299cm");
frame1.setSvgXAttribute("1.35cm");
frame1.setSvgYAttribute("0.717cm");
frame1.setPresentationClassAttribute(PresentationClassAttribute.Value.TITLE.toString());
frame1.setPresentationPlaceholderAttribute(true);
frame1.newDrawTextBoxElement();
DrawFrameElement frame2 = page.newDrawFrameElement();
frame2.setProperty(StyleGraphicPropertiesElement.FillColor, "#ffffff");
frame2.setProperty(StyleGraphicPropertiesElement.MinHeight, "13.114");
frame2.setPresentationStyleNameAttribute(frame2.getStyleName());
frame2.setDrawLayerAttribute("layout");
frame2.setSvgHeightAttribute("11.629cm");
frame2.setSvgWidthAttribute("24.199cm");
frame2.setSvgXAttribute("1.35cm");
frame2.setSvgYAttribute("4.337cm");
frame2.setPresentationClassAttribute(PresentationClassAttribute.Value.OUTLINE.toString());
frame2.setPresentationPlaceholderAttribute(true);
frame2.newDrawTextBoxElement();
} else if (slideLayout.toString().equals(OdfSlide.SlideLayout.TITLE_PLUS_TEXT.toString())) {
layoutName = makeUniqueName();
try {
styles = super.getStylesDom().getOfficeStyles();
if (styles == null) {
styles = super.getStylesDom().newOdfElement(OdfOfficeStyles.class);
}
StylePresentationPageLayoutElement layout = styles.newStylePresentationPageLayoutElement(layoutName);
layout.newPresentationPlaceholderElement("title", "2.058cm", "1.743cm", "23.91cm", "1.743cm");
layout.newPresentationPlaceholderElement("subtitle", "2.058cm", "5.838cm", "23.91cm", "13.23cm");
} catch (Exception e1) {
Logger.getLogger(OdfPresentationDocument.class.getName()).log(Level.SEVERE, null, e1);
}
page.setPresentationPresentationPageLayoutNameAttribute(layoutName);
DrawFrameElement frame1 = page.newDrawFrameElement();
frame1.setProperty(StyleGraphicPropertiesElement.AutoGrowHeight, "true");
frame1.setProperty(StyleGraphicPropertiesElement.MinHeight, "3.507");
frame1.setPresentationStyleNameAttribute(frame1.getStyleName());
frame1.setDrawLayerAttribute("layout");
frame1.setSvgHeightAttribute("3.006cm");
frame1.setSvgWidthAttribute("24.299cm");
frame1.setSvgXAttribute("1.35cm");
frame1.setSvgYAttribute("0.717cm");
frame1.setPresentationClassAttribute(PresentationClassAttribute.Value.TITLE.toString());
frame1.setPresentationPlaceholderAttribute(true);
frame1.newDrawTextBoxElement();
DrawFrameElement frame2 = page.newDrawFrameElement();
frame2.setProperty(StyleGraphicPropertiesElement.AutoGrowHeight, "true");
frame2.setProperty(StyleGraphicPropertiesElement.MinHeight, "3.507");
frame2.setPresentationStyleNameAttribute(frame2.getStyleName());
frame2.setDrawLayerAttribute("layout");
frame2.setSvgHeightAttribute("11.88cm");
frame2.setSvgWidthAttribute("24.299cm");
frame2.setSvgXAttribute("1.35cm");
frame2.setSvgYAttribute("4.712cm");
frame2.setPresentationClassAttribute(PresentationClassAttribute.Value.SUBTITLE.toString());
frame2.setPresentationPlaceholderAttribute(true);
frame2.newDrawTextBoxElement();
} else if (slideLayout.toString().equals(OdfSlide.SlideLayout.TITLE_PLUS_2_TEXT_BLOCK.toString())) {
layoutName = makeUniqueName();
try {
styles = super.getStylesDom().getOfficeStyles();
if (styles == null) {
styles = super.getStylesDom().newOdfElement(OdfOfficeStyles.class);
}
StylePresentationPageLayoutElement layout = styles.newStylePresentationPageLayoutElement(layoutName);
layout.newPresentationPlaceholderElement("outline", "2.058cm", "1.743cm", "23.91cm", "1.743cm");
layout.newPresentationPlaceholderElement("outline", "1.35cm", "4.212cm", "11.857cm", "11.629cm");
layout.newPresentationPlaceholderElement("outline", "4.212cm", "13.8cm", "11.857cm", "11.629cm");
} catch (Exception e1) {