LibreOffice Module sw (master)  1
flddb.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_SW_SOURCE_UI_FLDUI_FLDDB_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDDB_HXX
21 
22 #include <condedit.hxx>
23 #include <dbtree.hxx>
24 #include <numfmtlb.hxx>
25 
26 #include "fldpage.hxx"
27 
28 class SwFieldDBPage : public SwFieldPage
29 {
30  OUString m_sOldDBName;
31  OUString m_sOldTableName;
32  OUString m_sOldColumnName;
34  sal_uInt16 m_nOldSubType;
35 
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<SwNumFormatListBox> m_xNumFormatLB;
46  std::unique_ptr<weld::ComboBox> m_xFormatLB;
47  std::unique_ptr<weld::Widget> m_xFormat;
48 
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*);
55 
56  void CheckInsert();
57 
59 
60 protected:
61  virtual sal_uInt16 GetGroup() override;
62 
63 public:
64  SwFieldDBPage(TabPageParent pParent, const SfxItemSet* rSet);
65 
66  virtual ~SwFieldDBPage() override;
67  virtual void dispose() override;
68 
69  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
70 
71  virtual bool FillItemSet( SfxItemSet* rSet ) override;
72  virtual void Reset( const SfxItemSet* rSet ) override;
73 
74  virtual void FillUserData() override;
76 
77  void SetWrtShell(SwWrtShell& rSh);
78 };
79 
80 #endif
81 
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: flddb.hxx:36
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: flddb.cxx:193
std::unique_ptr< weld::Entry > m_xValueED
Definition: flddb.hxx:42
SwFieldDBPage(TabPageParent pParent, const SfxItemSet *rSet)
Definition: flddb.cxx:36
sal_uIntPtr sal_uLong
std::unique_ptr< weld::Widget > m_xCondition
Definition: flddb.hxx:39
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:90
std::unique_ptr< weld::ComboBox > m_xFormatLB
Definition: flddb.hxx:46
std::unique_ptr< weld::Widget > m_xValue
Definition: flddb.hxx:41
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:525
std::unique_ptr< SwNumFormatListBox > m_xNumFormatLB
Definition: flddb.hxx:45
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:37
OUString m_sOldDBName
Definition: flddb.hxx:30
void CheckInsert()
Definition: flddb.cxx:421
void ActivateMailMergeAddress()
Definition: flddb.cxx:517
sal_uLong m_nOldFormat
Definition: flddb.hxx:33
std::unique_ptr< weld::RadioButton > m_xNewFormatRB
Definition: flddb.hxx:44
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:264
std::unique_ptr< weld::RadioButton > m_xDBFormatRB
Definition: flddb.hxx:43
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:71
virtual void dispose() override
Definition: flddb.cxx:76
void SetWrtShell(SwWrtShell *m_pWrtShell)
Definition: fldpage.cxx:348
DECL_LINK(TypeListBoxHdl, weld::TreeView &, void)
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:280
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:34
virtual void FillUserData() override
Definition: flddb.cxx:509
OUString m_sOldColumnName
Definition: flddb.hxx:32
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:270
std::unique_ptr< ConditionEdit > m_xConditionED
Definition: flddb.hxx:40
std::unique_ptr< weld::Button > m_xAddDBPB
Definition: flddb.hxx:38
std::unique_ptr< weld::Widget > m_xFormat
Definition: flddb.hxx:47
OUString m_sOldTableName
Definition: flddb.hxx:31