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 .
21 #include <vcl/weld.hxx>
22 #include "JoinTableView.hxx"
26 class OTableListBoxControl
;
27 class IRelationControlInterface
;
28 class ORelationControl
;
30 class OTableListBoxControl final
32 std::unique_ptr
<weld::ComboBox
> m_xLeftTable
;
33 std::unique_ptr
<weld::ComboBox
> m_xRightTable
;
34 std::unique_ptr
<weld::Container
> m_xTable
;
35 css::uno::Reference
<css::awt::XWindow
> m_xTableCtrlParent
;
36 VclPtr
<ORelationControl
> m_xRC_Tables
;
38 const OJoinTableView::OTableWindowMap
* m_pTableMap
;
39 IRelationControlInterface
* m_pParentDialog
;
40 OUString m_strCurrentLeft
;
41 OUString m_strCurrentRight
;
42 DECL_LINK( OnTableChanged
, weld::ComboBox
&, void );
44 OTableListBoxControl(weld::Builder
* _pParent
,
45 const OJoinTableView::OTableWindowMap
* _pTableMap
,
46 IRelationControlInterface
* _pParentDialog
);
47 ~OTableListBoxControl();
49 /** fillListBoxes fills the list boxes with the table windows
53 /** fillAndDisable fill the listboxes only with one entry and then disable them
54 @param _pConnectionData
55 contains the data which should be filled into the listboxes
57 void fillAndDisable(const TTableConnectionData::value_type
& _pConnectionData
);
59 /** enables the relation control
61 * \param _bEnable when sal_True enables it, otherwise disable it.
63 void enableRelation(bool _bEnable
);
65 /** NotifyCellChange notifies the browse control that the connection data has changed
67 void NotifyCellChange();
69 /** Init is a call through to the control inside this one
71 the connection data which is used to init the control
73 void Init(const TTableConnectionData::value_type
& _pConnData
);
82 TTableWindowData::value_type
const & getReferencingTable() const;
84 /** getContainer returns the container interface
85 @return the interface of the container
87 IRelationControlInterface
* getContainer() const { return m_pParentDialog
; }
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */