diff options
Diffstat (limited to 'unotools/source/misc')
-rw-r--r-- | unotools/source/misc/atom.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/componentresmodule.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/datetime.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/desktopterminationobserver.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/eventlisteneradapter.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/fontcvt.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 2 | ||||
-rw-r--r-- | unotools/source/misc/makefile.mk | 6 | ||||
-rw-r--r-- | unotools/source/misc/sharedunocomponent.cxx | 5 | ||||
-rw-r--r-- | unotools/source/misc/syslocale.cxx | 32 |
10 files changed, 37 insertions, 38 deletions
diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx index 03a459326d08..3d7ccd1dd10e 100644 --- a/unotools/source/misc/atom.cxx +++ b/unotools/source/misc/atom.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atom.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/componentresmodule.cxx b/unotools/source/misc/componentresmodule.cxx index 9f0eaa055da8..21c50d9ec7f1 100644 --- a/unotools/source/misc/componentresmodule.cxx +++ b/unotools/source/misc/componentresmodule.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: componentresmodule.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index cab276309542..6bfd053b3fe9 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: datetime.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx index d30ea7cc281d..23d5089f545e 100644 --- a/unotools/source/misc/desktopterminationobserver.cxx +++ b/unotools/source/misc/desktopterminationobserver.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: desktopterminationobserver.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx index b4c344e2cfd3..0e14a54cd3c0 100644 --- a/unotools/source/misc/eventlisteneradapter.cxx +++ b/unotools/source/misc/eventlisteneradapter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eventlisteneradapter.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 5c4f902fbd55..1a31272a483c 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fontcvt.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index 15e67c44f001..4a3532b44659 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * diff --git a/unotools/source/misc/makefile.mk b/unotools/source/misc/makefile.mk index d588a216c159..46e173b9a055 100644 --- a/unotools/source/misc/makefile.mk +++ b/unotools/source/misc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.18 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx index a426a6662fa5..5402ebc06085 100644 --- a/unotools/source/misc/sharedunocomponent.cxx +++ b/unotools/source/misc/sharedunocomponent.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sharedunocomponent.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx index 8e9d75c6ce0c..f51ef35512cb 100644 --- a/unotools/source/misc/syslocale.cxx +++ b/unotools/source/misc/syslocale.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: syslocale.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,6 +36,9 @@ #include <unotools/localedatawrapper.hxx> #include <comphelper/processfactory.hxx> #include <i18npool/mslangid.hxx> +#include <rtl/tencinfo.h> +#include <rtl/locale.h> +#include <osl/nlsupport.h> using namespace osl; using namespace com::sun::star; @@ -187,4 +187,28 @@ LanguageType SvtSysLocale::GetUILanguage() const return pImpl->aSysLocaleOptions.GetRealUILanguage(); } +//------------------------------------------------------------------------ + +// static +rtl_TextEncoding SvtSysLocale::GetBestMimeEncoding() +{ + const sal_Char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding( + gsl_getSystemTextEncoding() ); + if ( !pCharSet ) + { + // If the system locale is unknown to us, e.g. LC_ALL=xx, match the UI + // language if possible. + ::com::sun::star::lang::Locale aLocale( SvtSysLocale().GetUILocale() ); + rtl_Locale * pLocale = rtl_locale_register( aLocale.Language.getStr(), + aLocale.Country.getStr(), aLocale.Variant.getStr() ); + rtl_TextEncoding nEnc = osl_getTextEncodingFromLocale( pLocale ); + pCharSet = rtl_getBestMimeCharsetFromTextEncoding( nEnc ); + } + rtl_TextEncoding nRet; + if ( pCharSet ) + nRet = rtl_getTextEncodingFromMimeCharset( pCharSet ); + else + nRet = RTL_TEXTENCODING_UTF8; + return nRet; +} |