1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
20 #define INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
22 #include "hltpbase.hxx"
24 /*************************************************************************
26 |* Tabpage : Hyperlink - Document
28 \************************************************************************/
30 class SvxHyperlinkDocTp final
: public SvxHyperlinkTabPageBase
33 VclPtr
<SvxHyperURLBox
> m_pCbbPath
;
34 VclPtr
<PushButton
> m_pBtFileopen
;
36 VclPtr
<Edit
> m_pEdTarget
;
37 VclPtr
<FixedText
> m_pFtFullURL
;
38 VclPtr
<PushButton
> m_pBtBrowse
;
44 DECL_LINK (ClickFileopenHdl_Impl
, Button
*, void );
45 DECL_LINK (ClickTargetHdl_Impl
, Button
*, void );
47 DECL_LINK (ModifiedPathHdl_Impl
, Edit
&, void ); ///< Contents of combobox "Path" modified
48 DECL_LINK (ModifiedTargetHdl_Impl
, Edit
&, void ); ///< Contents of editfield "Target" modified
50 DECL_LINK( LostFocusPathHdl_Impl
, Control
&, void ); ///< Combobox "path" lost its focus
52 DECL_LINK( TimeoutHdl_Impl
, Timer
*, void ); ///< Handler for timer -timeout
54 enum class EPathType
{ Invalid
, ExistsFile
};
55 static EPathType
GetPathType ( const OUString
& rStrPath
);
57 void FillDlgFields(const OUString
& rStrURL
) override
;
58 void GetCurentItemData ( OUString
& rStrURL
, OUString
& aStrName
,
59 OUString
& aStrIntName
, OUString
& aStrFrame
,
60 SvxLinkInsertMode
& eMode
) override
;
61 virtual bool ShouldOpenMarkWnd () override
{return mbMarkWndOpen
;}
62 virtual void SetMarkWndShouldOpen (bool bOpen
) override
{mbMarkWndOpen
=bOpen
;}
63 OUString
GetCurrentURL ();
66 SvxHyperlinkDocTp ( vcl::Window
*pParent
, IconChoiceDialog
* pDlg
, const SfxItemSet
* pItemSet
);
67 virtual ~SvxHyperlinkDocTp() override
;
68 virtual void dispose() override
;
70 static VclPtr
<IconChoicePage
> Create( vcl::Window
* pWindow
, IconChoiceDialog
* pDlg
, const SfxItemSet
* pItemSet
);
72 virtual void SetMarkStr ( const OUString
& aStrMark
) override
;
74 virtual void SetInitFocus() override
;
78 #endif // INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */