diff options
Diffstat (limited to 'linguistic/source/misc2.cxx')
-rw-r--r-- | linguistic/source/misc2.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index 16874c4ff830..dbfbd19f3f55 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -53,9 +53,9 @@ namespace linguistic /////////////////////////////////////////////////////////////////////////// -BOOL FileExists( const String &rMainURL ) +sal_Bool FileExists( const String &rMainURL ) { - BOOL bExists = FALSE; + sal_Bool bExists = sal_False; if (rMainURL.Len()) { try @@ -93,7 +93,7 @@ String GetFileURL( SvtPathOptions::Pathes ePath, const String &rFileName ) } -String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim ) +String GetModulePath( SvtPathOptions::Pathes ePath, sal_Bool bAddAccessDelim ) { String aRes; @@ -249,7 +249,10 @@ String GetWritableDictionaryURL( const String &rDicName ) aURLObj.Append( rDicName, INetURLObject::ENCODE_ALL ); DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL"); - return aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI ); + // NO_DECODE preserves the escape sequences that might be included in aDirName + // depending on the characters used in the path string. (Needed when comparing + // the dictionary URL with GetDictionaryWriteablePath in DicList::createDictionary.) + return aURLObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -265,11 +268,11 @@ String SearchFileInPaths( const sal_Int32 nPaths = rPaths.getLength(); for (sal_Int32 k = 0; k < nPaths; ++k) { - BOOL bIsURL = TRUE; + sal_Bool bIsURL = sal_True; INetURLObject aObj( rPaths[k] ); if ( aObj.HasError() ) { - bIsURL = FALSE; + bIsURL = sal_False; String aURL; if ( utl::LocalFileHelper::ConvertPhysicalNameToURL( rPaths[k], aURL ) ) aObj.SetURL( aURL ); |