tdf#130857 vcl: Move extract* helpers to BuilderBase
This will allow reusing them in QtBuilder in upcoming commits. Change-Id: I74d1cbf936d832443efccaaba4eb6625d32d1437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178851 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -45,6 +45,7 @@ public:
|
|||||||
typedef stringmap Adjustment;
|
typedef stringmap Adjustment;
|
||||||
typedef stringmap TextBuffer;
|
typedef stringmap TextBuffer;
|
||||||
|
|
||||||
|
static OUString extractActionName(stringmap& rMap);
|
||||||
static sal_Int32 extractActive(stringmap& rMap);
|
static sal_Int32 extractActive(stringmap& rMap);
|
||||||
static bool extractResizable(stringmap& rMap);
|
static bool extractResizable(stringmap& rMap);
|
||||||
|
|
||||||
@@ -88,6 +89,7 @@ protected:
|
|||||||
static bool extractHeadersVisible(stringmap& rMap);
|
static bool extractHeadersVisible(stringmap& rMap);
|
||||||
static bool extractEntry(stringmap& rMap);
|
static bool extractEntry(stringmap& rMap);
|
||||||
static OUString extractIconName(stringmap& rMap);
|
static OUString extractIconName(stringmap& rMap);
|
||||||
|
static OUString extractLabel(stringmap& rMap);
|
||||||
static bool extractShowExpanders(stringmap& rMap);
|
static bool extractShowExpanders(stringmap& rMap);
|
||||||
static OUString extractTitle(stringmap& rMap);
|
static OUString extractTitle(stringmap& rMap);
|
||||||
static OUString extractTooltipText(stringmap& rMap);
|
static OUString extractTooltipText(stringmap& rMap);
|
||||||
|
@@ -953,16 +953,6 @@ namespace
|
|||||||
return nBits;
|
return nBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString extractLabel(VclBuilder::stringmap &rMap)
|
|
||||||
{
|
|
||||||
return extractStringEntry(rMap, u"label"_ustr);
|
|
||||||
}
|
|
||||||
|
|
||||||
OUString extractActionName(VclBuilder::stringmap &rMap)
|
|
||||||
{
|
|
||||||
return extractStringEntry(rMap, u"action-name"_ustr);
|
|
||||||
}
|
|
||||||
|
|
||||||
Size extractSizeRequest(VclBuilder::stringmap &rMap)
|
Size extractSizeRequest(VclBuilder::stringmap &rMap)
|
||||||
{
|
{
|
||||||
OUString sWidthRequest(u"0"_ustr);
|
OUString sWidthRequest(u"0"_ustr);
|
||||||
@@ -1009,7 +999,7 @@ namespace
|
|||||||
if (!rFrame.is())
|
if (!rFrame.is())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OUString aCommand(extractActionName(rMap));
|
OUString aCommand(BuilderBase::extractActionName(rMap));
|
||||||
if (aCommand.isEmpty())
|
if (aCommand.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -3355,6 +3345,11 @@ bool BuilderBase::hasOrientationVertical(VclBuilder::stringmap &rMap)
|
|||||||
return bVertical;
|
return bVertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OUString BuilderBase::extractActionName(stringmap& rMap)
|
||||||
|
{
|
||||||
|
return extractStringEntry(rMap, u"action-name"_ustr);
|
||||||
|
}
|
||||||
|
|
||||||
sal_Int32 BuilderBase::extractActive(VclBuilder::stringmap& rMap)
|
sal_Int32 BuilderBase::extractActive(VclBuilder::stringmap& rMap)
|
||||||
{
|
{
|
||||||
sal_Int32 nActiveId = 0;
|
sal_Int32 nActiveId = 0;
|
||||||
@@ -3403,6 +3398,11 @@ OUString BuilderBase::extractIconName(VclBuilder::stringmap &rMap)
|
|||||||
return !sReplace.isEmpty() ? sReplace : sIconName;
|
return !sReplace.isEmpty() ? sReplace : sIconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OUString BuilderBase::extractLabel(VclBuilder::stringmap& rMap)
|
||||||
|
{
|
||||||
|
return extractStringEntry(rMap, u"label"_ustr);
|
||||||
|
}
|
||||||
|
|
||||||
bool BuilderBase::extractResizable(stringmap& rMap)
|
bool BuilderBase::extractResizable(stringmap& rMap)
|
||||||
{
|
{
|
||||||
return extractBoolEntry(rMap, u"resizable"_ustr, true);
|
return extractBoolEntry(rMap, u"resizable"_ustr, true);
|
||||||
|
Reference in New Issue
Block a user