diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-08-24 05:40:35 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-08-24 05:40:35 +0000 |
commit | d6d7f23601270f876e99e9d32d0961df0759fd1b (patch) | |
tree | 1eaa5a9c056031a02ccdcd1ad4151671b1637d03 /dbaccess/source/ui/dlg/adtabdlg.cxx | |
parent | 830000dafd352310e0ad26de5c19c76d4cb0a91e (diff) |
#90015# code corrcetions for some speedup's
Diffstat (limited to 'dbaccess/source/ui/dlg/adtabdlg.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 9bef0d869e4c..47ed949925d7 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: adtabdlg.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: fme $ $Date: 2001-06-21 15:07:11 $ + * last change: $Author: oj $ $Date: 2001-08-24 06:39:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -114,7 +114,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace dbtools; -DBG_NAME(OAddTableDlg); +DBG_NAME(OAddTableDlg) //------------------------------------------------------------------------------ OAddTableDlg::OAddTableDlg( Window* pParent) :ModelessDialog( pParent, ModuleRes(DLG_JOIN_TABADD) ) @@ -125,6 +125,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent) ,aHelpButton( this, ResId( PB_HELP ) ) ,aFixedLineTable( this, ResId( FL_TABLE ) ) ,aDefaultString( ResId( STR_DEFAULT ) ) + ,m_bInitialized(sal_False) { DBG_CTOR(OAddTableDlg,NULL); m_pTableView = static_cast<OJoinTableView*>(pParent); @@ -158,17 +159,11 @@ OAddTableDlg::~OAddTableDlg() //------------------------------------------------------------------------------ void OAddTableDlg::Update() { -// if (m_pShellAttachedTo == pNewShell) -// return; -// -// m_pShellAttachedTo = pNewShell; -// if (m_pShellAttachedTo) -// { -// xDatabase = m_pShellAttachedTo->GetDocShell()->GetJoinDocDatabase(); - UpdateTableList(sal_True); -// } - - //DetermineAddTable(); + if(!m_bInitialized) + { + UpdateTableList(m_pTableView->getDesignView()->getController()->isViewAllowed()); + m_bInitialized = sal_True; + } } //------------------------------------------------------------------------------ @@ -258,15 +253,19 @@ void OAddTableDlg::UpdateTableList(BOOL bViewsAllowed) xTables = xTableSupp->getTables(); // get the views supplier and the views - xViewSupp = Reference< XViewsSupplier >(xTableSupp, UNO_QUERY); - if (xViewSupp.is()) - xViews = xViewSupp->getViews(); - Sequence< ::rtl::OUString> sTables,sViews; if (xTables.is()) sTables = xTables->getElementNames(); - if (xViews.is()) - sViews = xViews->getElementNames(); + if(bViewsAllowed) + { + xViewSupp = Reference< XViewsSupplier >(xTableSupp, UNO_QUERY); + if (xViewSupp.is()) + { + xViews = xViewSupp->getViews(); + if (xViews.is()) + sViews = xViews->getElementNames(); + } + } aTableList.UpdateTableList(Reference< XConnection>(xTableSupp,UNO_QUERY)->getMetaData(),sTables,sViews); /* |