summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control/charsetlistbox.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-24 13:09:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-25 09:55:08 +0200
commit55078d3e3bef957311a80f5d1bcce594f298d2bd (patch)
treeac4be277991a2cb8c1695338ace8c6071866d0af /dbaccess/source/ui/control/charsetlistbox.cxx
parent660cace2a15bd863e0c85d61533cc52e9fa07e27 (diff)
remove unused stuff
Change-Id: I5ae616f46cb86b35435e007f98e4b0f882a75751 Reviewed-on: https://gerrit.libreoffice.org/62299 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/control/charsetlistbox.cxx')
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx59
1 files changed, 0 insertions, 59 deletions
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index 9ea9f7f70c65..d2b7d7e3457e 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -26,64 +26,6 @@
namespace dbaui
{
- CharSetListBox::CharSetListBox( vcl::Window* _pParent )
- : ListBox( _pParent, WB_DROPDOWN )
- {
- SetDropDownLineCount( 20 );
-
- for (auto const& charset : m_aCharSets)
- {
- InsertEntry( charset.getDisplayName() );
- }
- }
-
- VCL_BUILDER_FACTORY(CharSetListBox)
-
- void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName )
- {
- OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName );
- if (aFind == m_aCharSets.end())
- {
- OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" );
- aFind = m_aCharSets.findEncoding( RTL_TEXTENCODING_DONTKNOW );
- }
-
- if ( aFind == m_aCharSets.end() )
- {
- SelectEntry( OUString() );
- }
- else
- {
- OUString sDisplayName = (*aFind).getDisplayName();
- if ( LISTBOX_ENTRY_NOTFOUND == GetEntryPos( sDisplayName ) )
- {
- // in our settings, there was an encoding selected which is not valid for the current
- // data source type
- // This is worth at least an assertion.
- OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
- sDisplayName.clear();
- }
-
- SelectEntry( sDisplayName );
- }
- }
-
- bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId )
- {
- bool bChangedSomething = false;
- if ( IsValueChangedFromSaved() )
- {
- OCharsetDisplay::const_iterator aFind = m_aCharSets.findDisplayName( GetSelectedEntry() );
- OSL_ENSURE( aFind != m_aCharSets.end(), "CharSetListBox::StoreSelectedCharSet: could not translate the selected character set!" );
- if ( aFind != m_aCharSets.end() )
- {
- _rSet.Put( SfxStringItem( _nItemId, (*aFind).getIanaName() ) );
- bChangedSomething = true;
- }
- }
- return bChangedSomething;
- }
-
DBCharSetListBox::DBCharSetListBox(std::unique_ptr<weld::ComboBox> xControl)
: m_xControl(std::move(xControl))
{
@@ -123,7 +65,6 @@ namespace dbaui
}
return bChangedSomething;
}
-
} // namespace dbaui
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */