xref: /aoo42x/main/cui/source/inc/cuihyperdlg.hxx (revision 07a3d7f1)
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 
24 #ifndef _CUI_TAB_HYPERLINK_HXX
25 #define _CUI_TAB_HYPERLINK_HXX
26 
27 // include ---------------------------------------------------------------
28 
29 #include <svx/hlnkitem.hxx>
30 #include <sfx2/childwin.hxx>
31 #include <sfx2/ctrlitem.hxx>
32 #include <sfx2/bindings.hxx>
33 #include <vcl/image.hxx>
34 
35 #include "iconcdlg.hxx"
36 
37 /*************************************************************************
38 |*
39 |* Hyperlink-Dialog
40 |*
41 \************************************************************************/
42 
43 class SvxHpLinkDlg;
44 class SvxHlinkCtrl : public SfxControllerItem
45 {
46 private :
47 	SvxHpLinkDlg *pParent;
48 
49 	SfxStatusForwarder aOnlineForwarder;
50 	SfxStatusForwarder aRdOnlyForwarder;
51 
52 public :
53 	SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
54 
55 	virtual void	StateChanged( sal_uInt16 nSID, SfxItemState eState,
56 								const SfxPoolItem* pState );
57 };
58 
59 
60 
61 /*************************************************************************
62 |*
63 |* Hyperlink-Dialog
64 |*
65 \************************************************************************/
66 
67 class SvxHpLinkDlg : public IconChoiceDialog
68 {
69 private:
70 	SvxHlinkCtrl		maCtrl;			// Controller
71 	SfxBindings*		mpBindings;
72 	SfxItemSet*			mpItemSet;
73 
74 	sal_Bool			mbDummy1    : 1;
75 	sal_Bool			mbDummy2    : 1;
76 	sal_Bool			mbDummy3    : 1;
77 	sal_Bool			mbDummy4    : 1;
78 	sal_Bool			mbDummy5    : 1;
79 	sal_Bool			mbGrabFocus : 1;
80 	sal_Bool			mbReadOnly  : 1;
81 	sal_Bool			mbIsHTMLDoc : 1;
82 
83 	void*               mpDummy1;
84 	void*               mpDummy2;
85 
86 	DECL_LINK (ClickApplyHdl_Impl, void * );
87 	DECL_LINK (ClickCloseHdl_Impl, void * );
88 
89 protected:
90 	virtual sal_Bool			Close();
91 	virtual void			Move();
92 
93 //    virtual long			PreNotify( NotifyEvent& rNEvt );
94 public:
95 	SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings );
96 	~SvxHpLinkDlg ();
97 
98     virtual void            PageCreated( sal_uInt16 nId, IconChoicePage& rPage );
99 
100 	sal_uInt16					SetPage( SvxHyperlinkItem* pItem );
101 	void					EnableInetBrowse( sal_Bool bEnable = sal_True );
102     void					SetReadOnlyMode( sal_Bool bReadOnly = sal_False );
IsHTMLDoc() const103 	inline sal_Bool		IsHTMLDoc() const { return mbIsHTMLDoc; }
104 
GetBindings() const105     inline SfxBindings*		GetBindings() const { return mpBindings; };
GetDispatcher() const106 	inline SfxDispatcher*	GetDispatcher() const { return mpBindings->GetDispatcher(); }
107 };
108 
109 
110 #endif // _CUI_TAB_HYPERLINK_HXX
111