[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 28 15:09:41 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |   31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

New commits:
commit af8d12bd3a73381dfdfad92b63306369a665a2d7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 28 14:22:18 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 28 17:08:59 2021 +0200

    gtk4: insert propagate-natural-width on seeing hscrollbar-policy of never
    
    and likewise the vertical equivalents
    
    Change-Id: I28bb5de334aafc96de78c7d03c69f8df66e6a4ab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116341
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 5c5fbde02249..9f0ddc1a1f84 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -20673,6 +20673,32 @@ ConvertResult Convert3To4(const Reference<css::xml::dom::XNode>& xNode)
                 }
             }
 
+            if (sName == "hscrollbar-policy")
+            {
+                if (GetParentObjectType(xChild) == "GtkScrolledWindow")
+                {
+                    if (xChild->getFirstChild()->getNodeValue() == "never")
+                    {
+                        auto xDoc = xChild->getOwnerDocument();
+                        auto xHasFrame = CreateProperty(xDoc, "propagate-natural-width", "True");
+                        xChild->getParentNode()->insertBefore(xHasFrame, xChild);
+                    }
+                }
+            }
+
+            if (sName == "vscrollbar-policy")
+            {
+                if (GetParentObjectType(xChild) == "GtkScrolledWindow")
+                {
+                    if (xChild->getFirstChild()->getNodeValue() == "never")
+                    {
+                        auto xDoc = xChild->getOwnerDocument();
+                        auto xHasFrame = CreateProperty(xDoc, "propagate-natural-height", "True");
+                        xChild->getParentNode()->insertBefore(xHasFrame, xChild);
+                    }
+                }
+            }
+
             if (sName == "image")
             {
                 if (GetParentObjectType(xChild) == "GtkButton")
@@ -22022,17 +22048,20 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
         rUIFile != "sfx/ui/securityinfopage.ui" &&
         rUIFile != "svt/ui/javadisableddialog.ui" &&
         rUIFile != "svx/ui/fontworkgallerydialog.ui" &&
+        rUIFile != "modules/scalc/ui/colwidthdialog.ui" &&
+        rUIFile != "modules/scalc/ui/consolidatedialog.ui" &&
         rUIFile != "modules/scalc/ui/dataform.ui" &&
         rUIFile != "modules/scalc/ui/dataformfragment.ui" &&
         rUIFile != "modules/scalc/ui/definedatabaserangedialog.ui" &&
         rUIFile != "modules/scalc/ui/deletecells.ui" &&
         rUIFile != "modules/scalc/ui/deletecontents.ui" &&
         rUIFile != "modules/scalc/ui/goalseekdlg.ui" &&
+        rUIFile != "modules/scalc/ui/groupdialog.ui" &&
         rUIFile != "modules/scalc/ui/inputstringdialog.ui" &&
         rUIFile != "modules/scalc/ui/insertcells.ui" &&
         rUIFile != "modules/scalc/ui/optimalcolwidthdialog.ui" &&
         rUIFile != "modules/scalc/ui/optimalrowheightdialog.ui" &&
-        rUIFile != "modules/scalc/ui/colwidthdialog.ui" &&
+        rUIFile != "modules/scalc/ui/protectsheetdlg.ui" &&
         rUIFile != "modules/scalc/ui/rowheightdialog.ui" &&
         rUIFile != "modules/scalc/ui/selectrange.ui" &&
         rUIFile != "modules/scalc/ui/selectsource.ui" &&


More information about the Libreoffice-commits mailing list