}
if (pageOrientation == PageFormat.LANDSCAPE ||
pageOrientation == PageFormat.REVERSE_LANDSCAPE)
{
return new CSSValuePair(CSSNumericValue.createPtValue(ps.getHeight()),
CSSNumericValue.createPtValue(ps.getWidth()));
}
else
{
return new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
CSSNumericValue.createPtValue(ps.getHeight()));
}
}
else
{
final CSSNumericValue horizontalWidth = (CSSNumericValue) parseWidth(value);
if (horizontalWidth == null)
{
return null;
}
value = value.getNextLexicalUnit();
final CSSNumericValue verticalWidth;
if (value == null)
{
verticalWidth = horizontalWidth;
}
else
{
verticalWidth = (CSSNumericValue) parseWidth(value);
if (verticalWidth == null)
{
return null;
}
}
return new CSSValuePair (horizontalWidth, verticalWidth);
}
}