LibreOffice Module svx (master)  1
tabwin.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
20 #define INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
21 
22 #include <sfx2/basedlgs.hxx>
23 #include <sfx2/childwin.hxx>
24 #include <sfx2/ctrlitem.hxx>
25 #include <svx/dbaexchange.hxx>
26 #include <com/sun/star/form/XForm.hpp>
27 
29 #include <connectivity/dbtools.hxx>
30 
31 class FmFormShell;
32 struct ColumnInfo;
33 
35  , public SfxControllerItem
37 {
38  ::osl::Mutex m_aMutex;
39  std::unique_ptr<weld::TreeView> m_xListBox;
40  std::vector<std::unique_ptr<ColumnInfo>> m_aListBoxData;
43  OUString m_aDatabaseName,
45  sal_Int32 m_nObjectType;
46 
49 
50  void addToList(const css::uno::Reference<css::container::XNameAccess>& i_xColumns);
51 
52  DECL_LINK(RowActivatedHdl, weld::TreeView&, bool);
53  DECL_LINK(DragBeginHdl, bool&, bool);
54 public:
56 
57  virtual ~FmFieldWin() override;
58 
59  virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
60  const SfxPoolItem* pState) override;
61 
62  void UpdateContent(FmFormShell const *);
63  void UpdateContent(const css::uno::Reference< css::form::XForm > &);
64  void FillInfo( SfxChildWinInfo& rInfo ) const override;
65 
66  const OUString& GetDatabaseName() const { return m_aDatabaseName; }
67  const ::dbtools::SharedConnection& GetConnection() const { return m_aConnection; }
68  const OUString& GetObjectName() const { return m_aObjectName; }
69  sal_Int32 GetObjectType() const { return m_nObjectType; }
70 
72 
73 protected:
74  // FmXChangeListener
75  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
76 
77 protected:
79 };
80 
81 
83 {
84 public:
85  FmFieldWinMgr(vcl::Window *pParent, sal_uInt16 nId,
86  SfxBindings *pBindings, SfxChildWinInfo const *pInfo);
88 };
89 
90 
91 #endif
92 
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void FillInfo(SfxChildWinInfo &rInfo) const override
Definition: tabwin.cxx:287
void addToList(const css::uno::Reference< css::container::XNameAccess > &i_xColumns)
Definition: tabwin.cxx:70
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &evt) override
Definition: tabwin.cxx:177
std::unique_ptr< weld::TreeView > m_xListBox
Definition: tabwin.hxx:39
const OUString & GetDatabaseName() const
Definition: tabwin.hxx:66
const OUString & GetObjectName() const
Definition: tabwin.hxx:68
sal_Int16 nId
SFX_DECL_CHILDWINDOW(FmFieldWinMgr)
sal_Int32 m_nObjectType
Definition: tabwin.hxx:45
rtl::Reference< svx::OColumnTransferable > m_xHelper
Definition: tabwin.hxx:48
OUString m_aDatabaseName
Definition: tabwin.hxx:43
sal_Int32 GetObjectType() const
Definition: tabwin.hxx:69
void UpdateContent(FmFormShell const *)
Definition: tabwin.cxx:197
std::vector< std::unique_ptr< ColumnInfo > > m_aListBoxData
Definition: tabwin.hxx:40
FmFieldWin(SfxBindings *pBindings, SfxChildWindow *pMgr, weld::Window *pParent)
Definition: tabwin.cxx:111
const ::dbtools::SharedConnection & GetConnection() const
Definition: tabwin.hxx:67
SfxBindings & GetBindings()
VclPtr< vcl::Window > pParent
rtl::Reference< comphelper::OPropertyChangeMultiplexer > m_xChangeListener
Definition: tabwin.hxx:47
::osl::Mutex m_aMutex
Definition: tabwin.hxx:38
virtual ~FmFieldWin() override
Definition: tabwin.cxx:133
FmFieldWinMgr(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo const *pInfo)
Definition: tabwin.cxx:294
SfxItemState
DECL_LINK(RowActivatedHdl, weld::TreeView &, bool)
::dbtools::SharedConnection m_aConnection
Definition: tabwin.hxx:42
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: tabwin.cxx:183
bool createSelectionControls()
Definition: tabwin.cxx:148
SfxBindings * pBindings
OUString m_aObjectName
Definition: tabwin.hxx:43