ColUDA: Now uses ::renderString{Left,Right}
This commit is contained in:
@@ -145,42 +145,34 @@ void ColumnUDA::render (
|
|||||||
// rc.dateformat.
|
// rc.dateformat.
|
||||||
std::string format = context.config.get ("report." + _report + ".dateformat");
|
std::string format = context.config.get ("report." + _report + ".dateformat");
|
||||||
if (format == "")
|
if (format == "")
|
||||||
|
{
|
||||||
format = context.config.get ("dateformat.report");
|
format = context.config.get ("dateformat.report");
|
||||||
if (format == "")
|
if (format == "")
|
||||||
format = context.config.get ("dateformat");
|
format = context.config.get ("dateformat");
|
||||||
|
}
|
||||||
|
|
||||||
lines.push_back (
|
renderStringLeft (lines, width, color, ISO8601d ((time_t) strtol (value.c_str (), NULL, 10)).toString (format));
|
||||||
color.colorize (
|
|
||||||
leftJustify (
|
|
||||||
ISO8601d ((time_t) strtol (value.c_str (), NULL, 10)).toString (format), width)));
|
|
||||||
}
|
}
|
||||||
else if (_type == "duration")
|
else if (_type == "duration")
|
||||||
{
|
renderStringRight (lines, width, color, ISO8601p (value).format ());
|
||||||
lines.push_back (
|
|
||||||
color.colorize (
|
|
||||||
rightJustify (
|
|
||||||
ISO8601p (value).format (),
|
|
||||||
width)));
|
|
||||||
}
|
|
||||||
else if (_type == "string")
|
else if (_type == "string")
|
||||||
{
|
{
|
||||||
std::vector <std::string> raw;
|
std::vector <std::string> raw;
|
||||||
wrapText (raw, value, width, _hyphenate);
|
wrapText (raw, value, width, _hyphenate);
|
||||||
|
|
||||||
for (auto& i : raw)
|
for (auto& i : raw)
|
||||||
lines.push_back (color.colorize (leftJustify (i, width)));
|
renderStringLeft (lines, width, color, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (_type == "numeric")
|
else if (_type == "numeric")
|
||||||
{
|
renderStringRight (lines, width, color, value);
|
||||||
lines.push_back (color.colorize (rightJustify (value, width)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (_style == "indicator")
|
else if (_style == "indicator")
|
||||||
{
|
{
|
||||||
if (task.has (_name))
|
if (task.has (_name))
|
||||||
lines.push_back (
|
renderStringRight (lines, width, color, context.config.get ("uda." + _name + ".indicator"));
|
||||||
color.colorize (
|
|
||||||
rightJustify (context.config.get ("uda." + _name + ".indicator"), width)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user