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