Kaydet (Commit) 6d089a4c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Kill INetProtocol::News

Change-Id: I393edc816aaf189b1001e630c76f67dd53fd5be3
üst 52417882
...@@ -313,7 +313,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) ...@@ -313,7 +313,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
break; break;
case INetProtocol::Mailto : case INetProtocol::Mailto :
case INetProtocol::News :
nPageId = RID_SVXPAGE_HYPERLINK_MAIL; nPageId = RID_SVXPAGE_HYPERLINK_MAIL;
break; break;
default : default :
......
...@@ -41,8 +41,6 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* ...@@ -41,8 +41,6 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
: SvxHyperlinkTabPageBase ( pParent, pDlg, "HyperlinkMailPage", "cui/ui/hyperlinkmailpage.ui", : SvxHyperlinkTabPageBase ( pParent, pDlg, "HyperlinkMailPage", "cui/ui/hyperlinkmailpage.ui",
rItemSet ) rItemSet )
{ {
get(m_pRbtMail, "linktyp_mail");
get(m_pRbtNews, "linktyp_news");
get(m_pCbbReceiver, "receiver"); get(m_pCbbReceiver, "receiver");
m_pCbbReceiver->SetSmartProtocol(INetProtocol::Mailto); m_pCbbReceiver->SetSmartProtocol(INetProtocol::Mailto);
get(m_pBtAdrBook, "adressbook"); get(m_pBtAdrBook, "adressbook");
...@@ -60,12 +58,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* ...@@ -60,12 +58,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
SetExchangeSupport (); SetExchangeSupport ();
// set defaults
m_pRbtMail->Check ();
// set handlers // set handlers
m_pRbtMail->SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, Click_SmartProtocol_Impl ) );
m_pRbtNews->SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, Click_SmartProtocol_Impl ) );
m_pBtAdrBook->SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, ClickAdrBookHdl_Impl ) ); m_pBtAdrBook->SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, ClickAdrBookHdl_Impl ) );
m_pCbbReceiver->SetModifyHdl ( LINK ( this, SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) ); m_pCbbReceiver->SetModifyHdl ( LINK ( this, SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) );
...@@ -141,7 +134,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const ...@@ -141,7 +134,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
if( aURL.GetProtocol() == INetProtocol::NotValid ) if( aURL.GetProtocol() == INetProtocol::NotValid )
{ {
aURL.SetSmartProtocol( GetSmartProtocolFromButtons() ); aURL.SetSmartProtocol( INetProtocol::Mailto );
aURL.SetSmartURL(aStrURL); aURL.SetSmartURL(aStrURL);
} }
...@@ -189,18 +182,11 @@ void SvxHyperlinkMailTp::SetInitFocus() ...@@ -189,18 +182,11 @@ void SvxHyperlinkMailTp::SetInitFocus()
void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme) void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme)
{ {
//if rScheme is empty or unknown the default beaviour is like it where MAIL const bool bMail = true;
const sal_Char sNewsScheme[] = INET_NEWS_SCHEME;
bool bMail = !rScheme.startsWith(sNewsScheme);
//update protocol button selection:
m_pRbtMail->Check(bMail);
m_pRbtNews->Check(!bMail);
//update target: //update target:
RemoveImproperProtocol(rScheme); RemoveImproperProtocol(rScheme);
m_pCbbReceiver->SetSmartProtocol( GetSmartProtocolFromButtons() ); m_pCbbReceiver->SetSmartProtocol( INetProtocol::Mailto );
//show/hide special fields for MAIL: //show/hide special fields for MAIL:
m_pBtAdrBook->Enable(bMail); m_pBtAdrBook->Enable(bMail);
...@@ -227,35 +213,6 @@ void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme) ...@@ -227,35 +213,6 @@ void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme)
} }
} }
OUString SvxHyperlinkMailTp::GetSchemeFromButtons() const
{
if( m_pRbtNews->IsChecked() )
return OUString(INET_NEWS_SCHEME);
return OUString(INET_MAILTO_SCHEME);
}
INetProtocol SvxHyperlinkMailTp::GetSmartProtocolFromButtons() const
{
if( m_pRbtNews->IsChecked() )
{
return INetProtocol::News;
}
return INetProtocol::Mailto;
}
/*************************************************************************
|*
|* Click on radiobutton : Type EMail
|*
|************************************************************************/
IMPL_LINK_NOARG(SvxHyperlinkMailTp, Click_SmartProtocol_Impl)
{
OUString aScheme = GetSchemeFromButtons();
SetScheme( aScheme );
return 0L;
}
/************************************************************************* /*************************************************************************
|* |*
|* Contens of editfield "receiver" modified |* Contens of editfield "receiver" modified
......
...@@ -401,10 +401,6 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL ) ...@@ -401,10 +401,6 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL )
{ {
aStrScheme = INET_MAILTO_SCHEME; aStrScheme = INET_MAILTO_SCHEME;
} }
else if ( rStrURL.startsWithIgnoreAsciiCase( INET_NEWS_SCHEME ) )
{
aStrScheme = INET_NEWS_SCHEME;
}
} }
else else
aStrScheme = INetURLObject::GetScheme( aProtocol ); aStrScheme = INetURLObject::GetScheme( aProtocol );
......
...@@ -60,11 +60,11 @@ String RID_SVXSTR_HYPERDLG_HLINETTP_HELP ...@@ -60,11 +60,11 @@ String RID_SVXSTR_HYPERDLG_HLINETTP_HELP
String RID_SVXSTR_HYPERDLG_HLMAILTP String RID_SVXSTR_HYPERDLG_HLMAILTP
{ {
Text [ en-US ] = "Mail & News" ; Text [ en-US ] = "Mail" ;
}; };
String RID_SVXSTR_HYPERDLG_HLMAILTP_HELP String RID_SVXSTR_HYPERDLG_HLMAILTP_HELP
{ {
Text [ en-US ] = "This is where you create a hyperlink to an e-mail address or newsgroup." ; Text [ en-US ] = "This is where you create a hyperlink to an e-mail address." ;
}; };
String RID_SVXSTR_HYPERDLG_HLDOCTP String RID_SVXSTR_HYPERDLG_HLDOCTP
......
...@@ -23,28 +23,23 @@ ...@@ -23,28 +23,23 @@
/************************************************************************* /*************************************************************************
|* |*
|* Tabpage : Hyperlink - Mail & News |* Tabpage : Hyperlink - Mail
|* |*
\************************************************************************/ \************************************************************************/
class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase
{ {
private: private:
RadioButton *m_pRbtMail;
RadioButton *m_pRbtNews;
SvxHyperURLBox *m_pCbbReceiver; SvxHyperURLBox *m_pCbbReceiver;
PushButton *m_pBtAdrBook; PushButton *m_pBtAdrBook;
FixedText *m_pFtSubject; FixedText *m_pFtSubject;
Edit *m_pEdSubject; Edit *m_pEdSubject;
DECL_LINK (Click_SmartProtocol_Impl, void * ); ///< Radiobutton clicked: Type EMAIl or News
DECL_LINK (ClickAdrBookHdl_Impl , void * ); ///< Button : Address book DECL_LINK (ClickAdrBookHdl_Impl , void * ); ///< Button : Address book
DECL_LINK (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified DECL_LINK (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified
void SetScheme(const OUString& rScheme); void SetScheme(const OUString& rScheme);
void RemoveImproperProtocol(const OUString& aProperScheme); void RemoveImproperProtocol(const OUString& aProperScheme);
OUString GetSchemeFromButtons() const;
INetProtocol GetSmartProtocolFromButtons() const;
OUString CreateAbsoluteURL() const; OUString CreateAbsoluteURL() const;
......
...@@ -30,54 +30,6 @@ ...@@ -30,54 +30,6 @@
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="linktyp_mail">
<property name="label" translatable="yes">_E-mail</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="linktyp_news">
<property name="label" translatable="yes">_News</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">linktyp_mail</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child> <child>
<object class="GtkLabel" id="receiver_label"> <object class="GtkLabel" id="receiver_label">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -164,7 +116,7 @@ ...@@ -164,7 +116,7 @@
<object class="GtkLabel" id="label2"> <object class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Mail &amp; News</property> <property name="label" translatable="yes">Mail</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
</attributes> </attributes>
......
...@@ -40,7 +40,6 @@ namespace com { namespace sun { namespace star { namespace util { ...@@ -40,7 +40,6 @@ namespace com { namespace sun { namespace star { namespace util {
#define INET_HTTPS_SCHEME "https://" #define INET_HTTPS_SCHEME "https://"
#define INET_FILE_SCHEME "file://" #define INET_FILE_SCHEME "file://"
#define INET_MAILTO_SCHEME "mailto:" #define INET_MAILTO_SCHEME "mailto:"
#define INET_NEWS_SCHEME "news:"
#define INET_HID_SCHEME "hid:" #define INET_HID_SCHEME "hid:"
#define URL_PREFIX_PRIV_SOFFICE "private:" #define URL_PREFIX_PRIV_SOFFICE "private:"
...@@ -72,7 +71,6 @@ enum class INetProtocol ...@@ -72,7 +71,6 @@ enum class INetProtocol
File, File,
Mailto, Mailto,
VndSunStarWebdav, VndSunStarWebdav,
News,
PrivSoffice, PrivSoffice,
VndSunStarHelp, VndSunStarHelp,
Https, Https,
...@@ -882,7 +880,6 @@ public: ...@@ -882,7 +880,6 @@ public:
PART_UNAMBIGUOUS = 0x08000, PART_UNAMBIGUOUS = 0x08000,
PART_URIC_NO_SLASH = 0x10000, PART_URIC_NO_SLASH = 0x10000,
PART_HTTP_QUERY = 0x20000, //TODO! unused? PART_HTTP_QUERY = 0x20000, //TODO! unused?
PART_NEWS_ARTICLE_LOCALPART = 0x40000
}; };
enum EscapeType enum EscapeType
......
...@@ -1240,7 +1240,7 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, ...@@ -1240,7 +1240,7 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
( (bFileToFile && INetProtocol::File == aTargetUrl.GetProtocol()) || ( (bFileToFile && INetProtocol::File == aTargetUrl.GetProtocol()) ||
(!bFileToFile && INetProtocol::File != aTargetUrl.GetProtocol() && (!bFileToFile && INetProtocol::File != aTargetUrl.GetProtocol() &&
INetProtocol::Ftp <= aTargetUrl.GetProtocol() && INetProtocol::Ftp <= aTargetUrl.GetProtocol() &&
INetProtocol::News >= aTargetUrl.GetProtocol()) ) ) INetProtocol::Javascript >= aTargetUrl.GetProtocol()) ) )
{ {
if( pFileNameMap ) if( pFileNameMap )
{ {
......
...@@ -2683,7 +2683,6 @@ void SfxMedium::SetIsRemote_Impl() ...@@ -2683,7 +2683,6 @@ void SfxMedium::SetIsRemote_Impl()
case INetProtocol::Ftp: case INetProtocol::Ftp:
case INetProtocol::Http: case INetProtocol::Http:
case INetProtocol::Https: case INetProtocol::Https:
case INetProtocol::News:
case INetProtocol::Vim: case INetProtocol::Vim:
pImp->m_bRemote = true; pImp->m_bRemote = true;
break; break;
......
...@@ -191,7 +191,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, ...@@ -191,7 +191,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
// testen, ob es ein Protokoll-Typ ist, den ich anzeigen will // testen, ob es ein Protokoll-Typ ist, den ich anzeigen will
INetProtocol aProtocol = aUrl.GetProtocol(); INetProtocol aProtocol = aUrl.GetProtocol();
static const INetProtocol s_aQuickHelpSupported[] = static const INetProtocol s_aQuickHelpSupported[] =
{ INetProtocol::Ftp, INetProtocol::Http, INetProtocol::File, INetProtocol::Mailto, INetProtocol::News, { INetProtocol::Ftp, INetProtocol::Http, INetProtocol::File, INetProtocol::Mailto,
INetProtocol::Https, INetProtocol::Javascript, INetProtocol::Https, INetProtocol::Javascript,
INetProtocol::Vim, INetProtocol::Ldap INetProtocol::Vim, INetProtocol::Ldap
}; };
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment