1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _DBAUI_TABLESPAGE_HXX_
30 #define _DBAUI_TABLESPAGE_HXX_
32 #include "adminpages.hxx"
33 #include <com/sun/star/i18n/XCollator.hpp>
34 #include <osl/mutex.hxx>
35 #include <comphelper/stl_types.hxx>
36 #include <vcl/fixed.hxx>
37 #include "tabletree.hxx"
38 #include <com/sun/star/sdbc/XConnection.hpp>
41 //.........................................................................
44 //.........................................................................
46 //========================================================================
47 //= OTableSubscriptionPage
48 //========================================================================
49 class OTableSubscriptionDialog
;
50 class OTableSubscriptionPage
51 :public OGenericAdministrationPage
55 OTableTreeListBox m_aTablesList
;
56 FixedText m_aExplanation
;
58 ::rtl::OUString m_sCatalogSeparator
;
59 sal_Bool m_bCheckedAll
: 1;
60 sal_Bool m_bCatalogAtStart
: 1;
62 ::osl::Mutex m_aNotifierMutex
;
64 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>
65 m_xCurrentConnection
; /// valid as long as the page is active
66 ::com::sun::star::uno::Reference
< ::com::sun::star::i18n::XCollator
>
68 OTableSubscriptionDialog
* m_pTablesDlg
;
71 virtual sal_Bool
FillItemSet(SfxItemSet
& _rCoreAttrs
);
72 virtual int DeactivatePage(SfxItemSet
* _pSet
);
73 using OGenericAdministrationPage::DeactivatePage
;
75 virtual void StateChanged( StateChangedType nStateChange
);
76 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
79 /** will be called when the controls need to be resized.
81 virtual void resizeControls(const Size
& _rDiff
);
83 OTableSubscriptionPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
,OTableSubscriptionDialog
* _pTablesDlg
);
84 virtual ~OTableSubscriptionPage();
87 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
88 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
90 DECL_LINK( OnTreeEntryCompare
, const SvSortData
* );
91 DECL_LINK( OnTreeEntryChecked
, Control
* );
96 /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg>
98 void implCheckTables(const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& _rTables
);
100 /// returns the next sibling, if not available, the next sibling of the parent, a.s.o.
101 SvLBoxEntry
* implNextSibling(SvLBoxEntry
* _pEntry
) const;
103 /** return the current selection in <member>m_aTablesList</member>
105 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> collectDetailedSelection() const;
107 /// (un)check all entries
108 void CheckAll( sal_Bool bCheck
= sal_True
);
110 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
112 // checks the tables according to the filter given
113 // in oppsofite to implCheckTables, this method handles the case of an empty sequence, too ...
114 void implCompleteTablesCheck( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& _rTableFilter
);
117 //.........................................................................
119 //.........................................................................
121 #endif // _DBAUI_TABLESPAGE_HXX_
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */