Kaydet (Commit) 5118cb28 authored tarafından Noel Grandin's avatar Noel Grandin

convert linguistic/source/convdic.hxx from String to OUString

Change-Id: Id4dc56902722ea139e06e727a7090b9b10e3b347
üst 6317e4fa
......@@ -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");
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment