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; ...@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
disposeOnce(); disposeOnce();
} }
IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, DBOTextConnectionHelper*, void) IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, void)
{ {
SetRoadmapStateValue(!m_aTextConnectionHelper.GetExtension().isEmpty() && DBOConnectionTabPageSetup::checkTestConnection()); SetRoadmapStateValue(!m_aTextConnectionHelper.GetExtension().isEmpty() && DBOConnectionTabPageSetup::checkTestConnection());
callModifiedHdl(); callModifiedHdl();
......
...@@ -57,7 +57,7 @@ namespace dbaui ...@@ -57,7 +57,7 @@ namespace dbaui
{ {
public: public:
std::unique_ptr<weld::Widget> m_xSubContainer; std::unique_ptr<weld::Widget> m_xSubContainer;
DBOTextConnectionHelper m_aTextConnectionHelper; OTextConnectionHelper m_aTextConnectionHelper;
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override;
static VclPtr<OGenericAdministrationPage> CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet ); static VclPtr<OGenericAdministrationPage> CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet );
...@@ -71,7 +71,7 @@ namespace dbaui ...@@ -71,7 +71,7 @@ namespace dbaui
bool checkTestConnection() override; bool checkTestConnection() override;
private: private:
DECL_LINK(ImplGetExtensionHdl, DBOTextConnectionHelper*, void); DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*, void);
}; };
// OLDAPConnectionPageSetup // OLDAPConnectionPageSetup
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
namespace dbaui 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_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST))
, m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST) , m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST)
, m_aTextNone (DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE)) , m_aTextNone (DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE))
...@@ -91,10 +91,10 @@ namespace dbaui ...@@ -91,10 +91,10 @@ namespace dbaui
m_xTextSeparator->append_text( m_aTextSeparatorList.getToken( i, '\t' ) ); m_xTextSeparator->append_text( m_aTextSeparatorList.getToken( i, '\t' ) );
m_xTextSeparator->append_text(m_aTextNone); m_xTextSeparator->append_text(m_aTextNone);
m_xOwnExtension->connect_changed(LINK(this, DBOTextConnectionHelper, OnEditModified)); m_xOwnExtension->connect_changed(LINK(this, OTextConnectionHelper, OnEditModified));
m_xAccessTextFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); m_xAccessTextFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessCSVFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); m_xAccessCSVFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessOtherFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); m_xAccessOtherFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl));
m_xAccessCSVFiles->set_active(true); m_xAccessCSVFiles->set_active(true);
struct SectionDescriptor struct SectionDescriptor
...@@ -124,12 +124,12 @@ namespace dbaui ...@@ -124,12 +124,12 @@ namespace dbaui
m_xContainer->show(); m_xContainer->show();
} }
IMPL_LINK_NOARG(DBOTextConnectionHelper, OnEditModified, weld::Entry&, void) IMPL_LINK_NOARG(OTextConnectionHelper, OnEditModified, weld::Entry&, void)
{ {
m_aGetExtensionHandler.Call(this); 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(); bool bDoEnable = m_xAccessOtherFiles->get_active();
m_xOwnExtension->set_sensitive(bDoEnable); m_xOwnExtension->set_sensitive(bDoEnable);
...@@ -137,7 +137,7 @@ namespace dbaui ...@@ -137,7 +137,7 @@ namespace dbaui
m_aGetExtensionHandler.Call(this); 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_xFieldSeparator.get()));
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xTextSeparator.get())); _rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xTextSeparator.get()));
...@@ -147,7 +147,7 @@ namespace dbaui ...@@ -147,7 +147,7 @@ namespace dbaui
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xCharSet->get_widget())); _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_xFieldSeparatorLabel.get()));
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xTextSeparatorLabel.get())); _rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xTextSeparatorLabel.get()));
...@@ -158,7 +158,7 @@ namespace dbaui ...@@ -158,7 +158,7 @@ namespace dbaui
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::ComboBox>(m_xCharSet->get_widget())); _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 ) if ( !_bValid )
return; return;
...@@ -196,7 +196,7 @@ namespace dbaui ...@@ -196,7 +196,7 @@ namespace dbaui
} }
} }
bool DBOTextConnectionHelper::prepareLeave() bool OTextConnectionHelper::prepareLeave()
{ {
OUString sExtension = GetExtension(); OUString sExtension = GetExtension();
OUString aErrorText; OUString aErrorText;
...@@ -272,7 +272,7 @@ namespace dbaui ...@@ -272,7 +272,7 @@ namespace dbaui
return false; return false;
} }
bool DBOTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething ) bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething )
{ {
bool bChangedSomething = _bChangedSomething; bool bChangedSomething = _bChangedSomething;
...@@ -329,7 +329,7 @@ namespace dbaui ...@@ -329,7 +329,7 @@ namespace dbaui
return bChangedSomething; return bChangedSomething;
} }
void DBOTextConnectionHelper::SetExtension(const OUString& _rVal) void OTextConnectionHelper::SetExtension(const OUString& _rVal)
{ {
if (_rVal == "txt") if (_rVal == "txt")
m_xAccessTextFiles->set_active(true); m_xAccessTextFiles->set_active(true);
...@@ -342,7 +342,7 @@ namespace dbaui ...@@ -342,7 +342,7 @@ namespace dbaui
} }
} }
OUString DBOTextConnectionHelper::GetExtension() OUString OTextConnectionHelper::GetExtension()
{ {
OUString sExtension; OUString sExtension;
if (m_xAccessTextFiles->get_active()) if (m_xAccessTextFiles->get_active())
...@@ -358,7 +358,7 @@ namespace dbaui ...@@ -358,7 +358,7 @@ namespace dbaui
return sExtension; 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'; sal_Unicode const nTok = '\t';
int nPos(rBox.find_text(rBox.get_active_text())); int nPos(rBox.find_text(rBox.get_active_text()));
...@@ -373,7 +373,7 @@ namespace dbaui ...@@ -373,7 +373,7 @@ namespace dbaui
return OUString(); 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'; char nTok = '\t';
sal_Int32 nCnt = comphelper::string::getTokenCount(rList, nTok); sal_Int32 nCnt = comphelper::string::getTokenCount(rList, nTok);
......
...@@ -39,17 +39,17 @@ namespace dbaui ...@@ -39,17 +39,17 @@ namespace dbaui
#define TC_HEADER (short(0x04)) // a section containing the "Text contains header" check box only #define TC_HEADER (short(0x04)) // a section containing the "Text contains header" check box only
#define TC_CHARSET (short(0x08)) // not yet implemented #define TC_CHARSET (short(0x08)) // not yet implemented
class DBOTextConnectionHelper final class OTextConnectionHelper final
{ {
public: public:
DBOTextConnectionHelper(weld::Widget* pParent , const short _nAvailableSections); OTextConnectionHelper(weld::Widget* pParent , const short _nAvailableSections);
private: private:
OUString m_aFieldSeparatorList; OUString m_aFieldSeparatorList;
OUString m_aTextSeparatorList; OUString m_aTextSeparatorList;
OUString m_aTextNone; OUString m_aTextNone;
OUString m_aOldExtension; 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; short m_nAvailableSections;
...@@ -86,7 +86,7 @@ namespace dbaui ...@@ -86,7 +86,7 @@ namespace dbaui
void implInitControls(const SfxItemSet& _rSet, bool _bValid); void implInitControls(const SfxItemSet& _rSet, bool _bValid);
void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList); void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList);
void fillWindows(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(); OUString GetExtension();
bool FillItemSet( SfxItemSet& rSet, const bool bChangedSomething ); bool FillItemSet( SfxItemSet& rSet, const bool bChangedSomething );
bool prepareLeave(); bool prepareLeave();
......
...@@ -246,7 +246,7 @@ namespace dbaui ...@@ -246,7 +246,7 @@ namespace dbaui
OTextDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); OTextDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
DBOTextConnectionHelper m_aTextConnectionHelper; OTextConnectionHelper m_aTextConnectionHelper;
protected: protected:
virtual ~OTextDetailsPage() override; virtual ~OTextDetailsPage() override;
......
...@@ -30,7 +30,7 @@ namespace dbaui ...@@ -30,7 +30,7 @@ namespace dbaui
, m_rItems(rItems) , m_rItems(rItems)
, m_xContainer(m_xBuilder->weld_widget("TextPageContainer")) , m_xContainer(m_xBuilder->weld_widget("TextPageContainer"))
, m_xOK(m_xBuilder->weld_button("ok")) , 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)); m_xOK->connect_clicked(LINK(this, TextConnectionSettingsDialog, OnOK));
} }
......
...@@ -28,7 +28,7 @@ class SfxItemSet; ...@@ -28,7 +28,7 @@ class SfxItemSet;
namespace dbaui namespace dbaui
{ {
class DBOTextConnectionHelper; class OTextConnectionHelper;
// TextConnectionSettingsDialog // TextConnectionSettingsDialog
class TextConnectionSettingsDialog : public weld::GenericDialogController class TextConnectionSettingsDialog : public weld::GenericDialogController
...@@ -49,7 +49,7 @@ namespace dbaui ...@@ -49,7 +49,7 @@ namespace dbaui
std::unique_ptr<weld::Widget> m_xContainer; std::unique_ptr<weld::Widget> m_xContainer;
std::unique_ptr<weld::Button> m_xOK; std::unique_ptr<weld::Button> m_xOK;
std::unique_ptr<DBOTextConnectionHelper> m_xTextConnectionHelper; std::unique_ptr<OTextConnectionHelper> m_xTextConnectionHelper;
private: private:
DECL_LINK(OnOK, weld::Button&, void); 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