#81485# +OAdoDetailsPage

This commit is contained in:
Frank Schönheit 2001-01-04 10:21:45 +00:00
parent 46bd1847cc
commit b242af23c2
2 changed files with 113 additions and 4 deletions

View file

@ -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
*

View file

@ -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)
*