summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/pkgchk')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx15
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h17
3 files changed, 5 insertions, 30 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 1732b3fb5f88..4c9bd17b9f3c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -66,18 +66,6 @@ using ::rtl::OUString;
namespace {
//==============================================================================
-struct OfficeLocale :
- public rtl::StaticWithInit<lang::Locale, OfficeLocale> {
- const lang::Locale operator () () {
- OUString slang;
- if (! (::utl::ConfigManager::GetDirectConfigProperty(
- ::utl::ConfigManager::LOCALE ) >>= slang))
- throw RuntimeException( OUSTR("Cannot determine language!"), 0 );
- return toLocale(slang);
- }
-};
-
-//==============================================================================
class CommandEnvironmentImpl
: public ::cppu::WeakImplHelper3< XCommandEnvironment,
task::XInteractionHandler,
@@ -189,7 +177,8 @@ void CommandEnvironmentImpl::printLicense(
->createInstanceWithContext(
OUSTR("com.sun.star.i18n.Collator"),m_xComponentContext),
UNO_QUERY_THROW );
- xCollator->loadDefaultCollator(OfficeLocale::get(),
+ xCollator->loadDefaultCollator(
+ toLocale(utl::ConfigManager::getLocale()),
css::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE);
do
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index a2c9baf4986e..84b0b0ae09e9 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -511,8 +511,7 @@ Reference<XComponentContext> getUNO(
NULL );
{
WarningBox warn(NULL, WB_OK | WB_DEF_OK, sMsg);
- warn.SetText(::utl::ConfigManager::GetDirectConfigProperty(
- ::utl::ConfigManager::PRODUCTNAME).get<OUString>());
+ warn.SetText(utl::ConfigManager::getProductName());
warn.SetIcon(0);
warn.Execute();
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index feffd892a27e..c8de646b12ce 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -54,24 +54,11 @@ namespace unopkg {
return locale;
}
-
- struct OfficeLocale :
- public rtl::StaticWithInit<css::lang::Locale, OfficeLocale> {
- const css::lang::Locale operator () () {
- ::rtl::OUString slang;
- if (! (::utl::ConfigManager::GetDirectConfigProperty(
- ::utl::ConfigManager::LOCALE ) >>= slang))
- throw css::uno::RuntimeException( OUSTR("Cannot determine language!"), 0 );
- if (slang.getLength() == 0)
- slang = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US"));
- return toLocale(slang);
- }
-};
-
struct DeploymentResMgr : public rtl::StaticWithInit< ResMgr *, DeploymentResMgr >
{
ResMgr * operator () () {
- return ResMgr::CreateResMgr( "deployment", OfficeLocale::get());
+ return ResMgr::CreateResMgr(
+ "deployment", toLocale( utl::ConfigManager::getLocale() ) );
}
};