tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / svx / source / inc / tabwin.hxx
blob0209f3d31654ee3e35cc04b8ab7cac208ec60c89
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
20 #define INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
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>
28 #include <comphelper/propmultiplex2.hxx>
29 #include <connectivity/dbtools.hxx>
31 class FmFormShell;
32 struct ColumnInfo;
34 class FmFieldWin final : public SfxModelessDialogController
35 , public SfxControllerItem
36 , public ::comphelper::OPropertyChangeListener2
38 std::mutex m_aMutex;
39 std::unique_ptr<weld::TreeView> m_xListBox;
40 std::vector<std::unique_ptr<ColumnInfo>> m_aListBoxData;
41 ::dbtools::SharedConnection
42 m_aConnection;
43 OUString m_aDatabaseName,
44 m_aObjectName;
45 sal_Int32 m_nObjectType;
47 rtl::Reference<comphelper::OPropertyChangeMultiplexer2> m_xChangeListener;
48 rtl::Reference<svx::OColumnTransferable> m_xHelper;
50 void addToList(const css::uno::Reference<css::container::XNameAccess>& i_xColumns);
52 DECL_LINK(RowActivatedHdl, weld::TreeView&, bool);
53 DECL_LINK(DragBeginHdl, bool&, bool);
54 public:
55 FmFieldWin(SfxBindings *pBindings, SfxChildWindow *pMgr, weld::Window* pParent);
57 virtual ~FmFieldWin() override;
59 virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState,
60 const SfxPoolItem* pState) override;
62 void UpdateContent(FmFormShell const *);
63 void UpdateContent(const css::uno::Reference< css::form::XForm > &);
64 void FillInfo( SfxChildWinInfo& rInfo ) const override;
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; }
71 bool createSelectionControls( );
73 private:
74 // FmXChangeListener
75 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
77 using SfxControllerItem::GetBindings;
81 class FmFieldWinMgr final : public SfxChildWindow
83 public:
84 FmFieldWinMgr(vcl::Window *pParent, sal_uInt16 nId,
85 SfxBindings *pBindings, SfxChildWinInfo const *pInfo);
86 SFX_DECL_CHILDWINDOW(FmFieldWinMgr);
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */