2011/9/23 Caolán McNamara <caol...@redhat.com>:
> Looks sane to me. A good catch, pushed now.

He-he, I forgot to consider absolutely crazy cases - if
<mmultiscripts> element is empty at all. Should this be fixed?
From b30f382e563675d2ffdf9a241b74c822720e6070 Mon Sep 17 00:00:00 2001
From: Ivan Timofeev <timofeev....@gmail.com>
Date: Fri, 23 Sep 2011 22:31:40 +0400
Subject: [PATCH] consider empty <mmultiscripts>

---
 starmath/source/mathmlimport.cxx |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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;
-- 
1.7.6.3

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to