summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/imoptdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-09 09:55:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-10 12:59:38 +0200
commite4ff847fe0796420ba8023b70cad8589f5f19e9f (patch)
tree136786200de69f70dde4190c9725f35fe14b33e0 /sc/source/ui/dbgui/imoptdlg.cxx
parent5a89496ffcfcd561b3e595e01f35e0302fa00841 (diff)
loplugin:stringview check for getToken and trim
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 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.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 7c161da22754..3acb3cd00e36 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -22,6 +22,7 @@
#include <comphelper/string.hxx>
#include <unotools/charclass.hxx>
#include <osl/thread.h>
+#include <o3tl/string_view.hxx>
#include <global.hxx>
const char pStrFix[] = "FIX";
@@ -71,15 +72,15 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
{
// look at the same positions as in ScAsciiOptions
if ( nTokenCount >= 7 )
- bQuoteAllText = rStr.getToken(3, ',', nIdx) == "true"; // 7th token
+ bQuoteAllText = o3tl::getToken(rStr, 3, ',', nIdx) == u"true"; // 7th token
if ( nTokenCount >= 8 )
- bSaveNumberAsSuch = rStr.getToken(0, ',', nIdx) == "true";
+ bSaveNumberAsSuch = o3tl::getToken(rStr, 0, ',', nIdx) == u"true";
if ( nTokenCount >= 9 )
- bSaveAsShown = rStr.getToken(0, ',', nIdx) == "true";
+ bSaveAsShown = o3tl::getToken(rStr, 0, ',', nIdx) == u"true";
if ( nTokenCount >= 10 )
- bSaveFormulas = rStr.getToken(0, ',', nIdx) == "true";
+ bSaveFormulas = o3tl::getToken(rStr, 0, ',', nIdx) == u"true";
if ( nTokenCount >= 11 )
- bRemoveSpace = rStr.getToken(0, ',', nIdx) == "true";
+ bRemoveSpace = o3tl::getToken(rStr, 0, ',', nIdx) == u"true";
if ( nTokenCount >= 12 )
{
const OUString aTok(rStr.getToken(0, ',', nIdx));
@@ -92,7 +93,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
}
if ( nTokenCount >= 13 )
// If present, defaults to "false".
- bEvaluateFormulas = rStr.getToken(0, ',', nIdx) == "true";
+ bEvaluateFormulas = o3tl::getToken(rStr, 0, ',', nIdx) == u"true";
}
}