1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _CUI_TAB_HYPERLINK_HXX 29 #define _CUI_TAB_HYPERLINK_HXX 30 31 // include --------------------------------------------------------------- 32 33 #include <svx/hlnkitem.hxx> 34 #include <sfx2/childwin.hxx> 35 #include <sfx2/ctrlitem.hxx> 36 #include <sfx2/bindings.hxx> 37 #include <vcl/image.hxx> 38 39 #include "iconcdlg.hxx" 40 41 /************************************************************************* 42 |* 43 |* Hyperlink-Dialog 44 |* 45 \************************************************************************/ 46 47 class SvxHpLinkDlg; 48 class SvxHlinkCtrl : public SfxControllerItem 49 { 50 private : 51 SvxHpLinkDlg *pParent; 52 53 SfxStatusForwarder aOnlineForwarder; 54 SfxStatusForwarder aRdOnlyForwarder; 55 56 public : 57 SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg); 58 59 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 60 const SfxPoolItem* pState ); 61 }; 62 63 64 65 /************************************************************************* 66 |* 67 |* Hyperlink-Dialog 68 |* 69 \************************************************************************/ 70 71 class SvxHpLinkDlg : public IconChoiceDialog 72 { 73 private: 74 SvxHlinkCtrl maCtrl; // Controler 75 SfxBindings* mpBindings; 76 SfxItemSet* mpItemSet; 77 78 sal_Bool mbDummy1 : 1; 79 sal_Bool mbDummy2 : 1; 80 sal_Bool mbDummy3 : 1; 81 sal_Bool mbDummy4 : 1; 82 sal_Bool mbDummy5 : 1; 83 sal_Bool mbGrabFocus : 1; 84 sal_Bool mbReadOnly : 1; 85 sal_Bool mbIsHTMLDoc : 1; 86 87 void* mpDummy1; 88 void* mpDummy2; 89 90 DECL_LINK (ClickApplyHdl_Impl, void * ); 91 DECL_LINK (ClickCloseHdl_Impl, void * ); 92 93 protected: 94 virtual sal_Bool Close(); 95 virtual void Move(); 96 97 // virtual long PreNotify( NotifyEvent& rNEvt ); 98 public: 99 SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings ); 100 ~SvxHpLinkDlg (); 101 102 virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage ); 103 104 sal_uInt16 SetPage( SvxHyperlinkItem* pItem ); 105 void EnableInetBrowse( sal_Bool bEnable = sal_True ); 106 void SetReadOnlyMode( sal_Bool bReadOnly = sal_False ); 107 inline sal_Bool IsHTMLDoc() const { return mbIsHTMLDoc; } 108 109 inline SfxBindings* GetBindings() const { return mpBindings; }; 110 inline SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); } 111 }; 112 113 114 #endif // _CUI_TAB_HYPERLINK_HXX 115