diff options
author | Eike Rathke <er@openoffice.org> | 2001-02-05 16:21:36 +0000 |
---|---|---|
committer | Eike Rathke <er@openoffice.org> | 2001-02-05 16:21:36 +0000 |
commit | 79190f54fb732f1295d6031979bfab5f161622df (patch) | |
tree | 7514a2b5715bac37b5fb93c2d980ef5a37ef37d1 /svx/source/dialog/txencbox.cxx | |
parent | TabPage resized - TabArea: Selection of type id done with listbox rather than... (diff) | |
download | core-79190f54fb732f1295d6031979bfab5f161622df.tar.gz core-79190f54fb732f1295d6031979bfab5f161622df.zip |
add: FillWithMimeAndSelectBest
Diffstat (limited to 'svx/source/dialog/txencbox.cxx')
-rw-r--r-- | svx/source/dialog/txencbox.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 10b2eda34f22..b9dbf01ef645 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txencbox.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: er $ $Date: 2000-12-20 11:36:16 $ + * last change: $Author: er $ $Date: 2001-02-05 17:21:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -143,6 +143,16 @@ void SvxTextEncodingBox::FillFromTextEncodingTable( //------------------------------------------------------------------------ +void SvxTextEncodingBox::FillWithMimeAndSelectBest() +{ + FillFromTextEncodingTable( 0xffffffff, RTL_TEXTENCODING_INFO_MIME ); + const sal_Char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding( gsl_getSystemTextEncoding() ); + rtl_TextEncoding nEnc = rtl_getTextEncodingFromMimeCharset( pCharSet ); + SelectTextEncoding( nEnc ); +} + +//------------------------------------------------------------------------ + void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, const String& rEntry, USHORT nPos ) { |