frameNameGenerator.reset();
final OfficeDocument reportDoc = (OfficeDocument) report;
predefinedStylesCollection = reportDoc.getStylesCollection();
final OfficeStyles commonStyles = predefinedStylesCollection.getCommonStyles();
if (!commonStyles.containsStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS))
{
final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
graphicsDefaultStyle.setStyleFamily(OfficeToken.GRAPHIC);
graphicsDefaultStyle.setStyleName(OfficeToken.GRAPHICS);
final Element graphicProperties = produceFirstChild(graphicsDefaultStyle, OfficeNamespaces.STYLE_NS, OfficeToken.GRAPHIC_PROPERTIES);
graphicProperties.setAttribute(OfficeNamespaces.TEXT_NS, "anchor-type", OfficeToken.PARAGRAPH);
graphicProperties.setAttribute(OfficeNamespaces.SVG_NS, "x", ZERO_CM);
graphicProperties.setAttribute(OfficeNamespaces.SVG_NS, "y", ZERO_CM);
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "wrap", "dynamic");
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "number-wrapped-paragraphs", "no-limit");
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "wrap-contour", OfficeToken.FALSE);
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, VERTICAL_POS, "from-top"); // changed for chart
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "vertical-rel", OfficeToken.PARAGRAPH);
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, HORIZONTAL_POS, "from-left"); // changed for chart
graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "horizontal-rel", OfficeToken.PARAGRAPH);
commonStyles.addStyle(graphicsDefaultStyle);
}
// Make sure that later generated styles do not overwrite existing styles.
fillStyleNameGenerator(predefinedStylesCollection);