summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-02 16:02:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-03 21:24:35 +0100
commitbccf34c19ae022b67565e212fa4ec0d5213947de (patch)
tree73c2d2e29ad8d15999cbfb2ff554efa1e502a35e /linguistic
parent285289275d1cf1769080a208b55be984cd269e1e (diff)
ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dicimp.cxx9
-rw-r--r--linguistic/source/dicimp.hxx3
-rw-r--r--linguistic/source/dlistimp.cxx12
-rw-r--r--linguistic/source/lngsvcmgr.cxx8
4 files changed, 11 insertions, 21 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 42941cdbeda7..4ffb780bfd55 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -69,7 +69,6 @@ using ::rtl::OUString;
#define MAX_HEADER_LENGTH 16
-static const sal_Char* pDicExt = "dic";
static const sal_Char* pVerStr2 = "WBSWG2";
static const sal_Char* pVerStr5 = "WBSWG5";
static const sal_Char* pVerStr6 = "WBSWG6";
@@ -196,14 +195,6 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
return nDicVersion;
}
-
-
-const String GetDicExtension()
-{
- return String::CreateFromAscii( pDicExt );
-}
-
-
DictionaryNeo::DictionaryNeo() :
aDicEvtListeners( GetLinguMutex() ),
eDicType (DictionaryType_POSITIVE),
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index e40a0840002b..f2e51ad3d02b 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -45,8 +45,7 @@
#define DIC_MAX_ENTRIES 30000
-sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNeg );
-const String GetDicExtension();
+sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNeg );
class DictionaryNeo :
public ::cppu::WeakImplHelper2
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index f5ac64054e0d..d8ef8dd19d86 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -330,8 +330,8 @@ void DicList::SearchForDictionaries(
const rtl::OUString *pDirCnt = aDirCnt.getConstArray();
sal_Int32 nEntries = aDirCnt.getLength();
- String aDCN( String::CreateFromAscii( "dcn" ) );
- String aDCP( String::CreateFromAscii( "dcp" ) );
+ rtl::OUString aDCN("dcn");
+ rtl::OUString aDCP("dcp");
for (sal_Int32 i = 0; i < nEntries; ++i)
{
String aURL( pDirCnt[i] );
@@ -345,9 +345,9 @@ void DicList::SearchForDictionaries(
String aExt(aURL.Copy(nPos + 1));
aExt.ToLowerAscii();
- if(aExt == aDCN) // negativ
+ if (aDCN.equals(aExt)) // negativ
bNeg = sal_True;
- else if(aExt == aDCP) // positiv
+ else if (aDCP.equals(aExt)) // positiv
bNeg = sal_False;
else
continue; // andere Files
@@ -889,14 +889,14 @@ static sal_Bool IsVers2OrNewer( const String& rFileURL, sal_uInt16& nLng, sal_Bo
{
if (rFileURL.Len() == 0)
return sal_False;
- String aDIC( GetDicExtension() );
+ rtl::OUString aDIC("dic");
String aExt;
xub_StrLen nPos = rFileURL.SearchBackward( '.' );
if (STRING_NOTFOUND != nPos)
aExt = rFileURL.Copy( nPos + 1 );
aExt.ToLowerAscii();
- if(aExt != aDIC)
+ if (!aDIC.equals(aExt))
return sal_False;
// get stream to be used
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index b1c8055e8ca9..adf9da3a9b8c 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -986,7 +986,7 @@ void LngSvcMgr::SetCfgServiceLists( SpellCheckerDispatcher &rSpellDsp )
{
RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Spell" );
- String aNode( String::CreateFromAscii( "ServiceManager/SpellCheckerList" ) );
+ rtl::OUString aNode("ServiceManager/SpellCheckerList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
OUString *pNames = aNames.getArray();
sal_Int32 nLen = aNames.getLength();
@@ -1025,7 +1025,7 @@ void LngSvcMgr::SetCfgServiceLists( GrammarCheckingIterator &rGrammarDsp )
{
RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Grammar" );
- String aNode( String::CreateFromAscii( "ServiceManager/GrammarCheckerList" ) );
+ rtl::OUString aNode("ServiceManager/GrammarCheckerList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
OUString *pNames = aNames.getArray();
sal_Int32 nLen = aNames.getLength();
@@ -1068,7 +1068,7 @@ void LngSvcMgr::SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp )
{
RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Hyph" );
- String aNode( String::CreateFromAscii( "ServiceManager/HyphenatorList" ) );
+ rtl::OUString aNode("ServiceManager/HyphenatorList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
OUString *pNames = aNames.getArray();
sal_Int32 nLen = aNames.getLength();
@@ -1111,7 +1111,7 @@ void LngSvcMgr::SetCfgServiceLists( ThesaurusDispatcher &rThesDsp )
{
RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Thes" );
- String aNode( String::CreateFromAscii( "ServiceManager/ThesaurusList" ) );
+ rtl::OUString aNode("ServiceManager/ThesaurusList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
OUString *pNames = aNames.getArray();
sal_Int32 nLen = aNames.getLength();