Kaydet (Commit) b1cf2909 authored tarafından Caolán McNamara's avatar Caolán McNamara

merge SetDescription into SetText

that way the display text always matches the link text

Change-Id: I3f4901803bd9354d2cd0fc29d7d91ccd8e3def54
üst f88473c5
......@@ -573,7 +573,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
pEntry->m_pPublisher->SetBackground();
pEntry->m_pPublisher->SetPaintTransparent( true );
pEntry->m_pPublisher->SetURL( pEntry->m_sPublisherURL );
pEntry->m_pPublisher->SetDescription( pEntry->m_sPublisher );
pEntry->m_pPublisher->SetText( pEntry->m_sPublisher );
Size aSize = FixedText::CalcMinimumTextSize( pEntry->m_pPublisher );
pEntry->m_pPublisher->SetSizePixel( aSize );
......
......@@ -966,7 +966,7 @@ void UpdateDialog::clearDescription()
String sEmpty;
m_PublisherLabel.Hide();
m_PublisherLink.Hide();
m_PublisherLink.SetDescription( sEmpty );
m_PublisherLink.SetText( sEmpty );
m_PublisherLink.SetURL( sEmpty );
m_ReleaseNotesLabel.Hide();
m_ReleaseNotesLink.Hide();
......@@ -1015,7 +1015,7 @@ bool UpdateDialog::showDescription(std::pair< rtl::OUString, rtl::OUString > con
{
m_PublisherLabel.Show();
m_PublisherLink.Show();
m_PublisherLink.SetDescription( sPub );
m_PublisherLink.SetText( sPub );
m_PublisherLink.SetURL( sURL );
bPublisher = true;
}
......@@ -1054,7 +1054,7 @@ bool UpdateDialog::showDescription( const String& rDescription, bool bWithPublis
m_descriptions.SetPosSizePixel( aNewPos, aNewSize );
}
m_descriptions.Show();
m_descriptions.SetDescription( rDescription );
m_descriptions.SetText( rDescription );
return true;
}
......
......@@ -2955,8 +2955,8 @@ void VCLXFixedHyperlink::setText( const ::rtl::OUString& Text ) throw(::com::sun
SolarMutexGuard aGuard;
FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
if ( pBase )
pBase->SetDescription( Text );
if (pBase)
pBase->SetText(Text);
}
::rtl::OUString VCLXFixedHyperlink::getText() throw(::com::sun::star::uno::RuntimeException)
......@@ -3084,7 +3084,7 @@ void VCLXFixedHyperlink::setProperty( const ::rtl::OUString& PropertyName, const
{
::rtl::OUString sNewLabel;
if ( Value >>= sNewLabel )
pBase->SetDescription( sNewLabel );
pBase->SetText(sNewLabel);
break;
}
......
......@@ -119,7 +119,7 @@
OUString GetURL() const;
/** sets new text and recalculates the text length. */
void SetDescription(const OUString& rNewDescription);
virtual void SetText(const String& rNewDescription);
};
#endif
......
......@@ -115,9 +115,9 @@ OUString FixedHyperlink::GetURL() const
return m_sURL;
}
void FixedHyperlink::SetDescription(const OUString& rNewDescription)
void FixedHyperlink::SetText(const String& rNewDescription)
{
SetText(rNewDescription);
FixedText::SetText(rNewDescription);
m_nTextLen = GetCtrlTextWidth(GetText());
}
......
......@@ -705,7 +705,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
}
else if (name == "GtkLinkButton")
pWindow = new FixedHyperlink(pParent);
pWindow = new FixedHyperlink(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK|WB_NOLABEL);
else if (name == "GtkComboBox")
{
extractModel(id, rMap);
......
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