diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-25 10:39:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-25 19:34:55 +0200 |
commit | 5e975f671bc37d837d66e712ea064809daf51288 (patch) | |
tree | a4262a37cb226e71d5f0f5cbe28f28935d23c65e | |
parent | 304d7f557acee5ac1aa6e072550bb73f3a6e9e29 (diff) |
coverity#1416668 Uncaught exception
Change-Id: Ibc2be8fe44295a8ea08105549448609e00262740
Reviewed-on: https://gerrit.libreoffice.org/41560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/app/svmain.cxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 1b88fc290157..a8e42ad394d7 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -322,15 +322,22 @@ bool InitVCL() pSVData->mpApp->Init(); } - //Now that uno has been bootstrapped we can ask the config what the UI language is so that we can - //force that in as $LANGUAGE. That way we can get gtk to render widgets RTL - //if we have a RTL UI in an otherwise LTR locale and get gettext using externals (e.g. python) - //to match their translations to our preferred UI language - OUString aLocaleString(SvtSysLocaleOptions().GetRealUILanguageTag().getGlibcLocaleString(".UTF-8")); - if (!aLocaleString.isEmpty()) - { - OUString envVar("LANGUAGE"); - osl_setEnvironment(envVar.pData, aLocaleString.pData); + try + { + //Now that uno has been bootstrapped we can ask the config what the UI language is so that we can + //force that in as $LANGUAGE. That way we can get gtk to render widgets RTL + //if we have a RTL UI in an otherwise LTR locale and get gettext using externals (e.g. python) + //to match their translations to our preferred UI language + OUString aLocaleString(SvtSysLocaleOptions().GetRealUILanguageTag().getGlibcLocaleString(".UTF-8")); + if (!aLocaleString.isEmpty()) + { + OUString envVar("LANGUAGE"); + osl_setEnvironment(envVar.pData, aLocaleString.pData); + } + } + catch (const uno::Exception &e) + { + SAL_INFO("vcl.app", "Unable to get ui language: '" << e.Message); } pSVData->mpDefInst->AfterAppInit(); |