update dev300-m58
[ooovba.git] / dbaccess / source / ui / dlg / tablespage.hxx
blob92228a1aed4e09bfb4bee3f6c32a6155db8d3ff1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tablespage.hxx,v $
10 * $Revision: 1.15 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBAUI_TABLESPAGE_HXX_
32 #define _DBAUI_TABLESPAGE_HXX_
34 #ifndef _DBAUI_ADMINPAGES_HXX_
35 #include "adminpages.hxx"
36 #endif
37 #ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
38 #include <com/sun/star/i18n/XCollator.hpp>
39 #endif
40 #ifndef _OSL_MUTEX_HXX_
41 #include <osl/mutex.hxx>
42 #endif
43 #ifndef _COMPHELPER_STLTYPES_HXX_
44 #include <comphelper/stl_types.hxx>
45 #endif
46 #ifndef _SV_FIXED_HXX
47 #include <vcl/fixed.hxx>
48 #endif
49 #ifndef _DBAUI_TABLETREE_HXX_
50 #include "tabletree.hxx"
51 #endif
52 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
53 #include <com/sun/star/sdbc/XConnection.hpp>
54 #endif
57 //.........................................................................
58 namespace dbaui
60 //.........................................................................
62 //========================================================================
63 //= OTableSubscriptionPage
64 //========================================================================
65 class OTableSubscriptionDialog;
66 class OTableSubscriptionPage
67 :public OGenericAdministrationPage
69 private:
70 FixedLine m_aTables;
71 OTableTreeListBox m_aTablesList;
72 FixedText m_aExplanation;
74 ::rtl::OUString m_sCatalogSeparator;
75 sal_Bool m_bCheckedAll : 1;
76 sal_Bool m_bCatalogAtStart : 1;
78 ::osl::Mutex m_aNotifierMutex;
80 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
81 m_xCurrentConnection; /// valid as long as the page is active
82 ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator >
83 m_xCollator;
84 OTableSubscriptionDialog* m_pTablesDlg;
86 public:
87 virtual BOOL FillItemSet(SfxItemSet& _rCoreAttrs);
88 virtual int DeactivatePage(SfxItemSet* _pSet);
89 using OGenericAdministrationPage::DeactivatePage;
91 virtual void StateChanged( StateChangedType nStateChange );
92 virtual void DataChanged( const DataChangedEvent& rDCEvt );
95 /** will be called when the controls need to be resized.
97 virtual void resizeControls(const Size& _rDiff);
99 OTableSubscriptionPage( Window* pParent, const SfxItemSet& _rCoreAttrs ,OTableSubscriptionDialog* _pTablesDlg);
100 virtual ~OTableSubscriptionPage();
102 protected:
103 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
104 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
106 DECL_LINK( OnTreeEntryCompare, const SvSortData* );
107 DECL_LINK( OnTreeEntryChecked, Control* );
109 private:
112 /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg>
114 void implCheckTables(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTables);
116 /// returns the next sibling, if not available, the next sibling of the parent, a.s.o.
117 SvLBoxEntry* implNextSibling(SvLBoxEntry* _pEntry) const;
119 /** return the current selection in <member>m_aTablesList</member>
121 ::com::sun::star::uno::Sequence< ::rtl::OUString > collectDetailedSelection() const;
123 /// (un)check all entries
124 void CheckAll( BOOL bCheck = sal_True );
126 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
128 // checks the tables according to the filter given
129 // in oppsofite to implCheckTables, this method handles the case of an empty sequence, too ...
130 void implCompleteTablesCheck( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableFilter );
133 //.........................................................................
134 } // namespace dbaui
135 //.........................................................................
137 #endif // _DBAUI_TABLESPAGE_HXX_