diff options
author | Caolán McNamara <cmc@openoffice.org> | 2000-12-11 14:43:30 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2000-12-11 14:43:30 +0000 |
commit | c850177303355c19f026fed86c064452b738d2c3 (patch) | |
tree | 821fc9abda4f438bd98409b85a5e21299e995b80 | |
parent | 95ea35ea830dec8ff561d6bedd20b8deea0b144a (diff) |
#81764# Empty table row (double newline)
-rw-r--r-- | starmath/source/mathml.cxx | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/starmath/source/mathml.cxx b/starmath/source/mathml.cxx index fa7abcdc4613..56a68a8340a4 100644 --- a/starmath/source/mathml.cxx +++ b/starmath/source/mathml.cxx @@ -2,9 +2,9 @@ * * $RCSfile: mathml.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: cmc $ $Date: 2000-11-15 10:43:57 $ + * last change: $Author: cmc $ $Date: 2000-12-11 15:43:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1059,8 +1059,38 @@ public: SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList); + void EndElement(); }; +void SmXMLTableRowContext_Impl::EndElement() +{ + SmNodeArray aRelationArray; + SmNodeStack &rNodeStack = GetSmImport().GetNodeStack(); + USHORT nSize = rNodeStack.Count()-nElementCount; + + if (nSize) + { + aRelationArray.SetSize(nSize); + for(USHORT i=rNodeStack.Count()-nElementCount;i > 0;i--) + aRelationArray.Put(i-1,rNodeStack.Pop()); + } + else //Multiple newlines result in empty row elements + { + aRelationArray.SetSize(1); + SmToken aToken; + aToken.cMathChar = '\0'; + aToken.nGroup = 0; + aToken.nLevel = 5; + aToken.eType = TNEWLINE; + aRelationArray.Put(0,new SmLineNode(aToken)); + } + + SmToken aDummy; + SmStructureNode *pSNode = new SmExpressionNode(aDummy); + pSNode->SetSubNodes(aRelationArray); + rNodeStack.Push(pSNode); +} + class SmXMLTableContext_Impl : public SmXMLTableRowContext_Impl { public: |