From 65e4a776e8315fd61fd67ad00d28985b11f0b79e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 11 Jul 2017 10:31:38 +0200 Subject: simplify some OUString::copy calls Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/svg/svgreader.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'filter/source') diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 13f802a86705..4b261efb8097 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -236,7 +236,7 @@ struct AnnotatingVisitor { const OUString sValue(xNode->getNodeValue()); ElementRefMapType::iterator aFound=maGradientIdMap.end(); - if ( sValue.copy(0,1) == "#" ) + if ( sValue.startsWith("#") ) aFound = maGradientIdMap.find(sValue.copy(1)); else aFound = maGradientIdMap.find(sValue); @@ -279,7 +279,7 @@ struct AnnotatingVisitor { const OUString sValue(xNode->getNodeValue()); ElementRefMapType::iterator aFound=maGradientIdMap.end(); - if ( sValue.copy(0,1) == "#" ) + if ( sValue.startsWith("#") ) aFound = maGradientIdMap.find(sValue.copy(1)); else aFound = maGradientIdMap.find(sValue); @@ -315,7 +315,7 @@ struct AnnotatingVisitor { OUString sValue(xNode->getNodeValue()); ElementRefMapType::iterator aFound=maElementIdMap.end(); - if ( sValue.copy(0,1) == "#" ) + if ( sValue.startsWith("#") ) sValue = sValue.copy(1); aFound = maElementIdMap.find(sValue); bool bFound = aFound != maElementIdMap.end(); @@ -988,7 +988,7 @@ struct AnnotatingVisitor case XML_HREF: { ElementRefMapType::iterator aFound=maStopIdMap.end(); - if ( sValue.copy(0,1) == "#" ) + if ( sValue.startsWith("#") ) aFound = maStopIdMap.find(sValue.copy(1)); else aFound = maStopIdMap.find(sValue); -- cgit