convertWrapAlign static method
s
: Alignment text.lineStart
: line info for the Error handling.lineEnd
: line info for the Error handling.info
: SpWML info.
Returns WrapAlignment.
Throws SpWMLException : ParamValueException.
Implementation
static WrapAlignment convertWrapAlign(
String s, int lineStart, int lineEnd, SpWMLInfo? info) {
if (s == "left" || s == "start") {
return WrapAlignment.start;
} else if (s == "center") {
return WrapAlignment.center;
} else if (s == "right" || s == "end") {
return WrapAlignment.end;
} else if (s == "top") {
return WrapAlignment.start;
} else if (s == "bottom") {
return WrapAlignment.end;
} else {
throw SpWMLException(
EnumSpWMLExceptionType.paramValueException, lineStart, lineEnd, info);
}
}