LibreOffice Module sw (master)  1
glosbib.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 
20 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_GLOSBIB_HXX
21 #define INCLUDED_SW_SOURCE_UIBASE_INC_GLOSBIB_HXX
22 
23 #include <sfx2/basedlgs.hxx>
24 #include <rtl/ustring.hxx>
25 #include <vcl/weld.hxx>
26 
27 #include <vector>
28 
29 class SwGlossaryHdl;
30 
32 {
33  OUString sPath;
34  OUString sGroupName;
35  OUString sGroupTitle;
36 };
37 
39 {
40  std::vector<OUString> m_RemovedArr;
41  std::vector<OUString> m_InsertedArr;
42  std::vector<OUString> m_RenamedArr;
43 
46 
47  OUString sCreatedGroup;
48 
49  std::unique_ptr<weld::Entry> m_xNameED;
50  std::unique_ptr<weld::ComboBox> m_xPathLB;
51  std::unique_ptr<weld::TreeView> m_xGroupTLB;
52 
53  std::unique_ptr<weld::Button> m_xNewPB;
54  std::unique_ptr<weld::Button> m_xDelPB;
55  std::unique_ptr<weld::Button> m_xRenamePB;
56 
57  bool IsDeleteAllowed(const OUString &rGroup);
58 
59  void Apply();
60  DECL_LINK(SelectHdl, weld::TreeView&, void);
61  DECL_LINK(NewHdl, weld::Button&, void);
62  DECL_LINK(DeleteHdl, weld::Button&, void);
63  DECL_LINK(ModifyHdl, weld::Entry&, void);
64  DECL_LINK(ModifyListBoxHdl, weld::ComboBox&, void);
65  DECL_LINK(RenameHdl, weld::Button&, void);
66  DECL_STATIC_LINK(SwGlossaryGroupDlg, EditInsertTextHdl, OUString&, bool);
67  DECL_LINK(EntrySizeAllocHdl, const Size&, void);
68 
69 public:
71  std::vector<OUString> const& rPathArr,
72  SwGlossaryHdl *pGlosHdl);
73  virtual short run() override;
74  virtual ~SwGlossaryGroupDlg() override;
75 
76  const OUString& GetCreatedGroupName() const {return sCreatedGroup;}
77 };
78 
79 #endif
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Entry > m_xNameED
Definition: glosbib.hxx:49
DECL_LINK(SelectHdl, weld::TreeView &, void)
DECL_STATIC_LINK(SwGlossaryGroupDlg, EditInsertTextHdl, OUString &, bool)
std::vector< OUString > m_RemovedArr
Definition: glosbib.hxx:40
std::unique_ptr< weld::TreeView > m_xGroupTLB
Definition: glosbib.hxx:51
virtual short run() override
Definition: glosbib.cxx:130
SwGlossaryHdl * pGlosHdl
Definition: glosbib.hxx:45
std::unique_ptr< weld::Button > m_xRenamePB
Definition: glosbib.hxx:55
OUString sPath
Definition: glosbib.hxx:33
SwGlossaryGroupDlg(weld::Window *pParent, std::vector< OUString > const &rPathArr, SwGlossaryHdl *pGlosHdl)
Definition: glosbib.cxx:45
bool IsDeleteAllowed(const OUString &rGroup)
Definition: glosbib.cxx:393
std::vector< OUString > m_RenamedArr
Definition: glosbib.hxx:42
OUString sGroupTitle
Definition: glosbib.hxx:35
virtual ~SwGlossaryGroupDlg() override
Definition: glosbib.cxx:120
OUString sGroupName
Definition: glosbib.hxx:34
OUString sCreatedGroup
Definition: glosbib.hxx:47
std::vector< OUString > m_InsertedArr
Definition: glosbib.hxx:41
std::unique_ptr< weld::Button > m_xNewPB
Definition: glosbib.hxx:53
std::unique_ptr< weld::Button > m_xDelPB
Definition: glosbib.hxx:54
const OUString & GetCreatedGroupName() const
Definition: glosbib.hxx:76
weld::Window * m_pParent
Definition: glosbib.hxx:44
std::unique_ptr< weld::ComboBox > m_xPathLB
Definition: glosbib.hxx:50