summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-06 11:58:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-06 18:30:32 +0100
commit71c2a1d313263cd0d638ed754a85cb6a09c15b66 (patch)
treeec2452f4b00b46596f2ed36083cb1513da26fc1b
parent1a658831d86f6dba67f8f3bcd47435d496fe4dfa (diff)
ofz: reset sPush and sMainTerm once 'popped'
Change-Id: Ib63dd132cb2055b76492f5d53e45c2a86dd8a131 Reviewed-on: https://gerrit.libreoffice.org/45940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--starmath/source/mathtype.cxx67
1 files changed, 33 insertions, 34 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index dba5c8494721..68e87a3db7de 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -1350,9 +1350,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
}
else if (nPart == 1)
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
}
}
else
@@ -1463,10 +1463,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
}
else if (nPart == 1)
{
- sPush += rRet;
- rRet = sPush;
- rRet += " over ";
- rRet += sMainTerm;
+ rRet = sPush + rRet + " over " + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
}
}
if (nPart == 0)
@@ -1512,18 +1511,18 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
}
else if ((nPart == 1) && (nVariation == 0))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
else if ((nPart == 1) && (nVariation == 1))
newline--;
else if ((nPart == 2) && (nVariation == 1))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
nPart++;
@@ -1542,18 +1541,18 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
else if ((nPart == 1) &&
((nVariation == 1) || (nVariation==4)))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
else if ((nPart == 1) && (nVariation == 2))
newline--;
else if ((nPart == 2) && (nVariation == 2))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
nPart++;
@@ -1573,9 +1572,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
else if ((nPart == 1) &&
((nVariation == 1) || (nVariation==3)))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
nPart++;
@@ -1591,18 +1590,18 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
else if ((nPart == 1) &&
((nVariation == 1) || (nVariation==2)))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
else if ((nPart == 1) && (nVariation == 0))
newline--;
else if ((nPart == 2) && (nVariation == 0))
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
nPart++;
@@ -1618,9 +1617,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
}
else if (nPart == 1)
{
- sPush += rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
newline--;
}
nPart++;
@@ -1647,9 +1646,9 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
else if ((nPart == 2) || ((nPart == 1) &&
(nVariation == 0 || nVariation == 1)))
{
- sPush+=rRet;
- rRet = sPush;
- rRet += sMainTerm;
+ rRet = sPush + rRet + sMainTerm;
+ sPush.clear();
+ sMainTerm.clear();
}
nPart++;
break;