From b83cc2b0108a4ec2087221a6150a66578788e5b4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Jul 2018 17:16:16 +0200 Subject: loplugin:stringloop in basic, framework, sax, svtools Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d Reviewed-on: https://gerrit.libreoffice.org/58135 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sax/source/tools/converter.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sax') diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index fd450affb5f4..be9992d470ac 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -778,7 +778,7 @@ bool Converter::convertDuration(double& rfTime, if ( *(pStr++) != 'P' ) // duration must start with "P" return false; - OUString sDoubleStr; + OUStringBuffer sDoubleStr; bool bSuccess = true; bool bDone = false; bool bTimePart = false; @@ -807,7 +807,7 @@ bool Converter::convertDuration(double& rfTime, } else { - sDoubleStr += OUStringLiteral1(c); + sDoubleStr.append(c); } } } @@ -870,7 +870,7 @@ bool Converter::convertDuration(double& rfTime, double fHour = nHours; double fMin = nMins; double fSec = nSecs; - double fFraction = sDoubleStr.toDouble(); + double fFraction = sDoubleStr.makeStringAndClear().toDouble(); double fTempTime = fHour / 24; fTempTime += fMin / (24 * 60); fTempTime += fSec / (24 * 60 * 60); -- cgit