LibreOffice Module cui (master) 1
hlinettp.hxx
Go to the documentation of this file.
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#pragma once
20
21#include <sal/config.h>
22
23#include <string_view>
24
25#include "cuihyperdlg.hxx"
26#include "hltpbase.hxx"
27
28/*************************************************************************
29|*
30|* Tabpage : Hyperlink - Internet
31|*
32\************************************************************************/
33
35{
36private:
37 OUString maStrOldUser;
39
41
42 std::unique_ptr<weld::RadioButton> m_xRbtLinktypInternet;
43 std::unique_ptr<weld::RadioButton> m_xRbtLinktypFTP;
44 std::unique_ptr<SvxHyperURLBox> m_xCbbTarget;
45 std::unique_ptr<weld::Label> m_xFtTarget;
46 std::unique_ptr<weld::Label> m_xFtLogin;
47 std::unique_ptr<weld::Entry> m_xEdLogin;
48 std::unique_ptr<weld::Label> m_xFtPassword;
49 std::unique_ptr<weld::Entry> m_xEdPassword;
50 std::unique_ptr<weld::CheckButton> m_xCbAnonymous;
51
52 DECL_LINK( Click_SmartProtocol_Impl, weld::Toggleable&, void );
53 DECL_LINK( ClickAnonymousHdl_Impl, weld::Toggleable&, void );
54 DECL_LINK( ModifiedLoginHdl_Impl, weld::Entry&, void );
55 DECL_LINK( LostFocusTargetHdl_Impl, weld::Widget&, void );
56 DECL_LINK( ModifiedTargetHdl_Impl, weld::ComboBox&, void );
57
58 DECL_LINK( TimeoutHdl_Impl, Timer *, void);
59
60
61 void SetScheme(std::u16string_view rScheme);
62 void RemoveImproperProtocol(std::u16string_view rProperScheme);
63 OUString GetSchemeFromButtons() const;
65
66 OUString CreateAbsoluteURL() const;
67
69 void setFTPUser(const OUString& rUser, const OUString& rPassword);
70 void RefreshMarkWindow();
71
72protected:
73 virtual void FillDlgFields(const OUString& rStrURL) override;
74 virtual void GetCurrentItemData ( OUString& rStrURL, OUString& aStrName,
75 OUString& aStrIntName, OUString& aStrFrame,
76 SvxLinkInsertMode& eMode ) override;
77 virtual bool ShouldOpenMarkWnd () override {return ( m_bMarkWndOpen && m_xRbtLinktypInternet->get_active() );}
78 virtual void SetMarkWndShouldOpen (bool bOpen) override {m_bMarkWndOpen=bOpen;}
79
80public:
81 SvxHyperlinkInternetTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
82 virtual ~SvxHyperlinkInternetTp() override;
83
84 static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
85
86 virtual void SetMarkStr ( const OUString& aStrMark ) override;
87
88 virtual void SetInitFocus() override;
89};
90
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SvxHyperlinkInternetTp() override
Definition: hlinettp.cxx:80
std::unique_ptr< weld::CheckButton > m_xCbAnonymous
Definition: hlinettp.hxx:50
DECL_LINK(ModifiedTargetHdl_Impl, weld::ComboBox &, void)
Contents of editfield "Target" modified.
DECL_LINK(ClickAnonymousHdl_Impl, weld::Toggleable &, void)
Checkbox : Anonymous User.
OUString GetSchemeFromButtons() const
Definition: hlinettp.cxx:290
std::unique_ptr< weld::Label > m_xFtLogin
Definition: hlinettp.hxx:46
std::unique_ptr< weld::Label > m_xFtTarget
Definition: hlinettp.hxx:45
DECL_LINK(TimeoutHdl_Impl, Timer *, void)
Handler for timer -timeout.
std::unique_ptr< weld::Entry > m_xEdLogin
Definition: hlinettp.hxx:47
void setFTPUser(const OUString &rUser, const OUString &rPassword)
Definition: hlinettp.cxx:130
INetProtocol GetSmartProtocolFromButtons() const
Definition: hlinettp.cxx:297
DECL_LINK(Click_SmartProtocol_Impl, weld::Toggleable &, void)
Radiobutton toggled: Type HTTP or FTP.
SvxHyperlinkInternetTp(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
Definition: hlinettp.cxx:34
std::unique_ptr< weld::RadioButton > m_xRbtLinktypInternet
Definition: hlinettp.hxx:42
virtual void GetCurrentItemData(OUString &rStrURL, OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode) override
Definition: hlinettp.cxx:148
virtual void SetInitFocus() override
Definition: hlinettp.cxx:189
OUString maStrOldPassword
Definition: hlinettp.hxx:38
virtual void SetMarkWndShouldOpen(bool bOpen) override
Definition: hlinettp.hxx:78
virtual void SetMarkStr(const OUString &aStrMark) override
Definition: hlinettp.cxx:374
DECL_LINK(LostFocusTargetHdl_Impl, weld::Widget &, void)
Combobox "Target" lost its focus.
OUString CreateAbsoluteURL() const
Definition: hlinettp.cxx:156
DECL_LINK(ModifiedLoginHdl_Impl, weld::Entry &, void)
Contents of editfield "Login" modified.
virtual void FillDlgFields(const OUString &rStrURL) override
Definition: hlinettp.cxx:89
std::unique_ptr< weld::Entry > m_xEdPassword
Definition: hlinettp.hxx:49
void RemoveImproperProtocol(std::u16string_view rProperScheme)
Definition: hlinettp.cxx:276
virtual bool ShouldOpenMarkWnd() override
Definition: hlinettp.hxx:77
std::unique_ptr< SvxHyperURLBox > m_xCbbTarget
Definition: hlinettp.hxx:44
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
Definition: hlinettp.cxx:179
std::unique_ptr< weld::Label > m_xFtPassword
Definition: hlinettp.hxx:48
std::unique_ptr< weld::RadioButton > m_xRbtLinktypFTP
Definition: hlinettp.hxx:43
void SetScheme(std::u16string_view rScheme)
Definition: hlinettp.cxx:235
Tabpage : Basisclass.
Definition: hltpbase.hxx:47
SvxLinkInsertMode
INetProtocol