summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-03 12:54:24 +0000
committerMiklos Vajna <vmiklos@collabora.com>2024-12-10 14:12:40 +0100
commit3fe93a2938f4cc668c385adaeb85b8d316d590e4 (patch)
treec0cd2812a1308e8814ce496f5271693c10cd2183 /starmath
parenta58893f2de8210008fa7bb403e9c9000869e6c04 (diff)
crashtesting: fix failure of forum-en-13617.odt to reload from .doc
Change-Id: I907e282c9e7b75abca9a4c91ba12a2c57fc45f40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177735 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathtype.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index aca49f034ad0..1da9b0f4863d 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -3147,6 +3147,7 @@ void MathType::HandleMath(SmNode *pNode)
void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
+ sal_uInt64 nOldInsertion = nInsertion;
int nOldPending = 0;
SmNode *pTemp = nullptr;
SmTextNode *pIsText = nullptr;
@@ -3220,8 +3221,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
if ((nInsertion != 0) && nullptr != (pTemp = pNode->GetSubNode(0)))
{
auto nPos = pS->Tell();
- nInsertion--;
- pS->Seek(nInsertion);
+ pS->Seek(nInsertion - 1);
switch(pTemp->GetToken().eType)
{
case TACUTE: //Not Exportable
@@ -3274,6 +3274,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
pS->Seek(nPos);
}
}
+ nInsertion = nOldInsertion;
}
void MathType::HandleText(SmNode *pNode)