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_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;
48 
49  DECL_LINK( Click_SmartProtocol_Impl, weld::Button&, void );
50  DECL_LINK( ClickAnonymousHdl_Impl, weld::Button&, void );
51  DECL_LINK( ModifiedLoginHdl_Impl, weld::Entry&, void );
52  DECL_LINK( LostFocusTargetHdl_Impl, weld::Widget&, void );
53  DECL_LINK( ModifiedTargetHdl_Impl, weld::ComboBox&, void );
54 
55  DECL_LINK( TimeoutHdl_Impl, Timer *, void);
56 
57 
58  void SetScheme(const OUString& rScheme);
59  void RemoveImproperProtocol(const OUString& rProperScheme);
60  OUString GetSchemeFromButtons() const;
62 
63  OUString CreateAbsoluteURL() const;
64 
65  void setAnonymousFTPUser();
66  void setFTPUser(const OUString& rUser, const OUString& rPassword);
67  void RefreshMarkWindow();
68 
69 protected:
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;}
76 
77 public:
78  SvxHyperlinkInternetTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
79  virtual ~SvxHyperlinkInternetTp() override;
80 
81  static std::unique_ptr<IconChoicePage> Create(weld::Container* pWindow, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet);
82 
83  virtual void SetMarkStr ( const OUString& aStrMark ) override;
84 
85  virtual void SetInitFocus() override;
86 };
87 
88 
89 #endif // INCLUDED_CUI_SOURCE_INC_HLINETTP_HXX
90 
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool ShouldOpenMarkWnd() override
Definition: hlinettp.hxx:74
std::unique_ptr< weld::Label > m_xFtLogin
Definition: hlinettp.hxx:43
void RemoveImproperProtocol(const OUString &rProperScheme)
Definition: hlinettp.cxx:282
void setFTPUser(const OUString &rUser, const OUString &rPassword)
Definition: hlinettp.cxx:130
std::unique_ptr< weld::Label > m_xFtPassword
Definition: hlinettp.hxx:45
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:185
virtual void SetMarkWndShouldOpen(bool bOpen) override
Definition: hlinettp.hxx:75
void SetScheme(const OUString &rScheme)
Definition: hlinettp.cxx:241
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:378
INetProtocol GetSmartProtocolFromButtons() const
Definition: hlinettp.cxx:303
std::unique_ptr< weld::Label > m_xFtTarget
Definition: hlinettp.hxx:42
OUString CreateAbsoluteURL() const
Definition: hlinettp.cxx:156
SvxLinkInsertMode
std::unique_ptr< weld::Entry > m_xEdLogin
Definition: hlinettp.hxx:44
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:89
virtual void SetInitFocus() override
Definition: hlinettp.cxx:195
virtual void GetCurentItemData(OUString &rStrURL, OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode) override
Definition: hlinettp.cxx:148
SvxHyperlinkInternetTp(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
Definition: hlinettp.cxx:34
std::unique_ptr< weld::CheckButton > m_xCbAnonymous
Definition: hlinettp.hxx:47
OUString GetSchemeFromButtons() const
Definition: hlinettp.cxx:296
OUString maStrOldPassword
Definition: hlinettp.hxx:35
Tabpage : Basisclass.
Definition: hltpbase.hxx:47
std::unique_ptr< weld::Entry > m_xEdPassword
Definition: hlinettp.hxx:46
virtual ~SvxHyperlinkInternetTp() override
Definition: hlinettp.cxx:80