Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / ui / fldui / flddb.hxx
blob9fb967b9a5ae4a2bb5c00f1e95b02ede80b104c0
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_SW_SOURCE_UI_FLDUI_FLDDB_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDDB_HXX
22 #include <condedit.hxx>
23 #include <dbtree.hxx>
24 #include <numfmtlb.hxx>
26 #include "fldpage.hxx"
28 class SwFieldDBPage : public SwFieldPage
30 OUString m_sOldDBName;
31 OUString m_sOldTableName;
32 OUString m_sOldColumnName;
33 sal_uInt32 m_nOldFormat;
34 sal_uInt16 m_nOldSubType;
36 std::unique_ptr<weld::TreeView> m_xTypeLB;
37 std::unique_ptr<SwDBTreeList> m_xDatabaseTLB;
38 std::unique_ptr<weld::Button> m_xAddDBPB;
39 std::unique_ptr<weld::Widget> m_xCondition;
40 std::unique_ptr<ConditionEdit> m_xConditionED;
41 std::unique_ptr<weld::Widget> m_xValue;
42 std::unique_ptr<weld::Entry> m_xValueED;
43 std::unique_ptr<weld::RadioButton> m_xDBFormatRB;
44 std::unique_ptr<weld::RadioButton> m_xNewFormatRB;
45 std::unique_ptr<NumFormatListBox> m_xNumFormatLB;
46 std::unique_ptr<weld::ComboBox> m_xFormatLB;
47 std::unique_ptr<weld::Widget> m_xFormat;
49 DECL_LINK( TypeListBoxHdl, weld::TreeView&, void );
50 DECL_LINK( NumSelectHdl, weld::ComboBox&, void );
51 DECL_LINK( TreeSelectHdl, weld::TreeView&, void );
52 DECL_LINK( ModifyHdl, weld::Entry&, void );
53 DECL_LINK( AddDBHdl, weld::Button&, void );
54 void TypeHdl(const weld::TreeView*);
56 void CheckInsert();
58 using SwFieldPage::SetWrtShell;
59 SwWrtShell* CheckAndGetWrtShell();
61 protected:
62 virtual sal_uInt16 GetGroup() override;
64 public:
65 SwFieldDBPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
67 virtual ~SwFieldDBPage() override;
69 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
71 virtual bool FillItemSet( SfxItemSet* rSet ) override;
72 virtual void Reset( const SfxItemSet* rSet ) override;
73 virtual bool DeferResetToFirstActivation() override;
75 virtual void FillUserData() override;
76 void ActivateMailMergeAddress();
78 void SetWrtShell(SwWrtShell& rSh);
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */