Add Marathi autocorrect
[LibreOffice.git] / sw / source / ui / fldui / fldref.hxx
blob472d26a3c4a056e4a2c6845e6459097f83bbebd3
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_FLDREF_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDREF_HXX
22 #include <sfx2/tabdlg.hxx>
24 #include "fldpage.hxx"
25 #include <IDocumentOutlineNodes.hxx>
26 #include <IDocumentListItems.hxx>
27 class SwTextNode;
29 class SwFieldRefPage : public SwFieldPage
31 OUString m_sBookmarkText;
32 OUString m_sFootnoteText;
33 OUString m_sEndnoteText;
34 // #i83479#
35 OUString m_sHeadingText;
36 OUString m_sNumItemText;
37 OUString m_sStyleText;
39 IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes;
40 IDocumentListItems::tSortedNodeNumList maNumItems;
42 // selected text node in the listbox for headings and numbered items
43 // in order to restore selection after update of selection listbox
44 const SwTextNode* mpSavedSelectedTextNode;
45 // fallback, if previously selected text node doesn't exist anymore
46 size_t mnSavedSelectedPos;
48 std::unique_ptr<weld::TreeView> m_xTypeLB;
49 std::unique_ptr<weld::Widget> m_xSelection;
50 std::unique_ptr<weld::TreeView> m_xSelectionLB;
51 // #i83479#
52 std::unique_ptr<weld::TreeView> m_xSelectionToolTipLB;
53 std::unique_ptr<weld::Widget> m_xFormat;
54 std::unique_ptr<weld::TreeView> m_xFormatLB;
55 std::unique_ptr<weld::Label> m_xNameFT;
56 std::unique_ptr<weld::Entry> m_xNameED;
57 std::unique_ptr<weld::Entry> m_xValueED;
58 std::unique_ptr<weld::Entry> m_xFilterED;
60 std::unique_ptr<weld::Widget> m_xStylerefFlags;
61 std::unique_ptr<weld::CheckButton> m_xStylerefFromBottomCB;
62 std::unique_ptr<weld::CheckButton> m_xStylerefHideNonNumericalCB;
64 DECL_LINK(TypeHdl, weld::TreeView&, void);
65 DECL_LINK(SubTypeListBoxHdl, weld::TreeView&, void);
66 DECL_LINK(SubTypeTreeListBoxHdl, weld::TreeView&, void);
67 DECL_LINK(ModifyHdl, weld::Entry&, void);
68 DECL_LINK(ModifyHdl_Impl, weld::Entry&, void);
69 DECL_LINK(FormatHdl, weld::TreeView&, void);
71 void SubTypeHdl();
73 void UpdateSubType(const OUString& filterString);
75 static bool MatchSubstring( const OUString& list_string, const OUString& substr );
77 sal_Int32 FillFormatLB(sal_uInt16 nTypeId);
79 // #i83479#
80 void SaveSelectedTextNode();
82 protected:
83 virtual sal_uInt16 GetGroup() override;
85 public:
86 SwFieldRefPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pSet);
87 virtual ~SwFieldRefPage() override;
89 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
91 virtual bool FillItemSet( SfxItemSet* rSet ) override;
92 virtual void Reset( const SfxItemSet* rSet ) override;
94 virtual void FillUserData() override;
97 #endif
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */