summaryrefslogtreecommitdiffstats
path: root/desktop/source/app/langselect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r--desktop/source/app/langselect.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 13421d3cde7d..063fc69b2d35 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -178,24 +178,22 @@ bool LanguageSelection::prepareLanguage()
// get the selected UI language as string
bool bCmdLanguage( false );
bool bIniLanguage( false );
- OUString aEmpty;
OUString aLocaleString = getUserUILanguage();
if ( aLocaleString.getLength() == 0 )
{
- CommandLineArgs* pCmdLineArgs = Desktop::GetCommandLineArgs();
- if ( pCmdLineArgs )
+ OUString aEmpty;
+
+ const CommandLineArgs& rCmdLineArgs = Desktop::GetCommandLineArgs();
+ rCmdLineArgs.GetLanguage(aLocaleString);
+ if (isInstalledLanguage(aLocaleString, sal_False))
{
- pCmdLineArgs->GetLanguage(aLocaleString);
- if (isInstalledLanguage(aLocaleString, sal_False))
- {
- bCmdLanguage = true;
- bFoundLanguage = true;
- aFoundLanguage = aLocaleString;
- }
- else
- aLocaleString = aEmpty;
+ bCmdLanguage = true;
+ bFoundLanguage = true;
+ aFoundLanguage = aLocaleString;
}
+ else
+ aLocaleString = aEmpty;
if ( !bCmdLanguage )
{