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
: 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
, void * );
45 DECL_LINK (ClickTargetHdl_Impl
, void * );
47 DECL_LINK (ModifiedPathHdl_Impl
, void * ); ///< Contens of combobox "Path" modified
48 DECL_LINK (ModifiedTargetHdl_Impl
, void * ); ///< Contens of editfield "Target" modified
50 DECL_LINK (LostFocusPathHdl_Impl
, void * ); ///< Combobox "path" lost its focus
52 DECL_LINK_TYPED(TimeoutHdl_Impl
, Timer
*, void); ///< Handler for timer -timeout
54 enum EPathType
{ Type_Unknown
, Type_Invalid
,
55 Type_ExistsFile
, Type_File
,
56 Type_ExistsDir
, Type_Dir
};
57 static EPathType
GetPathType ( const OUString
& rStrPath
);
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 virtual bool ShouldOpenMarkWnd () SAL_OVERRIDE
{return mbMarkWndOpen
;}
65 virtual void SetMarkWndShouldOpen (bool bOpen
) SAL_OVERRIDE
{mbMarkWndOpen
=bOpen
;}
66 OUString
GetCurrentURL ();
69 SvxHyperlinkDocTp ( vcl::Window
*pParent
, IconChoiceDialog
* pDlg
, const SfxItemSet
& rItemSet
);
70 virtual ~SvxHyperlinkDocTp();
71 virtual void dispose() SAL_OVERRIDE
;
73 static VclPtr
<IconChoicePage
> Create( vcl::Window
* pWindow
, IconChoiceDialog
* pDlg
, const SfxItemSet
& rItemSet
);
75 virtual void SetMarkStr ( const OUString
& aStrMark
) SAL_OVERRIDE
;
77 virtual void SetInitFocus() SAL_OVERRIDE
;
81 #endif // INCLUDED_CUI_SOURCE_INC_HLDOCTP_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */