[Libreoffice-commits] .: 2 commits - starmath/source

2012-04-08 Thread Ivan Timofeev
 starmath/source/node.cxx  |4 ++--
 starmath/source/parse.cxx |4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 5f80687188db3a29fb0c3a5fe587aeeb3e13dccd
Author: Ivan Timofeev 
Date:   Sun Apr 8 14:11:11 2012 +0400

Revert "fdo#41739: Math: do not skip "newline" on error"

This reverts commit f52138deee9e129d0566f06d1d2138b6b159d16a. It was the 
cause
of infinite recursive loops (huh, why, that was obvious!).

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e5c1ff4..b386cf3 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2424,9 +2424,7 @@ void SmParser::Error(SmParseError eError)
 
 AddError(eError, pSNode);
 
-// Even if the newline token is unexpected, do not skip it. (fdo#41739)
-if (m_aCurToken.eType != TNEWLINE)
-NextToken();
+NextToken();
 }
 
 
commit eab7e131ecebe4cdefcdcb1ad176bbdce83cb467
Author: Ivan Timofeev 
Date:   Sat Apr 7 21:20:48 2012 +0400

starmath: fix DEBUG_ENABLE_DUMPASDOT build

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 09d2ee8..e05f188 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -647,8 +647,8 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, 
int number, int& id, in
 //Dump subnodes
 int myid = id;
 const SmNode *pNode;
-USHORT nSize = GetNumSubNodes();
-for (USHORT i = 0; i < nSize;  i++)
+sal_uInt16 nSize = GetNumSubNodes();
+for (sal_uInt16 i = 0; i < nSize;  i++)
 if (NULL != (pNode = GetSubNode(i)))
 pNode->DumpAsDot(out, NULL, i, ++id, myid);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - starmath/source

2011-09-26 Thread Caolán McNamara
 starmath/source/mathmlimport.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0be026ea4ae6d53d6cc0e5acb10bd58bec490adc
Author: Caolán McNamara 
Date:   Mon Sep 26 12:59:36 2011 +0100

<= for extra safely I suppose

diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index ce1d3c6..568ebb6 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2461,7 +2461,7 @@ void 
SmXMLMultiScriptsContext_Impl::ProcessSubSupPairs(bool bIsPrescript)
 {
 SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
 
-if (rNodeStack.Count() == nElementCount)
+if (rNodeStack.Count() <= nElementCount)
 return;
 
 sal_uLong nCount = rNodeStack.Count() - nElementCount - 1;
commit 30e8dcf0372977d5c6daea949b5cd39b6690fc55
Author: Ivan Timofeev 
Date:   Fri Sep 23 22:31:40 2011 +0400

consider empty 

diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 9cd36c6..ce1d3c6 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2461,6 +2461,9 @@ void 
SmXMLMultiScriptsContext_Impl::ProcessSubSupPairs(bool bIsPrescript)
 {
 SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
 
+if (rNodeStack.Count() == nElementCount)
+return;
+
 sal_uLong nCount = rNodeStack.Count() - nElementCount - 1;
 if (nCount == 0)
 return;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits