Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


2011/9/23 Caolán McNamara <caolanm@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.i.s@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.