Resolves: fdo#67743 user autocorr file not written
regression since c9c2fbe485
revert the logic change and keep the OUString conversion
Change-Id: Ia4f8c3be2b6e325122ae7b21c431c301b8afecad
This commit is contained in:
@@ -1542,7 +1542,9 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
|
|||||||
{
|
{
|
||||||
OSL_ENSURE(pLangTable->find(eLang) == pLangTable->end(), "Language already exists ");
|
OSL_ENSURE(pLangTable->find(eLang) == pLangTable->end(), "Language already exists ");
|
||||||
|
|
||||||
OUString sShareDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False ));
|
OUString sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False ));
|
||||||
|
OUString sShareDirFile( sUserDirFile );
|
||||||
|
|
||||||
SvxAutoCorrectLanguageListsPtr pLists = 0;
|
SvxAutoCorrectLanguageListsPtr pLists = 0;
|
||||||
|
|
||||||
Time nMinTime( 0, 2 ), nAktTime( Time::SYSTEM ), nLastCheckTime( Time::EMPTY );
|
Time nMinTime( 0, 2 ), nAktTime( Time::SYSTEM ), nLastCheckTime( Time::EMPTY );
|
||||||
@@ -1556,17 +1558,18 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
|
|||||||
// 2 minutes.
|
// 2 minutes.
|
||||||
if( bNewFile )
|
if( bNewFile )
|
||||||
{
|
{
|
||||||
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sShareDirFile );
|
sShareDirFile = sUserDirFile;
|
||||||
|
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile );
|
||||||
pLangTable->insert(eLang, pLists);
|
pLangTable->insert(eLang, pLists);
|
||||||
aLastFileTable.erase(nFndPos);
|
aLastFileTable.erase(nFndPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( ( FStatHelper::IsDocument( sShareDirFile ) ||
|
else if( ( FStatHelper::IsDocument( sUserDirFile ) ||
|
||||||
FStatHelper::IsDocument( sShareDirFile =
|
FStatHelper::IsDocument( sShareDirFile =
|
||||||
GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
|
GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
|
||||||
( sShareDirFile = sShareDirFile, bNewFile ))
|
( sShareDirFile = sUserDirFile, bNewFile ))
|
||||||
{
|
{
|
||||||
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sShareDirFile );
|
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile );
|
||||||
pLangTable->insert(eLang, pLists);
|
pLangTable->insert(eLang, pLists);
|
||||||
if (nFndPos != aLastFileTable.end())
|
if (nFndPos != aLastFileTable.end())
|
||||||
aLastFileTable.erase(nFndPos);
|
aLastFileTable.erase(nFndPos);
|
||||||
|
Reference in New Issue
Block a user