[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jul 18 16:02:12 UTC 2018


 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 9bde4146ad0ebe6d3298f7d359154459cbf62f89
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 17 16:05:35 2018 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 18 18:01:50 2018 +0200

    Resolves: tdf#118801 icons go missing on text-less buttons
    
    Change-Id: I003a59643518e60948d71b335dfcd7e20ba8fee5
    Reviewed-on: https://gerrit.libreoffice.org/57573
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index e2bc52fc922a..70b0625dd0e8 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4975,8 +4975,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);
@@ -4984,8 +4987,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);


More information about the Libreoffice-commits mailing list