[Libreoffice-commits] core.git: cui/source
Christophe JAILLET (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 28 07:34:36 UTC 2019
cui/source/dialogs/tipofthedaydlg.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 0615f3bc125d2d02d11d336e1d0b1c204c91f432
Author: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
AuthorDate: Tue Aug 20 21:21:44 2019 +0200
Commit: Heiko Tietze <heiko.tietze at 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.jaillet at wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/77862
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
Tested-by: Heiko Tietze <heiko.tietze at 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>());
More information about the Libreoffice-commits
mailing list