LibreOffice Module sw (master)  1
fldref.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_FLDREF_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDREF_HXX
21 
22 #include <sfx2/tabdlg.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/edit.hxx>
27 
28 #include "fldpage.hxx"
30 #include <IDocumentListItems.hxx>
31 class SwTextNode;
32 
34 {
35  OUString sBookmarkText;
36  OUString sFootnoteText;
37  OUString sEndnoteText;
38  // #i83479#
39  OUString sHeadingText;
40  OUString sNumItemText;
41 
44 
45  // selected text node in the listbox for headings and numbered items
46  // in order to restore selection after update of selection listbox
48  // fallback, if previously selected text node doesn't exist anymore
50 
51  std::unique_ptr<weld::TreeView> m_xTypeLB;
52  std::unique_ptr<weld::Widget> m_xSelection;
53  std::unique_ptr<weld::TreeView> m_xSelectionLB;
54  // #i83479#
55  std::unique_ptr<weld::TreeView> m_xSelectionToolTipLB;
56  std::unique_ptr<weld::Widget> m_xFormat;
57  std::unique_ptr<weld::TreeView> m_xFormatLB;
58  std::unique_ptr<weld::Label> m_xNameFT;
59  std::unique_ptr<weld::Entry> m_xNameED;
60  std::unique_ptr<weld::Entry> m_xValueED;
61  std::unique_ptr<weld::Entry> m_xFilterED;
62 
63  DECL_LINK(TypeHdl, weld::TreeView&, void);
64  DECL_LINK(SubTypeListBoxHdl, weld::TreeView&, void);
65  DECL_LINK(SubTypeTreeListBoxHdl, weld::TreeView&, void);
66  DECL_LINK(ModifyHdl, weld::Entry&, void);
67  DECL_LINK(ModifyHdl_Impl, weld::Entry&, void);
68 
69  void SubTypeHdl();
70 
71  void UpdateSubType(const OUString& filterString);
72 
73  static bool MatchSubstring( const OUString& list_string, const OUString& substr );
74 
75  sal_Int32 FillFormatLB(sal_uInt16 nTypeId);
76 
77  // #i83479#
78  void SaveSelectedTextNode();
79 
80 protected:
81  virtual sal_uInt16 GetGroup() override;
82 
83 public:
85  virtual ~SwFieldRefPage() override;
86 
87  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
88 
89  virtual bool FillItemSet( SfxItemSet* rSet ) override;
90  virtual void Reset( const SfxItemSet* rSet ) override;
91 
92  virtual void FillUserData() override;
93 };
94 
95 #endif
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IDocumentListItems::tSortedNodeNumList maNumItems
Definition: fldref.hxx:43
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: fldref.cxx:1087
OUString sNumItemText
Definition: fldref.hxx:40
virtual sal_uInt16 GetGroup() override
Definition: fldref.cxx:1093
std::unique_ptr< weld::Entry > m_xValueED
Definition: fldref.hxx:60
const SfxItemSet * pSet
IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes
Definition: fldref.hxx:42
void SubTypeHdl()
Definition: fldref.cxx:423
void SaveSelectedTextNode()
Definition: fldref.cxx:122
std::unique_ptr< weld::Entry > m_xFilterED
Definition: fldref.hxx:61
virtual ~SwFieldRefPage() override
Definition: fldref.cxx:111
std::unique_ptr< weld::Widget > m_xSelection
Definition: fldref.hxx:52
std::unique_ptr< weld::Widget > m_xFormat
Definition: fldref.hxx:56
const SwTextNode * mpSavedSelectedTextNode
Definition: fldref.hxx:47
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: fldref.cxx:907
std::vector< const SwNodeNum * > tSortedNodeNumList
std::unique_ptr< weld::TreeView > m_xSelectionToolTipLB
Definition: fldref.hxx:55
static bool MatchSubstring(const OUString &list_string, const OUString &substr)
Definition: fldref.cxx:711
DECL_LINK(TypeHdl, weld::TreeView &, void)
virtual void Reset(const SfxItemSet *rSet) override
Definition: fldref.cxx:153
void UpdateSubType(const OUString &filterString)
Definition: fldref.cxx:467
OUString sFootnoteText
Definition: fldref.hxx:36
std::unique_ptr< weld::Label > m_xNameFT
Definition: fldref.hxx:58
OUString sBookmarkText
Definition: fldref.hxx:35
OUString sHeadingText
Definition: fldref.hxx:39
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
std::unique_ptr< weld::TreeView > m_xFormatLB
Definition: fldref.hxx:57
std::vector< const SwTextNode * > tSortedOutlineNodeList
SwFieldRefPage(TabPageParent pParent, const SfxItemSet *pSet)
Definition: fldref.cxx:54
virtual void FillUserData() override
Definition: fldref.cxx:1098
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: fldref.hxx:51
sal_Int32 FillFormatLB(sal_uInt16 nTypeId)
Definition: fldref.cxx:750
OUString sEndnoteText
Definition: fldref.hxx:37
size_t mnSavedSelectedPos
Definition: fldref.hxx:49
std::unique_ptr< weld::TreeView > m_xSelectionLB
Definition: fldref.hxx:53
std::unique_ptr< weld::Entry > m_xNameED
Definition: fldref.hxx:59