1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tablespage.hxx,v $
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"
37 #ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
38 #include <com/sun/star/i18n/XCollator.hpp>
40 #ifndef _OSL_MUTEX_HXX_
41 #include <osl/mutex.hxx>
43 #ifndef _COMPHELPER_STLTYPES_HXX_
44 #include <comphelper/stl_types.hxx>
47 #include <vcl/fixed.hxx>
49 #ifndef _DBAUI_TABLETREE_HXX_
50 #include "tabletree.hxx"
52 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
53 #include <com/sun/star/sdbc/XConnection.hpp>
57 //.........................................................................
60 //.........................................................................
62 //========================================================================
63 //= OTableSubscriptionPage
64 //========================================================================
65 class OTableSubscriptionDialog
;
66 class OTableSubscriptionPage
67 :public OGenericAdministrationPage
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
>
84 OTableSubscriptionDialog
* m_pTablesDlg
;
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();
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
* );
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 //.........................................................................
135 //.........................................................................
137 #endif // _DBAUI_TABLESPAGE_HXX_