To parse a <draw:frame> element. More...
#include <ODi_Frame_ListenerState.h>
Public Member Functions | |
ODi_Frame_ListenerState (PD_Document *pDocument, ODi_Office_Styles *pStyles, ODi_Abi_Data &rAbiData, ODi_ElementStack &rElementStack) | |
Constructor. | |
virtual | ~ODi_Frame_ListenerState () |
void | startElement (const gchar *pName, const gchar **ppAtts, ODi_ListenerStateAction &rAction) |
void | endElement (const gchar *pName, ODi_ListenerStateAction &rAction) |
void | charData (const gchar *pBuffer, int length) |
Private Member Functions | |
void | _drawImage (const gchar **ppAtts, ODi_ListenerStateAction &rAction) |
void | _drawInlineImage (const gchar **ppAtts) |
void | _drawObject (const gchar **ppAtts, ODi_ListenerStateAction &rAction) |
void | _drawTextBox (const gchar **ppAtts, ODi_ListenerStateAction &rAction) |
bool | _getFrameProperties (std::string &rProps, const gchar **ppAtts) |
Private Attributes | |
PD_Document * | m_pAbiDocument |
ODi_Abi_Data & | m_rAbiData |
ODi_Office_Styles * | m_pStyles |
bool | m_parsedFrameStartTag |
bool | m_bOnContentStream |
bool | m_inlinedImage |
UT_sint32 | m_iFrameDepth |
UT_ByteBufPtr | m_pMathBB |
bool | m_bInMath |
bool | m_bInlineImagePending |
bool | m_bPositionedImagePending |
std::string | m_sAltTitle |
bool | m_bInAltTitle |
std::string | m_sAltDesc |
bool | m_bInAltDesc |
std::map< std::string, std::string > | m_mPendingImgProps |
To parse a <draw:frame> element.
ODi_Frame_ListenerState::ODi_Frame_ListenerState | ( | PD_Document * | pDocument, | |
ODi_Office_Styles * | pStyles, | |||
ODi_Abi_Data & | rAbiData, | |||
ODi_ElementStack & | rElementStack | |||
) |
Constructor.
References ODi_ElementStack::hasElement(), m_bOnContentStream, and ODi_ListenerState::m_rElementStack.
virtual ODi_Frame_ListenerState::~ODi_Frame_ListenerState | ( | ) | [inline, virtual] |
void ODi_Frame_ListenerState::_drawImage | ( | const gchar ** | ppAtts, | |
ODi_ListenerStateAction & | rAction | |||
) | [private] |
ppAtts | The attributes of a <draw:image> element. | |
The | attributes of a <draw:image> element. |
References _drawInlineImage(), _getFrameProperties(), ODi_Abi_Data::addImageDataItem(), UT_String::c_str(), gchar, ODi_StartTag::getAttributeValue(), ODi_Office_Styles::getGraphicStyle(), ODi_ElementStack::getStartTag(), ODi_ElementStack::hasElement(), ODi_ListenerStateAction::ignoreElement(), m_bInlineImagePending, m_bOnContentStream, m_bPositionedImagePending, m_mPendingImgProps, m_pStyles, m_rAbiData, ODi_ListenerState::m_rElementStack, UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by startElement().
void ODi_Frame_ListenerState::_drawInlineImage | ( | const gchar ** | ppAtts | ) | [private] |
References ODi_Abi_Data::addImageDataItem(), UT_String::c_str(), gchar, ODi_StartTag::getAttributeValue(), ODi_ElementStack::getStartTag(), m_bInlineImagePending, m_inlinedImage, m_mPendingImgProps, m_rAbiData, ODi_ListenerState::m_rElementStack, UT_ASSERT, UT_DEBUGMSG, and UT_String_sprintf().
Referenced by _drawImage().
void ODi_Frame_ListenerState::_drawObject | ( | const gchar ** | ppAtts, | |
ODi_ListenerStateAction & | rAction | |||
) | [private] |
ppAtts | The attributes of a <draw:object> element. | |
The | attributes of a <draw:image> element. |
References _getFrameProperties(), ODi_Abi_Data::addObjectDataItem(), PD_Document::appendObject(), UT_String::c_str(), gchar, ODi_StartTag::getAttributeValue(), ODi_Office_Styles::getGraphicStyle(), ODi_ElementStack::getStartTag(), ODi_ElementStack::hasElement(), ODi_ListenerStateAction::ignoreElement(), UT_String::length(), m_bOnContentStream, m_bPositionedImagePending, m_inlinedImage, m_mPendingImgProps, m_pAbiDocument, m_pStyles, m_rAbiData, ODi_ListenerState::m_rElementStack, UT_String::substr(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, and UT_std_string_sprintf().
Referenced by startElement().
void ODi_Frame_ListenerState::_drawTextBox | ( | const gchar ** | ppAtts, | |
ODi_ListenerStateAction & | rAction | |||
) | [private] |
ppAtts | The attributes of a <draw:text-box> element. | |
rAction | Any action to be taken, regarding state change. |
References _convertBorderThickness(), _getFrameProperties(), PD_Document::appendStrux(), gchar, ODi_StartTag::getAttributeValue(), ODi_Style_Style::getBorderBottom_color(), ODi_Style_Style::getBorderBottom_thickness(), ODi_Style_Style::getBorderLeft_color(), ODi_Style_Style::getBorderLeft_thickness(), ODi_Style_Style::getBorderRight_color(), ODi_Style_Style::getBorderRight_thickness(), ODi_Style_Style::getBorderTop_color(), ODi_Style_Style::getBorderTop_thickness(), ODi_Office_Styles::getGraphicStyle(), ODi_Style_Style::getHorizPos(), ODi_ElementStack::getStartTag(), ODi_Style_Style::hasBottomBorder(), ODi_Style_Style::hasLeftBorder(), ODi_Style_Style::hasRightBorder(), ODi_Style_Style::hasTopBorder(), ODi_ListenerStateAction::ignoreElement(), m_bOnContentStream, m_iFrameDepth, m_pAbiDocument, m_pStyles, ODi_ListenerState::m_rElementStack, PTX_SectionFrame, ODi_ListenerStateAction::pushState(), sThickness, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by startElement().
bool ODi_Frame_ListenerState::_getFrameProperties | ( | std::string & | rProps, | |
const gchar ** | ppAtts | |||
) | [private] |
References DIM_none, DIM_PERCENT, gchar, ODi_StartTag::getAttributeValue(), ODi_Style_Style::getBackgroundColor(), ODi_Office_Styles::getGraphicStyle(), ODi_ElementStack::getStartTag(), ODi_Style_Style::getWrap(), m_bOnContentStream, m_pStyles, ODi_ListenerState::m_rElementStack, UT_ASSERT, UT_ASSERT_HARMLESS, UT_determineDimension(), UT_getAttribute(), UT_NOT_IMPLEMENTED, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _drawImage(), _drawObject(), and _drawTextBox().
void ODi_Frame_ListenerState::charData | ( | const gchar * | pBuffer, | |
int | length | |||
) | [virtual] |
Implements ODi_ListenerState.
References m_bInAltDesc, m_bInAltTitle, m_bInMath, m_pMathBB, m_sAltDesc, and m_sAltTitle.
void ODi_Frame_ListenerState::endElement | ( | const gchar * | pName, | |
ODi_ListenerStateAction & | rAction | |||
) | [virtual] |
Implements ODi_ListenerState.
References PD_Document::appendObject(), PD_Document::appendStrux(), convertLaTeXtoEqn(), convertMathMLtoLaTeX(), PD_Document::createDataItem(), PD_Document::getUID(), m_bInAltDesc, m_bInAltTitle, m_bInlineImagePending, m_bInMath, m_bPositionedImagePending, m_iFrameDepth, m_inlinedImage, m_mPendingImgProps, m_pAbiDocument, m_pMathBB, m_sAltDesc, m_sAltTitle, UT_UniqueId::Math, ODi_ListenerStateAction::popState(), PTO_Image, PTO_Math, PTX_EndFrame, PTX_SectionFrame, UT_UTF8String::size(), UT_ASSERT_HARMLESS, UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, UT_std_string_sprintf(), and UT_UTF8String::utf8_str().
void ODi_Frame_ListenerState::startElement | ( | const gchar * | pName, | |
const gchar ** | ppAtts, | |||
ODi_ListenerStateAction & | rAction | |||
) | [virtual] |
Implements ODi_ListenerState.
References _drawImage(), _drawObject(), _drawTextBox(), ODi_ElementStack::hasElement(), ODi_ListenerStateAction::ignoreElement(), m_bInAltDesc, m_bInAltTitle, m_bInMath, m_parsedFrameStartTag, m_pMathBB, ODi_ListenerState::m_rElementStack, ODi_ListenerStateAction::pushState(), and UT_return_if_fail.
bool ODi_Frame_ListenerState::m_bInAltDesc [private] |
Referenced by charData(), endElement(), and startElement().
bool ODi_Frame_ListenerState::m_bInAltTitle [private] |
Referenced by charData(), endElement(), and startElement().
bool ODi_Frame_ListenerState::m_bInlineImagePending [private] |
Referenced by _drawImage(), _drawInlineImage(), and endElement().
bool ODi_Frame_ListenerState::m_bInMath [private] |
Referenced by charData(), endElement(), and startElement().
bool ODi_Frame_ListenerState::m_bOnContentStream [private] |
Referenced by _drawImage(), _drawObject(), _drawTextBox(), _getFrameProperties(), and ODi_Frame_ListenerState().
bool ODi_Frame_ListenerState::m_bPositionedImagePending [private] |
Referenced by _drawImage(), _drawObject(), and endElement().
Referenced by _drawTextBox(), and endElement().
bool ODi_Frame_ListenerState::m_inlinedImage [private] |
Referenced by _drawInlineImage(), _drawObject(), and endElement().
std::map<std::string, std::string> ODi_Frame_ListenerState::m_mPendingImgProps [private] |
Referenced by _drawImage(), _drawInlineImage(), _drawObject(), and endElement().
Referenced by _drawObject(), _drawTextBox(), and endElement().
bool ODi_Frame_ListenerState::m_parsedFrameStartTag [private] |
Referenced by startElement().
Referenced by charData(), endElement(), and startElement().
Referenced by _drawImage(), _drawObject(), _drawTextBox(), and _getFrameProperties().
ODi_Abi_Data& ODi_Frame_ListenerState::m_rAbiData [private] |
Referenced by _drawImage(), _drawInlineImage(), and _drawObject().
std::string ODi_Frame_ListenerState::m_sAltDesc [private] |
Referenced by charData(), and endElement().
std::string ODi_Frame_ListenerState::m_sAltTitle [private] |
Referenced by charData(), and endElement().