summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-07-17 16:05:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-07-17 22:11:24 +0200
commit74318dbeffb9536ac3b4215ae9369a05f2ac7228 (patch)
tree64fdec448420a481e6e5a9cd19b83ad6afb20e43 /vcl/unx
parent7207ef5c9cf1627d85a276a36753465c0169ebbf (diff)
Resolves: tdf#118801 icons go missing on text-less buttons
Change-Id: I003a59643518e60948d71b335dfcd7e20ba8fee5 Reviewed-on: https://gerrit.libreoffice.org/57572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f890a4f0c862..0f2c6568dd75 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4989,8 +4989,11 @@ private:
if (GTK_IS_BUTTON(pWidget))
{
GtkButton* pButton = GTK_BUTTON(pWidget);
- if (m_pStringReplace != nullptr) {
- set_label(pButton, (*m_pStringReplace)(get_label(pButton)));
+ if (m_pStringReplace != nullptr)
+ {
+ OUString aLabel(get_label(pButton));
+ if (!aLabel.isEmpty())
+ set_label(pButton, (*m_pStringReplace)(aLabel));
}
if (gtk_button_get_use_underline(pButton) && !gtk_button_get_use_stock(pButton))
m_aMnemonicButtons.push_back(pButton);
@@ -4998,8 +5001,11 @@ private:
else if (GTK_IS_LABEL(pWidget))
{
GtkLabel* pLabel = GTK_LABEL(pWidget);
- if (m_pStringReplace != nullptr) {
- set_label(pLabel, (*m_pStringReplace)(get_label(pLabel)));
+ if (m_pStringReplace != nullptr)
+ {
+ OUString aLabel(get_label(pLabel));
+ if (!aLabel.isEmpty())
+ set_label(pLabel, (*m_pStringReplace)(aLabel));
}
if (gtk_label_get_use_underline(pLabel))
m_aMnemonicLabels.push_back(pLabel);