summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2002-05-24 06:48:49 +0000
committerThomas Lange <tl@openoffice.org>2002-05-24 06:48:49 +0000
commit815d673408b8f0f67cb463d5b5ddaf3126c9f0f3 (patch)
tree02665006e11c50c9d515a489c4565f0feccb08e9 /starmath/source/node.cxx
parent8960f57cdd3f8d404ba123d4b546bfcadf98429a (diff)
#98669# accessibility in Math
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx38
1 files changed, 36 insertions, 2 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 57c54cfd0c97..fb2cc1df5377 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: node.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: tl $ $Date: 2002-04-18 11:50:14 $
+ * last change: $Author: tl $ $Date: 2002-05-24 07:48:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -604,6 +604,12 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
return pResult;
}
+String SmNode::GetAccessibleText() const
+{
+ DBG_ERROR( "SmNode: GetAccessibleText not overloaded" );
+ return String();
+}
+
///////////////////////////////////////////////////////////////////////////
@@ -691,6 +697,23 @@ SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
}
+String SmStructureNode::GetAccessibleText() const
+{
+ String aTxt;
+ USHORT nNodes = GetNumSubNodes();
+ for (USHORT i = 0; i < nNodes; ++i)
+ {
+ const SmNode *pNode = ((SmStructureNode *) this)->GetSubNode(i);
+ if (pNode)
+ {
+ aTxt += pNode->GetAccessibleText();
+ if (aTxt.Len() && ' ' != aTxt.GetChar( aTxt.Len() - 1 ))
+ aTxt += String::CreateFromAscii( " " );
+ }
+ }
+ return aTxt;
+}
+
///////////////////////////////////////////////////////////////////////////
@@ -714,6 +737,13 @@ SmNode * SmVisibleNode::GetSubNode(USHORT nIndex)
///////////////////////////////////////////////////////////////////////////
+String SmGraphicNode::GetAccessibleText() const
+{
+ return String::CreateFromAscii( " " );
+}
+
+///////////////////////////////////////////////////////////////////////////
+
void SmExpressionNode::CreateTextFromNode(String &rText)
{
@@ -2557,6 +2587,10 @@ void SmTextNode::Draw(OutputDevice &rDev, const Point& rPosition) const
#endif
}
+String SmTextNode::GetAccessibleText() const
+{
+ return aText;
+}
/**************************************************************************/