summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlplug.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html/htmlplug.cxx')
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 3179bfa68e21..069aeea16efb 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -235,8 +235,8 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( nLeftSpace > 0 || nRightSpace > 0 )
{
SvxLRSpaceItem aLRItem( RES_LR_SPACE );
- aLRItem.SetLeft( nLeftSpace > 0 ? nLeftSpace : 0 );
- aLRItem.SetRight( nRightSpace > 0 ? nRightSpace : 0 );
+ aLRItem.SetLeft( std::max<sal_Int32>(nLeftSpace, 0) );
+ aLRItem.SetRight( std::max<sal_Int32>(nRightSpace, 0) );
rFlyItemSet.Put( aLRItem );
if( nLeftSpace )
{