Classes | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes

ODe_Style_Style Class Reference

Class representing an OpenDocument <style:style> element. More...

#include <ODe_Style_Style.h>

List of all members.

Classes

class  CellProps
class  ColumnProps
class  GraphicProps
class  ParagraphProps
class  RowProps
class  SectionProps
class  TableProps
class  TabStop
class  TextProps

Public Member Functions

 ODe_Style_Style ()
 Constructor.
virtual ~ODe_Style_Style ()
 Destructor.
bool write (GsfOutput *pODT, const UT_UTF8String &rSpacesOffset) const
 Writes <style:style> and its subelements.
bool isEquivalentTo (const ODe_Style_Style &rStyle)
 It does not take style names into consideration.
bool isEmpty () const
ODe_Style_Styleoperator= (const ODe_Style_Style &rStyle)
bool fetchAttributesFromAbiStyle (const PP_AttrProp *pAP)
 Defines the style from attributes and properties of an AbiWord style.
void fetchAttributesFromAbiSpan (const PP_AttrProp *pAP)
 Defines the style from attributes and properties of an AbiWord .
void fetchAttributesFromAbiBlock (const PP_AttrProp *pAP, const ODe_Style_List *pCurrentListStyle)
 Fetch attributes from an AbiWord.
void fetchAttributesFromAbiSection (const PP_AttrProp *pAP)
 Fetch attributes from an AbiWord <section> tag.
void fetchAttributesFromAbiTable (const PP_AttrProp *pAP)
 Defines the style from attributes and properties of an AbiWord.
void fetchAttributesFromAbiCell (const PP_AttrProp *pAP)
 Defines the style from attributes and properties of an AbiWord <cell>.
void fetchAttributesFromAbiFrame (const PP_AttrProp &rAP)
 Defines the style from attributes and properties of an AbiWord <frame>.
void makeDefaultStyle ()
void setStyleName (const UT_UTF8String &rStyleName)
const UT_UTF8StringgetName () const
void setFamily (const gchar *pFamily)
void setParentStyleName (const gchar *pParentStyleName)
void setMasterPageName (const UT_UTF8String &rMasterPageName)
void setListStyleName (const UT_UTF8String &rListStyleName)
const UT_UTF8StringgetFontName ()
void setBreakBefore (const gchar *pBreakBefore)
void setColumnWidth (const gchar *pColumnWidth)
void setRelColumnWidth (const gchar *pRelColumnWidth)
void setRelTableWidth (const gchar *pRelTableWidth)
void setTableWidth (const gchar *pTableWidth)
void setRowHeight (const gchar *pRowHeight)
void setMinRowHeight (const gchar *pMinRowHeight)
void inheritTableCellProperties (const ODe_Style_Style &tableStyle)
void setWrap (const UT_UTF8String &rWrap)
void setRunThrough (const UT_UTF8String &rRunThrough)
void setPadding (const UT_UTF8String &rPadding)
void setHorizontalPos (const UT_UTF8String &rHorizontalPos)
void setVerticalPos (const UT_UTF8String &rVerticalPos)
void setVerticalRel (const UT_UTF8String &rVerticalRel)
const UT_UTF8StringgetDefaultTabInterval ()
void setDefaultTabInterval (const UT_UTF8String &rDefaultTabInterval)

Static Public Member Functions

static bool hasTextStyleProps (const PP_AttrProp *pAP)
 Returns true if the specified PP_AttrProp contains properties that belongs to <style:text-properties> elements.
static bool hasParagraphStyleProps (const PP_AttrProp *pAP)
 Returns true if the specified PP_AttrProp contains properties that belongs to <style:paragraph-properties> elements.
static bool hasSectionInfo (const PP_AttrProp *pAP)
static bool hasTableStyleProps (const PP_AttrProp *pAP)
static UT_UTF8String convertStyleToNCName (const UT_UTF8String &name)

Private Attributes

bool m_defaultStyle
UT_UTF8String m_name
UT_UTF8String m_family
UT_UTF8String m_parentStyleName
UT_UTF8String m_nextStyleName
UT_UTF8String m_masterPageName
UT_UTF8String m_listStyleName
class
ODe_Style_Style::SectionProps
m_pSectionProps
class
ODe_Style_Style::ParagraphProps
m_pParagraphProps
class ODe_Style_Style::TextPropsm_pTextProps
class ODe_Style_Style::TablePropsm_pTableProps
class
ODe_Style_Style::ColumnProps
m_pColumnProps
class ODe_Style_Style::RowPropsm_pRowProps
class ODe_Style_Style::CellPropsm_pCellProps
class
ODe_Style_Style::GraphicProps
m_pGraphicProps

Static Private Attributes

static std::map< std::string,
std::string > 
m_NCStyleMappings

Detailed Description

Class representing an OpenDocument <style:style> element.


Constructor & Destructor Documentation

ODe_Style_Style::ODe_Style_Style (  ) 

Constructor.

ODe_Style_Style::~ODe_Style_Style (  )  [virtual]

Member Function Documentation

UT_UTF8String ODe_Style_Style::convertStyleToNCName ( const UT_UTF8String name  )  [static]
void ODe_Style_Style::fetchAttributesFromAbiBlock ( const PP_AttrProp pAP,
const ODe_Style_List pCurrentListStyle 
)
void ODe_Style_Style::fetchAttributesFromAbiCell ( const PP_AttrProp pAP  ) 

Defines the style from attributes and properties of an AbiWord <cell>.

References ODe_Style_Style::CellProps::fetchAttributesFromAbiProps(), and m_pCellProps.

Referenced by ODe_Table_Listener::openTable().

void ODe_Style_Style::fetchAttributesFromAbiFrame ( const PP_AttrProp rAP  ) 

Defines the style from attributes and properties of an AbiWord <frame>.

References ODe_Style_Style::GraphicProps::fetchAttributesFromAbiProps(), and m_pGraphicProps.

Referenced by ODe_Frame_Listener::_openODTextbox().

void ODe_Style_Style::fetchAttributesFromAbiSection ( const PP_AttrProp pAP  ) 

Fetch attributes from an AbiWord <section> tag.

Usually column info for an OpenDocument <style:style style:family="section"> element.

References ODe_Style_Style::SectionProps::fetchAttributesFromAbiProps(), and m_pSectionProps.

Referenced by ODe_Main_Listener::openSection().

void ODe_Style_Style::fetchAttributesFromAbiSpan ( const PP_AttrProp pAP  ) 

Defines the style from attributes and properties of an AbiWord .

References ODe_Style_Style::TextProps::fetchAttributesFromAbiProps(), gchar, PP_AttrProp::getAttribute(), m_parentStyleName, and m_pTextProps.

Referenced by ODe_Text_Listener::openSpan().

bool ODe_Style_Style::fetchAttributesFromAbiStyle ( const PP_AttrProp pAP  ) 
void ODe_Style_Style::fetchAttributesFromAbiTable ( const PP_AttrProp pAP  ) 

Defines the style from attributes and properties of an AbiWord.

References ODe_Style_Style::TableProps::fetchAttributesFromAbiProps(), and m_pTableProps.

Referenced by ODe_Table_Listener::openTable().

const UT_UTF8String & ODe_Style_Style::getDefaultTabInterval (  ) 
const UT_UTF8String & ODe_Style_Style::getFontName (  ) 
const UT_UTF8String& ODe_Style_Style::getName (  )  const [inline]
bool ODe_Style_Style::hasParagraphStyleProps ( const PP_AttrProp pAP  )  [static]

Returns true if the specified PP_AttrProp contains properties that belongs to <style:paragraph-properties> elements.

References gchar, and PP_AttrProp::getProperty().

Referenced by ODe_Text_Listener::_openODParagraph(), and ODe_Text_Listener::_openParagraphDelayed().

bool ODe_Style_Style::hasSectionInfo ( const PP_AttrProp pAP  )  [static]
bool ODe_Style_Style::hasTableStyleProps ( const PP_AttrProp pAP  )  [static]
bool ODe_Style_Style::hasTextStyleProps ( const PP_AttrProp pAP  )  [static]

Returns true if the specified PP_AttrProp contains properties that belongs to <style:text-properties> elements.

References gchar, and PP_AttrProp::getProperty().

Referenced by ODe_Text_Listener::_openODParagraph(), ODe_Text_Listener::_openParagraphDelayed(), and ODe_Text_Listener::openSpan().

void ODe_Style_Style::inheritTableCellProperties ( const ODe_Style_Style tableStyle  ) 
bool ODe_Style_Style::isEmpty (  )  const
bool ODe_Style_Style::isEquivalentTo ( const ODe_Style_Style rStyle  ) 

It does not take style names into consideration.

Read it like: "is style "T1" equivalent to style "T2" It is *NOT* like: "is style A equal to style B"

References m_family, m_listStyleName, m_masterPageName, m_nextStyleName, m_parentStyleName, m_pCellProps, m_pColumnProps, m_pGraphicProps, m_pParagraphProps, m_pRowProps, m_pSectionProps, m_pTableProps, m_pTextProps, and ODE_EQUAL_STYLE_PROPS.

Referenced by ODe_AutomaticStyles::_storeStyle().

void ODe_Style_Style::makeDefaultStyle (  )  [inline]
ODe_Style_Style & ODe_Style_Style::operator= ( const ODe_Style_Style rStyle  ) 
void ODe_Style_Style::setBreakBefore ( const gchar *  pBreakBefore  ) 
void ODe_Style_Style::setColumnWidth ( const gchar *  pColumnWidth  ) 
void ODe_Style_Style::setDefaultTabInterval ( const UT_UTF8String rDefaultTabInterval  ) 
void ODe_Style_Style::setFamily ( const gchar *  pFamily  )  [inline]
void ODe_Style_Style::setHorizontalPos ( const UT_UTF8String rHorizontalPos  ) 
void ODe_Style_Style::setListStyleName ( const UT_UTF8String rListStyleName  )  [inline]

References m_listStyleName.

void ODe_Style_Style::setMasterPageName ( const UT_UTF8String rMasterPageName  )  [inline]
void ODe_Style_Style::setMinRowHeight ( const gchar *  pMinRowHeight  ) 
void ODe_Style_Style::setPadding ( const UT_UTF8String rPadding  ) 
void ODe_Style_Style::setParentStyleName ( const gchar *  pParentStyleName  )  [inline]
void ODe_Style_Style::setRelColumnWidth ( const gchar *  pRelColumnWidth  ) 
void ODe_Style_Style::setRelTableWidth ( const gchar *  pRelTableWidth  ) 
void ODe_Style_Style::setRowHeight ( const gchar *  pRowHeight  ) 
void ODe_Style_Style::setRunThrough ( const UT_UTF8String rRunThrough  ) 
void ODe_Style_Style::setStyleName ( const UT_UTF8String rStyleName  )  [inline]
void ODe_Style_Style::setTableWidth ( const gchar *  pTableWidth  ) 
void ODe_Style_Style::setVerticalPos ( const UT_UTF8String rVerticalPos  ) 
void ODe_Style_Style::setVerticalRel ( const UT_UTF8String rVerticalRel  ) 
void ODe_Style_Style::setWrap ( const UT_UTF8String rWrap  ) 
bool ODe_Style_Style::write ( GsfOutput *  pODT,
const UT_UTF8String rSpacesOffset 
) const

Member Data Documentation

Referenced by isEquivalentTo(), setFamily(), and write().

std::map< std::string, std::string > ODe_Style_Style::m_NCStyleMappings [static, private]

Referenced by convertStyleToNCName().


The documentation for this class was generated from the following files: