From b242af23c29e173ef3aea45a77f31dd6c5a1a11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Sch=C3=B6nheit?= Date: Thu, 4 Jan 2001 10:21:45 +0000 Subject: [PATCH] #81485# +OAdoDetailsPage --- dbaccess/source/ui/dlg/adminpages.cxx | 88 ++++++++++++++++++++++++++- dbaccess/source/ui/dlg/adminpages.hxx | 29 ++++++++- 2 files changed, 113 insertions(+), 4 deletions(-) diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 3b26622698af..9e09cdc3cd4e 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -2,9 +2,9 @@ * * $RCSfile: adminpages.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: fs $ $Date: 2001-01-04 09:43:26 $ + * last change: $Author: fs $ $Date: 2001-01-04 11:21:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1073,6 +1073,87 @@ sal_Bool OJdbcDetailsPage::FillItemSet( SfxItemSet& _rSet ) return bChangedSomething; } +//======================================================================== +//= OAdoDetailsPage +//======================================================================== +OAdoDetailsPage::OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) + :OCommonBehaviourTabPage(pParent, PAGE_ADO, _rCoreAttrs, CBTP_USE_UIDPWD) + + ,m_aAdoUrlLabel (this, ResId(FT_CONNECTURL)) + ,m_aAdoUrl (this, ResId(ET_CONNECTURL)) +{ + m_aAdoUrl.SetModifyHdl(getControlModifiedLink()); + + m_pUserName->SetZOrder(&m_aAdoUrl, WINDOW_ZORDER_BEHIND); + m_pPasswordRequired->SetZOrder(m_pUserName, WINDOW_ZORDER_BEHIND); + + FreeResource(); +} + +// ----------------------------------------------------------------------- +OAdoDetailsPage::~OAdoDetailsPage() +{ +} + +// ----------------------------------------------------------------------- +sal_Int32* OAdoDetailsPage::getDetailIds() +{ + static sal_Int32* pRelevantIds = NULL; + if (!pRelevantIds) + { + static sal_Int32 nRelevantIds[] = + { + 0 + }; + pRelevantIds = nRelevantIds; + } + return pRelevantIds; +} + +// ----------------------------------------------------------------------- +SfxTabPage* OAdoDetailsPage::Create( Window* pParent, const SfxItemSet& _rAttrSet ) +{ + return ( new OAdoDetailsPage( pParent, _rAttrSet ) ); +} + +// ----------------------------------------------------------------------- +void OAdoDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) +{ + OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); + + // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) + sal_Bool bValid, bReadonly; + getFlags(_rSet, bValid, bReadonly); + + SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True); + + String sURL; + if (bValid) + sURL = pUrlItem->GetValue(); + m_aAdoUrl.SetText(sURL); + + m_aAdoUrl.ClearModifyFlag(); + + if (_bSaveValue) + { + m_aAdoUrl.SaveValue(); + } + + if (bReadonly) + { + m_aAdoUrlLabel.Disable(); + m_aAdoUrl.Disable(); + } +} + +// ----------------------------------------------------------------------- +sal_Bool OAdoDetailsPage::FillItemSet( SfxItemSet& _rSet ) +{ + sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + FILL_STRING_ITEM(m_aAdoUrl, _rSet, DSID_CONNECTURL, bChangedSomething); + return bChangedSomething; +} + //======================================================================== //= OOdbcDetailsPage //======================================================================== @@ -1830,6 +1911,9 @@ IMPL_LINK( OTableSubscriptionPage, OnRadioButtonClicked, Button*, pButton ) /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.24 2001/01/04 09:43:26 fs + * #81615# auto completion for the extension checkbox is case sensitive + * * Revision 1.23 2000/12/11 16:33:15 fs * reversed the semantics of the SuppressVersionColumns checkbox * diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 8dc306bed042..97b5058b6240 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -2,9 +2,9 @@ * * $RCSfile: adminpages.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: oj $ $Date: 2000-12-07 14:15:42 $ + * last change: $Author: fs $ $Date: 2001-01-04 11:21:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -323,6 +323,28 @@ private: virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); }; +//======================================================================== +//= OAdoDetailsPage +//======================================================================== +class OAdoDetailsPage : public OCommonBehaviourTabPage +{ +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); + virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + + /// get the SfxPoolItem ids used by this tab page + static sal_Int32* getDetailIds(); + +private: + FixedText m_aAdoUrlLabel; + OConnectionURLEdit m_aAdoUrl; + + OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); + ~OAdoDetailsPage(); + + virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); +}; + //======================================================================== //= OOdbcDetailsPage //======================================================================== @@ -465,6 +487,9 @@ private: /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.16 2000/12/07 14:15:42 oj + * #81131# check installed adabas dbs + * * Revision 1.15 2000/11/30 08:32:30 fs * #80003# changed some sal_uInt16 to sal_Int32 (need some -1's) *