tdf#130857 VclBuilder: Move extractHeadersVisible to base class

Move this helper function to the base class, for reuse
in QtBuilder in an upcoming commit.

Change-Id: Ide125c87bd4ebf63f70f94239a9bc42c3eab3c98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177546
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2024-11-29 16:14:50 +01:00
parent 4d1f6c439b
commit 480d38b18c
2 changed files with 12 additions and 12 deletions

View File

@@ -84,6 +84,7 @@ protected:
static void collectAccelerator(xmlreader::XmlReader& reader, accelmap& rMap);
stringmap collectPackingProperties(xmlreader::XmlReader& reader);
void collectProperty(xmlreader::XmlReader& rReader, stringmap& rMap) const;
static bool extractHeadersVisible(stringmap& rMap);
static bool extractEntry(stringmap& rMap);
static OUString extractIconName(stringmap& rMap);
static OUString extractTooltipText(stringmap& rMap);

View File

@@ -1078,18 +1078,6 @@ namespace
return sTitle;
}
bool extractHeadersVisible(VclBuilder::stringmap &rMap)
{
bool bHeadersVisible = true;
VclBuilder::stringmap::iterator aFind = rMap.find(u"headers-visible"_ustr);
if (aFind != rMap.end())
{
bHeadersVisible = toBool(aFind->second);
rMap.erase(aFind);
}
return bHeadersVisible;
}
bool extractSortIndicator(VclBuilder::stringmap &rMap)
{
bool bSortIndicator = false;
@@ -3497,6 +3485,17 @@ bool BuilderBase::extractEntry(VclBuilder::stringmap &rMap)
return bHasEntry;
}
bool BuilderBase::extractHeadersVisible(VclBuilder::stringmap& rMap)
{
bool bHeadersVisible = true;
VclBuilder::stringmap::iterator aFind = rMap.find(u"headers-visible"_ustr);
if (aFind != rMap.end())
{
bHeadersVisible = toBool(aFind->second);
rMap.erase(aFind);
}
return bHeadersVisible;
}
OUString BuilderBase::extractIconName(VclBuilder::stringmap &rMap)
{