[Libreoffice-commits] core.git: xmloff/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 18 22:03:32 UTC 2019
xmloff/source/chart/SchXMLTableContext.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit bbb004094381ec595267fa93449facd2f608b9f7
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Dec 30 15:44:35 2018 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Fri Jan 18 23:03:02 2019 +0100
Avoid getToken index for single call, minor simplification
Change-Id: If9ec36565cf42d11a0e1715f4aac28c365843a56
Reviewed-on: https://gerrit.libreoffice.org/66226
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index cb607630f502..9dceca28faed 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -997,9 +997,8 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
if( xLabel.is() )
{
aRange = xLabel->getSourceRangeRepresentation();
- sal_Int32 nSearchIndex = 0;
- OUString aSecondToken = aRange.getToken( 1, ' ', nSearchIndex );
- if( ::std::find( rTable.aHiddenColumns.begin(), rTable.aHiddenColumns.end(), aSecondToken.toInt32() ) == rTable.aHiddenColumns.end() )
+ const sal_Int32 nId {aRange.getToken(1, ' ').toInt32()};
+ if( ::std::find( rTable.aHiddenColumns.begin(), rTable.aHiddenColumns.end(), nId ) == rTable.aHiddenColumns.end() )
bHasUnhiddenColumns = true;
}
}
@@ -1039,8 +1038,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
if( xLabel.is() )
{
aRange = xLabel->getSourceRangeRepresentation();
- sal_Int32 nSearchIndex = 0;
- OUString aSecondToken = aRange.getToken( 1, ' ', nSearchIndex );
+ OUString aSecondToken = aRange.getToken(1, ' ');
if( !aSecondToken.isEmpty() )
aUsageMap[aSecondToken.toInt32()] = true;
}
More information about the Libreoffice-commits
mailing list