summaryrefslogtreecommitdiff
path: root/starmath/inc/node.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/inc/node.hxx')
-rw-r--r--starmath/inc/node.hxx198
1 files changed, 99 insertions, 99 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index a8589c682dd4..153db2d38c05 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -60,27 +60,27 @@
#include "format.hxx"
-#define ATTR_BOLD 0x0001
-#define ATTR_ITALIC 0x0002
+#define ATTR_BOLD 0x0001
+#define ATTR_ITALIC 0x0002
-#define FNTSIZ_ABSOLUT 1
-#define FNTSIZ_PLUS 2
-#define FNTSIZ_MINUS 3
+#define FNTSIZ_ABSOLUT 1
+#define FNTSIZ_PLUS 2
+#define FNTSIZ_MINUS 3
#define FNTSIZ_MULTIPLY 4
-#define FNTSIZ_DIVIDE 5
+#define FNTSIZ_DIVIDE 5
// flags to interdict respective status changes
-#define FLG_FONT 0x0001
-#define FLG_SIZE 0x0002
-#define FLG_BOLD 0x0004
-#define FLG_ITALIC 0x0008
-#define FLG_COLOR 0x0010
-#define FLG_VISIBLE 0x0020
-#define FLG_HORALIGN 0x0040
+#define FLG_FONT 0x0001
+#define FLG_SIZE 0x0002
+#define FLG_BOLD 0x0004
+#define FLG_ITALIC 0x0008
+#define FLG_COLOR 0x0010
+#define FLG_VISIBLE 0x0020
+#define FLG_HORALIGN 0x0040
-extern SmFormat *pActiveFormat;
+extern SmFormat *pActiveFormat;
class SmVisitor;
class SmDocShell;
@@ -93,14 +93,14 @@ typedef std::vector< SmStructureNode * > SmStructureNodeArray;
////////////////////////////////////////////////////////////////////////////////
-enum SmScaleMode { SCALE_NONE, SCALE_WIDTH, SCALE_HEIGHT };
+enum SmScaleMode { SCALE_NONE, SCALE_WIDTH, SCALE_HEIGHT };
enum SmNodeType
{
- NTABLE, NBRACE, NBRACEBODY, NOPER, NALIGN,
- NATTRIBUT, NFONT, NUNHOR, NBINHOR, NBINVER,
- NBINDIAGONAL, NSUBSUP, NMATRIX, NPLACE, NTEXT,
- NSPECIAL, NGLYPH_SPECIAL, NMATH, NBLANK, NERROR,
+ NTABLE, NBRACE, NBRACEBODY, NOPER, NALIGN,
+ NATTRIBUT, NFONT, NUNHOR, NBINHOR, NBINVER,
+ NBINDIAGONAL, NSUBSUP, NMATRIX, NPLACE, NTEXT,
+ NSPECIAL, NGLYPH_SPECIAL, NMATH, NBLANK, NERROR,
NLINE, NEXPRESSION, NPOLYLINE, NROOT, NROOTSYMBOL,
NRECTANGLE, NVERTICAL_BRACE
};
@@ -111,15 +111,15 @@ enum SmNodeType
class SmNode : public SmRect
{
- SmFace aFace;
+ SmFace aFace;
- SmToken aNodeToken;
- SmNodeType eType;
- SmScaleMode eScaleMode;
- RectHorAlign eRectHorAlign;
- USHORT nFlags,
+ SmToken aNodeToken;
+ SmNodeType eType;
+ SmScaleMode eScaleMode;
+ RectHorAlign eRectHorAlign;
+ USHORT nFlags,
nAttributes;
- BOOL bIsPhantom,
+ BOOL bIsPhantom,
bIsDebug;
BOOL bIsSelected;
@@ -131,7 +131,7 @@ protected:
sal_Int32 nAccIndex;
public:
- virtual ~SmNode();
+ virtual ~SmNode();
virtual BOOL IsVisible() const;
@@ -142,14 +142,14 @@ public:
return ((SmNode *) this)->GetSubNode(nIndex);
}
- virtual SmNode * GetLeftMost();
+ virtual SmNode * GetLeftMost();
const SmNode * GetLeftMost() const
{
return ((SmNode *) this)->GetLeftMost();
}
- USHORT & Flags() { return nFlags; }
- USHORT & Attributes() { return nAttributes; }
+ USHORT & Flags() { return nFlags; }
+ USHORT & Attributes() { return nAttributes; }
BOOL IsDebug() const { return bIsDebug; }
BOOL IsPhantom() const { return bIsPhantom; }
@@ -160,7 +160,7 @@ public:
void ClearAttribut(USHORT nAttrib);
const SmFace & GetFont() const { return aFace; };
- SmFace & GetFont() { return aFace; };
+ SmFace & GetFont() { return aFace; };
void SetFont(const SmFace &rFace);
void SetFontSize(const Fraction &rRelSize, USHORT nType);
@@ -177,7 +177,7 @@ public:
RectHorAlign GetRectHorAlign() const { return eRectHorAlign; }
const SmRect & GetRect() const { return *this; }
- SmRect & GetRect() { return *this; }
+ SmRect & GetRect() { return *this; }
virtual void Move(const Point &rPosition);
void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); }
@@ -192,20 +192,20 @@ public:
sal_Int32 GetAccessibleIndex() const { return nAccIndex; }
const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const;
- USHORT GetRow() const { return (USHORT)aNodeToken.nRow; }
- USHORT GetColumn() const { return (USHORT)aNodeToken.nCol; }
+ USHORT GetRow() const { return (USHORT)aNodeToken.nRow; }
+ USHORT GetColumn() const { return (USHORT)aNodeToken.nCol; }
- SmScaleMode GetScaleMode() const { return eScaleMode; }
- void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
+ SmScaleMode GetScaleMode() const { return eScaleMode; }
+ void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
- SmNodeType GetType() const { return eType; }
- const SmToken & GetToken() const { return aNodeToken; }
+ SmNodeType GetType() const { return eType; }
+ const SmToken & GetToken() const { return aNodeToken; }
- const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const;
- const SmNode * FindRectClosestTo(const Point &rPoint) const;
+ const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const;
+ const SmNode * FindRectClosestTo(const Point &rPoint) const;
/** Accept a visitor
* Calls the method for this class on the visitor
@@ -252,8 +252,8 @@ protected:
/** Sets parent on children of this node */
void ClaimPaternity(){
SmNode* pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ USHORT nSize = GetNumSubNodes();
+ for (USHORT i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetParent((SmStructureNode*)this); //Cast is valid if we have children
}
@@ -334,20 +334,20 @@ class SmStructureNode : public SmNode
protected:
SmStructureNode(SmNodeType eNodeType, const SmToken &rNodeToken)
- : SmNode(eNodeType, rNodeToken)
+ : SmNode(eNodeType, rNodeToken)
{}
public:
SmStructureNode( const SmStructureNode &rNode );
virtual ~SmStructureNode();
- virtual BOOL IsVisible() const;
+ virtual BOOL IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
+ virtual USHORT GetNumSubNodes() const;
void SetNumSubNodes(USHORT nSize) { aSubNodes.resize(nSize); }
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(USHORT nIndex);
void SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird = NULL);
void SetSubNodes(const SmNodeArray &rNodeArray);
@@ -381,15 +381,15 @@ class SmVisibleNode : public SmNode
{
protected:
SmVisibleNode(SmNodeType eNodeType, const SmToken &rNodeToken)
- : SmNode(eNodeType, rNodeToken)
+ : SmNode(eNodeType, rNodeToken)
{}
public:
- virtual BOOL IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
+ virtual BOOL IsVisible() const;
+ virtual USHORT GetNumSubNodes() const;
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(USHORT nIndex);
};
@@ -400,7 +400,7 @@ class SmGraphicNode : public SmVisibleNode
{
protected:
SmGraphicNode(SmNodeType eNodeType, const SmToken &rNodeToken)
- : SmVisibleNode(eNodeType, rNodeToken)
+ : SmVisibleNode(eNodeType, rNodeToken)
{}
public:
@@ -421,7 +421,7 @@ class SmRectangleNode : public SmGraphicNode
public:
SmRectangleNode(const SmToken &rNodeToken)
- : SmGraphicNode(NRECTANGLE, rNodeToken)
+ : SmGraphicNode(NRECTANGLE, rNodeToken)
{}
virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
@@ -446,14 +446,14 @@ public:
*/
class SmPolyLineNode : public SmGraphicNode
{
- Polygon aPoly;
- Size aToSize;
- long nWidth;
+ Polygon aPoly;
+ Size aToSize;
+ long nWidth;
public:
SmPolyLineNode(const SmToken &rNodeToken);
- long GetWidth() const { return nWidth; }
+ long GetWidth() const { return nWidth; }
Size GetToSize() const { return aToSize; }
Polygon &GetPolygon() { return aPoly; }
@@ -495,9 +495,9 @@ protected:
public:
SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP );
- USHORT GetFontDesc() const { return nFontDesc; }
- void SetText(const XubString &rText) { aText = rText; }
- const XubString & GetText() const { return aText; }
+ USHORT GetFontDesc() const { return nFontDesc; }
+ void SetText(const XubString &rText) { aText = rText; }
+ const XubString & GetText() const { return aText; }
/** Change the text of this node, including the underlying token */
void ChangeText(const XubString &rText) {
aText = rText;
@@ -580,7 +580,7 @@ class SmGlyphSpecialNode : public SmSpecialNode
{
public:
SmGlyphSpecialNode(const SmToken &rNodeToken)
- : SmSpecialNode(NGLYPH_SPECIAL, rNodeToken, FNT_MATH)
+ : SmSpecialNode(NGLYPH_SPECIAL, rNodeToken, FNT_MATH)
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -598,7 +598,7 @@ class SmMathSymbolNode : public SmSpecialNode
{
protected:
SmMathSymbolNode(SmNodeType eNodeType, const SmToken &rNodeToken)
- : SmSpecialNode(eNodeType, rNodeToken, FNT_MATH)
+ : SmSpecialNode(eNodeType, rNodeToken, FNT_MATH)
{
xub_Unicode cChar = GetToken().cMathChar;
if ((xub_Unicode) '\0' != cChar)
@@ -659,7 +659,7 @@ class SmPlaceNode : public SmMathSymbolNode
{
public:
SmPlaceNode(const SmToken &rNodeToken)
- : SmMathSymbolNode(NPLACE, rNodeToken)
+ : SmMathSymbolNode(NPLACE, rNodeToken)
{
}
SmPlaceNode() : SmMathSymbolNode(NPLACE, SmToken(TPLACE, MS_PLACE, "<?>")) {};
@@ -681,7 +681,7 @@ class SmErrorNode : public SmMathSymbolNode
{
public:
SmErrorNode(SmParseError /*eError*/, const SmToken &rNodeToken)
- : SmMathSymbolNode(NERROR, rNodeToken)
+ : SmMathSymbolNode(NERROR, rNodeToken)
{
SetText((xub_Unicode) MS_ERROR);
}
@@ -705,7 +705,7 @@ class SmTableNode : public SmStructureNode
{
public:
SmTableNode(const SmToken &rNodeToken)
- : SmStructureNode(NTABLE, rNodeToken)
+ : SmStructureNode(NTABLE, rNodeToken)
{}
using SmNode::GetLeftMost;
@@ -729,14 +729,14 @@ class SmLineNode : public SmStructureNode
protected:
SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
- : SmStructureNode(eNodeType, rNodeToken)
+ : SmStructureNode(eNodeType, rNodeToken)
{
bUseExtraSpaces = TRUE;
}
public:
SmLineNode(const SmToken &rNodeToken)
- : SmStructureNode(NLINE, rNodeToken)
+ : SmStructureNode(NLINE, rNodeToken)
{
bUseExtraSpaces = TRUE;
}
@@ -762,7 +762,7 @@ class SmExpressionNode : public SmLineNode
{
public:
SmExpressionNode(const SmToken &rNodeToken)
- : SmLineNode(NEXPRESSION, rNodeToken)
+ : SmLineNode(NEXPRESSION, rNodeToken)
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -781,7 +781,7 @@ class SmUnHorNode : public SmStructureNode
{
public:
SmUnHorNode(const SmToken &rNodeToken)
- : SmStructureNode(NUNHOR, rNodeToken)
+ : SmStructureNode(NUNHOR, rNodeToken)
{
SetNumSubNodes(2);
}
@@ -813,7 +813,7 @@ protected:
public:
SmRootNode(const SmToken &rNodeToken)
- : SmStructureNode(NROOT, rNodeToken)
+ : SmStructureNode(NROOT, rNodeToken)
{
SetNumSubNodes(3);
}
@@ -841,7 +841,7 @@ class SmBinHorNode : public SmStructureNode
{
public:
SmBinHorNode(const SmToken &rNodeToken)
- : SmStructureNode(NBINHOR, rNodeToken)
+ : SmStructureNode(NBINHOR, rNodeToken)
{
SetNumSubNodes(3);
}
@@ -869,7 +869,7 @@ class SmBinVerNode : public SmStructureNode
{
public:
SmBinVerNode(const SmToken &rNodeToken)
- : SmStructureNode(NBINVER, rNodeToken)
+ : SmStructureNode(NBINVER, rNodeToken)
{
SetNumSubNodes(3);
}
@@ -897,16 +897,16 @@ public:
*/
class SmBinDiagonalNode : public SmStructureNode
{
- BOOL bAscending;
+ BOOL bAscending;
- void GetOperPosSize(Point &rPos, Size &rSize,
+ void GetOperPosSize(Point &rPos, Size &rSize,
const Point &rDiagPoint, double fAngleDeg) const;
public:
SmBinDiagonalNode(const SmToken &rNodeToken);
- BOOL IsAscending() const { return bAscending; }
- void SetAscending(BOOL bVal) { bAscending = bVal; }
+ BOOL IsAscending() const { return bAscending; }
+ void SetAscending(BOOL bVal) { bAscending = bVal; }
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void Accept(SmVisitor* pVisitor);
@@ -922,19 +922,19 @@ public:
* See graphic for positions at char:
*
* \code
- * CSUP
+ * CSUP
*
* LSUP H H RSUP
- * H H
- * HHHH
- * H H
+ * H H
+ * HHHH
+ * H H
* LSUB H H RSUB
*
- * CSUB
+ * CSUB
* \endcode
*/
enum SmSubSup
-{ CSUB, CSUP, RSUB, RSUP, LSUB, LSUP
+{ CSUB, CSUP, RSUB, RSUP, LSUB, LSUP
};
/** numbers of entries in the above enum (that is: the number of possible
@@ -962,14 +962,14 @@ class SmSubSupNode : public SmStructureNode
public:
SmSubSupNode(const SmToken &rNodeToken)
- : SmStructureNode(NSUBSUP, rNodeToken)
+ : SmStructureNode(NSUBSUP, rNodeToken)
{
SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES);
bUseLimits = FALSE;
}
/** Get body (Not NULL) */
- SmNode * GetBody() { return GetSubNode(0); }
+ SmNode * GetBody() { return GetSubNode(0); }
/** Get body (Not NULL) */
const SmNode * GetBody() const
{
@@ -1016,7 +1016,7 @@ class SmBraceNode : public SmStructureNode
{
public:
SmBraceNode(const SmToken &rNodeToken)
- : SmStructureNode(NBRACE, rNodeToken)
+ : SmStructureNode(NBRACE, rNodeToken)
{
SetNumSubNodes(3);
}
@@ -1045,8 +1045,8 @@ class SmBracebodyNode : public SmStructureNode
public:
inline SmBracebodyNode(const SmToken &rNodeToken);
- virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
- long GetBodyHeight() const { return nBodyHeight; }
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ long GetBodyHeight() const { return nBodyHeight; }
void Accept(SmVisitor* pVisitor);
};
@@ -1077,7 +1077,7 @@ class SmVerticalBraceNode : public SmStructureNode
public:
inline SmVerticalBraceNode(const SmToken &rNodeToken);
- virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void Accept(SmVisitor* pVisitor);
};
@@ -1108,12 +1108,12 @@ class SmOperNode : public SmStructureNode
{
public:
SmOperNode(const SmToken &rNodeToken)
- : SmStructureNode(NOPER, rNodeToken)
+ : SmStructureNode(NOPER, rNodeToken)
{
SetNumSubNodes(2);
}
- SmNode * GetSymbol();
+ SmNode * GetSymbol();
const SmNode * GetSymbol() const
{
return ((SmOperNode *) this)->GetSymbol();
@@ -1134,7 +1134,7 @@ class SmAlignNode : public SmStructureNode
{
public:
SmAlignNode(const SmToken &rNodeToken)
- : SmStructureNode(NALIGN, rNodeToken)
+ : SmStructureNode(NALIGN, rNodeToken)
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -1158,7 +1158,7 @@ class SmAttributNode : public SmStructureNode
{
public:
SmAttributNode(const SmToken &rNodeToken)
- : SmStructureNode(NATTRIBUT, rNodeToken)
+ : SmStructureNode(NATTRIBUT, rNodeToken)
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -1175,12 +1175,12 @@ public:
*/
class SmFontNode : public SmStructureNode
{
- USHORT nSizeType;
- Fraction aFontSize;
+ USHORT nSizeType;
+ Fraction aFontSize;
public:
SmFontNode(const SmToken &rNodeToken)
- : SmStructureNode(NFONT, rNodeToken)
+ : SmStructureNode(NFONT, rNodeToken)
{
nSizeType = FNTSIZ_MULTIPLY;
aFontSize = Fraction(1L);
@@ -1206,12 +1206,12 @@ public:
*/
class SmMatrixNode : public SmStructureNode
{
- USHORT nNumRows,
+ USHORT nNumRows,
nNumCols;
public:
SmMatrixNode(const SmToken &rNodeToken)
- : SmStructureNode(NMATRIX, rNodeToken)
+ : SmStructureNode(NMATRIX, rNodeToken)
{
nNumRows = nNumCols = 0;
}
@@ -1237,17 +1237,17 @@ public:
*/
class SmBlankNode : public SmGraphicNode
{
- USHORT nNum;
+ USHORT nNum;
public:
SmBlankNode(const SmToken &rNodeToken)
- : SmGraphicNode(NBLANK, rNodeToken)
+ : SmGraphicNode(NBLANK, rNodeToken)
{
nNum = 0;
}
void IncreaseBy(const SmToken &rToken);
- void Clear() { nNum = 0; }
+ void Clear() { nNum = 0; }
USHORT GetBlankNum() const { return nNum; }
void SetBlankNum(USHORT nNumber) { nNum = nNumber; }