[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 22:08:28 UTC 2019
sw/source/core/unocore/unofield.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 4a8f0d4ee9b144d215378582f02f788327e8f502
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 3 18:33:13 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 23:08:05 2019 +0100
Use indexed getToken()
Change-Id: I371ff95ff9d05e0c57844f99c222165e55aa51e8
Reviewed-on: https://gerrit.libreoffice.org/67332
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a75abdc77046..7aca6eb4ff03 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2660,8 +2660,8 @@ static SwFieldIds lcl_GetIdByName( OUString& rName, OUString& rTypeName )
rName = rName.copy(RTL_CONSTASCII_LENGTH(COM_TEXT_FLDMASTER_CC));
SwFieldIds nResId = SwFieldIds::Unknown;
- sal_Int32 nFound = 0;
- rTypeName = rName.getToken( 0, '.', nFound );
+ sal_Int32 nIdx = 0;
+ rTypeName = rName.getToken( 0, '.', nIdx );
if (rTypeName == "User")
nResId = SwFieldIds::User;
else if (rTypeName == "DDE")
@@ -2670,7 +2670,7 @@ static SwFieldIds lcl_GetIdByName( OUString& rName, OUString& rTypeName )
{
nResId = SwFieldIds::SetExp;
- const OUString sFieldTypName( rName.getToken( 1, '.' ));
+ const OUString sFieldTypName( rName.getToken( 0, '.', nIdx ));
const OUString sUIName( SwStyleNameMapper::GetSpecialExtraUIName( sFieldTypName ) );
if( sUIName != sFieldTypName )
More information about the Libreoffice-commits
mailing list