cui/source/dialogs/tipofthedaydlg.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 0615f3bc125d2d02d11d336e1d0b1c204c91f432 Author: Christophe JAILLET <christophe.jail...@wanadoo.fr> AuthorDate: Tue Aug 20 21:21:44 2019 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Mon Oct 28 08:33:55 2019 +0100 Improve the way %PRODUCTVERSION is expanded in 'tipoftheday' Expand %PRODUCTVERSION in a much cleaner way. Follow up to commit 0ed7f9dab2ec03e168f2013e57c21637f7700736 Change-Id: If3d03cba19f89849c930d6dc3f1e07a65115e4e0 Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> Reviewed-on: https://gerrit.libreoffice.org/77862 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index 9d6630d7e5a7..8f82f6841293 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -29,6 +29,7 @@ #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> #include <i18nlangtag/languagetag.hxx> +#include <unotools/resmgr.hxx> #include <unotools/configmgr.hxx> TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) @@ -88,8 +89,8 @@ void TipOfTheDayDialog::UpdateTip() } else if (aLink.startsWith("http")) { - aText = CuiResId(aLink.toUtf8().getStr()); - + // Links may have some %PRODUCTVERSION which need to be expanded + aText = Translate::ExpandVariables(aLink); sal_Int32 aPos = aText.indexOf("%LANGUAGENAME"); if (aPos != -1) { @@ -98,8 +99,8 @@ void TipOfTheDayDialog::UpdateTip() aLang = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47(); aText = aText.replaceAt(aPos, 13, aLang); } - m_pLink->set_uri(aText); + m_pLink->set_label(CuiResId(STR_MORE_LINK)); m_pLink->set_visible(true); m_pLink->connect_clicked(Link<weld::LinkButton&, void>()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits