Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_TABPAGE_DOC_HYPERLINK_HXX
29 : : #define _SVX_TABPAGE_DOC_HYPERLINK_HXX
30 : :
31 : : #include "hltpbase.hxx"
32 : :
33 : : /*************************************************************************
34 : : |*
35 : : |* Tabpage : Hyperlink - Document
36 : : |*
37 : : \************************************************************************/
38 : :
39 : : class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase
40 : : {
41 : : private:
42 : : FixedLine maGrpDocument;
43 : : FixedText maFtPath;
44 : : SvxHyperURLBox maCbbPath;
45 : : ImageButton maBtFileopen;
46 : :
47 : : FixedLine maGrpTarget;
48 : : FixedText maFtTarget;
49 : : Edit maEdTarget;
50 : : FixedText maFtURL;
51 : : FixedText maFtFullURL;
52 : : ImageButton maBtBrowse;
53 : :
54 : : String maStrURL;
55 : :
56 : : sal_Bool mbMarkWndOpen;
57 : :
58 : : DECL_LINK (ClickFileopenHdl_Impl , void * );
59 : : DECL_LINK (ClickTargetHdl_Impl , void * );
60 : :
61 : : DECL_LINK (ModifiedPathHdl_Impl , void * ); ///< Contens of combobox "Path" modified
62 : : DECL_LINK (ModifiedTargetHdl_Impl, void * ); ///< Contens of editfield "Target" modified
63 : :
64 : : DECL_LINK (LostFocusPathHdl_Impl, void * ); ///< Combobox "path" lost its focus
65 : :
66 : : DECL_LINK(TimeoutHdl_Impl , void *); ///< Handler for timer -timeout
67 : :
68 : : enum EPathType { Type_Unknown, Type_Invalid,
69 : : Type_ExistsFile, Type_File,
70 : : Type_ExistsDir, Type_Dir };
71 : : EPathType GetPathType ( String& aStrPath );
72 : :
73 : : protected:
74 : : void FillDlgFields ( String& aStrURL );
75 : : void GetCurentItemData ( String& aStrURL, String& aStrName,
76 : : String& aStrIntName, String& aStrFrame,
77 : : SvxLinkInsertMode& eMode );
78 : 0 : virtual sal_Bool ShouldOpenMarkWnd () {return mbMarkWndOpen;}
79 : 0 : virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;}
80 : : String GetCurrentURL ();
81 : :
82 : : public:
83 : : SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet);
84 : : ~SvxHyperlinkDocTp ();
85 : :
86 : : static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet );
87 : :
88 : : virtual void SetMarkStr ( String& aStrMark );
89 : :
90 : : virtual void SetInitFocus();
91 : : };
92 : :
93 : :
94 : : #endif // _SVX_TABPAGE_DOC_HYPERLINK_HXX
95 : :
96 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|