1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_DLG_TABLESPAGE_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_DLG_TABLESPAGE_HXX
23 #include "adminpages.hxx"
24 #include <com/sun/star/i18n/XCollator.hpp>
25 #include <osl/mutex.hxx>
26 #include <vcl/layout.hxx>
27 #include "tabletree.hxx"
28 #include <com/sun/star/sdbc/XConnection.hpp>
33 // OTableSubscriptionPage
34 class OTableSubscriptionDialog
;
35 class OTableSubscriptionPage
36 :public OGenericAdministrationPage
39 VclPtr
<VclContainer
> m_pTables
;
40 VclPtr
<OTableTreeListBox
> m_pTablesList
;
42 OUString m_sCatalogSeparator
;
43 bool m_bCatalogAtStart
: 1;
45 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>
46 m_xCurrentConnection
; /// valid as long as the page is active
47 ::com::sun::star::uno::Reference
< ::com::sun::star::i18n::XCollator
>
49 VclPtr
<OTableSubscriptionDialog
> m_pTablesDlg
;
52 virtual bool FillItemSet(SfxItemSet
* _rCoreAttrs
) SAL_OVERRIDE
;
53 virtual sfxpg
DeactivatePage(SfxItemSet
* _pSet
) SAL_OVERRIDE
;
54 using OGenericAdministrationPage::DeactivatePage
;
56 virtual void StateChanged( StateChangedType nStateChange
) SAL_OVERRIDE
;
57 virtual void DataChanged( const DataChangedEvent
& rDCEvt
) SAL_OVERRIDE
;
59 /** will be called when the controls need to be resized.
61 virtual void resizeControls(const Size
& _rDiff
);
63 OTableSubscriptionPage( vcl::Window
* pParent
, const SfxItemSet
& _rCoreAttrs
,OTableSubscriptionDialog
* _pTablesDlg
);
64 virtual ~OTableSubscriptionPage();
65 virtual void dispose() SAL_OVERRIDE
;
68 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
) SAL_OVERRIDE
;
69 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
) SAL_OVERRIDE
;
71 DECL_LINK( OnTreeEntryCompare
, const SvSortData
* );
72 DECL_LINK( OnTreeEntryChecked
, Control
* );
76 /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg>
78 void implCheckTables(const ::com::sun::star::uno::Sequence
< OUString
>& _rTables
);
80 /// returns the next sibling, if not available, the next sibling of the parent, a.s.o.
81 SvTreeListEntry
* implNextSibling(SvTreeListEntry
* _pEntry
) const;
83 /** return the current selection in <member>m_aTablesList</member>
85 ::com::sun::star::uno::Sequence
< OUString
> collectDetailedSelection() const;
87 /// (un)check all entries
88 void CheckAll( bool bCheck
= true );
90 virtual void implInitControls(const SfxItemSet
& _rSet
, bool _bSaveValue
) SAL_OVERRIDE
;
92 // checks the tables according to the filter given
93 // in oppsofite to implCheckTables, this method handles the case of an empty sequence, too ...
94 void implCompleteTablesCheck( const ::com::sun::star::uno::Sequence
< OUString
>& _rTableFilter
);
99 #endif // INCLUDED_DBACCESS_SOURCE_UI_DLG_TABLESPAGE_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */