summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomoyuki Kubota <himajin100000@gmail.com>2019-04-20 22:46:27 +0900
committerMichael Stahl <Michael.Stahl@cib.de>2019-04-23 12:51:51 +0200
commit47d25dc5abe000ce751cb1e4dbd1f85f7198ca05 (patch)
tree7c0fd093b90efa7697fd8ce9459c459d86646ab7
parenttdf#42949 Fix IWYU warnings in include/editeng/[f-x]* (diff)
downloadcore-47d25dc5abe000ce751cb1e4dbd1f85f7198ca05.tar.gz
core-47d25dc5abe000ce751cb1e4dbd1f85f7198ca05.zip
tdf#123043 make type character detection unicode-aware
Change-Id: I98886a7d13a43cc3202d45f96ceb5062f76f0784 Reviewed-on: https://gerrit.libreoffice.org/71013 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--basctl/source/basicide/baside2b.cxx8
-rw-r--r--basic/source/sbx/sbxvar.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b18ef9ab1190..2e3425da97ce 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -92,7 +92,7 @@ int const nScrollLine = 12;
int const nScrollPage = 60;
int const DWBORDER = 3;
-char const cSuffixes[] = "%&!#@$";
+OUString const cSuffixes {"%&!#@$"};
} // namespace
@@ -166,13 +166,13 @@ void lcl_SeparateNameAndIndex( const OUString& rVName, OUString& rVar, OUString&
if ( !rVar.isEmpty() )
{
sal_uInt16 nLastChar = rVar.getLength()-1;
- if ( strchr( cSuffixes, rVar[ nLastChar ] ) )
+ if ( cSuffixes.indexOf(rVar[ nLastChar ] ) >= 0 )
rVar = rVar.replaceAt( nLastChar, 1, "" );
}
if ( !rIndex.isEmpty() )
{
sal_uInt16 nLastChar = rIndex.getLength()-1;
- if ( strchr( cSuffixes, rIndex[ nLastChar ] ) )
+ if ( cSuffixes.indexOf(rIndex[ nLastChar ] ) >=0 )
rIndex = rIndex.replaceAt( nLastChar, 1, "" );
}
}
@@ -355,7 +355,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
if ( !aWord.isEmpty() && !comphelper::string::isdigitAsciiString(aWord) )
{
sal_uInt16 nLastChar = aWord.getLength() - 1;
- if ( strchr( cSuffixes, aWord[ nLastChar ] ) )
+ if ( cSuffixes.indexOf(aWord[ nLastChar ] ) >= 0 )
aWord = aWord.replaceAt( nLastChar, 1, "" );
SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord );
if (SbxVariable const* pVar = IsSbxVariable(pSBX))
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index ec67be889e3a..bab30af36989 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -220,7 +220,7 @@ void SbxVariable::SetName( const OUString& rName )
const OUString& SbxVariable::GetName( SbxNameType t ) const
{
- static const char cSuffixes[] = " %&!#@ $";
+ static const OUString cSuffixes { " %&!#@ $" };
if( t == SbxNameType::NONE )
{
return maName;