xref: /aoo41x/main/sw/source/ui/inc/bookmark.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 _BOOKMARK_HXX
24 #define _BOOKMARK_HXX
25 
26 #include <svx/stddlg.hxx>
27 #include <vcl/fixed.hxx>
28 
29 #ifndef _BUTTON_HXX //autogen
30 #include <vcl/button.hxx>
31 #endif
32 
33 #include "swlbox.hxx"		// SwComboBox
34 
35 class SwWrtShell;
36 class SfxRequest;
37 
38 /*--------------------------------------------------------------------
39 	Beschreibung:
40  --------------------------------------------------------------------*/
41 
42 class BookmarkCombo : public SwComboBox
43 {
44 	sal_uInt16			GetFirstSelEntryPos() const;
45 	sal_uInt16			GetNextSelEntryPos(sal_uInt16 nPos) const;
46 	sal_uInt16			GetSelEntryPos(sal_uInt16 nPos) const;
47 
48 	virtual long	PreNotify(NotifyEvent& rNEvt);
49 public:
50 	BookmarkCombo( Window* pWin, const ResId& rResId );
51 
52 	sal_uInt16			GetSelectEntryCount() const;
53 	sal_uInt16			GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
54 
55 	static const String aForbiddenChars;
56 };
57 
58 /*--------------------------------------------------------------------
59 	Beschreibung:
60  --------------------------------------------------------------------*/
61 
62 class SwInsertBookmarkDlg: public SvxStandardDialog
63 {
64 	FixedLine       aBookmarkFl;
65 	BookmarkCombo	aBookmarkBox;
66 	OKButton		aOkBtn;
67 	CancelButton	aCancelBtn;
68 	PushButton		aDeleteBtn;
69 
70 	String 			sRemoveWarning;
71 	SwWrtShell	   	&rSh;
72     SfxRequest&     rReq;
73 
74 	DECL_LINK( ModifyHdl, BookmarkCombo * );
75 	DECL_LINK( DeleteHdl, Button * );
76 
77 	virtual void Apply();
78 
79 public:
80     SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq );
81 	~SwInsertBookmarkDlg();
82 };
83 
84 #endif
85