diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2019-08-20 21:21:44 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2019-10-28 08:33:55 +0100 |
commit | 0615f3bc125d2d02d11d336e1d0b1c204c91f432 (patch) | |
tree | bd5fd16ee13dfc2651b221b1e86458e4d044ec70 /cui | |
parent | e6109939b448f070848bfcf11ac013e05f71767a (diff) |
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.jaillet@wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/77862
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/tipofthedaydlg.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
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>()); |