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 #ifndef _DBAUI_TABLESPAGE_HXX_ 29*cdf0e10cSrcweir #define _DBAUI_TABLESPAGE_HXX_ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #ifndef _DBAUI_ADMINPAGES_HXX_ 32*cdf0e10cSrcweir #include "adminpages.hxx" 33*cdf0e10cSrcweir #endif 34*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_ 35*cdf0e10cSrcweir #include <com/sun/star/i18n/XCollator.hpp> 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir #ifndef _OSL_MUTEX_HXX_ 38*cdf0e10cSrcweir #include <osl/mutex.hxx> 39*cdf0e10cSrcweir #endif 40*cdf0e10cSrcweir #ifndef _COMPHELPER_STLTYPES_HXX_ 41*cdf0e10cSrcweir #include <comphelper/stl_types.hxx> 42*cdf0e10cSrcweir #endif 43*cdf0e10cSrcweir #ifndef _SV_FIXED_HXX 44*cdf0e10cSrcweir #include <vcl/fixed.hxx> 45*cdf0e10cSrcweir #endif 46*cdf0e10cSrcweir #ifndef _DBAUI_TABLETREE_HXX_ 47*cdf0e10cSrcweir #include "tabletree.hxx" 48*cdf0e10cSrcweir #endif 49*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ 50*cdf0e10cSrcweir #include <com/sun/star/sdbc/XConnection.hpp> 51*cdf0e10cSrcweir #endif 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir //......................................................................... 55*cdf0e10cSrcweir namespace dbaui 56*cdf0e10cSrcweir { 57*cdf0e10cSrcweir //......................................................................... 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir //======================================================================== 60*cdf0e10cSrcweir //= OTableSubscriptionPage 61*cdf0e10cSrcweir //======================================================================== 62*cdf0e10cSrcweir class OTableSubscriptionDialog; 63*cdf0e10cSrcweir class OTableSubscriptionPage 64*cdf0e10cSrcweir :public OGenericAdministrationPage 65*cdf0e10cSrcweir { 66*cdf0e10cSrcweir private: 67*cdf0e10cSrcweir FixedLine m_aTables; 68*cdf0e10cSrcweir OTableTreeListBox m_aTablesList; 69*cdf0e10cSrcweir FixedText m_aExplanation; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir ::rtl::OUString m_sCatalogSeparator; 72*cdf0e10cSrcweir sal_Bool m_bCheckedAll : 1; 73*cdf0e10cSrcweir sal_Bool m_bCatalogAtStart : 1; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir ::osl::Mutex m_aNotifierMutex; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > 78*cdf0e10cSrcweir m_xCurrentConnection; /// valid as long as the page is active 79*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > 80*cdf0e10cSrcweir m_xCollator; 81*cdf0e10cSrcweir OTableSubscriptionDialog* m_pTablesDlg; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir public: 84*cdf0e10cSrcweir virtual sal_Bool FillItemSet(SfxItemSet& _rCoreAttrs); 85*cdf0e10cSrcweir virtual int DeactivatePage(SfxItemSet* _pSet); 86*cdf0e10cSrcweir using OGenericAdministrationPage::DeactivatePage; 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir virtual void StateChanged( StateChangedType nStateChange ); 89*cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir /** will be called when the controls need to be resized. 93*cdf0e10cSrcweir */ 94*cdf0e10cSrcweir virtual void resizeControls(const Size& _rDiff); 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir OTableSubscriptionPage( Window* pParent, const SfxItemSet& _rCoreAttrs ,OTableSubscriptionDialog* _pTablesDlg); 97*cdf0e10cSrcweir virtual ~OTableSubscriptionPage(); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir protected: 100*cdf0e10cSrcweir virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); 101*cdf0e10cSrcweir virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir DECL_LINK( OnTreeEntryCompare, const SvSortData* ); 104*cdf0e10cSrcweir DECL_LINK( OnTreeEntryChecked, Control* ); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir private: 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg> 110*cdf0e10cSrcweir */ 111*cdf0e10cSrcweir void implCheckTables(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTables); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir /// returns the next sibling, if not available, the next sibling of the parent, a.s.o. 114*cdf0e10cSrcweir SvLBoxEntry* implNextSibling(SvLBoxEntry* _pEntry) const; 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir /** return the current selection in <member>m_aTablesList</member> 117*cdf0e10cSrcweir */ 118*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::rtl::OUString > collectDetailedSelection() const; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir /// (un)check all entries 121*cdf0e10cSrcweir void CheckAll( sal_Bool bCheck = sal_True ); 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir // checks the tables according to the filter given 126*cdf0e10cSrcweir // in oppsofite to implCheckTables, this method handles the case of an empty sequence, too ... 127*cdf0e10cSrcweir void implCompleteTablesCheck( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableFilter ); 128*cdf0e10cSrcweir }; 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir //......................................................................... 131*cdf0e10cSrcweir } // namespace dbaui 132*cdf0e10cSrcweir //......................................................................... 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir #endif // _DBAUI_TABLESPAGE_HXX_ 135*cdf0e10cSrcweir 136