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 #ifndef INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
20 #define INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
21 
22 #include "cuihyperdlg.hxx"
23 #include "hltpbase.hxx"
24 
25 /*************************************************************************
26 |*
27 |* Tabpage : Hyperlink - Internet
28 |*
29 \************************************************************************/
30 
32 {
33 private:
34  OUString maStrOldUser;
35  OUString maStrOldPassword;
36 
38 
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_xFtLogin;
43  std::unique_ptr<weld::Entry> m_xEdLogin;
44  std::unique_ptr<weld::Label> m_xFtPassword;
45  std::unique_ptr<weld::Entry> m_xEdPassword;
46  std::unique_ptr<weld::CheckButton> m_xCbAnonymous;
47 
48  DECL_LINK( Click_SmartProtocol_Impl, weld::Button&, void );
49  DECL_LINK( ClickAnonymousHdl_Impl, weld::Button&, void );
50  DECL_LINK( ModifiedLoginHdl_Impl, weld::Entry&, void );
51  DECL_LINK( LostFocusTargetHdl_Impl, weld::Widget&, void );
52  DECL_LINK( ModifiedTargetHdl_Impl, weld::ComboBox&, void );
53 
54  DECL_LINK( TimeoutHdl_Impl, Timer *, void);
55 
56 
57  void SetScheme(const OUString& rScheme);
58  void RemoveImproperProtocol(const OUString& rProperScheme);
59  OUString GetSchemeFromButtons() const;
61 
62  OUString CreateAbsoluteURL() const;
63 
64  void setAnonymousFTPUser();
65  void setFTPUser(const OUString& rUser, const OUString& rPassword);
66  void RefreshMarkWindow();
67 
68 protected:
69  virtual void FillDlgFields(const OUString& rStrURL) override;
70  virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName,
71  OUString& aStrIntName, OUString& aStrFrame,
72  SvxLinkInsertMode& eMode ) override;
73  virtual bool ShouldOpenMarkWnd () override {return ( m_bMarkWndOpen && m_xRbtLinktypInternet->get_active() );}
74  virtual void SetMarkWndShouldOpen (bool bOpen) override {m_bMarkWndOpen=bOpen;}
75 
76 public:
77  SvxHyperlinkInternetTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
78  virtual ~SvxHyperlinkInternetTp() override;
79 
80  static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
81 
82  virtual void SetMarkStr ( const OUString& aStrMark ) override;
83 
84  virtual void SetInitFocus() override;
85 };
86 
87 
88 #endif // INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
89 
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool ShouldOpenMarkWnd() override
Definition: hlinettp.hxx:73
std::unique_ptr< weld::Label > m_xFtLogin
Definition: hlinettp.hxx:42
void RemoveImproperProtocol(const OUString &rProperScheme)
Definition: hlinettp.cxx:273
void setFTPUser(const OUString &rUser, const OUString &rPassword)
Definition: hlinettp.cxx:121
std::unique_ptr< weld::Label > m_xFtPassword
Definition: hlinettp.hxx:44
std::unique_ptr< SvxHyperURLBox > m_xCbbTarget
Definition: hlinettp.hxx:41
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
Definition: hlinettp.cxx:176
virtual void SetMarkWndShouldOpen(bool bOpen) override
Definition: hlinettp.hxx:74
void SetScheme(const OUString &rScheme)
Definition: hlinettp.cxx:232
INetProtocol
DECL_LINK(Click_SmartProtocol_Impl, weld::Button &, void)
Radiobutton clicked: Type HTTP or FTP.
virtual void SetMarkStr(const OUString &aStrMark) override
Definition: hlinettp.cxx:369
INetProtocol GetSmartProtocolFromButtons() const
Definition: hlinettp.cxx:294
OUString CreateAbsoluteURL() const
Definition: hlinettp.cxx:147
SvxLinkInsertMode
std::unique_ptr< weld::Entry > m_xEdLogin
Definition: hlinettp.hxx:43
std::unique_ptr< weld::RadioButton > m_xRbtLinktypInternet
Definition: hlinettp.hxx:39
std::unique_ptr< weld::RadioButton > m_xRbtLinktypFTP
Definition: hlinettp.hxx:40
virtual void FillDlgFields(const OUString &rStrURL) override
Definition: hlinettp.cxx:80
virtual void SetInitFocus() override
Definition: hlinettp.cxx:186
virtual void GetCurentItemData(OUString &rStrURL, OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode) override
Definition: hlinettp.cxx:139
SvxHyperlinkInternetTp(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
Definition: hlinettp.cxx:34
std::unique_ptr< weld::CheckButton > m_xCbAnonymous
Definition: hlinettp.hxx:46
OUString GetSchemeFromButtons() const
Definition: hlinettp.cxx:287
OUString maStrOldPassword
Definition: hlinettp.hxx:35
Tabpage : Basisclass.
Definition: hltpbase.hxx:47
std::unique_ptr< weld::Entry > m_xEdPassword
Definition: hlinettp.hxx:45
virtual ~SvxHyperlinkInternetTp() override
Definition: hlinettp.cxx:71