AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
This commit is contained in:
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_libraries,acc,\
|
||||
cppu \
|
||||
cppuhelper \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
sot \
|
||||
svl \
|
||||
svt \
|
||||
|
||||
@@ -185,7 +185,7 @@ throw(RuntimeException)
|
||||
Locale AccessibleIconChoiceCtrlEntry::implGetLocale()
|
||||
{
|
||||
Locale aLocale;
|
||||
aLocale = Application::GetSettings().GetUILocale();
|
||||
aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
return aLocale;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace accessibility
|
||||
Locale AccessibleListBoxEntry::implGetLocale()
|
||||
{
|
||||
Locale aLocale;
|
||||
aLocale = Application::GetSettings().GetUILocale();
|
||||
aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
return aLocale;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ namespace accessibility
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -394,7 +394,7 @@ namespace accessibility
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -567,7 +567,7 @@ namespace accessibility
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -43,7 +43,7 @@ void TkResMgr::ensureImplExists()
|
||||
if (m_pImpl)
|
||||
return;
|
||||
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
m_pImpl = SimpleResMgr::Create("acc", aLocale );
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ Locale OAccessibleMenuComponent::getLocale( ) throw (IllegalAccessibleComponent
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -391,7 +391,7 @@ Locale OAccessibleMenuItemComponent::getLocale( ) throw (IllegalAccessibleCompo
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -134,7 +134,7 @@ OUString VCLXAccessibleListItem::implGetText()
|
||||
// -----------------------------------------------------------------------------
|
||||
Locale VCLXAccessibleListItem::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void VCLXAccessibleListItem::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
|
||||
|
||||
@@ -137,7 +137,7 @@ OUString VCLXAccessibleMenuItem::implGetText()
|
||||
|
||||
Locale VCLXAccessibleMenuItem::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -191,7 +191,7 @@ OUString VCLXAccessibleStatusBarItem::implGetText()
|
||||
|
||||
lang::Locale VCLXAccessibleStatusBarItem::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -381,7 +381,7 @@ Locale VCLXAccessibleStatusBarItem::getLocale( ) throw (IllegalAccessibleCompon
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -224,7 +224,7 @@ OUString VCLXAccessibleTabPage::implGetText()
|
||||
|
||||
lang::Locale VCLXAccessibleTabPage::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -429,7 +429,7 @@ Locale VCLXAccessibleTabPage::getLocale( ) throw (IllegalAccessibleComponentSta
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -106,7 +106,7 @@ OUString VCLXAccessibleTextComponent::implGetText()
|
||||
|
||||
lang::Locale VCLXAccessibleTextComponent::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -229,7 +229,7 @@ OUString VCLXAccessibleToolBoxItem::implGetText()
|
||||
// -----------------------------------------------------------------------------
|
||||
Locale VCLXAccessibleToolBoxItem::implGetLocale()
|
||||
{
|
||||
return Application::GetSettings().GetUILocale();
|
||||
return Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void VCLXAccessibleToolBoxItem::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
|
||||
|
||||
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,avmedia,\
|
||||
cppu \
|
||||
cppuhelper \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
sfx \
|
||||
svl \
|
||||
svt \
|
||||
|
||||
@@ -29,7 +29,7 @@ ResMgr* GetResMgr()
|
||||
|
||||
if( !pResMgr )
|
||||
{
|
||||
pResMgr = ResMgr::CreateResMgr("avmedia", Application::GetSettings().GetUILocale());
|
||||
pResMgr = ResMgr::CreateResMgr("avmedia", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
}
|
||||
|
||||
return pResMgr;
|
||||
|
||||
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_use_libraries,basctl,\
|
||||
editeng \
|
||||
fwe \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
sb \
|
||||
sfx \
|
||||
sot \
|
||||
|
||||
@@ -484,7 +484,7 @@ Locale AccessibleDialogControlShape::getLocale( ) throw (IllegalAccessibleCompo
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -801,7 +801,7 @@ Locale AccessibleDialogWindow::getLocale( ) throw (IllegalAccessibleComponentSt
|
||||
{
|
||||
OExternalLockGuard aGuard( this );
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -279,7 +279,7 @@ String EditorWindow::GetWordAtCursor()
|
||||
const TextPaM& rSelStart = rSelection.GetStart();
|
||||
const TextPaM& rSelEnd = rSelection.GetEnd();
|
||||
String aText = pTextEngine->GetText( rSelEnd.GetPara() );
|
||||
CharClass aClass( ::comphelper::getProcessComponentContext() , Application::GetSettings().GetLocale() );
|
||||
CharClass aClass( ::comphelper::getProcessComponentContext() , Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
xub_StrLen nSelStart = static_cast< xub_StrLen >( rSelStart.GetIndex() );
|
||||
xub_StrLen nSelEnd = static_cast< xub_StrLen >( rSelEnd.GetIndex() );
|
||||
xub_StrLen nLength = static_cast< xub_StrLen >( aText.Len() );
|
||||
@@ -826,7 +826,7 @@ void EditorWindow::ImplSetFont()
|
||||
get_value_or( OUString() ) );
|
||||
if ( sFontName.isEmpty() )
|
||||
{
|
||||
Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0 , this ) );
|
||||
Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) );
|
||||
sFontName = aTmpFont.GetName();
|
||||
}
|
||||
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
|
||||
|
||||
@@ -1065,7 +1065,7 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum
|
||||
}
|
||||
|
||||
// Resource?
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
Reference< task::XInteractionHandler > xDummyHandler;
|
||||
bool bReadOnly = true;
|
||||
Reference< XStringResourceWithLocation > xImportStringResource =
|
||||
|
||||
@@ -126,7 +126,7 @@ Dll::Dll () :
|
||||
(void)pFact;
|
||||
|
||||
ResMgr* pMgr = ResMgr::CreateResMgr(
|
||||
"basctl", Application::GetSettings().GetUILocale()
|
||||
"basctl", Application::GetSettings().GetUILanguageTag().getLocale()
|
||||
);
|
||||
|
||||
Module::Get() = new Module( pMgr, &DocShell::Factory() );
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace {
|
||||
long nWidth = 0;
|
||||
Reference< XBreakIterator > xBreakIter( vcl::unohelper::CreateBreakIterator() );
|
||||
sal_Int32 nStartPos = 0;
|
||||
const Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
const Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
Boundary aBoundary = xBreakIter->getWordBoundary(
|
||||
rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, true );
|
||||
|
||||
@@ -341,7 +341,7 @@ void SetDefaultLanguageDialog::FillLanguageBox()
|
||||
}
|
||||
else
|
||||
// preselect current UI language
|
||||
m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguage() );
|
||||
m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() );
|
||||
}
|
||||
|
||||
void SetDefaultLanguageDialog::CalcInfoSize()
|
||||
|
||||
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_scanner, \
|
||||
cppuhelper \
|
||||
sal \
|
||||
salhelper \
|
||||
i18nisolang1 \
|
||||
sb \
|
||||
sot \
|
||||
svl \
|
||||
|
||||
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,sb,\
|
||||
cppuhelper \
|
||||
sal \
|
||||
salhelper \
|
||||
i18nisolang1 \
|
||||
sot \
|
||||
svl \
|
||||
svt \
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace
|
||||
comphelper::getProcessComponentContext(),
|
||||
com::sun::star::i18n::TransliterationModules_IGNORE_CASE )
|
||||
{
|
||||
const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage();
|
||||
const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
m_aTransliteration.loadModuleIfNeeded( eOfficeLanguage );
|
||||
}
|
||||
utl::TransliterationWrapper& getTransliteration() { return m_aTransliteration; }
|
||||
|
||||
@@ -100,7 +100,7 @@ bool BasicCharClass::isLetterUnicode( sal_Unicode c )
|
||||
{
|
||||
static CharClass* pCharClass = NULL;
|
||||
if( pCharClass == NULL )
|
||||
pCharClass = new CharClass( Application::GetSettings().GetLocale() );
|
||||
pCharClass = new CharClass( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
// can we get pCharClass to accept a sal_Unicode instead of this waste?
|
||||
return pCharClass->isLetter( rtl::OUString(c), 0 );
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ BasResId::BasResId( sal_uInt32 nId ) :
|
||||
BasicDLL::BasicDLL()
|
||||
{
|
||||
BASIC_DLL() = this;
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
pBasResMgr = ResMgr::CreateResMgr("sb", aLocale );
|
||||
bDebugMode = false;
|
||||
bBreakEnabled = true;
|
||||
|
||||
@@ -137,7 +137,7 @@ static const CharClass& GetCharClass( void )
|
||||
if( bNeedsInit )
|
||||
{
|
||||
bNeedsInit = false;
|
||||
aLocale = Application::GetSettings().GetLocale();
|
||||
aLocale = Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
static CharClass aCharClass( aLocale );
|
||||
return aCharClass;
|
||||
@@ -1650,7 +1650,7 @@ RTLFUNC(StrComp)
|
||||
i18n::TransliterationModules_IGNORE_WIDTH );
|
||||
}
|
||||
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
pTransliterationWrapper->loadModuleIfNeeded( eLangType );
|
||||
nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 );
|
||||
}
|
||||
@@ -1953,7 +1953,7 @@ RTLFUNC(DateValue)
|
||||
// by using SbiInstance::GetNumberFormatter.
|
||||
// It seems that both locale number formatter and English number formatter
|
||||
// are supported in Visual Basic.
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) )
|
||||
{
|
||||
// Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value;
|
||||
|
||||
@@ -74,7 +74,7 @@ static Reference< XCalendar3 > getLocaleCalendar( void )
|
||||
static com::sun::star::lang::Locale aLastLocale;
|
||||
static bool bNeedsInit = true;
|
||||
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLocale();
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLanguageTag().getLocale();
|
||||
bool bNeedsReload = false;
|
||||
if( bNeedsInit )
|
||||
{
|
||||
@@ -82,7 +82,8 @@ static Reference< XCalendar3 > getLocaleCalendar( void )
|
||||
bNeedsReload = true;
|
||||
}
|
||||
else if( aLocale.Language != aLastLocale.Language ||
|
||||
aLocale.Country != aLastLocale.Country )
|
||||
aLocale.Country != aLastLocale.Country ||
|
||||
aLocale.Variant != aLastLocale.Variant )
|
||||
{
|
||||
bNeedsReload = true;
|
||||
}
|
||||
@@ -2543,7 +2544,7 @@ RTLFUNC(FormatDateTime)
|
||||
SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n );
|
||||
}
|
||||
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType );
|
||||
Color* pCol;
|
||||
pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol );
|
||||
|
||||
@@ -321,7 +321,7 @@ SbiDllMgr* SbiInstance::GetDllMgr()
|
||||
// #39629 create NumberFormatter with the help of a static method now
|
||||
SvNumberFormatter* SbiInstance::GetNumberFormatter()
|
||||
{
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
SvtSysLocale aSysLocale;
|
||||
DateFormat eDate = aSysLocale.GetLocaleData().getDateFormat();
|
||||
if( pNumberFormatter )
|
||||
@@ -358,7 +358,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
|
||||
}
|
||||
else
|
||||
{
|
||||
eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
}
|
||||
DateFormat eDate;
|
||||
if( peFormatterDateFormat )
|
||||
|
||||
@@ -289,7 +289,7 @@ void SbiRuntime::StepLIKE()
|
||||
|
||||
aSearchOpt.algorithmType = com::sun::star::util::SearchAlgorithms_REGEXP;
|
||||
|
||||
aSearchOpt.Locale = Application::GetSettings().GetLocale();
|
||||
aSearchOpt.Locale = Application::GetSettings().GetLanguageTag().getLocale();
|
||||
aSearchOpt.searchString = pattern;
|
||||
|
||||
int bTextMode(1);
|
||||
|
||||
@@ -96,7 +96,7 @@ double ImpGetDate( const SbxValues* p )
|
||||
}
|
||||
else
|
||||
{
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
|
||||
SvNumberFormatter* pFormatter;
|
||||
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
|
||||
@@ -270,7 +270,7 @@ start:
|
||||
}
|
||||
Color* pColor;
|
||||
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
SvNumberFormatter* pFormatter;
|
||||
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
|
||||
xFactory = comphelper::getProcessServiceFactory();
|
||||
|
||||
@@ -629,7 +629,7 @@ ResMgr* implGetResMgr( void )
|
||||
static ResMgr* pResMgr = NULL;
|
||||
if( !pResMgr )
|
||||
{
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
pResMgr = ResMgr::CreateResMgr("sb", aLocale );
|
||||
}
|
||||
return pResMgr;
|
||||
@@ -725,7 +725,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
|
||||
return;
|
||||
}
|
||||
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
|
||||
xFactory = comphelper::getProcessServiceFactory();
|
||||
SvNumberFormatter aFormatter( xFactory, eLangType );
|
||||
@@ -853,7 +853,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
|
||||
{
|
||||
SbxAppData& rAppData = GetSbxData_Impl();
|
||||
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
|
||||
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
|
||||
if( rAppData.pBasicFormater )
|
||||
{
|
||||
if( rAppData.eBasicFormaterLangType != eLangType )
|
||||
|
||||
@@ -367,7 +367,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence >
|
||||
bool bReadOnly = pDialogLibrary->mbReadOnly;
|
||||
|
||||
// get ui locale
|
||||
::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
OUString aComment(aResourceFileCommentBase);
|
||||
aComment += aLibName;
|
||||
|
||||
@@ -44,6 +44,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\
|
||||
drawinglayer \
|
||||
editeng \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
sfx \
|
||||
sot \
|
||||
svl \
|
||||
|
||||
@@ -661,7 +661,7 @@ lang::Locale SAL_CALL AccessibleBase::getLocale()
|
||||
{
|
||||
CheckDisposeState();
|
||||
|
||||
return Application::GetSettings().GetLocale();
|
||||
return Application::GetSettings().GetLanguageTag().getLocale();
|
||||
}
|
||||
|
||||
// ________ AccessibleBase::XAccessibleComponent ________
|
||||
|
||||
@@ -71,7 +71,7 @@ using ::rtl::OUString;
|
||||
static String impl_getSvtResString( sal_uInt32 nId )
|
||||
{
|
||||
String aRet;
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
ResMgr* pMgr = ResMgr::CreateResMgr( "svt", aLocale );
|
||||
if( pMgr )
|
||||
{
|
||||
|
||||
@@ -199,7 +199,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper,
|
||||
|
||||
if( !aTypeName.Len() && !aSourceName.Len() )
|
||||
{
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
ResMgr* pMgr = ResMgr::CreateResMgr( "svt", aLocale );
|
||||
// global resource from svtools (former so3 resource)
|
||||
if( pMgr )
|
||||
|
||||
@@ -124,7 +124,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,
|
||||
}
|
||||
else
|
||||
{
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) );
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
|
||||
Date aDate( Date::SYSTEM );
|
||||
Time aTime( Time::SYSTEM );
|
||||
String aTmp( SvtUserOptions().GetID() );
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
String aStr( aEditED.GetText() );
|
||||
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
|
||||
|
||||
@@ -239,7 +239,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
|
||||
|
||||
IMPL_LINK_NOARG(SvxPostItDialog, OKHdl)
|
||||
{
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
pOutSet = new SfxItemSet( rSet );
|
||||
pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(),
|
||||
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
|
||||
|
||||
@@ -28,7 +28,7 @@ ResMgr* CuiResMgr::GetResMgr()
|
||||
|
||||
if ( !pResMgr )
|
||||
{
|
||||
pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILocale());
|
||||
pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
}
|
||||
|
||||
return pResMgr;
|
||||
|
||||
@@ -290,7 +290,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& )
|
||||
if(USHRT_MAX == eLastUsedLanguageTypeForForbiddenCharacters)
|
||||
{
|
||||
eLastUsedLanguageTypeForForbiddenCharacters = SvxLocaleToLanguage(
|
||||
Application::GetSettings().GetLocale() );
|
||||
Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
if (MsLangId::isSimplifiedChinese(eLastUsedLanguageTypeForForbiddenCharacters))
|
||||
eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_SIMPLIFIED;
|
||||
else if (MsLangId::isTraditionalChinese(eLastUsedLanguageTypeForForbiddenCharacters))
|
||||
|
||||
@@ -376,7 +376,7 @@ sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord)
|
||||
{
|
||||
sal_uInt16 nPos = USHRT_MAX;
|
||||
|
||||
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
|
||||
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
const CollatorWrapper* pCollator = aIntlWrapper.getCollator();
|
||||
sal_uInt16 j;
|
||||
for( j = 0; j < aWordsLB.GetEntryCount(); j++ )
|
||||
|
||||
@@ -1235,7 +1235,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
|
||||
|
||||
String aUILang(aStr);
|
||||
aUILang += rtl::OUString(" - ");
|
||||
aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguage(), true );
|
||||
aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true );
|
||||
|
||||
aUserInterfaceLB.InsertEntry(aUILang);
|
||||
aUserInterfaceLB.SetEntryData(0, 0);
|
||||
@@ -1697,7 +1697,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
|
||||
if (aDatePatternsString.isEmpty())
|
||||
{
|
||||
Locale aTempLocale;
|
||||
SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguage());
|
||||
SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguageTag().getLanguageType());
|
||||
LocaleDataWrapper aLocaleWrapper( aTempLocale );
|
||||
aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ void SvxGeneralTabPage::CreateControls ()
|
||||
{
|
||||
// which language bit do we use? (see Lang and vRowInfo[] above)
|
||||
unsigned LangBit;
|
||||
switch (LanguageType const eLang = Application::GetSettings().GetUILanguage())
|
||||
switch (LanguageType const eLang = Application::GetSettings().GetUILanguageTag().getLanguageType())
|
||||
{
|
||||
case LANGUAGE_ENGLISH_US:
|
||||
LangBit = Lang::US;
|
||||
|
||||
@@ -737,7 +737,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
|
||||
xLinguSrvcMgr = LinguServiceManager::create(comphelper::getComponentContext(xMSF));
|
||||
|
||||
Locale aCurrentLocale;
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
SvxLanguageToLocale(aCurrentLocale, eLang);
|
||||
Sequence<Any> aArgs(2);//second arguments has to be empty!
|
||||
aArgs.getArray()[0] <<= SvxGetLinguPropertySet();
|
||||
|
||||
@@ -133,7 +133,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
|
||||
aTime = Time( lastCheckedDT.Hours, lastCheckedDT.Minutes );
|
||||
}
|
||||
|
||||
LanguageType eUILang = Application::GetSettings().GetUILanguage();
|
||||
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();
|
||||
SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessServiceFactory(), eUILang );
|
||||
String aTmpStr;
|
||||
Color* pColor = NULL;
|
||||
|
||||
@@ -133,7 +133,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) :
|
||||
|
||||
// Initialisierung funktionier fuer static nicht unter Linux - deswegen hier
|
||||
if( LANGUAGE_SYSTEM == eLastDialogLanguage )
|
||||
eLastDialogLanguage = Application::GetSettings().GetLanguage();
|
||||
eLastDialogLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
|
||||
LanguageType nSelectLang = LANGUAGE_DONTKNOW;
|
||||
nPos = aLanguageLB.GetEntryPos( (void*)(long) eLastDialogLanguage );
|
||||
@@ -2008,7 +2008,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
|
||||
pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg );
|
||||
sal_UCS4 cDlg;
|
||||
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
switch( nMode )
|
||||
{
|
||||
case SGL_START:
|
||||
|
||||
@@ -206,7 +206,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
|
||||
if(xDefNum.is())
|
||||
{
|
||||
Sequence< Sequence< PropertyValue > > aNumberings;
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
Locale aLocale = SvxCreateLocale(eLang);
|
||||
try
|
||||
{
|
||||
@@ -568,7 +568,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
|
||||
if(xDefNum.is())
|
||||
{
|
||||
Sequence<Reference<XIndexAccess> > aOutlineAccess;
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
Locale aLocale = SvxCreateLocale(eLang);
|
||||
try
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent,
|
||||
aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial);
|
||||
|
||||
// Get the default decimal char from the system
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() );
|
||||
LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep()[0];
|
||||
FreeResource();
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ $(eval $(call gb_Library_use_libraries,dbu,\
|
||||
fwe \
|
||||
sal \
|
||||
salhelper \
|
||||
i18nisolang1 \
|
||||
sfx \
|
||||
sot \
|
||||
svl \
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace dbaccess
|
||||
if (m_pImpl)
|
||||
return;
|
||||
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
m_pImpl = ResMgr::CreateResMgr("dba", aLocale);
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
|
||||
|
||||
// the collator for the string compares
|
||||
m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW );
|
||||
m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 );
|
||||
m_xCollator->loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 );
|
||||
}
|
||||
catch(const Exception&)
|
||||
{
|
||||
|
||||
@@ -248,7 +248,7 @@ void OSqlEdit::ImplSetFont()
|
||||
get_value_or( rtl::OUString() ) );
|
||||
if ( sFontName.isEmpty() )
|
||||
{
|
||||
Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0 , this ) );
|
||||
Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) );
|
||||
sFontName = aTmpFont.GetName();
|
||||
}
|
||||
Size aFontSize(
|
||||
|
||||
@@ -273,7 +273,7 @@ DBG_NAME(OTableSubscriptionPage)
|
||||
{
|
||||
m_xCollator = Reference< XCollator >(m_xORB->createInstance(SERVICE_I18N_COLLATOR), UNO_QUERY);
|
||||
if (m_xCollator.is())
|
||||
m_xCollator->loadDefaultCollator(Application::GetSettings().GetLocale(), 0);
|
||||
m_xCollator->loadDefaultCollator(Application::GetSettings().GetLanguageTag().getLocale(), 0);
|
||||
}
|
||||
catch(const Exception&)
|
||||
{
|
||||
|
||||
@@ -345,7 +345,7 @@ void ODatabaseImportExport::initialize()
|
||||
{
|
||||
Font aApplicationFont = OutputDevice::GetDefaultFont(
|
||||
DEFAULTFONT_SANS_UNICODE,
|
||||
Application::GetSettings().GetUILanguage(),
|
||||
Application::GetSettings().GetUILanguageTag().getLanguageType(),
|
||||
DEFAULTFONT_FLAGS_ONLYONE
|
||||
);
|
||||
m_aFont = VCLUnoHelper::CreateFontDescriptor( aApplicationFont );
|
||||
|
||||
@@ -937,7 +937,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
|
||||
pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, sal_True));
|
||||
if (!_pFormatter->IsTextFormat(_nFormatKey))
|
||||
// text fields can only have text formats
|
||||
_nFormatKey = _pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT,_pParent->GetSettings().GetLanguage());
|
||||
_nFormatKey = _pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT,_pParent->GetSettings().GetLanguageTag().getLanguageType());
|
||||
}
|
||||
|
||||
pFormatDescriptor->Put(SfxUInt32Item(SBA_DEF_FMTVALUE, _nFormatKey));
|
||||
|
||||
@@ -138,7 +138,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
|
||||
// TriState der ::com::sun::star::form::CheckBox abschalten
|
||||
m_pVisibleCell->GetBox().EnableTriState( sal_False );
|
||||
|
||||
Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguage(),DEFAULTFONT_FLAGS_ONLYONE);
|
||||
Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE);
|
||||
aTitleFont.SetSize(Size(0, 6));
|
||||
SetTitleFont(aTitleFont);
|
||||
|
||||
|
||||
@@ -349,6 +349,7 @@ ResMgr* Desktop::GetDesktopResManager()
|
||||
// Use VCL to get the correct language specific message as we
|
||||
// are in the bootstrap process and not able to get the installed
|
||||
// language!!
|
||||
/* FIXME-BCP47: handle language tag! */
|
||||
OUString aUILocaleString = LanguageSelection::getLanguageString();
|
||||
sal_Int32 nIndex = 0;
|
||||
OUString aLanguage = aUILocaleString.getToken( 0, '-', nIndex);
|
||||
@@ -359,7 +360,7 @@ ResMgr* Desktop::GetDesktopResManager()
|
||||
|
||||
Desktop::pResMgr = ResMgr::SearchCreateResMgr( "dkt", aLocale);
|
||||
AllSettings as = GetSettings();
|
||||
as.SetUILocale(aLocale);
|
||||
as.SetUILanguageTag(LanguageTag(aLocale));
|
||||
SetSettings(as);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ void ExtensionBox_Impl::Init()
|
||||
|
||||
m_xRemoveListener = new ExtensionRemovedListener( this );
|
||||
|
||||
m_pLocale = new lang::Locale( Application::GetSettings().GetLocale() );
|
||||
m_pLocale = new lang::Locale( Application::GetSettings().GetLanguageTag().getLocale() );
|
||||
m_pCollator = new CollatorWrapper( ::comphelper::getProcessServiceFactory() );
|
||||
m_pCollator->loadDefaultCollator( *m_pLocale, i18n::CollatorOptions::CollatorOptions_IGNORE_CASE );
|
||||
|
||||
|
||||
@@ -239,9 +239,7 @@ void ServiceImpl::startExecuteModal(
|
||||
throw RuntimeException( OUSTR("Cannot initialize VCL!"),
|
||||
static_cast<OWeakObject *>(this) );
|
||||
AllSettings as = app->GetSettings();
|
||||
as.SetUILanguage(
|
||||
LanguageTag(
|
||||
utl::ConfigManager::getLocale() ).getLanguageType() );
|
||||
as.SetUILanguageTag( LanguageTag( utl::ConfigManager::getLocale() ) );
|
||||
app->SetSettings( as );
|
||||
app->SetDisplayName(
|
||||
utl::ConfigManager::getProductName() +
|
||||
|
||||
@@ -42,7 +42,7 @@ LanguageType drawinglayer::detail::getDigitLanguage() {
|
||||
case SvtCTLOptions::NUMERALS_HINDI:
|
||||
return LANGUAGE_ARABIC_SAUDI_ARABIA;
|
||||
default:
|
||||
return Application::GetSettings().GetLanguage();
|
||||
return Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ static LanguageType lcl_CheckLanguage(
|
||||
lang::Locale aLocale( xLangGuess->guessPrimaryLanguage( rText, 0, rText.getLength()) );
|
||||
|
||||
// get language as from "Tools/Options - Language Settings - Languages: Locale setting"
|
||||
LanguageType nTmpLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType nTmpLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
|
||||
// if the result from language guessing does not provide a 'Country' part
|
||||
// try to get it by looking up the locale setting of the office.
|
||||
@@ -123,9 +123,9 @@ static LanguageType lcl_CheckLanguage(
|
||||
// The default document language from "Tools/Options - Language Settings - Languages: Western"
|
||||
aLangList[0] = aLinguOpt.nDefaultLanguage;
|
||||
// The one from "Tools/Options - Language Settings - Languages: User interface"
|
||||
aLangList[1] = rSettings.GetUILanguage();
|
||||
aLangList[1] = rSettings.GetUILanguageTag().getLanguageType();
|
||||
// The one from "Tools/Options - Language Settings - Languages: Locale setting"
|
||||
aLangList[2] = rSettings.GetLanguage();
|
||||
aLangList[2] = rSettings.GetLanguageTag().getLanguageType();
|
||||
// en-US
|
||||
aLangList[3] = LANGUAGE_ENGLISH_US;
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -211,7 +211,7 @@ EditResId::EditResId( sal_uInt16 nId ):
|
||||
EditDLL::EditDLL()
|
||||
{
|
||||
pGlobalData = new GlobalEditData;
|
||||
pResMgr = ResMgr::CreateResMgr( "editeng", Application::GetSettings().GetUILocale() );
|
||||
pResMgr = ResMgr::CreateResMgr( "editeng", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
}
|
||||
|
||||
EditDLL::~EditDLL()
|
||||
|
||||
@@ -4246,7 +4246,7 @@ void ImpEditEngine::ImplInitDigitMode( OutputDevice* pOutDev, String* pString, x
|
||||
else if ( SvtCTLOptions::NUMERALS_ARABIC == nCTLTextNumerals )
|
||||
eLang = LANGUAGE_ENGLISH;
|
||||
else if ( SvtCTLOptions::NUMERALS_SYSTEM == nCTLTextNumerals )
|
||||
eLang = (LanguageType) Application::GetSettings().GetLanguage();
|
||||
eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
|
||||
if(pOutDev)
|
||||
{
|
||||
@@ -4337,7 +4337,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara,
|
||||
else if ( SvtCTLOptions::NUMERALS_ARABIC == pCTLOptions->GetCTLTextNumerals() )
|
||||
eLang = LANGUAGE_ENGLISH;
|
||||
else
|
||||
eLang = (LanguageType) Application::GetSettings().GetLanguage();
|
||||
eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
|
||||
pOutDev->SetDigitLanguage( eLang );
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ SvxNumberType::~SvxNumberType()
|
||||
|
||||
String SvxNumberType::GetNumStr( sal_uLong nNo ) const
|
||||
{
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
Locale aLocale = SvxCreateLocale(eLang);
|
||||
return GetNumStr( nNo, aLocale );
|
||||
}
|
||||
@@ -562,7 +562,7 @@ SvxNumRule::SvxNumRule( sal_uLong nFeatures,
|
||||
bContinuousNumbering(bCont)
|
||||
{
|
||||
++nRefCount;
|
||||
LanguageType eLang = Application::GetSettings().GetLanguage();
|
||||
LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
aLocale = SvxCreateLocale(eLang);
|
||||
for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
|
||||
{
|
||||
|
||||
@@ -198,7 +198,7 @@ static ::com::sun::star::uno::Reference<
|
||||
|
||||
static sal_uInt16 GetAppLang()
|
||||
{
|
||||
return Application::GetSettings().GetLanguage();
|
||||
return Application::GetSettings().GetLanguageTag().getLanguageType();
|
||||
}
|
||||
static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang )
|
||||
{
|
||||
|
||||
@@ -45,11 +45,7 @@ using namespace ::com::sun::star;
|
||||
static CharSet lcl_GetDefaultTextEncodingForRTF()
|
||||
{
|
||||
|
||||
::com::sun::star::lang::Locale aLocale;
|
||||
::rtl::OUString aLangString;
|
||||
|
||||
aLocale = Application::GetSettings().GetLocale();
|
||||
aLangString = aLocale.Language;
|
||||
::rtl::OUString aLangString( Application::GetSettings().GetLanguageTag().getLanguage());
|
||||
|
||||
if ( aLangString == "ru" || aLangString == "uk" )
|
||||
return RTL_TEXTENCODING_MS_1251;
|
||||
|
||||
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_sdk_api,res))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,res,\
|
||||
vcl \
|
||||
i18nisolang1 \
|
||||
tl \
|
||||
comphelper \
|
||||
cppu \
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace pcr
|
||||
aUnderlineItem.SetColor(Color(nTextLineColor));
|
||||
|
||||
SvxColorItem aSvxColorItem(nColor32,CFID_CHARCOLOR);
|
||||
SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguage(), CFID_LANGUAGE);
|
||||
SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE);
|
||||
|
||||
// the 2 CJK props
|
||||
SvxCharReliefItem aFontReliefItem((FontRelief)nFontRelief, CFID_RELIEF);
|
||||
@@ -494,7 +494,7 @@ namespace pcr
|
||||
*pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT);
|
||||
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT);
|
||||
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_POSTURE);
|
||||
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguage(), CFID_LANGUAGE);
|
||||
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE);
|
||||
*pCounter++ = new SvxUnderlineItem(aDefaultVCLFont.GetUnderline(), CFID_UNDERLINE);
|
||||
*pCounter++ = new SvxCrossedOutItem(aDefaultVCLFont.GetStrikeout(), CFID_STRIKEOUT);
|
||||
*pCounter++ = new SvxWordLineModeItem(aDefaultVCLFont.IsWordLineMode(), CFID_WORDLINEMODE);
|
||||
@@ -506,7 +506,7 @@ namespace pcr
|
||||
*pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_CJK_HEIGHT);
|
||||
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_CJK_WEIGHT);
|
||||
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_CJK_POSTURE);
|
||||
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguage(), CFID_CJK_LANGUAGE);
|
||||
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_CJK_LANGUAGE);
|
||||
|
||||
*pCounter++ = new SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, CFID_CASEMAP);
|
||||
*pCounter++ = new SvxContourItem(sal_False, CFID_CONTOUR);
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace extensions { namespace resource
|
||||
//--------------------------------------------------------------------
|
||||
Reference< XResourceBundle > SAL_CALL OpenOfficeResourceLoader::loadBundle_Default( const ::rtl::OUString& _baseName ) throw (MissingResourceException, RuntimeException)
|
||||
{
|
||||
return loadBundle( _baseName, Application::GetSettings().GetUILocale() );
|
||||
return loadBundle( _baseName, Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,eps,\
|
||||
vcl \
|
||||
utl \
|
||||
tl \
|
||||
i18nisolang1 \
|
||||
cppu \
|
||||
sal \
|
||||
$(gb_UWINAPI) \
|
||||
|
||||
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,flash,\
|
||||
vcl \
|
||||
utl \
|
||||
tl \
|
||||
i18nisolang1 \
|
||||
comphelper \
|
||||
basegfx \
|
||||
cppuhelper \
|
||||
|
||||
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,pdffilter,\
|
||||
utl \
|
||||
tl \
|
||||
svl \
|
||||
i18nisolang1 \
|
||||
comphelper \
|
||||
basegfx \
|
||||
cppuhelper \
|
||||
|
||||
@@ -43,6 +43,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\
|
||||
svl \
|
||||
utl \
|
||||
tl \
|
||||
i18nisolang1 \
|
||||
sax \
|
||||
comphelper \
|
||||
basegfx \
|
||||
|
||||
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,xsltdlg,\
|
||||
svl \
|
||||
utl \
|
||||
tl \
|
||||
i18nisolang1 \
|
||||
comphelper \
|
||||
cppuhelper \
|
||||
cppu \
|
||||
|
||||
@@ -90,7 +90,7 @@ Reference< XInterface > SAL_CALL SWFDialog_createInstance( const Reference< XMul
|
||||
SWFDialog::SWFDialog( const Reference< XMultiServiceFactory > &rxMSF ) :
|
||||
OGenericUnoDialog( rxMSF )
|
||||
{
|
||||
mpResMgr = ResMgr::CreateResMgr( "flash", Application::GetSettings().GetUILocale() );
|
||||
mpResMgr = ResMgr::CreateResMgr( "flash", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -294,7 +294,7 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi
|
||||
{
|
||||
ResMgr* pResMgr;
|
||||
|
||||
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILocale() );
|
||||
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
|
||||
if( pResMgr )
|
||||
{
|
||||
@@ -440,7 +440,7 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi
|
||||
if ( mbStatus && mnLevelWarning && pFilterConfigItem )
|
||||
{
|
||||
ResMgr* pResMgr;
|
||||
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILocale() );
|
||||
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
if( pResMgr )
|
||||
{
|
||||
InfoBox aInfoBox( NULL, String( ResId( KEY_VERSION_CHECK, *pResMgr ) ) );
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
static ResMgr& getPDFFilterResMgr()
|
||||
{
|
||||
static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale());
|
||||
static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
return *pRes;
|
||||
}
|
||||
|
||||
|
||||
@@ -887,7 +887,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
|
||||
|
||||
if ( mxStatusIndicator.is() )
|
||||
{
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale() );
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
if ( pResMgr )
|
||||
{
|
||||
sal_Int32 nTotalPageCount = aRangeEnum.size();
|
||||
|
||||
@@ -139,7 +139,7 @@ void SVGFontExport::implCollectGlyphs()
|
||||
|
||||
if( xBI.is() )
|
||||
{
|
||||
const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale();
|
||||
const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale();
|
||||
sal_Int32 nCurPos = 0, nLastPos = -1;
|
||||
|
||||
while( ( nCurPos < aText.getLength() ) && ( nCurPos > nLastPos ) )
|
||||
|
||||
@@ -2796,7 +2796,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
|
||||
else
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBI( ::vcl::unohelper::CreateBreakIterator() );
|
||||
const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale();
|
||||
const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale();
|
||||
sal_Int32 nCurPos = 0, nLastPos = 0, nX = aPos.X();
|
||||
|
||||
// write single glyphs at absolute text positions
|
||||
|
||||
@@ -351,7 +351,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException)
|
||||
|
||||
if( NULL == pXSLTResMgr )
|
||||
{
|
||||
pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILocale() );
|
||||
pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILanguageTag().getLocale() );
|
||||
}
|
||||
|
||||
if( NULL == mpDialog )
|
||||
|
||||
@@ -735,7 +735,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
|
||||
Reference<XNumberFormatTypes> xTypes(xSupplier->getNumberFormats(), UNO_QUERY);
|
||||
if (xTypes.is())
|
||||
{
|
||||
Locale aApplicationLocale = Application::GetSettings().GetUILocale();
|
||||
Locale aApplicationLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
if (m_bOriginalNumeric)
|
||||
aFmtKey <<= (sal_Int32)xTypes->getStandardFormat(NumberFormat::NUMBER, aApplicationLocale);
|
||||
|
||||
@@ -247,7 +247,7 @@ void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream>
|
||||
Reference<XPropertySet> xEditProps(
|
||||
static_cast< OWeakObject * >(m_editPart.get()), UNO_QUERY);
|
||||
|
||||
Locale aAppLanguage = Application::GetSettings().GetUILocale();
|
||||
Locale aAppLanguage = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
dbtools::TransferFormComponentProperties(xFormatProps, xEditProps, aAppLanguage);
|
||||
|
||||
// then write the edit part, after switching to "fake mode"
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace frm
|
||||
if (m_pImpl)
|
||||
return;
|
||||
|
||||
m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale());
|
||||
m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
|
||||
if (m_pImpl)
|
||||
{
|
||||
|
||||
@@ -281,7 +281,7 @@ namespace frm
|
||||
{
|
||||
ScriptType nScript = m_pView->GetSelectedScriptType();
|
||||
if ( !nScript )
|
||||
nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
|
||||
nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
|
||||
return nScript;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_use_libraries,for,\
|
||||
cppu \
|
||||
cppuhelper \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
svl \
|
||||
svt \
|
||||
tl \
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace formula
|
||||
if (m_pImpl)
|
||||
return;
|
||||
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
|
||||
|
||||
m_pImpl = ResMgr::CreateResMgr("for", aLocale);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ $(eval $(call gb_Library_use_libraries,fwe,\
|
||||
cppuhelper \
|
||||
fwi \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
svl \
|
||||
svt \
|
||||
tl \
|
||||
|
||||
@@ -34,7 +34,7 @@ ResMgr* FwlResId::GetResManager()
|
||||
if ( !pResMgr )
|
||||
{
|
||||
SolarMutexGuard aSolarGuard;
|
||||
pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILocale());
|
||||
pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
}
|
||||
|
||||
return pResMgr;
|
||||
|
||||
@@ -34,7 +34,7 @@ ResMgr* FwkResId::GetResManager()
|
||||
if ( !pResMgr )
|
||||
{
|
||||
SolarMutexGuard aSolarGuard;
|
||||
pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILocale());
|
||||
pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
}
|
||||
|
||||
return pResMgr;
|
||||
|
||||
@@ -159,7 +159,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
|
||||
|
||||
//2--System
|
||||
const AllSettings& rAllSettings = Application::GetSettings();
|
||||
LanguageType rSystemLanguage = rAllSettings.GetLanguage();
|
||||
LanguageType rSystemLanguage = rAllSettings.GetLanguageTag().getLanguageType();
|
||||
if( rSystemLanguage != LANGUAGE_DONTKNOW )
|
||||
{
|
||||
if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage ))
|
||||
@@ -167,7 +167,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
|
||||
}
|
||||
|
||||
//3--UI
|
||||
LanguageType rUILanguage = rAllSettings.GetUILanguage();
|
||||
LanguageType rUILanguage = rAllSettings.GetUILanguageTag().getLanguageType();
|
||||
if( rUILanguage != LANGUAGE_DONTKNOW )
|
||||
{
|
||||
if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage ))
|
||||
|
||||
@@ -224,7 +224,7 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na
|
||||
::rtl::OUString aLangString;
|
||||
::com::sun::star::lang::Locale aLocale;
|
||||
AllSettings aSettings(Application::GetSettings());
|
||||
aLocale = aSettings.GetUILocale();
|
||||
aLocale = aSettings.GetUILanguageTag().getLocale();
|
||||
ResMgr* pResMgr = ResMgr::SearchCreateResMgr("fwe", aLocale);
|
||||
|
||||
aLangString = aLocale.Language;
|
||||
|
||||
@@ -206,7 +206,7 @@ ControlMenuController::~ControlMenuController()
|
||||
// private function
|
||||
void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu )
|
||||
{
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILocale());
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
ResId aResId( RID_SVXIMGLIST_FMEXPL, *pResMgr );
|
||||
aResId.SetRT( RSC_IMAGELIST );
|
||||
|
||||
@@ -355,7 +355,7 @@ void ControlMenuController::impl_setPopupMenu()
|
||||
{
|
||||
if ( m_pResPopupMenu == 0 )
|
||||
{
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILocale());
|
||||
ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag().getLocale());
|
||||
if ( pResMgr )
|
||||
{
|
||||
ResId aResId( RID_FMSHELL_CONVERSIONMENU, *pResMgr );
|
||||
|
||||
@@ -172,7 +172,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
|
||||
|
||||
// first insert font size names (for simplified/traditional chinese)
|
||||
float fPoint;
|
||||
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() );
|
||||
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguageTag().getLanguageType() );
|
||||
m_pHeightArray = new long[nSizeCount+aFontSizeNames.Count()];
|
||||
rtl::OUString aCommand;
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ ToolbarsMenuController::ToolbarsMenuController( const ::com::sun::star::uno::Ref
|
||||
m_aPropResourceURL( "ResourceURL" ),
|
||||
m_bModuleIdentified( sal_False ),
|
||||
m_bResetActive( sal_False ),
|
||||
m_aIntlWrapper( xServiceManager, Application::GetSettings().GetLocale() )
|
||||
m_aIntlWrapper( xServiceManager, Application::GetSettings().GetLanguageTag().getLocale() )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
|
||||
cppu \
|
||||
cppuhelper \
|
||||
sal \
|
||||
i18nisolang1 \
|
||||
sfx \
|
||||
sot \
|
||||
svt \
|
||||
|
||||
@@ -284,8 +284,9 @@ XFDateStyle* LwpTools::GetSystemDateStyle(sal_Bool bLongFormat)
|
||||
udat_toPattern(fmt,true,pattern,nLength,&status);
|
||||
}
|
||||
*/
|
||||
/* FIXME-BCP47: handle language tags! */
|
||||
//1 get locale for system
|
||||
::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLocale();
|
||||
::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLanguageTag().getLocale();
|
||||
rtl::OUString strLang = aLocale.Language;
|
||||
rtl::OUString strCountry = aLocale.Country;
|
||||
icu::Locale bLocale((char*)(OUStringToOString(strLang,RTL_TEXTENCODING_MS_1252).getStr()),
|
||||
@@ -697,8 +698,9 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle()
|
||||
udat_toPattern(fmt,true,pattern,nLength,&status);
|
||||
}
|
||||
*/
|
||||
/* FIXME-BCP47: handle language tags! */
|
||||
//1 get locale for system
|
||||
::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLocale();
|
||||
::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLanguageTag().getLocale();
|
||||
rtl::OUString strLang = aLocale.Language;
|
||||
rtl::OUString strCountry = aLocale.Country;
|
||||
icu::Locale bLocale((char*)(OUStringToOString(strLang,RTL_TEXTENCODING_MS_1252).getStr()),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user