summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx59
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx390
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.hxx53
-rw-r--r--dbaccess/source/ui/inc/charsetlistbox.hxx19
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in3
5 files changed, 1 insertions, 523 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: */
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 80bb9d580955..61b0324c8682 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -53,396 +53,6 @@
namespace dbaui
{
-
- OTextConnectionHelper::OTextConnectionHelper( vcl::Window* pParent, const short _nAvailableSections )
- :TabPage(pParent, "TextPage", "dbaccess/ui/textpage.ui")
- ,m_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST))
- ,m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST)
- ,m_aTextNone (DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE))
- ,m_nAvailableSections( _nAvailableSections )
- {
- get(m_pExtensionHeader, "extensionheader");
- get(m_pAccessTextFiles, "textfile");
- get(m_pAccessCSVFiles, "csvfile");
- get(m_pAccessOtherFiles, "custom");
- get(m_pOwnExtension, "extension");
- get(m_pExtensionExample, "example");
- get(m_pFormatHeader, "formatlabel");
- get(m_pFieldSeparatorLabel, "fieldlabel");
- get(m_pFieldSeparator, "fieldseparator");
- get(m_pTextSeparatorLabel, "textlabel");
- get(m_pTextSeparator, "textseparator");
- get(m_pDecimalSeparatorLabel, "decimallabel");
- get(m_pDecimalSeparator, "decimalseparator");
- get(m_pThousandsSeparatorLabel, "thousandslabel");
- get(m_pThousandsSeparator, "thousandsseparator");
- get(m_pRowHeader, "containsheaders");
- get(m_pCharSetHeader, "charsetheader");
- get(m_pCharSetLabel, "charsetlabel");
- get(m_pCharSet, "charset");
-
- sal_Int32 nCnt = comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t');
- sal_Int32 i;
-
- for( i = 0 ; i < nCnt ; i += 2 )
- m_pFieldSeparator->InsertEntry( m_aFieldSeparatorList.getToken( i, '\t' ) );
-
- nCnt = comphelper::string::getTokenCount(m_aTextSeparatorList, '\t');
- for( i=0 ; i<nCnt ; i+=2 )
- m_pTextSeparator->InsertEntry( m_aTextSeparatorList.getToken( i, '\t' ) );
- m_pTextSeparator->InsertEntry(m_aTextNone);
-
- m_pOwnExtension->SetModifyHdl(LINK(this, OTextConnectionHelper, OnEditModified));
- m_pAccessTextFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
- m_pAccessCSVFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
- m_pAccessOtherFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
- m_pAccessCSVFiles->Check();
-
- struct SectionDescriptor
- {
- short nFlag;
- VclPtr<vcl::Window> pFirstControl;
- } aSections[] = {
- { TC_EXTENSION, m_pExtensionHeader },
- { TC_SEPARATORS, m_pFormatHeader },
- { TC_HEADER, m_pRowHeader },
- { TC_CHARSET, m_pCharSetHeader },
- { 0, nullptr }
- };
-
- for ( size_t section=0; section < SAL_N_ELEMENTS( aSections ) - 1; ++section )
- {
- if ( ( m_nAvailableSections & aSections[section].nFlag ) != 0 )
- {
- // the section is visible, no need to do anything here
- continue;
- }
-
- vcl::Window* pThisSection = aSections[section].pFirstControl;
- vcl::Window* pNextSection = aSections[section+1].pFirstControl;
-
- // hide all elements from this section
- vcl::Window* pControl = pThisSection;
- while ( ( pControl != pNextSection ) && pControl )
- {
- vcl::Window* pRealWindow = pControl->GetWindow( GetWindowType::Client );
- #if OSL_DEBUG_LEVEL > 0
- OUString sWindowText( pRealWindow->GetText() );
- (void)sWindowText;
- #endif
- pRealWindow->Hide();
- pControl = pControl->GetWindow( GetWindowType::Next );
- }
- }
-
- Show();
- }
-
- OTextConnectionHelper::~OTextConnectionHelper()
- {
- disposeOnce();
- }
-
- void OTextConnectionHelper::dispose()
- {
- m_pExtensionHeader.clear();
- m_pAccessTextFiles.clear();
- m_pAccessCSVFiles.clear();
- m_pAccessOtherFiles.clear();
- m_pOwnExtension.clear();
- m_pExtensionExample.clear();
- m_pFormatHeader.clear();
- m_pFieldSeparatorLabel.clear();
- m_pFieldSeparator.clear();
- m_pTextSeparatorLabel.clear();
- m_pTextSeparator.clear();
- m_pDecimalSeparatorLabel.clear();
- m_pDecimalSeparator.clear();
- m_pThousandsSeparatorLabel.clear();
- m_pThousandsSeparator.clear();
- m_pRowHeader.clear();
- m_pCharSetHeader.clear();
- m_pCharSetLabel.clear();
- m_pCharSet.clear();
- TabPage::dispose();
- }
-
- IMPL_LINK_NOARG(OTextConnectionHelper, OnEditModified, Edit&, void)
- {
- m_aGetExtensionHandler.Call(this);
- }
-
- IMPL_LINK_NOARG(OTextConnectionHelper, OnSetExtensionHdl, RadioButton&, void)
- {
- bool bDoEnable = m_pAccessOtherFiles->IsChecked();
- m_pOwnExtension->Enable(bDoEnable);
- m_pExtensionExample->Enable(bDoEnable);
- m_aGetExtensionHandler.Call(this);
- }
-
- void OTextConnectionHelper::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
- {
- _rControlList.emplace_back(new OSaveValueWrapper<ComboBox>(m_pFieldSeparator));
- _rControlList.emplace_back(new OSaveValueWrapper<ComboBox>(m_pTextSeparator));
- _rControlList.emplace_back(new OSaveValueWrapper<ComboBox>(m_pDecimalSeparator));
- _rControlList.emplace_back(new OSaveValueWrapper<ComboBox>(m_pThousandsSeparator));
- _rControlList.emplace_back(new OSaveValueWrapper<CheckBox>(m_pRowHeader));
- _rControlList.emplace_back(new OSaveValueWrapper<ListBox>(m_pCharSet));
- }
-
- void OTextConnectionHelper::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
- {
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pFieldSeparatorLabel));
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pTextSeparatorLabel));
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pDecimalSeparatorLabel));
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pThousandsSeparatorLabel));
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pCharSetHeader));
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pCharSetLabel));
- _rControlList.emplace_back(new ODisableWrapper<ListBox>(m_pCharSet));
- }
-
- void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bValid)
- {
- if ( !_bValid )
- return;
-
- const SfxStringItem* pDelItem = _rSet.GetItem<SfxStringItem>(DSID_FIELDDELIMITER);
- const SfxStringItem* pStrItem = _rSet.GetItem<SfxStringItem>(DSID_TEXTDELIMITER);
- const SfxStringItem* pDecdelItem = _rSet.GetItem<SfxStringItem>(DSID_DECIMALDELIMITER);
- const SfxStringItem* pThodelItem = _rSet.GetItem<SfxStringItem>(DSID_THOUSANDSDELIMITER);
- const SfxStringItem* pExtensionItem = _rSet.GetItem<SfxStringItem>(DSID_TEXTFILEEXTENSION);
- const SfxStringItem* pCharsetItem = _rSet.GetItem<SfxStringItem>(DSID_CHARSET);
-
- if ( ( m_nAvailableSections & TC_EXTENSION ) != 0 )
- {
- m_aOldExtension = pExtensionItem->GetValue();
- SetExtension( m_aOldExtension );
- }
-
- if ( ( m_nAvailableSections & TC_HEADER ) != 0 )
- {
- const SfxBoolItem* pHdrItem = _rSet.GetItem<SfxBoolItem>(DSID_TEXTFILEHEADER);
- m_pRowHeader->Check( pHdrItem->GetValue() );
- }
-
- if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 )
- {
- SetSeparator( *m_pFieldSeparator, m_aFieldSeparatorList, pDelItem->GetValue() );
- SetSeparator( *m_pTextSeparator, m_aTextSeparatorList, pStrItem->GetValue() );
- m_pDecimalSeparator->SetText( pDecdelItem->GetValue() );
- m_pThousandsSeparator->SetText( pThodelItem->GetValue() );
- }
-
- if ( ( m_nAvailableSections & TC_CHARSET ) != 0 )
- {
- m_pCharSet->SelectEntryByIanaName( pCharsetItem->GetValue() );
- }
- }
-
- bool OTextConnectionHelper::prepareLeave()
- {
- OUString sExtension = GetExtension();
- OUString aErrorText;
- Control* pErrorWin = nullptr;
- OUString aDelText(m_pFieldSeparator->GetText());
- if(aDelText.isEmpty())
- { // No FieldSeparator
- aErrorText = DBA_RES(STR_AUTODELIMITER_MISSING);
- aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText());
- pErrorWin = m_pFieldSeparator;
- }
- else if (m_pDecimalSeparator->GetText().isEmpty())
- { // No DecimalSeparator
- aErrorText = DBA_RES(STR_AUTODELIMITER_MISSING);
- aErrorText = aErrorText.replaceFirst("#1",m_pDecimalSeparatorLabel->GetText());
- pErrorWin = m_pDecimalSeparator;
- }
- else if (m_pTextSeparator->GetText() == m_pFieldSeparator->GetText())
- { // Field and TextSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pFieldSeparatorLabel->GetText());
- pErrorWin = m_pTextSeparator;
- }
- else if (m_pDecimalSeparator->GetText() == m_pThousandsSeparator->GetText())
- { // Thousands and DecimalSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pDecimalSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText());
- pErrorWin = m_pDecimalSeparator;
- }
- else if (m_pFieldSeparator->GetText() == m_pThousandsSeparator->GetText())
- { // Thousands and FieldSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText());
- pErrorWin = m_pFieldSeparator;
- }
- else if (m_pFieldSeparator->GetText() == m_pDecimalSeparator->GetText())
- { // Tenner and FieldSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pDecimalSeparatorLabel->GetText());
- pErrorWin = m_pFieldSeparator;
- }
- else if (m_pTextSeparator->GetText() == m_pThousandsSeparator->GetText())
- { // Thousands and TextSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText());
- pErrorWin = m_pTextSeparator;
- }
- else if (m_pTextSeparator->GetText() == m_pDecimalSeparator->GetText())
- { // Tenner and TextSeparator must not be the same
- aErrorText = DBA_RES(STR_AUTODELIMITER_MUST_DIFFER);
- aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText());
- aErrorText = aErrorText.replaceFirst("#2",m_pDecimalSeparatorLabel->GetText());
- pErrorWin = m_pTextSeparator;
- }
- else if ((sExtension.indexOf('*') != -1) || (sExtension.indexOf('?') != -1))
- {
- aErrorText = DBA_RES(STR_AUTONO_WILDCARDS);
- aErrorText = aErrorText.replaceFirst("#1",sExtension);
- pErrorWin = m_pOwnExtension;
- }
- else
- return true;
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
- VclMessageType::Warning, VclButtonsType::Ok,
- MnemonicGenerator::EraseAllMnemonicChars(aErrorText)));
- xBox->run();
- pErrorWin->GrabFocus();
- return false;
- }
-
- bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething )
- {
- bool bChangedSomething = _bChangedSomething;
-
- if ( ( m_nAvailableSections & TC_EXTENSION ) != 0 )
- {
- OUString sExtension = GetExtension();
- if( m_aOldExtension != sExtension )
- {
- rSet.Put( SfxStringItem( DSID_TEXTFILEEXTENSION, sExtension ) );
- bChangedSomething = true;
- }
- }
-
- if ( ( m_nAvailableSections & TC_HEADER ) != 0 )
- {
- if( m_pRowHeader->IsValueChangedFromSaved() )
- {
- rSet.Put(SfxBoolItem(DSID_TEXTFILEHEADER, m_pRowHeader->IsChecked()));
- bChangedSomething = true;
- }
- }
-
- if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 )
- {
- if( m_pFieldSeparator->IsValueChangedFromSaved() )
- {
- rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( *m_pFieldSeparator, m_aFieldSeparatorList) ) );
- bChangedSomething = true;
- }
- if( m_pTextSeparator->IsValueChangedFromSaved() )
- {
- rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( *m_pTextSeparator, m_aTextSeparatorList) ) );
- bChangedSomething = true;
- }
-
- if( m_pDecimalSeparator->IsValueChangedFromSaved() )
- {
- rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_pDecimalSeparator->GetText().copy(0, 1) ) );
- bChangedSomething = true;
- }
- if( m_pThousandsSeparator->IsValueChangedFromSaved() )
- {
- rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_pThousandsSeparator->GetText().copy(0,1) ) );
- bChangedSomething = true;
- }
- }
-
- if ( ( m_nAvailableSections & TC_CHARSET ) != 0 )
- {
- if ( m_pCharSet->StoreSelectedCharSet( rSet, DSID_CHARSET ) )
- bChangedSomething = true;
- }
-
- return bChangedSomething;
- }
-
- void OTextConnectionHelper::SetExtension(const OUString& _rVal)
- {
- if (_rVal == "txt")
- m_pAccessTextFiles->Check();
- else if (_rVal == "csv")
- m_pAccessCSVFiles->Check();
- else
- {
- m_pAccessOtherFiles->Check();
- m_pExtensionExample->SetText(_rVal);
- }
- }
-
- OUString OTextConnectionHelper::GetExtension()
- {
- OUString sExtension;
- if (m_pAccessTextFiles->IsChecked())
- sExtension = "txt";
- else if (m_pAccessCSVFiles->IsChecked())
- sExtension = "csv";
- else
- {
- sExtension = m_pOwnExtension->GetText();
- if ( sExtension.getToken(0,'.') == "*" )
- sExtension = sExtension.copy(2);
- }
- return sExtension;
- }
-
- OUString OTextConnectionHelper::GetSeparator( const ComboBox& rBox, const OUString& rList )
- {
- sal_Unicode const nTok = '\t';
- sal_Int32 nPos(rBox.GetEntryPos( rBox.GetText() ));
-
- if( nPos == COMBOBOX_ENTRY_NOTFOUND )
- return rBox.GetText().copy(0);
-
- if ( !( m_pTextSeparator == &rBox && nPos == (rBox.GetEntryCount()-1) ) )
- return OUString(
- static_cast< sal_Unicode >( rList.getToken((nPos*2)+1, nTok ).toInt32() ));
- // somewhat strange ... translates for instance an "32" into " "
- return OUString();
- }
-
- void OTextConnectionHelper::SetSeparator( ComboBox& rBox, const OUString& rList, const OUString& rVal )
- {
- char nTok = '\t';
- sal_Int32 nCnt = comphelper::string::getTokenCount(rList, nTok);
- sal_Int32 i;
-
- for( i=0 ; i<nCnt ; i+=2 )
- {
- OUString sTVal(
- static_cast< sal_Unicode >( rList.getToken( (i+1), nTok ).toInt32() ));
-
- if( sTVal == rVal )
- {
- rBox.SetText( rList.getToken( i, nTok ) );
- break;
- }
- }
-
- if ( i >= nCnt )
- {
- if ( m_pTextSeparator == &rBox && rVal.isEmpty() )
- rBox.SetText(m_aTextNone);
- else
- rBox.SetText( rVal.copy(0, 1) );
- }
- }
-
DBOTextConnectionHelper::DBOTextConnectionHelper(weld::Widget* pParent, const short _nAvailableSections)
: m_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST))
, m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST)
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index db71db300c0c..b96a7d811c0e 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -39,59 +39,6 @@ namespace dbaui
#define TC_HEADER (short(0x04)) // a section containing the "Text contains header" check box only
#define TC_CHARSET (short(0x08)) // not yet implemented
- // OTextConnectionPage
- class OTextConnectionHelper final : public TabPage
- {
- public:
- OTextConnectionHelper( vcl::Window* pParent, const short _nAvailableSections );
- virtual ~OTextConnectionHelper() override;
- virtual void dispose() override;
-
- private:
- VclPtr<FixedText> m_pExtensionHeader;
- VclPtr<RadioButton> m_pAccessTextFiles;
- VclPtr<RadioButton> m_pAccessCSVFiles;
- VclPtr<RadioButton> m_pAccessOtherFiles;
- VclPtr<Edit> m_pOwnExtension;
- VclPtr<FixedText> m_pExtensionExample;
- VclPtr<FixedText> m_pFormatHeader;
- VclPtr<FixedText> m_pFieldSeparatorLabel;
- VclPtr<ComboBox> m_pFieldSeparator;
- VclPtr<FixedText> m_pTextSeparatorLabel;
- VclPtr<ComboBox> m_pTextSeparator;
- VclPtr<FixedText> m_pDecimalSeparatorLabel;
- VclPtr<ComboBox> m_pDecimalSeparator;
- VclPtr<FixedText> m_pThousandsSeparatorLabel;
- VclPtr<ComboBox> m_pThousandsSeparator;
- VclPtr<CheckBox> m_pRowHeader;
- VclPtr<FixedText> m_pCharSetHeader;
- VclPtr<FixedText> m_pCharSetLabel;
- VclPtr<CharSetListBox> m_pCharSet;
- OUString m_aFieldSeparatorList;
- OUString m_aTextSeparatorList;
- OUString m_aTextNone;
- OUString m_aOldExtension;
- Link<OTextConnectionHelper*, void> m_aGetExtensionHandler; /// to be called if a new type is selected
-
- short m_nAvailableSections;
-
- DECL_LINK(OnSetExtensionHdl,RadioButton&,void);
- DECL_LINK(OnEditModified, Edit&, void);
-
- OUString GetSeparator( const ComboBox& rBox, const OUString& rList );
- void SetSeparator( ComboBox& rBox, const OUString& rList, const OUString& rVal );
- void SetExtension(const OUString& _rVal);
-
- public:
- void implInitControls(const SfxItemSet& _rSet, bool _bValid);
- void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList);
- void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList);
- void SetClickHandler(const Link<OTextConnectionHelper*, void>& _rHandler) { m_aGetExtensionHandler = _rHandler; }
- OUString GetExtension();
- bool FillItemSet( SfxItemSet& rSet, const bool bChangedSomething );
- bool prepareLeave();
- };
-
class DBOTextConnectionHelper final
{
public:
diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx
index b97145e862b9..82633189a8bf 100644
--- a/dbaccess/source/ui/inc/charsetlistbox.hxx
+++ b/dbaccess/source/ui/inc/charsetlistbox.hxx
@@ -20,29 +20,13 @@
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_CHARSETLISTBOX_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_INC_CHARSETLISTBOX_HXX
-#include "charsets.hxx"
-
-#include <vcl/lstbox.hxx>
#include <vcl/weld.hxx>
+#include "charsets.hxx"
class SfxItemSet;
namespace dbaui
{
-
- // CharSetListBox
- class CharSetListBox : public ListBox
- {
- public:
- CharSetListBox( vcl::Window* _pParent );
-
- void SelectEntryByIanaName( const OUString& _rIanaName );
- bool StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId );
-
- private:
- OCharsetDisplay m_aCharSets;
- };
-
// CharSetListBox
class DBCharSetListBox
{
@@ -60,7 +44,6 @@ namespace dbaui
OCharsetDisplay m_aCharSets;
std::unique_ptr<weld::ComboBox> m_xControl;
};
-
} // namespace dbaui
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CHARSETLISTBOX_HXX
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index fffb76e04ed0..15e6e80500fb 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -45,9 +45,6 @@
<glade-widget-class title="OSQL NameEdit" name="dbulo-OSQLNameEdit"
generic-name="OSQLNameEdit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
- <glade-widget-class title="CharSetListBox" name="dbulo-CharSetListBox"
- generic-name="CharSetListBox" parent="GtkComboBox"
- icon-name="widget-gtk-combobox"/>
<glade-widget-class title="ConnectionURLEdit" name="dbulo-ConnectionURLEdit"
generic-name="ConnectionURLEdit" parent="GtkEntry"
icon-name="widget-gtk-entry"/>