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 #ifndef _SVX_TABPAGE_DOC_HYPERLINK_HXX 28 #define _SVX_TABPAGE_DOC_HYPERLINK_HXX 29 30 #include "hltpbase.hxx" 31 32 /************************************************************************* 33 |* 34 |* Tabpage : Hyperlink - Document 35 |* 36 \************************************************************************/ 37 38 class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase 39 { 40 private: 41 FixedLine maGrpDocument; 42 FixedText maFtPath; 43 SvxHyperURLBox maCbbPath; 44 ImageButton maBtFileopen; 45 46 FixedLine maGrpTarget; 47 FixedText maFtTarget; 48 Edit maEdTarget; 49 FixedText maFtURL; 50 FixedText maFtFullURL; 51 ImageButton maBtBrowse; 52 53 String maStrURL; 54 55 sal_Bool mbMarkWndOpen; 56 57 DECL_LINK (ClickFileopenHdl_Impl , void * ); // Button : Fileopen 58 DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Target 59 60 DECL_LINK (ModifiedPathHdl_Impl , void * ); // Contens of combobox "Path" modified 61 DECL_LINK (ModifiedTargetHdl_Impl, void * ); // Contens of editfield "Target" modified 62 63 DECL_LINK (LostFocusPathHdl_Impl, void * ); // Combobox "path" lost its focus 64 65 DECL_LINK (TimeoutHdl_Impl , Timer * ); // Handler for timer -timeout 66 67 enum EPathType { Type_Unknown, Type_Invalid, 68 Type_ExistsFile, Type_File, 69 Type_ExistsDir, Type_Dir }; 70 EPathType GetPathType ( String& aStrPath ); 71 72 protected: 73 void FillDlgFields ( String& aStrURL ); 74 void GetCurentItemData ( String& aStrURL, String& aStrName, 75 String& aStrIntName, String& aStrFrame, 76 SvxLinkInsertMode& eMode ); 77 virtual sal_Bool ShouldOpenMarkWnd () {return mbMarkWndOpen;} 78 virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} 79 String GetCurrentURL (); 80 81 public: 82 SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet); 83 ~SvxHyperlinkDocTp (); 84 85 static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); 86 87 virtual void SetMarkStr ( String& aStrMark ); 88 89 virtual void SetInitFocus(); 90 }; 91 92 93 #endif // _SVX_TABPAGE_DOC_HYPERLINK_HXX 94