LibreOffice Module starmath (master) 1
|
#include <element.hxx>
Public Member Functions | |
SmMlElement () | |
SmMlElement (SmMlElementType aElementType) | |
SmMlElement (const SmMlElement &aElement) | |
SmMlElementType | getMlElementType () const |
Returns the mathml element type. More... | |
bool | isMlElementType (SmMlElementType aElementType) const |
Check if the mathml element is of a given type. More... | |
const ESelection & | getESelection () const |
Returns the location in the source code of the node type. More... | |
const ESelection & | getESelectionReference () const |
Returns the location in the source code of the node type. More... | |
void | setESelection (ESelection aESelection) |
Sets the location in the source code of the node type. More... | |
sal_Int32 | GetSourceCodeRow () const |
Gets the line in the text where the node is located. More... | |
sal_Int32 | GetSourceCodeColumn () const |
Gets the column of the line in the text where the node is located. More... | |
size_t | getAttributeCount () const |
Returns the amount of available attributes. More... | |
SmMlAttribute | getAttribute (size_t nAttributePos) const |
Gets a given attribute. More... | |
SmMlAttribute | getAttribute (SmMlAttributeValueType aAttributeType) const |
Gets a given attribute. More... | |
void | setAttribute (const SmMlAttribute *aAttribute) |
Sets a given attribute. More... | |
void | setAttribute (const SmMlAttribute &aAttribute) |
Set's a given attribute. More... | |
bool | isAttributeSet (SmMlAttributeValueType aAttributeType) const |
Checks if an attribute has been manually set. More... | |
size_t | getSubElementsCount () const |
Returns the sub elements count. More... | |
SmMlElement * | getSubElement (size_t nPos) |
Returns a given sub element. More... | |
const SmMlElement * | getSubElement (size_t nPos) const |
Returns a given sub element. More... | |
void | setSubElement (size_t nPos, SmMlElement *aElement) |
Sets a given sub element. More... | |
size_t | getSubElementId () const |
Gets subelement id. More... | |
void | setSubElementId (size_t nSubElementId) |
Sets subelement id. More... | |
SmMlElement * | getParentElement () |
Returns the parent element. More... | |
const SmMlElement * | getParentElement () const |
Returns the parent element. More... | |
void | setParentElement (SmMlElement *aParentElement) |
Sets the parent element No allocation / free is done. More... | |
const OUString & | getText () const |
Returns the element text. More... | |
void | setText (OUString aText) |
Returns the element text. More... | |
Public Member Functions inherited from SmRect | |
SmRect () | |
SmRect (const OutputDevice &rDev, const SmFormat *pFormat, const OUString &rText, sal_uInt16 nBorderWidth) | |
SmRect (tools::Long nWidth, tools::Long nHeight) | |
sal_uInt16 | GetBorderWidth () const |
void | SetItalicSpaces (tools::Long nLeftSpace, tools::Long nRightSpace) |
void | SetWidth (sal_uLong nWidth) |
void | SetLeft (tools::Long nLeft) |
void | SetRight (tools::Long nRight) |
void | SetBottom (tools::Long nBottom) |
void | SetTop (tools::Long nTop) |
const Point & | GetTopLeft () const |
tools::Long | GetTop () const |
tools::Long | GetLeft () const |
tools::Long | GetBottom () const |
tools::Long | GetRight () const |
tools::Long | GetCenterY () const |
tools::Long | GetWidth () const |
tools::Long | GetHeight () const |
tools::Long | GetItalicLeftSpace () const |
tools::Long | GetItalicRightSpace () const |
tools::Long | GetHiAttrFence () const |
tools::Long | GetLoAttrFence () const |
tools::Long | GetItalicLeft () const |
tools::Long | GetItalicCenterX () const |
tools::Long | GetItalicRight () const |
tools::Long | GetItalicWidth () const |
bool | HasBaseline () const |
tools::Long | GetBaseline () const |
tools::Long | GetBaselineOffset () const |
tools::Long | GetAlignT () const |
tools::Long | GetAlignM () const |
tools::Long | GetAlignB () const |
const Size & | GetSize () const |
Size | GetItalicSize () const |
void | Move (const Point &rPosition) |
void | MoveTo (const Point &rPosition) |
bool | IsEmpty () const |
bool | HasAlignInfo () const |
Point | AlignTo (const SmRect &rRect, RectPos ePos, RectHorAlign eHor, RectVerAlign eVer) const |
SmRect & | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode) |
void | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, tools::Long nNewAlignM) |
SmRect & | ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, bool bKeepVerAlignParams) |
tools::Long | OrientedDist (const Point &rPoint) const |
bool | IsInsideRect (const Point &rPoint) const |
bool | IsInsideItalicRect (const Point &rPoint) const |
tools::Rectangle | AsRectangle () const |
SmRect | AsGlyphRect () const |
Private Member Functions | |
void | SmImplAttributeType () |
const SmMlAttribute * | getAttributePointer (size_t nAttributePos) const |
Gets a given attribute. More... | |
void | setAttributeForce (size_t nAttributePos, const SmMlAttribute *aAttribute) |
Sets a given attribute. More... | |
Private Attributes | |
SmMlElementType | m_aElementType |
OUString | m_aText |
ESelection | m_aESelection |
std::vector< SmMlAttribute > | m_aAttributeList |
std::vector< SmMlAttributePos > | m_aAttributePosList |
std::vector< SmMlElement * > | m_aSubElements |
SmMlElement * | m_aParentElement |
size_t | m_nSubElementId |
Definition at line 17 of file element.hxx.
|
inline |
Definition at line 22 of file element.hxx.
References SmImplAttributeType(), and u.
|
inline |
Definition at line 37 of file element.hxx.
References SmImplAttributeType(), and u.
|
inline |
Definition at line 49 of file element.hxx.
References getAttributeCount(), getAttributePointer(), i, m_aAttributePosList, and setAttributeForce().
|
inline |
Gets a given attribute.
If no available returns empty attribute.
nAttributePos |
Definition at line 154 of file element.hxx.
References m_aAttributeList.
Referenced by SmMLExport::exportMlAttributes().
SmMlAttribute SmMlElement::getAttribute | ( | SmMlAttributeValueType | aAttributeType | ) | const |
Gets a given attribute.
If no available returns empty attribute.
nAttributePos |
Definition at line 71 of file element.cxx.
References i, m_aAttributeList, and m_aAttributePosList.
|
inline |
Returns the amount of available attributes.
Definition at line 146 of file element.hxx.
References m_aAttributeList.
Referenced by SmMLExport::exportMlAttributes(), and SmMlElement().
|
inlineprivate |
Gets a given attribute.
If no available returns empty attribute.
nAttributePos |
Definition at line 196 of file element.hxx.
References m_aAttributeList.
Referenced by SmMlElement().
|
inline |
Returns the location in the source code of the node type.
Definition at line 113 of file element.hxx.
References m_aESelection.
|
inline |
Returns the location in the source code of the node type.
Definition at line 119 of file element.hxx.
References m_aESelection.
|
inline |
Returns the mathml element type.
Definition at line 96 of file element.hxx.
References m_aElementType.
Referenced by SmMLExport::exportMlElement().
|
inline |
Returns the parent element.
Definition at line 263 of file element.hxx.
References m_aParentElement.
Referenced by mathml::cloneElement(), exportMlElementTreeExec(), mathml::SmMlIteratorBottomToTop(), and mathml::SmMlIteratorTopToBottom().
|
inline |
Returns the parent element.
Definition at line 269 of file element.hxx.
References m_aParentElement.
|
inline |
Gets the column of the line in the text where the node is located.
It is used to do the visual <-> text correspondence.
Definition at line 139 of file element.hxx.
References m_aESelection, and ESelection::nStartPos.
|
inline |
Gets the line in the text where the node is located.
It is used to do the visual <-> text correspondence.
Definition at line 132 of file element.hxx.
References m_aESelection, and ESelection::nStartPara.
|
inline |
Returns a given sub element.
nPos |
Definition at line 225 of file element.hxx.
References m_aSubElements, and nPos.
Referenced by SmMLImport::endDocument(), mathml::SmMlIteratorBottomToTop(), mathml::SmMlIteratorCopy(), mathml::SmMlIteratorFree(), and mathml::SmMlIteratorTopToBottom().
|
inline |
Returns a given sub element.
nPos |
Definition at line 235 of file element.hxx.
References m_aSubElements, and nPos.
|
inline |
Gets subelement id.
Definition at line 250 of file element.hxx.
References m_nSubElementId.
Referenced by mathml::cloneElement(), exportMlElementTreeExec(), mathml::SmMlIteratorBottomToTop(), and mathml::SmMlIteratorTopToBottom().
|
inline |
Returns the sub elements count.
Definition at line 218 of file element.hxx.
References m_aSubElements.
Referenced by mathml::cloneElement(), SmMLImport::endDocument(), exportMlElementTreeExec(), mathml::SmMlIteratorBottomToTop(), mathml::SmMlIteratorFree(), and mathml::SmMlIteratorTopToBottom().
|
inline |
Returns the element text.
Definition at line 282 of file element.hxx.
References m_aText.
Referenced by SmMLExport::exportMlElement().
bool SmMlElement::isAttributeSet | ( | SmMlAttributeValueType | aAttributeType | ) | const |
Checks if an attribute has been manually set.
aElementType |
Definition at line 82 of file element.cxx.
References i, m_aAttributeList, and m_aAttributePosList.
|
inline |
Check if the mathml element is of a given type.
aElementType |
Definition at line 103 of file element.hxx.
References m_aElementType.
|
inline |
Set's a given attribute.
If no available does nothing.
nAttributePos |
Definition at line 182 of file element.hxx.
References setAttribute().
Referenced by setAttribute().
void SmMlElement::setAttribute | ( | const SmMlAttribute * | aAttribute | ) |
Sets a given attribute.
If no available does nothing.
nAttributePos |
Definition at line 93 of file element.cxx.
References SmMlAttribute::getMlAttributeValueType(), i, m_aAttributeList, and m_aAttributePosList.
|
inlineprivate |
Sets a given attribute.
If no available undefined behaviour.
nAttributePos | |
aAttribute |
Definition at line 208 of file element.hxx.
References m_aAttributeList.
Referenced by SmMlElement().
|
inline |
Sets the location in the source code of the node type.
aESelection |
Definition at line 125 of file element.hxx.
References m_aESelection.
|
inline |
Sets the parent element No allocation / free is done.
aParentElement |
Definition at line 276 of file element.hxx.
References m_aParentElement.
Referenced by setSubElement().
void SmMlElement::setSubElement | ( | size_t | nPos, |
SmMlElement * | aElement | ||
) |
Sets a given sub element.
nPos | |
aElement |
Definition at line 106 of file element.cxx.
References m_aSubElements, nPos, setParentElement(), and setSubElementId().
Referenced by mathml::cloneElement().
|
inline |
Sets subelement id.
nSubElementId |
Definition at line 256 of file element.hxx.
References m_nSubElementId.
Referenced by setSubElement().
|
inline |
|
private |
Definition at line 12 of file element.cxx.
References m_aAttributeList, m_aAttributePosList, m_aElementType, starmathdatabase::makeMlAttributeList(), starmathdatabase::MlAttributeListMerror, starmathdatabase::MlAttributeListMi, starmathdatabase::MlAttributeListMn, starmathdatabase::MlAttributeListMo, starmathdatabase::MlAttributeListMrow, starmathdatabase::MlAttributeListMstyle, starmathdatabase::MlAttributeListMtext, MlMath, MlMerror, MlMi, MlMn, MlMo, MlMrow, MlMstyle, MlMtext, NMlEmpty, NMlSmNode, and NMlStructural.
Referenced by SmMlElement().
|
private |
Definition at line 74 of file element.hxx.
Referenced by getAttribute(), getAttributeCount(), getAttributePointer(), isAttributeSet(), setAttribute(), setAttributeForce(), and SmImplAttributeType().
|
private |
Definition at line 77 of file element.hxx.
Referenced by getAttribute(), isAttributeSet(), setAttribute(), SmImplAttributeType(), and SmMlElement().
|
private |
Definition at line 65 of file element.hxx.
Referenced by getMlElementType(), isMlElementType(), and SmImplAttributeType().
|
private |
Definition at line 71 of file element.hxx.
Referenced by getESelection(), getESelectionReference(), GetSourceCodeColumn(), GetSourceCodeRow(), and setESelection().
|
private |
Definition at line 83 of file element.hxx.
Referenced by getParentElement(), and setParentElement().
|
private |
Definition at line 80 of file element.hxx.
Referenced by getSubElement(), getSubElementsCount(), and setSubElement().
|
private |
Definition at line 68 of file element.hxx.
|
private |
Definition at line 86 of file element.hxx.
Referenced by getSubElementId(), and setSubElementId().