diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-27 12:16:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-27 15:48:39 +0200 |
commit | 2aff82411b905d55774057ed6e74b8cd45dc570b (patch) | |
tree | 45bdde85b955643be9ae29840a0254c6071eb464 /svx/source | |
parent | 67950f00989dff4640ba83e540673375a2c60a13 (diff) |
weld OfaHtmlTabPage
Change-Id: I10ee46d19047da9a3e3d8b0f99866568a12aa0f1
Reviewed-on: https://gerrit.libreoffice.org/76471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/txencbox.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 1273d6e8f6f9..3d0cb086bf25 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -258,7 +258,7 @@ TextEncodingTreeView::~TextEncodingTreeView() namespace { - std::vector<int> FillFromTextEncodingTable(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags) + std::vector<int> FillFromTextEncodingTable(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags, sal_uInt32 nButIncludeInfoFlags) { std::vector<int> aRet; @@ -282,7 +282,7 @@ namespace nEnc == RTL_TEXTENCODING_UCS4) ) bInsert = false; // InfoFlags don't work for Unicode :-( } - else + else if ( (aInfo.Flags & nButIncludeInfoFlags) == 0 ) bInsert = false; } } @@ -306,9 +306,10 @@ namespace } void TextEncodingBox::FillFromTextEncodingTable( - bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags) + bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags, + sal_uInt32 nButIncludeInfoFlags ) { - std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags)); + std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags, nButIncludeInfoFlags)); m_xControl->freeze(); for (auto j : aRet) { @@ -319,9 +320,10 @@ void TextEncodingBox::FillFromTextEncodingTable( } void TextEncodingTreeView::FillFromTextEncodingTable( - bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags) + bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags, + sal_uInt32 nButIncludeInfoFlags ) { - std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags)); + std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags, nButIncludeInfoFlags)); m_xControl->freeze(); for (auto j : aRet) { @@ -331,6 +333,13 @@ void TextEncodingTreeView::FillFromTextEncodingTable( m_xControl->thaw(); } +void TextEncodingBox::FillWithMimeAndSelectBest() +{ + FillFromTextEncodingTable( false, 0xffffffff, RTL_TEXTENCODING_INFO_MIME ); + rtl_TextEncoding nEnc = SvtSysLocale::GetBestMimeEncoding(); + SelectTextEncoding( nEnc ); +} + void TextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, const OUString& rEntry ) { |