/************************************************************************
*
* SectionStyleConverter.java
*
* Copyright: 2002-2008 by Henrik Just
*
* This file is part of Writer2LaTeX.
*
* Writer2LaTeX is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Writer2LaTeX is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Writer2LaTeX. If not, see SectionStyleConverter
* @param ofr an OfficeReader
to read style information from
* @param config the configuration to use
* @param converter the main Converter
class
* @param nType the type of xhtml to use
*/
public SectionStyleConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType) {
super(ofr,config,converter,nType);
// Style maps for sections are currently not supported.
// (Section styles are not supported by OOo yet)
this.styleMap = new XhtmlStyleMap();
this.bConvertStyles = config.xhtmlSectionFormatting()==XhtmlConfig.CONVERT_ALL
|| config.xhtmlSectionFormatting()==XhtmlConfig.IGNORE_HARD;
this.bConvertHard = config.xhtmlSectionFormatting()==XhtmlConfig.CONVERT_ALL
|| config.xhtmlSectionFormatting()==XhtmlConfig.IGNORE_STYLES;
}
/** Get the family of section styles
* @return the style family
*/
public OfficeStyleFamily getStyles() {
return ofr.getSectionStyles();
}
/**
Create default tag name to represent a section object
* @param style to use * @return the tag name. If the style is null, a default result should be * returned. */ public String getDefaultTagName(StyleWithProperties style) { return "div"; } /**Convert formatting properties for a specific section style.
* @param style the style to convert * @param props theCSVList
object to add information to
* @param bInherit true if properties should be inherited from parent style(s)
*/
public void applyProperties(StyleWithProperties style, CSVList props, boolean bInherit) {
getFrameSc().cssBox(style,props,bInherit);
}
}