summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorRicardo Montania <ricardo@linuxafundo.com.br>2013-05-16 13:08:34 -0300
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-05-20 03:34:26 +0000
commitc9c2fbe485de2bb831bd2e58faef87a19ceff622 (patch)
tree238586e9cadaad55a073a76bbbd4433464dafc65 /editeng
parent5861f62ee9a14a32c3a3eeb31487f74d6a79d0eb (diff)
Drop String.AppendAscii in editeng
Change-Id: I25df0e20e2da50e91139cefba74af2741e5fffb5 Reviewed-on: https://gerrit.libreoffice.org/3923 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx20
-rw-r--r--editeng/source/outliner/outlvw.cxx10
2 files changed, 12 insertions, 18 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index eebf87c88df4..bb8f0896c587 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1604,9 +1604,7 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
{
OSL_ENSURE(pLangTable->find(eLang) == pLangTable->end(), "Language already exists ");
- String sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False ));
- String sShareDirFile( sUserDirFile );
-
+ OUString sShareDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False ));
SvxAutoCorrectLanguageListsPtr pLists = 0;
Time nMinTime( 0, 2 ), nAktTime( Time::SYSTEM ), nLastCheckTime( Time::EMPTY );
@@ -1620,18 +1618,17 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
// 2 minutes.
if( bNewFile )
{
- sShareDirFile = sUserDirFile;
- pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile );
+ pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sShareDirFile );
pLangTable->insert(eLang, pLists);
aLastFileTable.erase(nFndPos);
}
}
- else if( ( FStatHelper::IsDocument( sUserDirFile ) ||
+ else if( ( FStatHelper::IsDocument( sShareDirFile ) ||
FStatHelper::IsDocument( sShareDirFile =
GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
- ( sShareDirFile = sUserDirFile, bNewFile ))
+ ( sShareDirFile = sShareDirFile, bNewFile ))
{
- pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile );
+ pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sShareDirFile );
pLangTable->insert(eLang, pLists);
if (nFndPos != aLastFileTable.end())
aLastFileTable.erase(nFndPos);
@@ -1909,13 +1906,12 @@ sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
return sal_False;
}
-String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
+OUString SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
sal_Bool bNewFile, sal_Bool bTst ) const
{
- String sRet, sExt( LanguageTag( eLang ).getBcp47() );
+ OUString sRet, sExt( LanguageTag( eLang ).getBcp47() );
- sExt.Insert('_', 0);
- sExt.AppendAscii( ".dat" );
+ sExt = "_" + sExt + ".dat";
if( bNewFile )
( sRet = sUserAutoCorrFile ) += sExt;
else if( !bTst )
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index a76419e4e001..2229857dd837 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1312,7 +1312,7 @@ bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext(
const EditView &rEditView )
{
// get text and locale for thesaurus look up
- String aText;
+ OUString aText;
EditEngine *pEditEngine = rEditView.GetEditEngine();
ESelection aTextSel( rEditView.GetSelection() );
if (!aTextSel.HasRange())
@@ -1320,17 +1320,15 @@ bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext(
aText = pEditEngine->GetText( aTextSel );
aTextSel.Adjust();
LanguageType nLang = pEditEngine->GetLanguage( aTextSel.nStartPara, aTextSel.nStartPos );
- String aLangText( LanguageTag( nLang ).getBcp47() );
+ OUString aLangText( LanguageTag( nLang ).getBcp47() );
// set word and locale to look up as status value
- String aStatusVal( aText );
- aStatusVal.AppendAscii( "#" );
- aStatusVal += aLangText;
+ OUString aStatusVal= aText + "#" + aLangText;
rStatusVal = aStatusVal;
rLang = nLang;
- return aText.Len() > 0;
+ return aText.getLength() > 0;
}