Kaydet (Commit) e6176cdb authored tarafından Caolán McNamara's avatar Caolán McNamara

rename DBOTextConnectionHelper back to OTextConnectionHelper

Change-Id: Ie20403b88c8510465ab7cccbb431072331dbc96f
Reviewed-on: https://gerrit.libreoffice.org/62321
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e82650de
......@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
disposeOnce();
}
IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, DBOTextConnectionHelper*, void)
IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, void)
{
SetRoadmapStateValue(!m_aTextConnectionHelper.GetExtension().isEmpty() && DBOConnectionTabPageSetup::checkTestConnection());
callModifiedHdl();
......
......@@ -57,7 +57,7 @@ namespace dbaui
{
public:
std::unique_ptr<weld::Widget> m_xSubContainer;
DBOTextConnectionHelper m_aTextConnectionHelper;
OTextConnectionHelper m_aTextConnectionHelper;
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override;
static VclPtr<OGenericAdministrationPage> CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet );
......@@ -71,7 +71,7 @@ namespace dbaui
bool checkTestConnection() override;
private:
DECL_LINK(ImplGetExtensionHdl, DBOTextConnectionHelper*, void);
DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*, void);
};
// OLDAPConnectionPageSetup
......
......@@ -53,7 +53,7 @@
namespace dbaui
{
DBOTextConnectionHelper::DBOTextConnectionHelper(weld::Widget* pParent, const short _nAvailableSections)
OTextConnectionHelper::OTextConnectionHelper(weld::Widget* pParent, const short _nAvailableSections)
: m_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST))
, m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST)
, m_aTextNone (DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE))
......@@ -91,10 +91,10 @@ namespace dbaui
m_xTextSeparator->append_text( m_aTextSeparatorList.getToken( i, '\t' ) );
m_xTextSeparator->append_text(m_aTextNone);
m_xOwnExtension->connect_changed(LINK(this, DBOTextConnectionHelper, OnEditModified));
m_xAccessTextFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl));
m_xAccessCSVFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl));
m_xAccessOtherFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl));
m_xOwnExtension->connect_changed(LINK(this, OTextConnectionHelper, OnEditModified));
m_xAccessTextFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessCSVFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessOtherFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessCSVFiles->set_active(true);
struct SectionDescriptor
......@@ -124,12 +124,12 @@ namespace dbaui
m_xContainer->show();
}
IMPL_LINK_NOARG(DBOTextConnectionHelper, OnEditModified, weld::Entry&, void)
IMPL_LINK_NOARG(OTextConnectionHelper, OnEditModified, weld::Entry&, void)
{
m_aGetExtensionHandler.Call(this);
}
IMPL_LINK_NOARG(DBOTextConnectionHelper, OnSetExtensionHdl, weld::ToggleButton&, void)
IMPL_LINK_NOARG(OTextConnectionHelper, OnSetExtensionHdl, weld::ToggleButton&, void)
{
bool bDoEnable = m_xAccessOtherFiles->get_active();
m_xOwnExtension->set_sensitive(bDoEnable);
......@@ -137,7 +137,7 @@ namespace dbaui
m_aGetExtensionHandler.Call(this);
}
void DBOTextConnectionHelper::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
void OTextConnectionHelper::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
{
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xFieldSeparator.get()));
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xTextSeparator.get()));
......@@ -147,7 +147,7 @@ namespace dbaui
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xCharSet->get_widget()));
}
void DBOTextConnectionHelper::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
void OTextConnectionHelper::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
{
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xFieldSeparatorLabel.get()));
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xTextSeparatorLabel.get()));
......@@ -158,7 +158,7 @@ namespace dbaui
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::ComboBox>(m_xCharSet->get_widget()));
}
void DBOTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bValid)
void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bValid)
{
if ( !_bValid )
return;
......@@ -196,7 +196,7 @@ namespace dbaui
}
}
bool DBOTextConnectionHelper::prepareLeave()
bool OTextConnectionHelper::prepareLeave()
{
OUString sExtension = GetExtension();
OUString aErrorText;
......@@ -272,7 +272,7 @@ namespace dbaui
return false;
}
bool DBOTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething )
bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething )
{
bool bChangedSomething = _bChangedSomething;
......@@ -329,7 +329,7 @@ namespace dbaui
return bChangedSomething;
}
void DBOTextConnectionHelper::SetExtension(const OUString& _rVal)
void OTextConnectionHelper::SetExtension(const OUString& _rVal)
{
if (_rVal == "txt")
m_xAccessTextFiles->set_active(true);
......@@ -342,7 +342,7 @@ namespace dbaui
}
}
OUString DBOTextConnectionHelper::GetExtension()
OUString OTextConnectionHelper::GetExtension()
{
OUString sExtension;
if (m_xAccessTextFiles->get_active())
......@@ -358,7 +358,7 @@ namespace dbaui
return sExtension;
}
OUString DBOTextConnectionHelper::GetSeparator(const weld::ComboBox& rBox, const OUString& rList)
OUString OTextConnectionHelper::GetSeparator(const weld::ComboBox& rBox, const OUString& rList)
{
sal_Unicode const nTok = '\t';
int nPos(rBox.find_text(rBox.get_active_text()));
......@@ -373,7 +373,7 @@ namespace dbaui
return OUString();
}
void DBOTextConnectionHelper::SetSeparator( weld::ComboBox& rBox, const OUString& rList, const OUString& rVal )
void OTextConnectionHelper::SetSeparator( weld::ComboBox& rBox, const OUString& rList, const OUString& rVal )
{
char nTok = '\t';
sal_Int32 nCnt = comphelper::string::getTokenCount(rList, nTok);
......
......@@ -39,17 +39,17 @@ 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
class DBOTextConnectionHelper final
class OTextConnectionHelper final
{
public:
DBOTextConnectionHelper(weld::Widget* pParent , const short _nAvailableSections);
OTextConnectionHelper(weld::Widget* pParent , const short _nAvailableSections);
private:
OUString m_aFieldSeparatorList;
OUString m_aTextSeparatorList;
OUString m_aTextNone;
OUString m_aOldExtension;
Link<DBOTextConnectionHelper*, void> m_aGetExtensionHandler; /// to be called if a new type is selected
Link<OTextConnectionHelper*, void> m_aGetExtensionHandler; /// to be called if a new type is selected
short m_nAvailableSections;
......@@ -86,7 +86,7 @@ namespace dbaui
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<DBOTextConnectionHelper*, void>& _rHandler) { m_aGetExtensionHandler = _rHandler; }
void SetClickHandler(const Link<OTextConnectionHelper*, void>& _rHandler) { m_aGetExtensionHandler = _rHandler; }
OUString GetExtension();
bool FillItemSet( SfxItemSet& rSet, const bool bChangedSomething );
bool prepareLeave();
......
......@@ -246,7 +246,7 @@ namespace dbaui
OTextDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
DBOTextConnectionHelper m_aTextConnectionHelper;
OTextConnectionHelper m_aTextConnectionHelper;
protected:
virtual ~OTextDetailsPage() override;
......
......@@ -30,7 +30,7 @@ namespace dbaui
, m_rItems(rItems)
, m_xContainer(m_xBuilder->weld_widget("TextPageContainer"))
, m_xOK(m_xBuilder->weld_button("ok"))
, m_xTextConnectionHelper(new DBOTextConnectionHelper(m_xContainer.get(), TC_HEADER | TC_SEPARATORS | TC_CHARSET))
, m_xTextConnectionHelper(new OTextConnectionHelper(m_xContainer.get(), TC_HEADER | TC_SEPARATORS | TC_CHARSET))
{
m_xOK->connect_clicked(LINK(this, TextConnectionSettingsDialog, OnOK));
}
......
......@@ -28,7 +28,7 @@ class SfxItemSet;
namespace dbaui
{
class DBOTextConnectionHelper;
class OTextConnectionHelper;
// TextConnectionSettingsDialog
class TextConnectionSettingsDialog : public weld::GenericDialogController
......@@ -49,7 +49,7 @@ namespace dbaui
std::unique_ptr<weld::Widget> m_xContainer;
std::unique_ptr<weld::Button> m_xOK;
std::unique_ptr<DBOTextConnectionHelper> m_xTextConnectionHelper;
std::unique_ptr<OTextConnectionHelper> m_xTextConnectionHelper;
private:
DECL_LINK(OnOK, weld::Button&, void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment