1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sfx2/tabdlg.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/edit.hxx>
29 #include "fldpage.hxx"
31 #include <IDocumentOutlineNodes.hxx>
32 #include <IDocumentListItems.hxx>
33 #include <FldRefTreeListBox.hxx>
36 class SwFldRefPage
: public SwFldPage
40 FixedText aSelectionFT
;
43 SwFldRefTreeListBox aSelectionToolTipLB
;
50 const String sBookmarkTxt
;
51 const String sFootnoteTxt
;
52 const String sEndnoteTxt
;
54 const String sHeadingTxt
;
55 const String sNumItemTxt
;
57 IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes
;
58 IDocumentListItems::tSortedNodeNumList maNumItems
;
60 // selected text node in the listbox for headings and numbered items
61 // in order to restore selection after update of selection listbox
62 const SwTxtNode
* mpSavedSelectedTxtNode
;
63 // fallback, if previously selected text node doesn't exist anymore
64 sal_uInt16 mnSavedSelectedPos
;
66 DECL_LINK(TypeHdl
, void *);
67 DECL_LINK(SubTypeHdl
, void * = 0);
68 DECL_LINK(ModifyHdl
, void * = 0);
71 sal_uInt16
FillFormatLB(sal_uInt16 nTypeId
);
74 void SaveSelectedTxtNode();
75 const SwTxtNode
* GetSavedSelectedTxtNode() const;
76 sal_uInt16
GetSavedSelectedPos() const;
79 virtual sal_uInt16
GetGroup();
82 SwFldRefPage(Window
* pParent
, const SfxItemSet
& rSet
);
86 static SfxTabPage
* Create(Window
* pParent
, const SfxItemSet
& rAttrSet
);
88 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
89 virtual void Reset( const SfxItemSet
& rSet
);
91 virtual void FillUserData();
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */