diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-29 07:28:03 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-29 12:17:19 +0100 |
commit | 4692b33314669515a973f69cddd27b688327ca99 (patch) | |
tree | bd495c5cf823395479228fe4ffd68cfa5e0e4f54 /vcl/source | |
parent | 59d8a8b03a0c23842e567d5dc1fb2051d8685c0e (diff) |
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.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/builder.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
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; |