summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-10 16:43:31 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:41 +0200
commit5118cb286865a6617273cb1a8de963b893cdf86c (patch)
treeb90d95791f904ac614790dd433ae10ea2ce36575 /linguistic
parent6317e4fa97278c1b9f1ab76696bf816f3605a354 (diff)
convert linguistic/source/convdic.hxx from String to OUString
Change-Id: Id4dc56902722ea139e06e727a7090b9b10e3b347
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx20
-rw-r--r--linguistic/source/convdic.hxx12
2 files changed, 16 insertions, 16 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 323422af4045..5fbe2572442e 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -123,18 +123,18 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
}
}
-sal_Bool IsConvDic( const String &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType )
+sal_Bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType )
{
sal_Bool bRes = sal_False;
- if (rFileURL.Len() == 0)
+ if (rFileURL.isEmpty())
return bRes;
// check if file extension matches CONV_DIC_EXT
String aExt;
- xub_StrLen nPos = rFileURL.SearchBackward( '.' );
- if (STRING_NOTFOUND != nPos)
- aExt = rFileURL.Copy( nPos + 1 );
+ sal_Int32 nPos = rFileURL.lastIndexOf( '.' );
+ if (-1 != nPos)
+ aExt = rFileURL.copy( nPos + 1 );
aExt.ToLowerAscii();
if (!aExt.EqualsAscii( CONV_DIC_EXT ))
return bRes;
@@ -164,11 +164,11 @@ sal_Bool IsConvDic( const String &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvTy
ConvDic::ConvDic(
- const String &rName,
+ const OUString &rName,
sal_Int16 nLang,
sal_Int16 nConvType,
- sal_Bool bBiDirectional,
- const String &rMainURL) :
+ sal_Bool bBiDirectional,
+ const OUString &rMainURL) :
aFlushListeners( GetLinguMutex() )
{
aName = rName;
@@ -188,7 +188,7 @@ ConvDic::ConvDic(
bIsModified = bIsActive = sal_False;
bIsReadonly = sal_False;
- if( rMainURL.Len() > 0 )
+ if( !rMainURL.isEmpty() )
{
sal_Bool bExists = sal_False;
bIsReadonly = IsReadOnly( rMainURL, &bExists );
@@ -232,7 +232,7 @@ void ConvDic::Load()
void ConvDic::Save()
{
DBG_ASSERT( !bNeedEntries, "saving while entries missing" );
- if (aMainURL.Len() == 0 || bNeedEntries)
+ if (aMainURL.isEmpty() || bNeedEntries)
return;
DBG_ASSERT(!INetURLObject( aMainURL ).HasError(), "invalid URL");
diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx
index 375acbbca2fa..3261ffd8389a 100644
--- a/linguistic/source/convdic.hxx
+++ b/linguistic/source/convdic.hxx
@@ -40,7 +40,7 @@
#define SN_CONV_DICTIONARY "com.sun.star.linguistic2.ConversionDictionary"
-sal_Bool IsConvDic( const String &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType );
+sal_Bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType );
struct StrLT
{
@@ -87,9 +87,9 @@ protected:
std::auto_ptr< PropTypeMap > pConvPropType;
- String aMainURL; // URL to file
- OUString aName;
- sal_Int16 nLanguage;
+ OUString aMainURL; // URL to file
+ OUString aName;
+ sal_Int16 nLanguage;
sal_Int16 nConversionType;
sal_Int16 nMaxLeftCharCount;
sal_Int16 nMaxRightCharCount;
@@ -108,11 +108,11 @@ protected:
void Save();
public:
- ConvDic( const String &rName,
+ ConvDic( const OUString &rName,
sal_Int16 nLanguage,
sal_Int16 nConversionType,
sal_Bool bBiDirectional,
- const String &rMainURL);
+ const OUString &rMainURL);
virtual ~ConvDic();
// XConversionDictionary