summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/html/svxcss1.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 37c0a88df992..e442644271f2 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -2019,11 +2019,15 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
break;
case CSS1_PIXLENGTH:
{
- long nPWidth = (long)pExpr->GetNumber();
- long nPHeight = 0;
- SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nIndent = (short)nPWidth;
- bSet = true;
+ double fWidth = pExpr->GetNumber();
+ if (fWidth < SAL_MAX_INT32/2.0 && fWidth > SAL_MIN_INT32/2.0)
+ {
+ long nPWidth = (long)fWidth;
+ long nPHeight = 0;
+ SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
+ nIndent = (short)nPWidth;
+ bSet = true;
+ }
}
break;
case CSS1_PERCENTAGE: