Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
20 : #define INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
21 :
22 : #include "hltpbase.hxx"
23 :
24 : /*************************************************************************
25 : |*
26 : |* Tabpage : Hyperlink - Document
27 : |*
28 : \************************************************************************/
29 :
30 : class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase
31 : {
32 : private:
33 : VclPtr<SvxHyperURLBox> m_pCbbPath;
34 : VclPtr<PushButton> m_pBtFileopen;
35 :
36 : VclPtr<Edit> m_pEdTarget;
37 : VclPtr<FixedText> m_pFtFullURL;
38 : VclPtr<PushButton> m_pBtBrowse;
39 :
40 : OUString maStrURL;
41 :
42 : bool mbMarkWndOpen;
43 :
44 : DECL_LINK (ClickFileopenHdl_Impl , void * );
45 : DECL_LINK (ClickTargetHdl_Impl , void * );
46 :
47 : DECL_LINK (ModifiedPathHdl_Impl , void * ); ///< Contens of combobox "Path" modified
48 : DECL_LINK (ModifiedTargetHdl_Impl, void * ); ///< Contens of editfield "Target" modified
49 :
50 : DECL_LINK (LostFocusPathHdl_Impl, void * ); ///< Combobox "path" lost its focus
51 :
52 : DECL_LINK_TYPED(TimeoutHdl_Impl, Timer *, void); ///< Handler for timer -timeout
53 :
54 : enum EPathType { Type_Unknown, Type_Invalid,
55 : Type_ExistsFile, Type_File,
56 : Type_ExistsDir, Type_Dir };
57 : static EPathType GetPathType ( const OUString& rStrPath );
58 :
59 : protected:
60 : void FillDlgFields(const OUString& rStrURL) SAL_OVERRIDE;
61 : void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
62 : OUString& aStrIntName, OUString& aStrFrame,
63 : SvxLinkInsertMode& eMode ) SAL_OVERRIDE;
64 0 : virtual bool ShouldOpenMarkWnd () SAL_OVERRIDE {return mbMarkWndOpen;}
65 0 : virtual void SetMarkWndShouldOpen (bool bOpen) SAL_OVERRIDE {mbMarkWndOpen=bOpen;}
66 : OUString GetCurrentURL ();
67 :
68 : public:
69 : SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet);
70 : virtual ~SvxHyperlinkDocTp();
71 : virtual void dispose() SAL_OVERRIDE;
72 :
73 : static VclPtr<IconChoicePage> Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet );
74 :
75 : virtual void SetMarkStr ( const OUString& aStrMark ) SAL_OVERRIDE;
76 :
77 : virtual void SetInitFocus() SAL_OVERRIDE;
78 : };
79 :
80 :
81 : #endif // INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
82 :
83 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|