diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 11:01:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 12:45:22 +0200 |
commit | dba55c304a330a355147a39e53ec4c7cf5c5c3f5 (patch) | |
tree | dab1da47f32006f6d4362f492f0c8d6255737b5d /vcl | |
parent | 8505d29d61a76ffa506be0dc86fe2ec7ed647483 (diff) |
loplugin:unnecessarygetstr extend to createFromAscii
idea from mike kaganski
Change-Id: I0ecb9cad091d7a048d2ddae73165bf22748f3872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/field2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/mtfxmldump.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index be02536ef513..726af088d89c 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2553,7 +2553,7 @@ void TimeFormatter::ImplTimeReformat( std::u16string_view rStr, OUString& rOutSt ostr.fill('0'); ostr.width(9); ostr << aTempTime.GetNanoSec(); - rOutStr += OUString::createFromAscii(ostr.str().c_str()); + rOutStr += OUString::createFromAscii(ostr.str()); } else if ( mbDuration ) rOutStr = ImplGetLocaleDataWrapper().getDuration( aTempTime, bSecond, b100Sec ); @@ -2784,7 +2784,7 @@ OUString TimeFormatter::FormatTime(const tools::Time& rNewTime, TimeFieldFormat ostr.fill('0'); ostr.width(9); ostr << rNewTime.GetNanoSec(); - aStr += OUString::createFromAscii(ostr.str().c_str()); + aStr += OUString::createFromAscii(ostr.str()); } else if ( bDuration ) { diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index 7092ebfa54fc..fc38ee0a5a97 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -371,7 +371,7 @@ OUString convertFractionToString(const Fraction& aFraction) ss << aFraction; - return OUString::createFromAscii(ss.str().c_str()); + return OUString::createFromAscii(ss.str()); } OUString convertGradientStyleToOUString(css::awt::GradientStyle eStyle) @@ -405,7 +405,7 @@ OUString convertLanguageTypeToString(LanguageType rLanguageType) { std::stringstream ss; ss << std::hex << std::setfill ('0') << std::setw(4) << rLanguageType.get(); - return "#" + OUString::createFromAscii(ss.str().c_str()); + return "#" + OUString::createFromAscii(ss.str()); } OUString convertWallpaperStyleToString(WallpaperStyle eWallpaperStyle) @@ -480,7 +480,7 @@ OUString hex32(sal_uInt32 nNumber) { std::stringstream ss; ss << std::hex << std::setfill('0') << std::setw(8) << nNumber; - return OUString::createFromAscii(ss.str().c_str()); + return OUString::createFromAscii(ss.str()); } OUString toHexString(const sal_uInt8* nData, sal_uInt32 nDataSize){ @@ -491,7 +491,7 @@ OUString toHexString(const sal_uInt8* nData, sal_uInt32 nDataSize){ aStrm << std::setw(2) << std::setfill('0') << std::hex << static_cast<int>(nData[i]); } - return OUString::createFromAscii(aStrm.str().c_str()); + return OUString::createFromAscii(aStrm.str()); } void writePoint(tools::XmlWriter& rWriter, Point const& rPoint) |