From a7369d98991eb41e0e6bb008ef0305c17859540e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Nov 2016 14:37:24 +0200 Subject: loplugin:oncevar in helpcompiler..reportdesign Change-Id: I2dc57931fb230953c285aeb18f57c0a41fedafcb Reviewed-on: https://gerrit.libreoffice.org/30463 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- linguistic/source/dicimp.cxx | 4 +--- linguistic/source/dlistimp.cxx | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'linguistic') diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 3e7ff05ab18e..5efe94f475de 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -1018,9 +1018,7 @@ void DicEntry::splitDicFileWord(const OUString &rDicFileWord, { MutexGuard aGuard( GetLinguMutex() ); - static const char aDelim[] = "=="; - - sal_Int32 nDelimPos = rDicFileWord.indexOf( aDelim ); + sal_Int32 nDelimPos = rDicFileWord.indexOf( "==" ); if (-1 != nDelimPos) { sal_Int32 nTriplePos = nDelimPos + 2; diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index f4506ee5343f..6b2a43be4068 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -790,16 +790,13 @@ static void AddInternal( if (rDic.is()) { //! TL TODO: word iterator should be used to break up the text - static const char aDefWordDelim[] = - "!\"#$%&'()*+,-/:;<=>?[]\\_^`{|}~\t \n"; - OUString aDelim(aDefWordDelim); + OUString aDelim("!\"#$%&'()*+,-/:;<=>?[]\\_^`{|}~\t \n"); OSL_ENSURE(aDelim.indexOf(static_cast('.')) == -1, "ensure no '.'"); OUString aToken; sal_Int32 nPos = 0; - while (-1 != - (nPos = lcl_GetToken( aToken, rNew, nPos, aDelim ))) + while (-1 != (nPos = lcl_GetToken( aToken, rNew, nPos, aDelim ))) { if( !aToken.isEmpty() && !IsNumeric( aToken ) ) { -- cgit