diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 13:00:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-04 12:21:03 +0100 |
commit | 2219d37896ee4a8662d9dccc06a73302f8ac6c7c (patch) | |
tree | 3e51fe58bdefe850dc9e62df7087795de8ead83d /sc/source/ui/dbgui | |
parent | a469d1353f4efd2c22d2fd8497a0d456e11760ad (diff) |
loplugin:stringliteraldefine in sc
Change-Id: I49159fa9b525ced9423c9a37d8a31b15cc8b1e98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126308
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/scuiasciiopt.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 2daa4af97f0c..d0af7db301a4 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -307,8 +307,6 @@ static void lcl_SaveSeparators( aItem.PutProperties(aNames, aValues); } -constexpr OUStringLiteral gaTextSepList(u"" SCSTR_TEXTSEP); - ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatName, SvStream* pInStream, ScImportAsciiCall eCall) : GenericDialogController(pParent, "modules/scalc/ui/textimportcsv.ui", "TextImportCsvDialog") @@ -487,10 +485,10 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa mxNfRow->connect_value_changed( LINK( this, ScImportAsciiDlg, FirstRowHdl ) ); // *** Separator characters *** - lcl_FillCombo( *mxCbTextSep, gaTextSepList, mcTextSep ); + lcl_FillCombo( *mxCbTextSep, SCSTR_TEXTSEP, mcTextSep ); mxCbTextSep->set_entry_text(sTextSeparators); // tdf#69207 - use selected text delimiter to parse the provided data - mcTextSep = lcl_CharFromCombo(*mxCbTextSep, gaTextSepList); + mcTextSep = lcl_CharFromCombo(*mxCbTextSep, SCSTR_TEXTSEP); Link<weld::Toggleable&,void> aSeparatorClickHdl =LINK( this, ScImportAsciiDlg, SeparatorClickHdl ); mxCbTextSep->connect_changed( LINK( this, ScImportAsciiDlg, SeparatorComboBoxHdl ) ); @@ -678,7 +676,7 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt ) rOpt.SetFieldSeps( GetSeparators() ); rOpt.SetMergeSeps( mxCkbAsOnce->get_active() ); rOpt.SetRemoveSpace( mxCkbRemoveSpace->get_active() ); - rOpt.SetTextSep( lcl_CharFromCombo( *mxCbTextSep, gaTextSepList ) ); + rOpt.SetTextSep( lcl_CharFromCombo( *mxCbTextSep, SCSTR_TEXTSEP ) ); } rOpt.SetQuotedAsText(mxCkbQuotedAsText->get_active()); @@ -836,7 +834,7 @@ void ScImportAsciiDlg::SeparatorHdl(const weld::Widget* pCtrl) OUString aOldFldSeps( maFieldSeparators); maFieldSeparators = GetSeparators(); sal_Unicode cOldSep = mcTextSep; - mcTextSep = lcl_CharFromCombo( *mxCbTextSep, gaTextSepList ); + mcTextSep = lcl_CharFromCombo( *mxCbTextSep, SCSTR_TEXTSEP ); // Any separator changed may result in completely different lines due to // embedded line breaks. if (cOldSep != mcTextSep || aOldFldSeps != maFieldSeparators) |