39 , m_bMarkWndOpen(false)
40 , m_xRbtLinktypInternet(xBuilder->weld_radio_button(
"linktyp_internet"))
41 , m_xRbtLinktypFTP(xBuilder->weld_radio_button(
"linktyp_ftp"))
42 , m_xCbbTarget(new
SvxHyperURLBox(xBuilder->weld_combo_box(
"target")))
43 , m_xFtTarget(xBuilder->weld_label(
"target_label"))
44 , m_xFtLogin(xBuilder->weld_label(
"login_label"))
45 , m_xEdLogin(xBuilder->weld_entry(
"login"))
46 , m_xFtPassword(xBuilder->weld_label(
"password_label"))
47 , m_xEdPassword(xBuilder->weld_entry(
"password"))
48 , m_xCbAnonymous(xBuilder->weld_check_button(
"anonymous"))
55 auto nLabelWidth =
m_xFtTarget->get_preferred_size().Width();
103 if(!
aURL.GetUser().isEmpty() || !
aURL.GetPass().isEmpty() )
104 aURL.SetUserAndPass(
u"",
u"");
109 if (
aURL.GetProtocol() != INetProtocol::NotValid )
149 OUString& aStrIntName, OUString& aStrFrame,
159 OUString aStrURL(
m_xCbbTarget->get_active_text().trim());
164 if(
aURL.GetProtocol() == INetProtocol::Ftp && !
m_xEdLogin->get_text().isEmpty() )
167 if (
aURL.GetProtocol() != INetProtocol::NotValid )
181 return std::make_unique<SvxHyperlinkInternetTp>(pWindow, pDlg, pItemSet);
201 OUString aScheme = GetSchemeFromURL( m_xCbbTarget->get_active_text() );
202 if( !aScheme.isEmpty() )
203 SetScheme( aScheme );
206 maTimer.SetTimeout( 2500 );
227 OUString aStrLogin ( m_xEdLogin->get_text() );
228 if ( aStrLogin.equalsIgnoreAsciiCase(
sAnonymous ) )
230 m_xCbAnonymous->set_active(
true);
231 ClickAnonymousHdl_Impl(*m_xCbAnonymous);
239 bool bInternet = !bFTP;
279 if ( !aStrURL.isEmpty() )
282 if ( !aStrScheme.isEmpty() && aStrScheme != aProperScheme )
284 aStrURL = aStrURL.copy( aStrScheme.getLength() );
301 return INetProtocol::Ftp;
303 return INetProtocol::Http;
313 if (!rButton.get_active())
315 OUString aScheme = GetSchemeFromButtons();
327 if ( m_xCbAnonymous->get_active() )
329 if ( m_xEdLogin->get_text().toAsciiLowerCase().startsWith(
sAnonymous ) )
331 maStrOldUser.clear();
332 maStrOldPassword.clear();
336 maStrOldUser = m_xEdLogin->get_text();
337 maStrOldPassword = m_xEdPassword->get_text();
340 setAnonymousFTPUser();
343 setFTPUser(maStrOldUser, maStrOldPassword);
362 if ( !aStrURL.isEmpty() )
379 sal_Int32
nPos = aStrURL.lastIndexOf( sUHash );
382 aStrURL = aStrURL.copy(0,
nPos);
384 aStrURL += OUStringChar(sUHash) + aStrMark;
void SetExchangeSupport()
const OUString & GetEmailAddress(sal_Int32 nIndex) const
ComboBox-Control for URL's with History and Autocompletion.
virtual ~SvxHyperlinkInternetTp() override
std::unique_ptr< weld::CheckButton > m_xCbAnonymous
OUString GetSchemeFromButtons() const
std::unique_ptr< weld::Label > m_xFtLogin
std::unique_ptr< weld::Label > m_xFtTarget
std::unique_ptr< weld::Entry > m_xEdLogin
void setFTPUser(const OUString &rUser, const OUString &rPassword)
INetProtocol GetSmartProtocolFromButtons() const
SvxHyperlinkInternetTp(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
std::unique_ptr< weld::RadioButton > m_xRbtLinktypInternet
virtual void GetCurrentItemData(OUString &rStrURL, OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode) override
virtual void SetInitFocus() override
virtual void SetMarkStr(const OUString &aStrMark) override
OUString CreateAbsoluteURL() const
virtual void FillDlgFields(const OUString &rStrURL) override
std::unique_ptr< weld::Entry > m_xEdPassword
void RemoveImproperProtocol(std::u16string_view rProperScheme)
void setAnonymousFTPUser()
std::unique_ptr< SvxHyperURLBox > m_xCbbTarget
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
std::unique_ptr< weld::Label > m_xFtPassword
std::unique_ptr< weld::RadioButton > m_xRbtLinktypFTP
void SetScheme(std::u16string_view rScheme)
static OUString GetSchemeFromURL(const OUString &rStrURL)
bool IsMarkWndVisible() const
std::shared_ptr< SvxHlinkDlgMarkWnd > mxMarkWnd
void GetDataFromCommonFields(OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, weld::ComboBox &, void)
constexpr OUStringLiteral sAnonymous
IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable &, rButton, void)
#define LINK(Instance, Class, Member)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
constexpr OUStringLiteral INET_HTTP_SCHEME
constexpr OUStringLiteral INET_FTP_SCHEME