include/vcl/builderbase.hxx   |    1 +
 vcl/source/window/builder.cxx |   26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 4692b33314669515a973f69cddd27b688327ca99
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Oct 29 07:28:03 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Oct 29 12:17:19 2024 +0100

    tdf#130857 VclBuilder: Move extractResizable to BuilderBase
    
    Turn this local helper function into a static method
    in the BuilderBase class, for reuse in QtBuilder
    in an upcoming commit.
    
    Change-Id: Iee5d5c061c8b1bad3fefb7398111ad6815fc4c6d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175776
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/builderbase.hxx b/include/vcl/builderbase.hxx
index 829e3dff8f52..428141860a09 100644
--- a/include/vcl/builderbase.hxx
+++ b/include/vcl/builderbase.hxx
@@ -46,6 +46,7 @@ public:
     typedef stringmap TextBuffer;
 
     static sal_Int32 extractActive(stringmap& rMap);
+    static bool extractResizable(stringmap& rMap);
 
 protected:
     BuilderBase(std::u16string_view sUIDir, const OUString& rUIFile, bool 
bLegacy);
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 14bebb7d724f..5e41df185bd1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -922,18 +922,6 @@ namespace
         return sRet;
     }
 
-    bool extractResizable(VclBuilder::stringmap &rMap)
-    {
-        bool bResizable = true;
-        VclBuilder::stringmap::iterator aFind = rMap.find(u"resizable"_ustr);
-        if (aFind != rMap.end())
-        {
-            bResizable = toBool(aFind->second);
-            rMap.erase(aFind);
-        }
-        return bResizable;
-    }
-
 #if HAVE_FEATURE_DESKTOP
     bool extractModal(VclBuilder::stringmap &rMap)
     {
@@ -1186,7 +1174,7 @@ namespace
     WinBits extractDeferredBits(VclBuilder::stringmap &rMap)
     {
         WinBits nBits = WB_3DLOOK|WB_HIDE;
-        if (extractResizable(rMap))
+        if (BuilderBase::extractResizable(rMap))
             nBits |= WB_SIZEABLE;
         if (extractCloseable(rMap))
             nBits |= WB_CLOSEABLE;
@@ -3759,6 +3747,18 @@ OUString 
BuilderBase::extractIconName(VclBuilder::stringmap &rMap)
     return !sReplace.isEmpty() ? sReplace : sIconName;
 }
 
+bool BuilderBase::extractResizable(stringmap& rMap)
+{
+    bool bResizable = true;
+    VclBuilder::stringmap::iterator aFind = rMap.find(u"resizable"_ustr);
+    if (aFind != rMap.end())
+    {
+        bResizable = toBool(aFind->second);
+        rMap.erase(aFind);
+    }
+    return bResizable;
+}
+
 OUString BuilderBase::extractTooltipText(stringmap& rMap)
 {
     OUString sTooltipText;

Reply via email to