[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 21:04:43 UTC 2019
sw/source/ui/fldui/fldref.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit a2d4d00cb34cb092ad3d226d086976991c0991cb
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Jan 30 07:52:44 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 22:04:21 2019 +0100
Check emptiness of last token on index
Change-Id: I4cf0ea849f221270ebe8763d6a55f20dd72ba576
Reviewed-on: https://gerrit.libreoffice.org/67316
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4ece72e1a1a4..f52464c6e142 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -285,10 +285,9 @@ void SwFieldRefPage::Reset(const SfxItemSet* )
break;
}
}
- sVal = sUserData.getToken(0, ';', nIdx);
- if(!sVal.isEmpty())
+ if (nIdx>=0 && nIdx<sUserData.getLength())
{
- nFormatBoxPosition = static_cast< sal_uInt16 >(sVal.toInt32());
+ nFormatBoxPosition = static_cast< sal_uInt16 >(sUserData.getToken(0, ';', nIdx).toInt32());
}
}
}
More information about the Libreoffice-commits
mailing list