summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-08-30 16:54:36 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-08-30 16:56:38 +0200
commit3d2b643c3c9c3185bc1b7efaef466ec681a9608c (patch)
treec9bdba6cdc541485a5d9ff3b28e2cae8b5a0b4b4 /starmath/inc
parent5425c4a08e6428c50d22bdc54a852b8a49fbc620 (diff)
implement math vertical brace export to .docx
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/node.hxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 8b11ce5efe50..e39046308345 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1064,6 +1064,13 @@ class SmVerticalBraceNode : public SmStructureNode
public:
inline SmVerticalBraceNode(const SmToken &rNodeToken);
+ SmNode* Body();
+ const SmNode* Body() const;
+ SmMathSymbolNode* Brace();
+ const SmMathSymbolNode* Brace() const;
+ SmNode* Script();
+ const SmNode* Script() const;
+
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void Accept(SmVisitor* pVisitor);
};
@@ -1372,6 +1379,34 @@ inline const SmMathSymbolNode* SmBraceNode::ClosingBrace() const
return const_cast< SmBraceNode* >( this )->ClosingBrace();
}
+inline SmNode* SmVerticalBraceNode::Body()
+{
+ OSL_ASSERT( GetNumSubNodes() > 0 );
+ return GetSubNode( 0 );
+}
+inline const SmNode* SmVerticalBraceNode::Body() const
+{
+ return const_cast< SmVerticalBraceNode* >( this )->Body();
+}
+inline SmMathSymbolNode* SmVerticalBraceNode::Brace()
+{
+ OSL_ASSERT( GetNumSubNodes() > 1 && GetSubNode( 1 )->GetType() == NMATH );
+ return static_cast< SmMathSymbolNode* >( GetSubNode( 1 ));
+}
+inline const SmMathSymbolNode* SmVerticalBraceNode::Brace() const
+{
+ return const_cast< SmVerticalBraceNode* >( this )->Brace();
+}
+inline SmNode* SmVerticalBraceNode::Script()
+{
+ OSL_ASSERT( GetNumSubNodes() > 2 );
+ return GetSubNode( 2 );
+}
+inline const SmNode* SmVerticalBraceNode::Script() const
+{
+ return const_cast< SmVerticalBraceNode* >( this )->Script();
+}
+
#endif