summaryrefslogtreecommitdiff
path: root/svx/source/dialog/txencbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/txencbox.cxx')
-rw-r--r--svx/source/dialog/txencbox.cxx33
1 files changed, 2 insertions, 31 deletions
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 0c96191c3db8..718989b84450 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.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: txencbox.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -178,36 +175,10 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap(
//------------------------------------------------------------------------
-// static
-rtl_TextEncoding SvxTextEncodingBox::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(
- Application::GetSettings().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;
-}
-
-//------------------------------------------------------------------------
-
void SvxTextEncodingBox::FillWithMimeAndSelectBest()
{
FillFromTextEncodingTable( sal_False, 0xffffffff, RTL_TEXTENCODING_INFO_MIME );
- rtl_TextEncoding nEnc = GetBestMimeEncoding();
+ rtl_TextEncoding nEnc = SvtSysLocale::GetBestMimeEncoding();
SelectTextEncoding( nEnc );
}