1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_dbaccess.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #ifndef _DBAUI_TABLESPAGE_HXX_ 32*cdf0e10cSrcweir #include "tablespage.hxx" 33*cdf0e10cSrcweir #endif 34*cdf0e10cSrcweir #ifndef _DBU_DLG_HRC_ 35*cdf0e10cSrcweir #include "dbu_dlg.hrc" 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir #ifndef _DBAUI_DBADMIN_HRC_ 38*cdf0e10cSrcweir #include "dbadmin.hrc" 39*cdf0e10cSrcweir #endif 40*cdf0e10cSrcweir #ifndef _DBAUI_DATASOURCEITEMS_HXX_ 41*cdf0e10cSrcweir #include "dsitems.hxx" 42*cdf0e10cSrcweir #endif 43*cdf0e10cSrcweir #ifndef DBACCESS_UI_BROWSER_ID_HXX 44*cdf0e10cSrcweir #include "browserids.hxx" 45*cdf0e10cSrcweir #endif 46*cdf0e10cSrcweir #ifndef _DBAUI_DATASOURCECONNECTOR_HXX_ 47*cdf0e10cSrcweir #include "datasourceconnector.hxx" 48*cdf0e10cSrcweir #endif 49*cdf0e10cSrcweir #ifndef _COMPHELPER_TYPES_HXX_ 50*cdf0e10cSrcweir #include <comphelper/types.hxx> 51*cdf0e10cSrcweir #endif 52*cdf0e10cSrcweir #ifndef _CONNECTIVITY_DBTOOLS_HXX_ 53*cdf0e10cSrcweir #include <connectivity/dbtools.hxx> 54*cdf0e10cSrcweir #endif 55*cdf0e10cSrcweir #ifndef _DBHELPER_DBEXCEPTION_HXX_ 56*cdf0e10cSrcweir #include <connectivity/dbexception.hxx> 57*cdf0e10cSrcweir #endif 58*cdf0e10cSrcweir #ifndef _DBAUI_STRINGLISTITEM_HXX_ 59*cdf0e10cSrcweir #include "stringlistitem.hxx" 60*cdf0e10cSrcweir #endif 61*cdf0e10cSrcweir #ifndef _SFXENUMITEM_HXX 62*cdf0e10cSrcweir #include <svl/eitem.hxx> 63*cdf0e10cSrcweir #endif 64*cdf0e10cSrcweir #ifndef _SFXSTRITEM_HXX 65*cdf0e10cSrcweir #include <svl/stritem.hxx> 66*cdf0e10cSrcweir #endif 67*cdf0e10cSrcweir #ifndef DBACCESS_SHARED_DBUSTRINGS_HRC 68*cdf0e10cSrcweir #include "dbustrings.hrc" 69*cdf0e10cSrcweir #endif 70*cdf0e10cSrcweir #ifndef _SV_SVAPP_HXX 71*cdf0e10cSrcweir #include <vcl/svapp.hxx> 72*cdf0e10cSrcweir #endif 73*cdf0e10cSrcweir #ifndef _SV_WAITOBJ_HXX 74*cdf0e10cSrcweir #include <vcl/waitobj.hxx> 75*cdf0e10cSrcweir #endif 76*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_ 77*cdf0e10cSrcweir #include <com/sun/star/sdb/SQLContext.hpp> 78*cdf0e10cSrcweir #endif 79*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_ 80*cdf0e10cSrcweir #include <com/sun/star/sdbcx/XTablesSupplier.hpp> 81*cdf0e10cSrcweir #endif 82*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_ 83*cdf0e10cSrcweir #include <com/sun/star/sdbcx/XAppend.hpp> 84*cdf0e10cSrcweir #endif 85*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_ 86*cdf0e10cSrcweir #include <com/sun/star/util/XModifiable.hpp> 87*cdf0e10cSrcweir #endif 88*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_ 89*cdf0e10cSrcweir #include <com/sun/star/sdbcx/XDrop.hpp> 90*cdf0e10cSrcweir #endif 91*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_ 92*cdf0e10cSrcweir #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp> 93*cdf0e10cSrcweir #endif 94*cdf0e10cSrcweir #ifndef _DBAUI_SQLMESSAGE_HXX_ 95*cdf0e10cSrcweir #include "sqlmessage.hxx" 96*cdf0e10cSrcweir #endif 97*cdf0e10cSrcweir #ifndef _SV_MSGBOX_HXX 98*cdf0e10cSrcweir #include <vcl/msgbox.hxx> 99*cdf0e10cSrcweir #endif 100*cdf0e10cSrcweir #ifndef _DBA_DBACCESS_HELPID_HRC_ 101*cdf0e10cSrcweir #include "dbaccess_helpid.hrc" 102*cdf0e10cSrcweir #endif 103*cdf0e10cSrcweir #ifndef DBAUI_TOOLS_HXX 104*cdf0e10cSrcweir #include "UITools.hxx" 105*cdf0e10cSrcweir #endif 106*cdf0e10cSrcweir #ifndef _VOS_MUTEX_HXX_ 107*cdf0e10cSrcweir #include <vos/mutex.hxx> 108*cdf0e10cSrcweir #endif 109*cdf0e10cSrcweir #ifndef _SVTOOLS_IMGDEF_HXX 110*cdf0e10cSrcweir #include <svtools/imgdef.hxx> 111*cdf0e10cSrcweir #endif 112*cdf0e10cSrcweir #ifndef _DBAUI_TABLESSINGLEDLG_HXX_ 113*cdf0e10cSrcweir #include "TablesSingleDlg.hxx" 114*cdf0e10cSrcweir #endif 115*cdf0e10cSrcweir #ifndef TOOLS_DIAGNOSE_EX_H 116*cdf0e10cSrcweir #include <tools/diagnose_ex.h> 117*cdf0e10cSrcweir #endif 118*cdf0e10cSrcweir #ifndef _CPPUHELPER_EXC_HLP_HXX_ 119*cdf0e10cSrcweir #include <cppuhelper/exc_hlp.hxx> 120*cdf0e10cSrcweir #endif 121*cdf0e10cSrcweir #ifndef _DBAUI_AUTOCONTROLS_HRC_ 122*cdf0e10cSrcweir #include "AutoControls.hrc" 123*cdf0e10cSrcweir #endif 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir //......................................................................... 126*cdf0e10cSrcweir namespace dbaui 127*cdf0e10cSrcweir { 128*cdf0e10cSrcweir //......................................................................... 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 131*cdf0e10cSrcweir using namespace ::com::sun::star::sdbc; 132*cdf0e10cSrcweir using namespace ::com::sun::star::sdbcx; 133*cdf0e10cSrcweir using namespace ::com::sun::star::sdb; 134*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 135*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 136*cdf0e10cSrcweir using namespace ::com::sun::star::i18n; 137*cdf0e10cSrcweir using namespace ::com::sun::star::container; 138*cdf0e10cSrcweir using namespace ::com::sun::star::frame; 139*cdf0e10cSrcweir using namespace ::com::sun::star::util; 140*cdf0e10cSrcweir using namespace ::dbtools; 141*cdf0e10cSrcweir using namespace ::comphelper; 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir //======================================================================== 144*cdf0e10cSrcweir //= OTableSubscriptionPage 145*cdf0e10cSrcweir //======================================================================== 146*cdf0e10cSrcweir DBG_NAME(OTableSubscriptionPage) 147*cdf0e10cSrcweir //------------------------------------------------------------------------ 148*cdf0e10cSrcweir OTableSubscriptionPage::OTableSubscriptionPage( Window* pParent, const SfxItemSet& _rCoreAttrs,OTableSubscriptionDialog* _pTablesDlg ) 149*cdf0e10cSrcweir :OGenericAdministrationPage( pParent, ModuleRes(PAGE_TABLESUBSCRIPTION), _rCoreAttrs ) 150*cdf0e10cSrcweir ,m_aTables (this, ModuleRes(FL_SEPARATOR1)) 151*cdf0e10cSrcweir ,m_aTablesList (this, NULL,ModuleRes(CTL_TABLESUBSCRIPTION),sal_True) 152*cdf0e10cSrcweir ,m_aExplanation (this, ModuleRes(FT_FILTER_EXPLANATION)) 153*cdf0e10cSrcweir ,m_bCheckedAll ( sal_False ) 154*cdf0e10cSrcweir ,m_bCatalogAtStart ( sal_True ) 155*cdf0e10cSrcweir ,m_pTablesDlg(_pTablesDlg) 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir DBG_CTOR(OTableSubscriptionPage,NULL); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir m_aTablesList.SetCheckHandler(getControlModifiedLink()); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir // initialize the TabListBox 162*cdf0e10cSrcweir m_aTablesList.SetSelectionMode( MULTIPLE_SELECTION ); 163*cdf0e10cSrcweir m_aTablesList.SetDragDropMode( 0 ); 164*cdf0e10cSrcweir m_aTablesList.EnableInplaceEditing( sal_False ); 165*cdf0e10cSrcweir m_aTablesList.SetStyle(m_aTablesList.GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir m_aTablesList.Clear(); 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir FreeResource(); 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir m_aTablesList.SetCheckButtonHdl(LINK(this, OTableSubscriptionPage, OnTreeEntryChecked)); 172*cdf0e10cSrcweir m_aTablesList.SetCheckHandler(LINK(this, OTableSubscriptionPage, OnTreeEntryChecked)); 173*cdf0e10cSrcweir } 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir //------------------------------------------------------------------------ 176*cdf0e10cSrcweir OTableSubscriptionPage::~OTableSubscriptionPage() 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir // just to make sure that our connection will be removed 179*cdf0e10cSrcweir try 180*cdf0e10cSrcweir { 181*cdf0e10cSrcweir ::comphelper::disposeComponent(m_xCurrentConnection); 182*cdf0e10cSrcweir } 183*cdf0e10cSrcweir catch (RuntimeException&) { } 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir DBG_DTOR(OTableSubscriptionPage,NULL); 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 189*cdf0e10cSrcweir void OTableSubscriptionPage::StateChanged( StateChangedType nType ) 190*cdf0e10cSrcweir { 191*cdf0e10cSrcweir OGenericAdministrationPage::StateChanged( nType ); 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) 194*cdf0e10cSrcweir { 195*cdf0e10cSrcweir // Check if we need to get new images for normal/high contrast mode 196*cdf0e10cSrcweir m_aTablesList.notifyHiContrastChanged(); 197*cdf0e10cSrcweir } 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 200*cdf0e10cSrcweir void OTableSubscriptionPage::DataChanged( const DataChangedEvent& rDCEvt ) 201*cdf0e10cSrcweir { 202*cdf0e10cSrcweir OGenericAdministrationPage::DataChanged( rDCEvt ); 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || 205*cdf0e10cSrcweir ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && 206*cdf0e10cSrcweir ( rDCEvt.GetFlags() & SETTINGS_STYLE )) 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir // Check if we need to get new images for normal/high contrast mode 209*cdf0e10cSrcweir m_aTablesList.notifyHiContrastChanged(); 210*cdf0e10cSrcweir } 211*cdf0e10cSrcweir } 212*cdf0e10cSrcweir //------------------------------------------------------------------ 213*cdf0e10cSrcweir void OTableSubscriptionPage::resizeControls(const Size& _rDiff) 214*cdf0e10cSrcweir { 215*cdf0e10cSrcweir if ( _rDiff.Height() ) 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir Size aOldSize = m_aTablesList.GetSizePixel(); 218*cdf0e10cSrcweir aOldSize.Height() -= _rDiff.Height(); 219*cdf0e10cSrcweir m_aTablesList.SetPosSizePixel( 220*cdf0e10cSrcweir m_aTablesList.GetPosPixel()+Point(0,_rDiff.Height()), 221*cdf0e10cSrcweir aOldSize 222*cdf0e10cSrcweir ); 223*cdf0e10cSrcweir } 224*cdf0e10cSrcweir } 225*cdf0e10cSrcweir //------------------------------------------------------------------------ 226*cdf0e10cSrcweir void OTableSubscriptionPage::implCheckTables(const Sequence< ::rtl::OUString >& _rTables) 227*cdf0e10cSrcweir { 228*cdf0e10cSrcweir // the meta data for the current connection, used for splitting up table names 229*cdf0e10cSrcweir Reference< XDatabaseMetaData > xMeta; 230*cdf0e10cSrcweir try 231*cdf0e10cSrcweir { 232*cdf0e10cSrcweir if (m_xCurrentConnection.is()) 233*cdf0e10cSrcweir xMeta = m_xCurrentConnection->getMetaData(); 234*cdf0e10cSrcweir } 235*cdf0e10cSrcweir catch(SQLException&) 236*cdf0e10cSrcweir { 237*cdf0e10cSrcweir DBG_ERROR("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!"); 238*cdf0e10cSrcweir } 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir // uncheck all 241*cdf0e10cSrcweir CheckAll(sal_False); 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir // check the ones which are in the list 244*cdf0e10cSrcweir String aListBoxTable; 245*cdf0e10cSrcweir ::rtl::OUString sCatalog, sSchema, sName; 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir SvLBoxEntry* pRootEntry = m_aTablesList.getAllObjectsEntry(); 248*cdf0e10cSrcweir sal_Bool bAllTables = sal_False; 249*cdf0e10cSrcweir sal_Bool bAllSchemas = sal_False; 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir const ::rtl::OUString* pIncludeTable = _rTables.getConstArray(); 252*cdf0e10cSrcweir for (sal_Int32 i=0; i<_rTables.getLength(); ++i, ++pIncludeTable) 253*cdf0e10cSrcweir { 254*cdf0e10cSrcweir if (xMeta.is()) 255*cdf0e10cSrcweir qualifiedNameComponents(xMeta, pIncludeTable->getStr(), sCatalog, sSchema, sName,::dbtools::eInDataManipulation); 256*cdf0e10cSrcweir else 257*cdf0e10cSrcweir sName = pIncludeTable->getStr(); 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir bAllTables = (1 == sName.getLength()) && ('%' == sName[0]); 260*cdf0e10cSrcweir bAllSchemas = (1 == sSchema.getLength()) && ('%' == sSchema[0]); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir // the catalog entry 263*cdf0e10cSrcweir SvLBoxEntry* pCatalog = m_aTablesList.GetEntryPosByName(sCatalog, pRootEntry); 264*cdf0e10cSrcweir if (!pCatalog && sCatalog.getLength()) 265*cdf0e10cSrcweir // the table (resp. its catalog) refered in this filter entry does not exist anymore 266*cdf0e10cSrcweir continue; 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir if (bAllSchemas && pCatalog) 269*cdf0e10cSrcweir { 270*cdf0e10cSrcweir m_aTablesList.checkWildcard(pCatalog); 271*cdf0e10cSrcweir continue; 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir // the schema entry 275*cdf0e10cSrcweir SvLBoxEntry* pSchema = m_aTablesList.GetEntryPosByName(sSchema, (pCatalog ? pCatalog : pRootEntry)); 276*cdf0e10cSrcweir if (!pSchema && sSchema.getLength()) 277*cdf0e10cSrcweir // the table (resp. its schema) refered in this filter entry does not exist anymore 278*cdf0e10cSrcweir continue; 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir if (bAllTables && pSchema) 281*cdf0e10cSrcweir { 282*cdf0e10cSrcweir m_aTablesList.checkWildcard(pSchema); 283*cdf0e10cSrcweir continue; 284*cdf0e10cSrcweir } 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir SvLBoxEntry* pEntry = m_aTablesList.GetEntryPosByName(sName, pSchema ? pSchema : (pCatalog ? pCatalog : pRootEntry) ); 287*cdf0e10cSrcweir if (pEntry) 288*cdf0e10cSrcweir m_aTablesList.SetCheckButtonState(pEntry, SV_BUTTON_CHECKED); 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir m_aTablesList.CheckButtons(); 291*cdf0e10cSrcweir } 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir //------------------------------------------------------------------------ 294*cdf0e10cSrcweir void OTableSubscriptionPage::implCompleteTablesCheck( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableFilter ) 295*cdf0e10cSrcweir { 296*cdf0e10cSrcweir if (!_rTableFilter.getLength()) 297*cdf0e10cSrcweir { // no tables visible 298*cdf0e10cSrcweir CheckAll(sal_False); 299*cdf0e10cSrcweir } 300*cdf0e10cSrcweir else 301*cdf0e10cSrcweir { 302*cdf0e10cSrcweir if ((1 == _rTableFilter.getLength()) && _rTableFilter[0].equalsAsciiL("%", 1)) 303*cdf0e10cSrcweir { // all tables visible 304*cdf0e10cSrcweir CheckAll(sal_True); 305*cdf0e10cSrcweir } 306*cdf0e10cSrcweir else 307*cdf0e10cSrcweir implCheckTables( _rTableFilter ); 308*cdf0e10cSrcweir } 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir //------------------------------------------------------------------------- 312*cdf0e10cSrcweir void OTableSubscriptionPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) 313*cdf0e10cSrcweir { 314*cdf0e10cSrcweir // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) 315*cdf0e10cSrcweir sal_Bool bValid, bReadonly; 316*cdf0e10cSrcweir getFlags(_rSet, bValid, bReadonly); 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir // get the name of the data source we're working for 319*cdf0e10cSrcweir SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); 320*cdf0e10cSrcweir DBG_ASSERT(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!"); 321*cdf0e10cSrcweir String sDSName = pNameItem->GetValue(); 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir if (bValid && sDSName.Len() && !m_xCurrentConnection.is() ) 324*cdf0e10cSrcweir { // get the current table list from the connection for the current settings 325*cdf0e10cSrcweir 326*cdf0e10cSrcweir // the PropertyValues for the current dialog settings 327*cdf0e10cSrcweir Sequence< PropertyValue > aConnectionParams; 328*cdf0e10cSrcweir DBG_ASSERT(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!"); 329*cdf0e10cSrcweir if ( m_pTablesDlg ) 330*cdf0e10cSrcweir { 331*cdf0e10cSrcweir if (!m_pTablesDlg->getCurrentSettings(aConnectionParams)) 332*cdf0e10cSrcweir { 333*cdf0e10cSrcweir m_aTablesList.Clear(); 334*cdf0e10cSrcweir m_pTablesDlg->endExecution(); 335*cdf0e10cSrcweir return; 336*cdf0e10cSrcweir } 337*cdf0e10cSrcweir } 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir if (!m_xCollator.is()) 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir // the collator for the string compares 342*cdf0e10cSrcweir try 343*cdf0e10cSrcweir { 344*cdf0e10cSrcweir m_xCollator = Reference< XCollator >(m_xORB->createInstance(SERVICE_I18N_COLLATOR), UNO_QUERY); 345*cdf0e10cSrcweir if (m_xCollator.is()) 346*cdf0e10cSrcweir m_xCollator->loadDefaultCollator(Application::GetSettings().GetLocale(), 0); 347*cdf0e10cSrcweir } 348*cdf0e10cSrcweir catch(const Exception&) 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir DBG_UNHANDLED_EXCEPTION(); 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir } 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir // fill the table list with this connection information 355*cdf0e10cSrcweir SQLExceptionInfo aErrorInfo; 356*cdf0e10cSrcweir // the current DSN 357*cdf0e10cSrcweir String sURL; 358*cdf0e10cSrcweir if ( m_pTablesDlg ) 359*cdf0e10cSrcweir sURL = m_pTablesDlg->getConnectionURL(); 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir try 362*cdf0e10cSrcweir { 363*cdf0e10cSrcweir WaitObject aWaitCursor(this); 364*cdf0e10cSrcweir m_aTablesList.GetModel()->SetSortMode(SortAscending); 365*cdf0e10cSrcweir m_aTablesList.GetModel()->SetCompareHdl(LINK(this, OTableSubscriptionPage, OnTreeEntryCompare)); 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir Reference< XDriver > xDriver; 368*cdf0e10cSrcweir m_aTablesList.setORB(m_xORB); 369*cdf0e10cSrcweir Reference<XPropertySet> xProp = m_pTablesDlg->getCurrentDataSource(); 370*cdf0e10cSrcweir OSL_ENSURE(xProp.is(),"No data source set!"); 371*cdf0e10cSrcweir if ( xProp.is() ) 372*cdf0e10cSrcweir { 373*cdf0e10cSrcweir Any aTableFilter = xProp->getPropertyValue(PROPERTY_TABLEFILTER); 374*cdf0e10cSrcweir Any aTableTypeFilter = xProp->getPropertyValue(PROPERTY_TABLETYPEFILTER); 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir Reference<XModifiable> xModi(getDataSourceOrModel(xProp),UNO_QUERY); 377*cdf0e10cSrcweir sal_Bool bModified = ( xModi.is() && xModi->isModified() ); 378*cdf0e10cSrcweir 379*cdf0e10cSrcweir Sequence< ::rtl::OUString > aNewTableFilter(1); 380*cdf0e10cSrcweir aNewTableFilter[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")); 381*cdf0e10cSrcweir xProp->setPropertyValue(PROPERTY_TABLEFILTER,makeAny(aNewTableFilter)); 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, makeAny( Sequence< ::rtl::OUString >() ) ); 384*cdf0e10cSrcweir Reference< ::com::sun::star::lang::XEventListener> xEvt; 385*cdf0e10cSrcweir aErrorInfo = ::dbaui::createConnection(xProp,m_xORB,xEvt,m_xCurrentConnection); 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir xProp->setPropertyValue(PROPERTY_TABLEFILTER,aTableFilter); 388*cdf0e10cSrcweir xProp->setPropertyValue(PROPERTY_TABLETYPEFILTER,aTableTypeFilter); 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir if ( xModi.is() && !bModified ) 391*cdf0e10cSrcweir xModi->setModified(sal_False); 392*cdf0e10cSrcweir 393*cdf0e10cSrcweir } 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir if ( m_xCurrentConnection.is() ) 396*cdf0e10cSrcweir { 397*cdf0e10cSrcweir m_aTablesList.UpdateTableList( m_xCurrentConnection ); 398*cdf0e10cSrcweir if (m_pTablesDlg) 399*cdf0e10cSrcweir m_pTablesDlg->successfullyConnected(); 400*cdf0e10cSrcweir } 401*cdf0e10cSrcweir } 402*cdf0e10cSrcweir catch (const SQLException&) 403*cdf0e10cSrcweir { 404*cdf0e10cSrcweir aErrorInfo = ::cppu::getCaughtException(); 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir if (aErrorInfo.isValid()) 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir // establishing the connection failed. Show an error window and exit. 410*cdf0e10cSrcweir OSQLMessageBox aMessageBox( GetParent()->GetParent(), aErrorInfo ); 411*cdf0e10cSrcweir aMessageBox.Execute(); 412*cdf0e10cSrcweir m_aTables.Enable(sal_False); 413*cdf0e10cSrcweir m_aTablesList.Enable(sal_False); 414*cdf0e10cSrcweir m_aExplanation.Enable(sal_False); 415*cdf0e10cSrcweir m_aTablesList.Clear(); 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir if ( m_pTablesDlg ) 418*cdf0e10cSrcweir { 419*cdf0e10cSrcweir m_pTablesDlg->clearPassword(); 420*cdf0e10cSrcweir m_pTablesDlg->endExecution(); 421*cdf0e10cSrcweir } 422*cdf0e10cSrcweir } 423*cdf0e10cSrcweir else 424*cdf0e10cSrcweir { 425*cdf0e10cSrcweir // in addition, we need some infos about the connection used 426*cdf0e10cSrcweir m_sCatalogSeparator = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")); // (default) 427*cdf0e10cSrcweir m_bCatalogAtStart = sal_True; // (default) 428*cdf0e10cSrcweir try 429*cdf0e10cSrcweir { 430*cdf0e10cSrcweir Reference< XDatabaseMetaData > xMeta; 431*cdf0e10cSrcweir if (m_xCurrentConnection.is()) 432*cdf0e10cSrcweir xMeta = m_xCurrentConnection->getMetaData(); 433*cdf0e10cSrcweir if (xMeta.is() && xMeta->supportsCatalogsInDataManipulation()) 434*cdf0e10cSrcweir { 435*cdf0e10cSrcweir m_sCatalogSeparator = xMeta->getCatalogSeparator(); 436*cdf0e10cSrcweir m_bCatalogAtStart = xMeta->isCatalogAtStart(); 437*cdf0e10cSrcweir } 438*cdf0e10cSrcweir } 439*cdf0e10cSrcweir catch(Exception&) 440*cdf0e10cSrcweir { 441*cdf0e10cSrcweir DBG_UNHANDLED_EXCEPTION(); 442*cdf0e10cSrcweir } 443*cdf0e10cSrcweir } 444*cdf0e10cSrcweir } 445*cdf0e10cSrcweir 446*cdf0e10cSrcweir bValid = bValid && m_xCurrentConnection.is(); 447*cdf0e10cSrcweir bReadonly = bReadonly || !bValid; 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir // get the current table filter 450*cdf0e10cSrcweir SFX_ITEMSET_GET(_rSet, pTableFilter, OStringListItem, DSID_TABLEFILTER, sal_True); 451*cdf0e10cSrcweir SFX_ITEMSET_GET(_rSet, pSuppress, SfxBoolItem, DSID_SUPPRESSVERSIONCL, sal_True); 452*cdf0e10cSrcweir Sequence< ::rtl::OUString > aTableFilter; 453*cdf0e10cSrcweir sal_Bool bSuppressVersionColumns = sal_True; 454*cdf0e10cSrcweir if (pTableFilter) 455*cdf0e10cSrcweir aTableFilter = pTableFilter->getList(); 456*cdf0e10cSrcweir if (pSuppress) 457*cdf0e10cSrcweir bSuppressVersionColumns = pSuppress->GetValue(); 458*cdf0e10cSrcweir 459*cdf0e10cSrcweir implCompleteTablesCheck( aTableFilter ); 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir // expand the first entry by default 462*cdf0e10cSrcweir SvLBoxEntry* pExpand = m_aTablesList.getAllObjectsEntry(); 463*cdf0e10cSrcweir while (pExpand) 464*cdf0e10cSrcweir { 465*cdf0e10cSrcweir m_aTablesList.Expand(pExpand); 466*cdf0e10cSrcweir pExpand = m_aTablesList.FirstChild(pExpand); 467*cdf0e10cSrcweir if (pExpand && m_aTablesList.NextSibling(pExpand)) 468*cdf0e10cSrcweir pExpand = NULL; 469*cdf0e10cSrcweir } 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir // update the toolbox according the the current selection and check state 472*cdf0e10cSrcweir OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); 473*cdf0e10cSrcweir } 474*cdf0e10cSrcweir 475*cdf0e10cSrcweir //------------------------------------------------------------------------ 476*cdf0e10cSrcweir void OTableSubscriptionPage::CheckAll( sal_Bool _bCheck ) 477*cdf0e10cSrcweir { 478*cdf0e10cSrcweir SvButtonState eState = _bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED; 479*cdf0e10cSrcweir SvLBoxEntry* pEntry = m_aTablesList.First(); 480*cdf0e10cSrcweir while (pEntry) 481*cdf0e10cSrcweir { 482*cdf0e10cSrcweir m_aTablesList.SetCheckButtonState( pEntry, eState); 483*cdf0e10cSrcweir pEntry = m_aTablesList.Next(pEntry); 484*cdf0e10cSrcweir } 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir if (_bCheck && m_aTablesList.getAllObjectsEntry()) 487*cdf0e10cSrcweir m_aTablesList.checkWildcard(m_aTablesList.getAllObjectsEntry()); 488*cdf0e10cSrcweir } 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir //------------------------------------------------------------------------ 491*cdf0e10cSrcweir int OTableSubscriptionPage::DeactivatePage(SfxItemSet* _pSet) 492*cdf0e10cSrcweir { 493*cdf0e10cSrcweir int nResult = OGenericAdministrationPage::DeactivatePage(_pSet); 494*cdf0e10cSrcweir 495*cdf0e10cSrcweir // dispose the connection, we don't need it anymore, so we're not wasting resources 496*cdf0e10cSrcweir try 497*cdf0e10cSrcweir { 498*cdf0e10cSrcweir ::comphelper::disposeComponent(m_xCurrentConnection); 499*cdf0e10cSrcweir } 500*cdf0e10cSrcweir catch (RuntimeException&) { } 501*cdf0e10cSrcweir 502*cdf0e10cSrcweir return nResult; 503*cdf0e10cSrcweir } 504*cdf0e10cSrcweir //------------------------------------------------------------------------ 505*cdf0e10cSrcweir IMPL_LINK( OTableSubscriptionPage, OnTreeEntryChecked, Control*, _pControl ) 506*cdf0e10cSrcweir { 507*cdf0e10cSrcweir return OnControlModified(_pControl); 508*cdf0e10cSrcweir } 509*cdf0e10cSrcweir //------------------------------------------------------------------------ 510*cdf0e10cSrcweir IMPL_LINK( OTableSubscriptionPage, OnTreeEntryCompare, const SvSortData*, _pSortData ) 511*cdf0e10cSrcweir { 512*cdf0e10cSrcweir SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft); 513*cdf0e10cSrcweir SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight); 514*cdf0e10cSrcweir DBG_ASSERT(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); 515*cdf0e10cSrcweir 516*cdf0e10cSrcweir SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); 517*cdf0e10cSrcweir SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); 518*cdf0e10cSrcweir DBG_ASSERT(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); 519*cdf0e10cSrcweir 520*cdf0e10cSrcweir String sLeftText = pLeftTextItem->GetText(); 521*cdf0e10cSrcweir String sRightText = pRightTextItem->GetText(); 522*cdf0e10cSrcweir 523*cdf0e10cSrcweir sal_Int32 nCompareResult = 0; // equal by default 524*cdf0e10cSrcweir 525*cdf0e10cSrcweir if (m_xCollator.is()) 526*cdf0e10cSrcweir { 527*cdf0e10cSrcweir try 528*cdf0e10cSrcweir { 529*cdf0e10cSrcweir nCompareResult = m_xCollator->compareString(sLeftText, sRightText); 530*cdf0e10cSrcweir } 531*cdf0e10cSrcweir catch(Exception&) 532*cdf0e10cSrcweir { 533*cdf0e10cSrcweir } 534*cdf0e10cSrcweir } 535*cdf0e10cSrcweir else 536*cdf0e10cSrcweir // default behaviour if we do not have a collator -> do the simple string compare 537*cdf0e10cSrcweir nCompareResult = sLeftText.CompareTo(sRightText); 538*cdf0e10cSrcweir 539*cdf0e10cSrcweir return nCompareResult; 540*cdf0e10cSrcweir } 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir //------------------------------------------------------------------------ 543*cdf0e10cSrcweir Sequence< ::rtl::OUString > OTableSubscriptionPage::collectDetailedSelection() const 544*cdf0e10cSrcweir { 545*cdf0e10cSrcweir Sequence< ::rtl::OUString > aTableFilter; 546*cdf0e10cSrcweir static const ::rtl::OUString sDot(RTL_CONSTASCII_USTRINGPARAM(".")); 547*cdf0e10cSrcweir static const ::rtl::OUString sWildcard(RTL_CONSTASCII_USTRINGPARAM("%")); 548*cdf0e10cSrcweir 549*cdf0e10cSrcweir ::rtl::OUString sComposedName; 550*cdf0e10cSrcweir const SvLBoxEntry* pAllObjectsEntry = m_aTablesList.getAllObjectsEntry(); 551*cdf0e10cSrcweir if (!pAllObjectsEntry) 552*cdf0e10cSrcweir return aTableFilter; 553*cdf0e10cSrcweir SvLBoxEntry* pEntry = m_aTablesList.GetModel()->Next(const_cast<SvLBoxEntry*>(pAllObjectsEntry)); 554*cdf0e10cSrcweir while(pEntry) 555*cdf0e10cSrcweir { 556*cdf0e10cSrcweir sal_Bool bCatalogWildcard = sal_False; 557*cdf0e10cSrcweir sal_Bool bSchemaWildcard = sal_False; 558*cdf0e10cSrcweir SvLBoxEntry* pSchema = NULL; 559*cdf0e10cSrcweir SvLBoxEntry* pCatalog = NULL; 560*cdf0e10cSrcweir 561*cdf0e10cSrcweir if (m_aTablesList.GetCheckButtonState(pEntry) == SV_BUTTON_CHECKED && !m_aTablesList.GetModel()->HasChilds(pEntry)) 562*cdf0e10cSrcweir { // checked and a leaf, which means it's no catalog, no schema, but a real table 563*cdf0e10cSrcweir ::rtl::OUString sCatalog; 564*cdf0e10cSrcweir if(m_aTablesList.GetModel()->HasParent(pEntry)) 565*cdf0e10cSrcweir { 566*cdf0e10cSrcweir pSchema = m_aTablesList.GetModel()->GetParent(pEntry); 567*cdf0e10cSrcweir if (pAllObjectsEntry == pSchema) 568*cdf0e10cSrcweir // do not want to have the root entry 569*cdf0e10cSrcweir pSchema = NULL; 570*cdf0e10cSrcweir 571*cdf0e10cSrcweir if (pSchema) 572*cdf0e10cSrcweir { // it's a real schema entry, not the "all objects" root 573*cdf0e10cSrcweir if(m_aTablesList.GetModel()->HasParent(pSchema)) 574*cdf0e10cSrcweir { 575*cdf0e10cSrcweir pCatalog = m_aTablesList.GetModel()->GetParent(pSchema); 576*cdf0e10cSrcweir if (pAllObjectsEntry == pCatalog) 577*cdf0e10cSrcweir // do not want to have the root entry 578*cdf0e10cSrcweir pCatalog = NULL; 579*cdf0e10cSrcweir 580*cdf0e10cSrcweir if (pCatalog) 581*cdf0e10cSrcweir { // it's a real catalog entry, not the "all objects" root 582*cdf0e10cSrcweir bCatalogWildcard = m_aTablesList.isWildcardChecked(pCatalog); 583*cdf0e10cSrcweir if (m_bCatalogAtStart) 584*cdf0e10cSrcweir { 585*cdf0e10cSrcweir sComposedName += m_aTablesList.GetEntryText( pCatalog ); 586*cdf0e10cSrcweir sComposedName += m_sCatalogSeparator; 587*cdf0e10cSrcweir if (bCatalogWildcard) 588*cdf0e10cSrcweir sComposedName += sWildcard; 589*cdf0e10cSrcweir } 590*cdf0e10cSrcweir else 591*cdf0e10cSrcweir { 592*cdf0e10cSrcweir if (bCatalogWildcard) 593*cdf0e10cSrcweir sCatalog = sWildcard; 594*cdf0e10cSrcweir else 595*cdf0e10cSrcweir sCatalog = ::rtl::OUString(); 596*cdf0e10cSrcweir sCatalog += m_sCatalogSeparator; 597*cdf0e10cSrcweir sCatalog += m_aTablesList.GetEntryText( pCatalog ); 598*cdf0e10cSrcweir } 599*cdf0e10cSrcweir } 600*cdf0e10cSrcweir } 601*cdf0e10cSrcweir bSchemaWildcard = m_aTablesList.isWildcardChecked(pSchema); 602*cdf0e10cSrcweir sComposedName += m_aTablesList.GetEntryText( pSchema ); 603*cdf0e10cSrcweir sComposedName += sDot; 604*cdf0e10cSrcweir } 605*cdf0e10cSrcweir 606*cdf0e10cSrcweir if (bSchemaWildcard) 607*cdf0e10cSrcweir sComposedName += sWildcard; 608*cdf0e10cSrcweir } 609*cdf0e10cSrcweir if (!bSchemaWildcard && !bCatalogWildcard) 610*cdf0e10cSrcweir sComposedName += m_aTablesList.GetEntryText( pEntry ); 611*cdf0e10cSrcweir 612*cdf0e10cSrcweir if (!m_bCatalogAtStart && !bCatalogWildcard) 613*cdf0e10cSrcweir sComposedName += sCatalog; 614*cdf0e10cSrcweir 615*cdf0e10cSrcweir // need some space 616*cdf0e10cSrcweir sal_Int32 nOldLen = aTableFilter.getLength(); 617*cdf0e10cSrcweir aTableFilter.realloc(nOldLen + 1); 618*cdf0e10cSrcweir // add the new name 619*cdf0e10cSrcweir aTableFilter[nOldLen] = sComposedName; 620*cdf0e10cSrcweir 621*cdf0e10cSrcweir // reset the composed name 622*cdf0e10cSrcweir sComposedName = ::rtl::OUString(); 623*cdf0e10cSrcweir } 624*cdf0e10cSrcweir 625*cdf0e10cSrcweir if (bCatalogWildcard) 626*cdf0e10cSrcweir pEntry = implNextSibling(pCatalog); 627*cdf0e10cSrcweir else if (bSchemaWildcard) 628*cdf0e10cSrcweir pEntry = implNextSibling(pSchema); 629*cdf0e10cSrcweir else 630*cdf0e10cSrcweir pEntry = m_aTablesList.GetModel()->Next(pEntry); 631*cdf0e10cSrcweir } 632*cdf0e10cSrcweir 633*cdf0e10cSrcweir return aTableFilter; 634*cdf0e10cSrcweir } 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir //------------------------------------------------------------------------ 637*cdf0e10cSrcweir SvLBoxEntry* OTableSubscriptionPage::implNextSibling(SvLBoxEntry* _pEntry) const 638*cdf0e10cSrcweir { 639*cdf0e10cSrcweir SvLBoxEntry* pReturn = NULL; 640*cdf0e10cSrcweir if (_pEntry) 641*cdf0e10cSrcweir { 642*cdf0e10cSrcweir pReturn = m_aTablesList.NextSibling(_pEntry); 643*cdf0e10cSrcweir if (!pReturn) 644*cdf0e10cSrcweir pReturn = implNextSibling(m_aTablesList.GetParent(_pEntry)); 645*cdf0e10cSrcweir } 646*cdf0e10cSrcweir return pReturn; 647*cdf0e10cSrcweir } 648*cdf0e10cSrcweir 649*cdf0e10cSrcweir //------------------------------------------------------------------------ 650*cdf0e10cSrcweir sal_Bool OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs ) 651*cdf0e10cSrcweir { 652*cdf0e10cSrcweir sal_Bool bValid, bReadonly; 653*cdf0e10cSrcweir getFlags(_rCoreAttrs, bValid, bReadonly); 654*cdf0e10cSrcweir 655*cdf0e10cSrcweir if (!bValid || bReadonly) 656*cdf0e10cSrcweir // don't store anything if the data we're working with is invalid or readonly 657*cdf0e10cSrcweir return sal_True; 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////// 660*cdf0e10cSrcweir // create the output string which contains all the table names 661*cdf0e10cSrcweir if ( m_xCurrentConnection.is() ) 662*cdf0e10cSrcweir { // collect the table filter data only if we have a connection - else no tables are displayed at all 663*cdf0e10cSrcweir Sequence< ::rtl::OUString > aTableFilter; 664*cdf0e10cSrcweir if (m_aTablesList.isWildcardChecked(m_aTablesList.getAllObjectsEntry())) 665*cdf0e10cSrcweir { 666*cdf0e10cSrcweir aTableFilter.realloc(1); 667*cdf0e10cSrcweir aTableFilter[0] = ::rtl::OUString("%", 1, RTL_TEXTENCODING_ASCII_US); 668*cdf0e10cSrcweir } 669*cdf0e10cSrcweir else 670*cdf0e10cSrcweir { 671*cdf0e10cSrcweir aTableFilter = collectDetailedSelection(); 672*cdf0e10cSrcweir } 673*cdf0e10cSrcweir _rCoreAttrs.Put( OStringListItem(DSID_TABLEFILTER, aTableFilter) ); 674*cdf0e10cSrcweir } 675*cdf0e10cSrcweir 676*cdf0e10cSrcweir return sal_True; 677*cdf0e10cSrcweir } 678*cdf0e10cSrcweir 679*cdf0e10cSrcweir // ----------------------------------------------------------------------- 680*cdf0e10cSrcweir void OTableSubscriptionPage::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) 681*cdf0e10cSrcweir { 682*cdf0e10cSrcweir } 683*cdf0e10cSrcweir // ----------------------------------------------------------------------- 684*cdf0e10cSrcweir void OTableSubscriptionPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) 685*cdf0e10cSrcweir { 686*cdf0e10cSrcweir _rControlList.push_back(new ODisableWrapper<OTableTreeListBox>(&m_aTablesList)); 687*cdf0e10cSrcweir _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aTables)); 688*cdf0e10cSrcweir _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aExplanation)); 689*cdf0e10cSrcweir } 690*cdf0e10cSrcweir // ----------------------------------------------------------------------- 691*cdf0e10cSrcweir //......................................................................... 692*cdf0e10cSrcweir } // namespace dbaui 693*cdf0e10cSrcweir //......................................................................... 694*cdf0e10cSrcweir 695