Kaydet (Commit) 76fa859a authored tarafından Noel Grandin's avatar Noel Grandin

convert SvxAutoCorrectLanguageLists from String to OUString

Change-Id: Ib10ec6b9ab8d3a6538a5e6cafa349774d123531c
üst 7b3f9c73
......@@ -1871,8 +1871,8 @@ OUString SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists(
SvxAutoCorrect& rParent,
const String& rShareAutoCorrectFile,
const String& rUserAutoCorrectFile)
const OUString& rShareAutoCorrectFile,
const OUString& rUserAutoCorrectFile)
: sShareAutoCorrFile( rShareAutoCorrectFile ),
sUserAutoCorrFile( rUserAutoCorrectFile ),
aModifiedDate( Date::EMPTY ),
......@@ -2121,10 +2121,10 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList()
return pCplStt_ExcptLst;
}
sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew)
{
sal_Bool aRet = sal_False;
if( rNew.Len() && GetCplSttExceptList()->insert( rNew ).second )
if( !rNew.isEmpty() && GetCplSttExceptList()->insert( rNew ).second )
{
MakeUserStorage_Impl();
SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
......@@ -2141,11 +2141,11 @@ sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
return aRet;
}
sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew)
{
sal_Bool aRet = sal_False;
SvStringsISortDtor* pExceptList = LoadWrdSttExceptList();
if( rNew.Len() && pExceptList && pExceptList->insert( rNew ).second )
if( !rNew.isEmpty() && pExceptList && pExceptList->insert( rNew ).second )
{
MakeUserStorage_Impl();
SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
......@@ -2244,7 +2244,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetWrdSttExceptList()
return pWrdStt_ExcptLst;
}
void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName )
void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const OUString& rName )
{
if( sShareAutoCorrFile != sUserAutoCorrFile )
{
......@@ -2489,7 +2489,7 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutoco
return bRet;
}
sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, const String& rLong )
sal_Bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, const OUString& rLong )
{
// First get the current list!
GetAutocorrWordList();
......@@ -2535,7 +2535,7 @@ sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, const Strin
return bRet;
}
sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
sal_Bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort,
SfxObjectShell& rShell )
{
// First get the current list!
......@@ -2572,7 +2572,7 @@ sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
}
// Delete an entry
sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const OUString& rShort )
{
// First get the current list!
GetAutocorrWordList();
......
......@@ -170,7 +170,7 @@ public:
class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
{
String sShareAutoCorrFile, sUserAutoCorrFile;
OUString sShareAutoCorrFile, sUserAutoCorrFile;
// If the AutoCorr file is newer
Date aModifiedDate;
Time aModifiedTime, aLastCheckTime;
......@@ -192,13 +192,13 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
sal_Bool bConvert = sal_False);
sal_Bool MakeBlocklist_Imp( SotStorage& rStg );
void RemoveStream_Imp( const String& rName );
void RemoveStream_Imp( const OUString& rName );
void MakeUserStorage_Impl();
public:
SvxAutoCorrectLanguageLists( SvxAutoCorrect& rParent,
const String& rShareAutoCorrectFile,
const String& rUserAutoCorrectFile);
const OUString& rShareAutoCorrectFile,
const OUString& rUserAutoCorrectFile);
~SvxAutoCorrectLanguageLists();
// Load, Set, Get - the replacement list
......@@ -212,7 +212,7 @@ public:
void SaveCplSttExceptList();
void SetCplSttExceptList( SvStringsISortDtor* pList );
SvStringsISortDtor* GetCplSttExceptList();
sal_Bool AddToCplSttExceptList(const String& rNew);
sal_Bool AddToCplSttExceptList(const OUString& rNew);
// Load, Set, Get the exception list for 2 Capital letters at the
// beginning of a word.
......@@ -220,17 +220,17 @@ public:
void SaveWrdSttExceptList();
void SetWrdSttExceptList( SvStringsISortDtor* pList );
SvStringsISortDtor* GetWrdSttExceptList();
sal_Bool AddToWrdSttExceptList(const String& rNew);
sal_Bool AddToWrdSttExceptList(const OUString& rNew);
// Save word substitutions:
// Store these directly in the storage. The word list is updated
// accordingly!
// - pure Text
sal_Bool PutText( const String& rShort, const String& rLong );
sal_Bool PutText( const OUString& rShort, const OUString& rLong );
// - Text with attribution (only the SWG - SWG format!)
sal_Bool PutText( const String& rShort, SfxObjectShell& );
sal_Bool PutText( const OUString& rShort, SfxObjectShell& );
// - Deleting an entry
sal_Bool DeleteText( const String& rShort );
sal_Bool DeleteText( const OUString& rShort );
// - Make combined changes in one pass
sal_Bool MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNewEntries, std::vector<SvxAutocorrWord>& aDeleteEntries );
};
......
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