OdsElements implements StylesContainer { public void freezeStyles() { this.stylesContainer.freeze(); } OdsElements(final Logger logger, final StylesContainerImpl stylesContainer,
                final MimetypeElement mimeTypeElement, final ManifestElement manifestElement,
                final SettingsElement settingsElement, final MetaElement metaElement,
                final ContentElement contentElement, final StylesElement stylesElement); static OdsElements create(final PositionUtil positionUtil, final XMLUtil xmlUtil,
                                     final WriteUtil writeUtil, final DataStyles format,
                                     final boolean libreOfficeMode, final MetaElement metaElement,
                                     final Map<String, String> additionalNamespaceByPrefix); void addObserver(final NamedOdsFileWriter o); void addCellStyle(final TableCellStyle style, final CellType... types); @Override boolean addDataStyle(final DataStyle dataStyle); @Override void setDataStylesMode(final Container.Mode mode); @Override boolean addMasterPageStyle(final MasterPageStyle masterPageStyle); @Override void setMasterPageStyleMode(final Container.Mode mode); @Override boolean addNewDataStyleFromCellStyle(final TableCellStyle style); @Override void setPageLayoutStyleMode(final Container.Mode mode); @Override boolean addPageLayoutStyle(final PageLayoutStyle pageLayoutStyle); @Override void setPageStyleMode(final Container.Mode mode); @Override boolean addPageStyle(final PageStyle ps); @Override void setObjectStyleMode(final Container.Mode mode); @Override boolean addContentStyle(final ObjectStyle objectStyle); @Override boolean addStylesStyle(final ObjectStyle objectStyle); @Override TableCellStyle addChildCellStyle(final TableCellStyle style, final DataStyle dataStyle); @Override boolean addContentFontFaceContainerStyle(final FontFaceContainerStyle objectStyle); @Override boolean addStylesFontFaceContainerStyle(final FontFaceContainerStyle ffcStyle); void createEmptyElements(final XMLUtil util, final ZipUTF8Writer writer); void debugStyles(); void freezeStyles(); @Deprecated Table addTableToContent(final String name, final int rowCapacity,
                                   final int columnCapacity); boolean addTableToContent(final Table table); Table createTable(final String name, final int rowCapacity, final int columnCapacity); void prepareAsync(); void saveAsync(); void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer); void writeMeta(final XMLUtil xmlUtil, final ZipUTF8Writer writer); void writeSettings(final XMLUtil xmlUtil, final ZipUTF8Writer writer); void writeStyles(final XMLUtil xmlUtil, final ZipUTF8Writer writer); void freezeCells(final Table table, final int rowCount, final int colCount); Table getTable(final int tableIndex); Table getTable(final String name); int getTableCount(); List<Table> getTables(); void setActiveTable(final Table table); void setViewSetting(final String viewId, final String item, final String value); void addAutoFilter(final AutoFilter autoFilter); void addExtraFile(final String fullPath, final String mediaType, final byte[] data); void addExtraDir(final String fullPath); void addExtraObject(final String fullPath, final String mediaType,
                               final String version); void writeExtras(final XMLUtil xmlUtil,
                            final ZipUTF8Writer writer); void writeMimeType(final XMLUtil xmlUtil, final ZipUTF8Writer writer); void addEvents(final ScriptEventListener... events); void addPilotTable(final PilotTable pilot); static final String SC_SPLIT_NORMAL; static final String SC_SPLIT_FIX; static final Map<String, String> BASE_NAMESPACE_BY_PREFIX; }
@Test(expected = IllegalStateException.class) public void testFreezeStyles() { PowerMock.resetAll(); PowerMock.replayAll(); this.odsElements.freezeStyles(); this.odsElements.addContentStyle(TableCellStyle.DEFAULT_CELL_STYLE); PowerMock.verifyAll(); }