summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-10 16:34:44 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:40 +0200
commitb2ff26cc4e9a012b67c7244ee75ab98898d02827 (patch)
treee08992473ecfffbdf1e834c3af1d14fc3625e471 /linguistic
parentf9ce731120f2e308e8fe71eb1a1d981590362afb (diff)
convert include/linguistic/misc.hxx from String to OUString
Change-Id: I454c577d7b6c0994046de9cba076e6478a4ce309
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/misc.cxx18
-rw-r--r--linguistic/source/misc2.cxx10
2 files changed, 14 insertions, 14 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index d5b96bd69903..867dccfc4c38 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -392,12 +392,12 @@ uno::Sequence< sal_Int16 >
return aLangs;
}
-sal_Bool IsReadOnly( const String &rURL, sal_Bool *pbExist )
+sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist )
{
sal_Bool bRes = sal_False;
sal_Bool bExists = sal_False;
- if (rURL.Len() > 0)
+ if (!rURL.isEmpty())
{
try
{
@@ -583,7 +583,7 @@ osl::Mutex & lcl_GetCharClassMutex()
return aMutex;
}
-sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage )
+sal_Bool IsUpper( const OUString &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage )
{
MutexGuard aGuard( lcl_GetCharClassMutex() );
@@ -599,7 +599,7 @@ CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
sal_Int32 tlen = aTerm.getLength();
if ((pCC) && (tlen))
{
- String aStr(aTerm);
+ OUString aStr(aTerm);
sal_Int32 nc = 0;
for (sal_uInt16 tindex = 0; tindex < tlen; tindex++)
{
@@ -620,7 +620,7 @@ CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
return CAPTYPE_UNKNOWN;
}
-String ToLower( const String &rText, sal_Int16 nLanguage )
+OUString ToLower( const OUString &rText, sal_Int16 nLanguage )
{
MutexGuard aGuard( lcl_GetCharClassMutex() );
@@ -689,17 +689,17 @@ sal_Bool HasDigits( const OUString &rText )
return sal_False;
}
-sal_Bool IsNumeric( const String &rText )
+sal_Bool IsNumeric( const OUString &rText )
{
sal_Bool bRes = sal_False;
- xub_StrLen nLen = rText.Len();
- if (nLen)
+ if (!rText.isEmpty())
{
+ xub_StrLen nLen = rText.getLength();
bRes = sal_True;
xub_StrLen i = 0;
while (i < nLen)
{
- sal_Unicode cChar = rText.GetChar( i++ );
+ sal_Unicode cChar = rText[ i++ ];
if ( !((sal_Unicode)'0' <= cChar && cChar <= (sal_Unicode)'9') )
{
bRes = sal_False;
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index eab239de6f03..726493ebb3b9 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -41,10 +41,10 @@ namespace linguistic
{
-sal_Bool FileExists( const String &rMainURL )
+sal_Bool FileExists( const OUString &rMainURL )
{
sal_Bool bExists = sal_False;
- if (rMainURL.Len())
+ if (!rMainURL.isEmpty())
{
try
{
@@ -123,7 +123,7 @@ OUString GetDictionaryWriteablePath()
{
uno::Sequence< OUString > aPaths( GetMultiPaths_Impl( "Dictionary", PATH_FLAG_WRITABLE ) );
DBG_ASSERT( aPaths.getLength() == 1, "Dictionary_writable path corrupted?" );
- String aRes;
+ OUString aRes;
if (aPaths.getLength() > 0)
aRes = aPaths[0];
return aRes;
@@ -134,10 +134,10 @@ uno::Sequence< OUString > GetDictionaryPaths( sal_Int16 nPathFlags )
return GetMultiPaths_Impl( "Dictionary", nPathFlags );
}
-String GetWritableDictionaryURL( const String &rDicName )
+OUString GetWritableDictionaryURL( const OUString &rDicName )
{
// new user writable dictionaries should be created in the 'writable' path
- String aDirName( GetDictionaryWriteablePath() );
+ OUString aDirName( GetDictionaryWriteablePath() );
// build URL to use for a new (persistent) dictionary
INetURLObject aURLObj;