summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/imoptdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-10 20:17:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-11 14:45:38 +0200
commit85c2ed8dc790689ce69ff0a08ff5a4de98df54b7 (patch)
treef7d7f6fce51d1a4443608971da7d9c42b1201fa3 /sc/source/ui/dbgui/imoptdlg.cxx
parent117688bd3f51a7a50b2620aa7dcc0c065f29d402 (diff)
loplugin:stringview add check for getToken().toInt32
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/dbgui/imoptdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 3acb3cd00e36..3fbbf8f8355c 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -58,14 +58,14 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
bFixedWidth = true;
else
nFieldSepCode = ScAsciiOptions::GetWeightedFieldSep( aToken, true);
- nTextSepCode = static_cast<sal_Unicode>(rStr.getToken(0, ',', nIdx).toInt32());
+ nTextSepCode = static_cast<sal_Unicode>(o3tl::toInt32(o3tl::getToken(rStr, 0, ',', nIdx)));
aStrFont = rStr.getToken(0, ',', nIdx);
eCharSet = ScGlobal::GetCharsetValue(aStrFont);
if ( nTokenCount == 4 )
{
// compatibility with old options string: "Save as shown" as 4th token, numeric
- bSaveAsShown = rStr.getToken(0, ',', nIdx).toInt32() != 0;
+ bSaveAsShown = o3tl::toInt32(o3tl::getToken(rStr, 0, ',', nIdx)) != 0;
bQuoteAllText = true; // use old default then
}
else