summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-24 12:26:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-24 17:45:06 +0200
commitb3d41f0c0ad6790254a898f8fd242979c0e47be4 (patch)
tree759535aff8ffdecbaf0d4a91b930233ba0c1cca4 /dbaccess/source
parent1fccdde12a27379ed75463ba175732b72265eb70 (diff)
drop now unused OCommonBehaviourTabPage
Change-Id: I0a7ff8a018cbe20481360196f6f2ed919f11ded8 Reviewed-on: https://gerrit.libreoffice.org/62293 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx162
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx39
2 files changed, 17 insertions, 184 deletions
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 9b41ad6404fa..00e3c38e6333 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -54,151 +54,6 @@ namespace dbaui
using namespace ::com::sun::star::container;
using namespace ::dbtools;
- OCommonBehaviourTabPage::OCommonBehaviourTabPage(vcl::Window* pParent, const OString& rId,
- const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs,
- OCommonBehaviourTabPageFlags nControlFlags)
-
- :OGenericAdministrationPage(pParent, rId, rUIXMLDescription, _rCoreAttrs)
- ,m_pOptionsLabel(nullptr)
- ,m_pOptions(nullptr)
- ,m_pCharsetLabel(nullptr)
- ,m_pCharset(nullptr)
- ,m_pAutoRetrievingEnabled(nullptr)
- ,m_pAutoIncrementLabel(nullptr)
- ,m_pAutoIncrement(nullptr)
- ,m_pAutoRetrievingLabel(nullptr)
- ,m_pAutoRetrieving(nullptr)
- ,m_nControlFlags(nControlFlags)
- {
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
- {
- m_pOptionsLabel = get<FixedText>("optionslabel");
- m_pOptionsLabel->Show();
- m_pOptions = get<Edit>("options");
- m_pOptions->Show();
- m_pOptions->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl));
- }
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
- {
- FixedText* pDataConvertLabel = get<FixedText>("charsetheader");
- pDataConvertLabel->Show();
- m_pCharsetLabel = get<FixedText>("charsetlabel");
- m_pCharsetLabel->Show();
- m_pCharset = get<CharSetListBox>("charset");
- m_pCharset->Show();
- m_pCharset->SetSelectHdl(LINK(this, OCommonBehaviourTabPage, CharsetSelectHdl));
- }
- }
-
- IMPL_LINK_NOARG(OCommonBehaviourTabPage, CharsetSelectHdl, ListBox&, void)
- {
- callModifiedHdl();
- }
-
- OCommonBehaviourTabPage::~OCommonBehaviourTabPage()
- {
- disposeOnce();
- }
-
- void OCommonBehaviourTabPage::dispose()
- {
- m_pOptionsLabel.disposeAndClear();
- m_pOptions.disposeAndClear();
- m_pCharsetLabel.disposeAndClear();
- m_pCharset.disposeAndClear();
- m_pAutoIncrementLabel.disposeAndClear();
- m_pAutoIncrement.disposeAndClear();
- m_pAutoRetrievingEnabled.disposeAndClear();
- m_pAutoRetrievingLabel.disposeAndClear();
- m_pAutoRetrieving.disposeAndClear();
- OGenericAdministrationPage::dispose();
- }
-
- void OCommonBehaviourTabPage::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
- {
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
- {
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pOptionsLabel));
- }
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
- {
- _rControlList.emplace_back(new ODisableWrapper<FixedText>(m_pCharsetLabel));
- }
- }
- void OCommonBehaviourTabPage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
- {
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
- _rControlList.emplace_back(new OSaveValueWrapper<Edit>(m_pOptions));
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
- _rControlList.emplace_back(new OSaveValueWrapper<ListBox>(m_pCharset));
- }
-
- void OCommonBehaviourTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
- {
- // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
- bool bValid, bReadonly;
- getFlags(_rSet, bValid, bReadonly);
-
- // collect the items
- const SfxStringItem* pOptionsItem = _rSet.GetItem<SfxStringItem>(DSID_ADDITIONALOPTIONS);
- const SfxStringItem* pCharsetItem = _rSet.GetItem<SfxStringItem>(DSID_CHARSET);
-
- // forward the values to the controls
- if (bValid)
- {
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
- {
- m_pOptions->SetText(pOptionsItem->GetValue());
- m_pOptions->ClearModifyFlag();
- }
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
- {
- m_pCharset->SelectEntryByIanaName( pCharsetItem->GetValue() );
- }
- }
- OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
- }
-
- bool OCommonBehaviourTabPage::FillItemSet(SfxItemSet* _rSet)
- {
- bool bChangedSomething = false;
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
- {
- fillString(*_rSet,m_pOptions,DSID_ADDITIONALOPTIONS,bChangedSomething);
- }
-
- if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
- {
- if ( m_pCharset->StoreSelectedCharSet( *_rSet, DSID_CHARSET ) )
- bChangedSomething = true;
- }
-
- return bChangedSomething;
- }
-
- // ODbaseDetailsPage
- ODbaseDetailsPage::ODbaseDetailsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs)
- : DBOCommonBehaviourTabPage(pParent, "dbaccess/ui/dbasepage.ui", "DbasePage",
- _rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
- , m_xShowDeleted(m_xBuilder->weld_check_button("showDelRowsCheckbutton"))
- , m_xFT_Message(m_xBuilder->weld_label("specMessageLabel"))
- , m_xIndexes(m_xBuilder->weld_button("indiciesButton"))
- {
- m_xIndexes->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
- m_xShowDeleted->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
- }
-
- ODbaseDetailsPage::~ODbaseDetailsPage()
- {
- disposeOnce();
- }
-
DBOCommonBehaviourTabPage::DBOCommonBehaviourTabPage(TabPageParent pParent,
const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rCoreAttrs,
OCommonBehaviourTabPageFlags nControlFlags)
@@ -309,6 +164,23 @@ namespace dbaui
return bChangedSomething;
}
+ // ODbaseDetailsPage
+ ODbaseDetailsPage::ODbaseDetailsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs)
+ : DBOCommonBehaviourTabPage(pParent, "dbaccess/ui/dbasepage.ui", "DbasePage",
+ _rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
+ , m_xShowDeleted(m_xBuilder->weld_check_button("showDelRowsCheckbutton"))
+ , m_xFT_Message(m_xBuilder->weld_label("specMessageLabel"))
+ , m_xIndexes(m_xBuilder->weld_button("indiciesButton"))
+ {
+ m_xIndexes->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
+ m_xShowDeleted->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
+ }
+
+ ODbaseDetailsPage::~ODbaseDetailsPage()
+ {
+ disposeOnce();
+ }
+
VclPtr<SfxTabPage> ODriversSettings::CreateDbase(TabPageParent pParent, const SfxItemSet* _rAttrSet)
{
return VclPtr<ODbaseDetailsPage>::Create(pParent, *_rAttrSet);
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 1739de02d4d5..98341ca67ea1 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -51,45 +51,6 @@ namespace dbaui
The controls to be used have to be defined within the resource, as usual, but
this class does all the handling necessary.
*/
- class OCommonBehaviourTabPage : public OGenericAdministrationPage
- {
- protected:
-
- VclPtr<FixedText> m_pOptionsLabel;
- VclPtr<Edit> m_pOptions;
-
- VclPtr<FixedText> m_pCharsetLabel;
- VclPtr<CharSetListBox> m_pCharset;
-
- VclPtr<CheckBox> m_pAutoRetrievingEnabled;
- VclPtr<FixedText> m_pAutoIncrementLabel;
- VclPtr<Edit> m_pAutoIncrement;
- VclPtr<FixedText> m_pAutoRetrievingLabel;
- VclPtr<Edit> m_pAutoRetrieving;
-
- OCommonBehaviourTabPageFlags m_nControlFlags;
-
- public:
- virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override;
-
- OCommonBehaviourTabPage(vcl::Window* pParent, const OString& rId, const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags);
- protected:
-
- virtual ~OCommonBehaviourTabPage() override;
- virtual void dispose() override;
-
- // subclasses must override this, but it isn't pure virtual
- virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
-
- // <method>OGenericAdministrationPage::fillControls</method>
- virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
-
- // <method>OGenericAdministrationPage::fillWindows</method>
- virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
- private:
- DECL_LINK(CharsetSelectHdl, ListBox&, void);
- };
-
class DBOCommonBehaviourTabPage : public OGenericAdministrationPage
{
protected: