Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / inc / cuihyperdlg.hxx
blob9e976dfed2bdf650a419783f4f0689ddcfe7b06b
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 .
20 #ifndef _CUI_TAB_HYPERLINK_HXX
21 #define _CUI_TAB_HYPERLINK_HXX
23 #include <svx/hlnkitem.hxx>
24 #include <sfx2/childwin.hxx>
25 #include <sfx2/ctrlitem.hxx>
26 #include <sfx2/bindings.hxx>
27 #include <vcl/image.hxx>
29 #include "iconcdlg.hxx"
31 /*************************************************************************
33 |* Hyperlink-Dialog
35 \************************************************************************/
37 class SvxHpLinkDlg;
38 class SvxHlinkCtrl : public SfxControllerItem
40 private :
41 SvxHpLinkDlg *pParent;
43 SfxStatusForwarder aOnlineForwarder;
44 SfxStatusForwarder aRdOnlyForwarder;
46 public :
47 SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
49 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
50 const SfxPoolItem* pState );
55 /*************************************************************************
57 |* Hyperlink-Dialog
59 \************************************************************************/
61 class SvxHpLinkDlg : public IconChoiceDialog
63 private:
64 SvxHlinkCtrl maCtrl; ///< Controler
65 SfxBindings* mpBindings;
66 SfxItemSet* mpItemSet;
68 sal_Bool mbGrabFocus : 1;
69 sal_Bool mbReadOnly : 1;
70 sal_Bool mbIsHTMLDoc : 1;
72 DECL_LINK (ClickApplyHdl_Impl, void * );
73 DECL_LINK (ClickCloseHdl_Impl, void * );
75 protected:
76 virtual sal_Bool Close();
77 virtual void Move();
79 public:
80 SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings );
81 ~SvxHpLinkDlg ();
83 virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage );
85 sal_uInt16 SetPage( SvxHyperlinkItem* pItem );
86 void EnableInetBrowse( sal_Bool bEnable = sal_True );
87 void SetReadOnlyMode( sal_Bool bReadOnly = sal_False );
88 inline sal_Bool IsHTMLDoc() const { return mbIsHTMLDoc; }
90 inline SfxBindings* GetBindings() const { return mpBindings; };
91 inline SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); }
95 #endif // _CUI_TAB_HYPERLINK_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */