xref: /aoo41x/main/sw/source/ui/fldui/fldref.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SWFLDREF_HXX
24 #define _SWFLDREF_HXX
25 
26 #include <sfx2/tabdlg.hxx>
27 #include <vcl/fixed.hxx>
28 #include <vcl/lstbox.hxx>
29 #ifndef _SV_BUTTON_HXX //autogen
30 #include <vcl/button.hxx>
31 #endif
32 #include <vcl/group.hxx>
33 #include <vcl/edit.hxx>
34 
35 #include "fldpage.hxx"
36 // --> OD 2007-11-15 #i83479#
37 #include <IDocumentOutlineNodes.hxx>
38 #include <IDocumentListItems.hxx>
39 #include <FldRefTreeListBox.hxx>
40 class SwTxtNode;
41 // <--
42 
43 /*--------------------------------------------------------------------
44    Beschreibung:
45  --------------------------------------------------------------------*/
46 
47 class SwFldRefPage : public SwFldPage
48 {
49 	FixedText 		aTypeFT;
50 	ListBox 		aTypeLB;
51 	FixedText		aSelectionFT;
52 	ListBox			aSelectionLB;
53     // --> OD 2007-11-21 #i83479#
54     SwFldRefTreeListBox aSelectionToolTipLB;
55     // <--
56 	FixedText		aFormatFT;
57 	ListBox			aFormatLB;
58 	FixedText		aNameFT;
59 	Edit			aNameED;
60 	FixedText		aValueFT;
61 	Edit			aValueED;
62     const String    sBookmarkTxt;
63     const String    sFootnoteTxt;
64     const String    sEndnoteTxt;
65     // --> OD 2007-11-09 #i83479#
66     const String    sHeadingTxt;
67     const String    sNumItemTxt;
68 
69     IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes;
70     IDocumentListItems::tSortedNodeNumList maNumItems;
71 
72     // selected text node in the listbox for headings and numbered items
73     // in order to restore selection after update of selection listbox
74     const SwTxtNode* mpSavedSelectedTxtNode;
75     // fallback, if previously selected text node doesn't exist anymore
76     sal_uInt16 mnSavedSelectedPos;
77     // <--
78 
79 	DECL_LINK( TypeHdl, ListBox* pLB = 0 );
80 	DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
81 	DECL_LINK( ModifyHdl, Edit *pEd = 0 );
82 
83 	void				UpdateSubType();
84 	sal_uInt16				FillFormatLB(sal_uInt16 nTypeId);
85 
86     // --> OD 2007-12-05 #i83479#
87     void SaveSelectedTxtNode();
88     const SwTxtNode* GetSavedSelectedTxtNode() const;
89     sal_uInt16 GetSavedSelectedPos() const;
90     // <--
91 
92 protected:
93 	virtual sal_uInt16		GetGroup();
94 
95 public:
96 						SwFldRefPage(Window* pParent, const SfxItemSet& rSet);
97 
98 						~SwFldRefPage();
99 
100 	static SfxTabPage*  Create(Window* pParent, const SfxItemSet& rAttrSet);
101 
102 	virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
103 	virtual void        Reset( const SfxItemSet& rSet );
104 
105 	virtual void		FillUserData();
106 };
107 
108 
109 #endif
110 
111