From 0f8f92a5b6fcba1fef456539bb929819a9162a85 Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Fri, 15 Jun 2012 17:20:20 +0530 Subject: n757419: Hidden/Non-wrapping text. Negative values for left-margin plays havoc with the text in this case. --- svx/source/unodraw/unoshape.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'svx/source') diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 16af6ec00883..4c21d47429f0 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -4299,11 +4299,18 @@ uno::Any SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet void SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) { + uno::Any aVal(rVal); if(!pMap || !pMap->nWID) return; bool bDontConvertNegativeValues = ( pMap->nWID == XATTR_FILLBMP_SIZEX || pMap->nWID == XATTR_FILLBMP_SIZEY ); - rPropSet.setPropertyValue( pMap, rVal, rSet, bDontConvertNegativeValues ); + if( pMap->nWID == EE_PARA_LRSPACE ) // n#757419 Don't import negative values + { + sal_Int32 nVal; + if( (aVal >>= nVal) && nVal < 0 ) + aVal <<= ( sal_Int32 ) 0; + } + rPropSet.setPropertyValue( pMap, aVal, rSet, bDontConvertNegativeValues ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit