summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-04-01 15:51:04 +0300
committerTor Lillqvist <tml@collabora.com>2015-04-02 22:44:37 +0300
commit6d089a4c7dbc38277e54998020cdb6ff3fac9371 (patch)
tree14a66e5ec1bc2606f764de3c6fb1ed34878c017d /cui
parent5241788281e315fc735e5322b3b642486be52c50 (diff)
Kill INetProtocol::News
Change-Id: I393edc816aaf189b1001e630c76f67dd53fd5be3
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx1
-rw-r--r--cui/source/dialogs/hlmailtp.cxx49
-rw-r--r--cui/source/dialogs/hltpbase.cxx4
-rw-r--r--cui/source/dialogs/hyperdlg.src4
-rw-r--r--cui/source/inc/hlmailtp.hxx7
-rw-r--r--cui/uiconfig/ui/hyperlinkmailpage.ui50
6 files changed, 7 insertions, 108 deletions
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 5043af660d39..053196c25a5d 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -313,7 +313,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
break;
case INetProtocol::Mailto :
- case INetProtocol::News :
nPageId = RID_SVXPAGE_HYPERLINK_MAIL;
break;
default :
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index bb04adb1e675..068d412ce069 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -41,8 +41,6 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
: SvxHyperlinkTabPageBase ( pParent, pDlg, "HyperlinkMailPage", "cui/ui/hyperlinkmailpage.ui",
rItemSet )
{
- get(m_pRbtMail, "linktyp_mail");
- get(m_pRbtNews, "linktyp_news");
get(m_pCbbReceiver, "receiver");
m_pCbbReceiver->SetSmartProtocol(INetProtocol::Mailto);
get(m_pBtAdrBook, "adressbook");
@@ -60,12 +58,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
SetExchangeSupport ();
- // set defaults
- m_pRbtMail->Check ();
-
// 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_pCbbReceiver->SetModifyHdl ( LINK ( this, SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) );
@@ -141,7 +134,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
if( aURL.GetProtocol() == INetProtocol::NotValid )
{
- aURL.SetSmartProtocol( GetSmartProtocolFromButtons() );
+ aURL.SetSmartProtocol( INetProtocol::Mailto );
aURL.SetSmartURL(aStrURL);
}
@@ -189,18 +182,11 @@ void SvxHyperlinkMailTp::SetInitFocus()
void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme)
{
- //if rScheme is empty or unknown the default beaviour is like it where MAIL
- const sal_Char sNewsScheme[] = INET_NEWS_SCHEME;
-
- bool bMail = !rScheme.startsWith(sNewsScheme);
-
- //update protocol button selection:
- m_pRbtMail->Check(bMail);
- m_pRbtNews->Check(!bMail);
+ const bool bMail = true;
//update target:
RemoveImproperProtocol(rScheme);
- m_pCbbReceiver->SetSmartProtocol( GetSmartProtocolFromButtons() );
+ m_pCbbReceiver->SetSmartProtocol( INetProtocol::Mailto );
//show/hide special fields for MAIL:
m_pBtAdrBook->Enable(bMail);
@@ -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
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 7aec01683018..293b04069896 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -401,10 +401,6 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL )
{
aStrScheme = INET_MAILTO_SCHEME;
}
- else if ( rStrURL.startsWithIgnoreAsciiCase( INET_NEWS_SCHEME ) )
- {
- aStrScheme = INET_NEWS_SCHEME;
- }
}
else
aStrScheme = INetURLObject::GetScheme( aProtocol );
diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src
index 393c1182cb44..7ac2a43a76bd 100644
--- a/cui/source/dialogs/hyperdlg.src
+++ b/cui/source/dialogs/hyperdlg.src
@@ -60,11 +60,11 @@ String RID_SVXSTR_HYPERDLG_HLINETTP_HELP
String RID_SVXSTR_HYPERDLG_HLMAILTP
{
- Text [ en-US ] = "Mail & News" ;
+ Text [ en-US ] = "Mail" ;
};
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
diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx
index 44aacc78453d..6f847976e16b 100644
--- a/cui/source/inc/hlmailtp.hxx
+++ b/cui/source/inc/hlmailtp.hxx
@@ -23,28 +23,23 @@
/*************************************************************************
|*
-|* Tabpage : Hyperlink - Mail & News
+|* Tabpage : Hyperlink - Mail
|*
\************************************************************************/
class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase
{
private:
- RadioButton *m_pRbtMail;
- RadioButton *m_pRbtNews;
SvxHyperURLBox *m_pCbbReceiver;
PushButton *m_pBtAdrBook;
FixedText *m_pFtSubject;
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 (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified
void SetScheme(const OUString& rScheme);
void RemoveImproperProtocol(const OUString& aProperScheme);
- OUString GetSchemeFromButtons() const;
- INetProtocol GetSmartProtocolFromButtons() const;
OUString CreateAbsoluteURL() const;
diff --git a/cui/uiconfig/ui/hyperlinkmailpage.ui b/cui/uiconfig/ui/hyperlinkmailpage.ui
index 15f988e317d2..9496365518d4 100644
--- a/cui/uiconfig/ui/hyperlinkmailpage.ui
+++ b/cui/uiconfig/ui/hyperlinkmailpage.ui
@@ -31,54 +31,6 @@
<property name="row_spacing">6</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>
<object class="GtkLabel" id="receiver_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -164,7 +116,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Mail &amp; News</property>
+ <property name="label" translatable="yes">Mail</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>