summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-11 10:46:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 07:56:12 +0200
commitfb1d3b580763a333bbbfe115d09e1b5cd8849675 (patch)
tree93cf0598c86ba188f69ab30425ffea856ea9886b /sc/source/ui/dbgui
parent40bc840da261fcc5652e5278dc2566b61f990884 (diff)
loplugin:constfields in sc
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 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/csvgrid.cxx4
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx9
2 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index f5b63fd3a48f..bff66aa2609e 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -47,7 +47,7 @@
struct Func_SetType
{
- sal_Int32 mnType;
+ sal_Int32 const mnType;
explicit Func_SetType( sal_Int32 nType ) : mnType( nType ) {}
void operator()( ScCsvColState& rState ) const
{ rState.mnType = mnType; }
@@ -55,7 +55,7 @@ struct Func_SetType
struct Func_Select
{
- bool mbSelect;
+ bool const mbSelect;
explicit Func_Select( bool bSelect ) : mbSelect( bSelect ) {}
void operator()( ScCsvColState& rState ) const
{ rState.Select( mbSelect ); }
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index ac3293403fd5..cddaf40e997b 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -285,6 +285,8 @@ static void lcl_SaveSeparators(
aItem.PutProperties(aNames, aValues);
}
+static constexpr OUStringLiteral gaTextSepList(SCSTR_TEXTSEP);
+
ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatName,
SvStream* pInStream, ScImportAsciiCall eCall ) :
ModalDialog (pParent, "TextImportCsvDialog",
@@ -294,7 +296,6 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa
mnRowPosCount(0),
- aTextSepList(SCSTR_TEXTSEP),
mcTextSep ( ScAsciiOptions::cDefaultTextSep ),
meCall(eCall),
mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS)
@@ -431,7 +432,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa
pNfRow->SetModifyHdl( LINK( this, ScImportAsciiDlg, FirstRowHdl ) );
// *** Separator characters ***
- lcl_FillCombo( *pCbTextSep, aTextSepList, mcTextSep );
+ lcl_FillCombo( *pCbTextSep, gaTextSepList, mcTextSep );
pCbTextSep->SetText( sTextSeparators );
Link<Edit&,void> aSeparatorHdl = LINK( this, ScImportAsciiDlg, SeparatorEditHdl );
@@ -646,7 +647,7 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt )
rOpt.SetFieldSeps( GetSeparators() );
rOpt.SetMergeSeps( pCkbAsOnce->IsChecked() );
rOpt.SetRemoveSpace( pCkbRemoveSpace->IsChecked() );
- rOpt.SetTextSep( lcl_CharFromCombo( *pCbTextSep, aTextSepList ) );
+ rOpt.SetTextSep( lcl_CharFromCombo( *pCbTextSep, gaTextSepList ) );
}
rOpt.SetQuotedAsText(pCkbQuotedAsText->IsChecked());
@@ -776,7 +777,7 @@ void ScImportAsciiDlg::SeparatorHdl( const Control* pCtrl )
OUString aOldFldSeps( maFieldSeparators);
maFieldSeparators = GetSeparators();
sal_Unicode cOldSep = mcTextSep;
- mcTextSep = lcl_CharFromCombo( *pCbTextSep, aTextSepList );
+ mcTextSep = lcl_CharFromCombo( *pCbTextSep, gaTextSepList );
// Any separator changed may result in completely different lines due to
// embedded line breaks.
if (cOldSep != mcTextSep || aOldFldSeps != maFieldSeparators)