summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-22 12:26:52 +0100
committerEike Rathke <erack@redhat.com>2012-11-22 12:34:59 +0100
commit9955dbebbdf1b7d36fec272dfea46f57fab47e19 (patch)
tree80705ccc2382e7440ea76f62a544d64d12d1ce4f /sc
parent9c5d6ea5efb5f56a4ac96b4a8505ed84abbbc6bf (diff)
AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
Diffstat (limited to 'sc')
-rw-r--r--sc/Library_scfilt.mk1
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx2
-rw-r--r--sc/source/core/data/global.cxx12
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/core/tool/addincol.cxx7
-rw-r--r--sc/source/core/tool/callform.cxx2
-rw-r--r--sc/source/core/tool/zforauto.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx6
-rw-r--r--sc/source/ui/dbgui/textimportoptions.cxx2
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx2
12 files changed, 21 insertions, 23 deletions
diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 7a5256e4ec7a..8359c73c41d2 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,scfilt,\
tl \
utl \
vcl \
+ i18nisolang1 \
$(gb_UWINAPI) \
))
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 4286cfd71794..23d4e8049c99 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -720,7 +720,7 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
sal_uInt16 nCellLang = ((const SvxLanguageItem&)
pPattern->GetItem(ATTR_FONT_LANGUAGE)).GetValue();
if ( nCellLang == LANGUAGE_SYSTEM )
- nCellLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling
+ nCellLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling
pEngine->SetDefaultLanguage( nCellLang );
if ( eType == CELLTYPE_STRING )
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 61db8dbce155..0034d92caca2 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -240,7 +240,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
rPool.SetPoolDefaultItem(SdrShadowYDistItem(300));
// default for script spacing depends on locale, see SdDrawDocument ctor in sd
- LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage();
+ LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
if (MsLangId::isKorean(eOfficeLanguage) || eOfficeLanguage == LANGUAGE_JAPANESE)
{
// secondary is edit engine pool
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 378a2d46bc7b..3b6e40ceed73 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -971,7 +971,7 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
sal_Bool ScGlobal::IsSystemRTL()
{
- return MsLangId::isRightToLeft( Application::GetSettings().GetLanguage() );
+ return MsLangId::isRightToLeft( Application::GetSettings().GetLanguageTag().getLanguageType() );
}
sal_uInt8 ScGlobal::GetDefaultScriptType()
@@ -981,14 +981,14 @@ sal_uInt8 ScGlobal::GetDefaultScriptType()
// to get consistent behavior of text in simple cells and EditEngine,
// also same as GetAppLanguage() in Writer)
- return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
+ return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
}
LanguageType ScGlobal::GetEditDefaultLanguage()
{
// used for EditEngine::SetDefaultLanguage
- return Application::GetSettings().GetLanguage();
+ return Application::GetSettings().GetLanguageTag().getLanguageType();
}
sal_uInt16 ScGlobal::GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhich )
@@ -1115,7 +1115,7 @@ utl::TransliterationWrapper* ScGlobal::GetpTransliteration()
{
if ( !pTransliteration )
{
- const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage();
+ const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
pTransliteration = new ::utl::TransliterationWrapper(
::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE );
pTransliteration->loadModuleIfNeeded( eOfficeLanguage );
@@ -1164,7 +1164,7 @@ CollatorWrapper* ScGlobal::GetCaseCollator()
{
if ( !pCaseTransliteration )
{
- const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage();
+ const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
pCaseTransliteration = new ::utl::TransliterationWrapper(::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_CASESENSE );
pCaseTransliteration->loadModuleIfNeeded( eOfficeLanguage );
}
@@ -1182,7 +1182,7 @@ IntlWrapper* ScGlobal::GetScIntlWrapper()
{
if ( !pLocale )
{
- pLocale = new ::com::sun::star::lang::Locale( Application::GetSettings().GetLocale());
+ pLocale = new ::com::sun::star::lang::Locale( Application::GetSettings().GetLanguageTag().getLocale());
}
return pLocale;
}
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 020967f57451..fb5365318678 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -291,7 +291,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// If the UI language is Korean, the default Latin font has to
// be queried for Korean, too (the Latin language from the document can't be Korean).
// This is the same logic as in SwDocShell::InitNew.
- LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
+ LanguageType eUiLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
if (MsLangId::isKorean(eUiLanguage))
eLatin = eUiLanguage;
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index d7a19cd2f61d..b298969e1c58 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -790,9 +790,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
if ( xAddIn.is() && xName.is() )
{
// AddIns must use the language for which the office is installed
- LanguageType eOfficeLang = Application::GetSettings().GetUILanguage();
-
- lang::Locale aLocale( LanguageTag( eOfficeLang ).getLocale());
+ lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale());
xAddIn->setLocale( aLocale );
::rtl::OUString aServiceName( xName->getServiceName() );
@@ -1046,8 +1044,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
uno::Reference<lang::XLocalizable> xLoc( xInterface, uno::UNO_QUERY );
if ( xLoc.is() ) // optional in new add-ins
{
- LanguageType eOfficeLang = Application::GetSettings().GetUILanguage();
- lang::Locale aLocale( LanguageTag( eOfficeLang ).getLocale());
+ lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale());
xLoc->setLocale( aLocale );
}
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 8ba120bf861b..a07eea3d7e6a 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -206,7 +206,7 @@ bool InitExternalFunc(const rtl::OUString& rModuleName)
FARPROC fpSetLanguage = (FARPROC)pLib->getFunctionSymbol(SETLANGUAGE);
if ( fpSetLanguage )
{
- LanguageType eLanguage = Application::GetSettings().GetUILanguage();
+ LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
sal_uInt16 nLanguage = (sal_uInt16) eLanguage;
(*((SetLanguagePtr)fpSetLanguage))( nLanguage );
}
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index d3ddf047857f..94a22a6d92be 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -66,7 +66,7 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
eLnge = (LanguageType) nLang;
eSysLnge = (LanguageType) nSysLang;
if ( eSysLnge == LANGUAGE_SYSTEM ) // old versions did write it
- eSysLnge = Application::GetSettings().GetLanguage();
+ eSysLnge = Application::GetSettings().GetLanguageTag().getLanguageType();
}
void ScNumFormatAbbrev::Save( SvStream& rStream, CharSet eByteStrSet ) const
@@ -81,7 +81,7 @@ void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,
const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat);
if (pFormat)
{
- eSysLnge = Application::GetSettings().GetLanguage();
+ eSysLnge = Application::GetSettings().GetLanguageTag().getLanguageType();
eLnge = pFormat->GetLanguage();
sFormatstring = ((SvNumberformat*)pFormat)->GetFormatstring();
}
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index d5c9d7147aba..ecd7c0a66cb4 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -93,9 +93,9 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
mrDoc( rDoc ),
maDefPassword( CREATE_STRING( "VelvetSweatshop" ) ),
meTextEnc( eTextEnc ),
- meSysLang( Application::GetSettings().GetLanguage() ),
- meDocLang( Application::GetSettings().GetLanguage() ),
- meUILang( Application::GetSettings().GetUILanguage() ),
+ meSysLang( Application::GetSettings().GetLanguageTag().getLanguageType() ),
+ meDocLang( Application::GetSettings().GetLanguageTag().getLanguageType() ),
+ meUILang( Application::GetSettings().GetUILanguageTag().getLanguageType() ),
mnDefApiScript( ApiScriptType::LATIN ),
maScMaxPos( MAXCOL, MAXROW, MAXTAB ),
maXclMaxPos( EXC_MAXCOL2, EXC_MAXROW2, EXC_MAXTAB2 ),
diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx
index 503a5e4f5c4d..ba22489e1b9a 100644
--- a/sc/source/ui/dbgui/textimportoptions.cxx
+++ b/sc/source/ui/dbgui/textimportoptions.cxx
@@ -82,7 +82,7 @@ void ScTextImportOptionsDlg::init()
m_pLbCustomLang->SetLanguageList(
LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false, false);
- LanguageType eLang = Application::GetSettings().GetLanguage();
+ LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
m_pLbCustomLang->SelectLanguage(eLang);
m_pLbCustomLang->Disable();
}
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index b4470983235b..5ff8faf8901b 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -230,7 +230,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
{
LanguageType eLang = static_cast< LanguageType >( pLangItem->GetValue() );
if( eLang == LANGUAGE_SYSTEM )
- eLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling
+ eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling
if( eLang != meCurrLang )
{
meCurrLang = eLang;
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 574d1c6d7904..7fae7783ebc8 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -104,7 +104,7 @@ sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
else
eLnge = LANGUAGE_ENGLISH_US;
if ( eLnge == LANGUAGE_SYSTEM )
- eLnge = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling
+ eLnge = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling
return eLnge;
}