diff options
Diffstat (limited to 'cui/source/dialogs/hlinettp.cxx')
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 50 |
1 files changed, 10 insertions, 40 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index a887388b8..4926b6699 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -34,18 +34,14 @@ #include "hyperdlg.hrc" #include "hlmarkwn_def.hxx" -#define STD_DOC_SUBPATH "internal" -#define STD_DOC_NAME "url_transfer.htm" - sal_Char const sAnonymous[] = "anonymous"; sal_Char const sHTTPScheme[] = INET_HTTP_SCHEME; sal_Char const sHTTPSScheme[] = INET_HTTPS_SCHEME; sal_Char const sFTPScheme[] = INET_FTP_SCHEME; -sal_Char const sTelnetScheme[] = INET_TELNET_SCHEME; /************************************************************************* |* -|* Contructor / Destructor +|* Constructor / Destructor |* |************************************************************************/ @@ -56,7 +52,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maGrpLinkTyp ( this, CUI_RES (GRP_LINKTYPE) ), maRbtLinktypInternet ( this, CUI_RES (RB_LINKTYP_INTERNET) ), maRbtLinktypFTP ( this, CUI_RES (RB_LINKTYP_FTP) ), - maRbtLinktypTelnet ( this, CUI_RES (RB_LINKTYP_TELNET) ), maFtTarget ( this, CUI_RES (FT_TARGET_HTML) ), maCbbTarget ( this, INET_PROT_HTTP ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), @@ -81,19 +76,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maCbbTarget.Show(); maCbbTarget.SetHelpId( HID_HYPERDLG_INET_PATH ); - // Find Path to Std-Doc - String aStrBasePaths( SvtPathOptions().GetTemplatePath() ); - for( xub_StrLen n = 0; n < aStrBasePaths.GetTokenCount(); n++ ) - { - INetURLObject aURL( aStrBasePaths.GetToken( n ) ); - aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_SUBPATH ) ) ); - aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_NAME ) ) ); - if ( FileExists( aURL ) ) - { - maStrStdDocURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); - break; - } - } SetExchangeSupport (); /////////////////////////////////////// @@ -105,14 +87,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maEdPassword.Show( sal_False ); maCbAnonymous.Show( sal_False ); maBtTarget.Enable( sal_False ); - maBtBrowse.Enable( maStrStdDocURL != aEmptyStr ); + maBtBrowse.Enable( sal_True ); /////////////////////////////////////// // overload handlers Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); maRbtLinktypInternet.SetClickHdl( aLink ); maRbtLinktypFTP.SetClickHdl ( aLink ); - maRbtLinktypTelnet.SetClickHdl ( aLink ); maCbAnonymous.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) ); maBtBrowse.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickBrowseHdl_Impl ) ); maBtTarget.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTargetHdl_Impl ) ); @@ -253,7 +234,7 @@ void SvxHyperlinkInternetTp::SetInitFocus() /************************************************************************* |* -|* Contens of editfield "Taregt" modified +|* Contents of editfield "Target" modified |* |************************************************************************/ @@ -272,7 +253,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, void *, EMPTYARG ) /************************************************************************* |* -|* If target-field was modify, to browse the new doc afeter timeout +|* If target-field was modify, to browse the new doc after timeout |* |************************************************************************/ @@ -284,7 +265,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, EMPTYARG ) /************************************************************************* |* -|* Contens of editfield "Login" modified +|* Contents of editfield "Login" modified |* |************************************************************************/ @@ -308,14 +289,10 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) //if aScheme is empty or unknown the default beaviour is like it where HTTP sal_Bool bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; - sal_Bool bTelnet = sal_False; - if( !bFTP ) - bTelnet = aScheme.SearchAscii( sTelnetScheme ) == 0; - sal_Bool bInternet = !(bFTP || bTelnet); + sal_Bool bInternet = !(bFTP); //update protocol button selection: maRbtLinktypFTP.Check(bFTP); - maRbtLinktypTelnet.Check(bTelnet); maRbtLinktypInternet.Check(bInternet); //update target: @@ -338,7 +315,7 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) } else { - //disable for https, ftp and telnet + //disable for https and ftp maBtTarget.Disable(); if ( mbMarkWndOpen ) HideMarkWnd (); @@ -371,10 +348,6 @@ String SvxHyperlinkInternetTp::GetSchemeFromButtons() const { return String::CreateFromAscii( INET_FTP_SCHEME ); } - else if( maRbtLinktypTelnet.IsChecked() ) - { - return String::CreateFromAscii( INET_TELNET_SCHEME ); - } return String::CreateFromAscii( INET_HTTP_SCHEME ); } @@ -384,16 +357,12 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const { return INET_PROT_FTP; } - else if( maRbtLinktypTelnet.IsChecked() ) - { - return INET_PROT_TELNET; - } return INET_PROT_HTTP; } /************************************************************************* |* -|* Click on Radiobutton : Internet, FTP or Telnet +|* Click on Radiobutton : Internet or FTP |* |************************************************************************/ @@ -457,7 +426,8 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG ) ///////////////////////////////////////////////// // Open URL if available - SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL ); + SfxStringItem aName( SID_FILE_NAME, UniString::CreateFromAscii( + RTL_CONSTASCII_STRINGPARAM( "http://" ) ) ); SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True ); |