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_HLINETTP_HXX
20 #define INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
22 #include "cuihyperdlg.hxx"
23 #include "hltpbase.hxx"
25 /*************************************************************************
27 |* Tabpage : Hyperlink - Internet
29 \************************************************************************/
31 class SvxHyperlinkInternetTp
: public SvxHyperlinkTabPageBase
34 OUString maStrOldUser
;
35 OUString maStrOldPassword
;
39 std::unique_ptr
<weld::RadioButton
> m_xRbtLinktypInternet
;
40 std::unique_ptr
<weld::RadioButton
> m_xRbtLinktypFTP
;
41 std::unique_ptr
<SvxHyperURLBox
> m_xCbbTarget
;
42 std::unique_ptr
<weld::Label
> m_xFtTarget
;
43 std::unique_ptr
<weld::Label
> m_xFtLogin
;
44 std::unique_ptr
<weld::Entry
> m_xEdLogin
;
45 std::unique_ptr
<weld::Label
> m_xFtPassword
;
46 std::unique_ptr
<weld::Entry
> m_xEdPassword
;
47 std::unique_ptr
<weld::CheckButton
> m_xCbAnonymous
;
49 DECL_LINK( Click_SmartProtocol_Impl
, weld::Button
&, void ); ///< Radiobutton clicked: Type HTTP or FTP
50 DECL_LINK( ClickAnonymousHdl_Impl
, weld::Button
&, void ); ///< Checkbox : Anonymous User
51 DECL_LINK( ModifiedLoginHdl_Impl
, weld::Entry
&, void ); ///< Contents of editfield "Login" modified
52 DECL_LINK( LostFocusTargetHdl_Impl
, weld::Widget
&, void ); ///< Combobox "Target" lost its focus
53 DECL_LINK( ModifiedTargetHdl_Impl
, weld::ComboBox
&, void ); ///< Contents of editfield "Target" modified
55 DECL_LINK( TimeoutHdl_Impl
, Timer
*, void); ///< Handler for timer -timeout
58 void SetScheme(const OUString
& rScheme
);
59 void RemoveImproperProtocol(const OUString
& rProperScheme
);
60 OUString
GetSchemeFromButtons() const;
61 INetProtocol
GetSmartProtocolFromButtons() const;
63 OUString
CreateAbsoluteURL() const;
65 void setAnonymousFTPUser();
66 void setFTPUser(const OUString
& rUser
, const OUString
& rPassword
);
67 void RefreshMarkWindow();
70 virtual void FillDlgFields(const OUString
& rStrURL
) override
;
71 virtual void GetCurentItemData ( OUString
& rStrURL
, OUString
& aStrName
,
72 OUString
& aStrIntName
, OUString
& aStrFrame
,
73 SvxLinkInsertMode
& eMode
) override
;
74 virtual bool ShouldOpenMarkWnd () override
{return ( m_bMarkWndOpen
&& m_xRbtLinktypInternet
->get_active() );}
75 virtual void SetMarkWndShouldOpen (bool bOpen
) override
{m_bMarkWndOpen
=bOpen
;}
78 SvxHyperlinkInternetTp(weld::Container
* pParent
, SvxHpLinkDlg
* pDlg
, const SfxItemSet
* pItemSet
);
79 virtual ~SvxHyperlinkInternetTp() override
;
81 static std::unique_ptr
<IconChoicePage
> Create(weld::Container
* pWindow
, SvxHpLinkDlg
* pDlg
, const SfxItemSet
* pItemSet
);
83 virtual void SetMarkStr ( const OUString
& aStrMark
) override
;
85 virtual void SetInitFocus() override
;
89 #endif // INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */