diff options
author | Caolán McNamara <cmc@openoffice.org> | 2002-07-16 09:49:43 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2002-07-16 09:49:43 +0000 |
commit | 764d1a16d27e2c0dd12fb34fb4f11f5e1139a72d (patch) | |
tree | 31b5e29a85e9eeeb72b580b0f3652d0aafa42edd /starmath/source/mathtype.cxx | |
parent | ac61d8c889efe579afb61dc46364284dc1615ca2 (diff) |
#101373# + with no trailing term gets {} to balance it, - does not
Diffstat (limited to 'starmath/source/mathtype.cxx')
-rw-r--r-- | starmath/source/mathtype.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 5ce778db0f8c..a6d29d8bebb0 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: mathtype.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: cmc $ $Date: 2002-05-17 12:15:17 $ + * last change: $Author: cmc $ $Date: 2002-07-16 10:49:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -214,7 +214,7 @@ static sal_Unicode Convert(sal_Unicode nIn) { case 0x2223: nIn = '|'; - break; + break; default: break; } @@ -858,7 +858,10 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector, { if (nRecord == END) { - sal_Unicode cChar = rRet.GetChar(rRet.Len()-1); + sal_Unicode cChar = 0; + xub_StrLen nI = rRet.Len()-1; + while (nI && ((cChar = rRet.GetChar(nI)) == ' ')) + --nI; if ((cChar == '=') || (cChar == '+') || (cChar == '-')) APPEND(rRet,"{}"); } |