oox/source/drawingml/textbodypropertiescontext.cxx | 4 ++++ oox/source/drawingml/textparagraph.cxx | 7 ++++++- svx/source/unodraw/unoshape.cxx | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-)
New commits: commit 81c3727086699e842930beb1dd9d59891125e9b3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Jun 15 16:23:50 2012 +0200 Avoid bogus "may be used uninitialized" warning Change-Id: Ib763b8ab1e728d400859a7abb355bba182b28684 diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 4c21d47..28b00a7 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -4306,7 +4306,7 @@ void SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, co bool bDontConvertNegativeValues = ( pMap->nWID == XATTR_FILLBMP_SIZEX || pMap->nWID == XATTR_FILLBMP_SIZEY ); if( pMap->nWID == EE_PARA_LRSPACE ) // n#757419 Don't import negative values { - sal_Int32 nVal; + sal_Int32 nVal = sal_Int32(); if( (aVal >>= nVal) && nVal < 0 ) aVal <<= ( sal_Int32 ) 0; } commit f2096b28ad43ad55970060751d5cbf5d4d3c7f38 Author: Muthu Subramanian <sumu...@suse.com> Date: Tue Aug 14 17:43:54 2012 +0530 n#759180: Override properties with endParaPr. This is done only for empty textruns. diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 9f0b29d..3ee16db 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -101,8 +101,13 @@ void TextParagraph::insertAt( { for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt ) { + sal_Int32 nLen = (*aIt)->getText().getLength(); + // n#759180: Force use, maEndProperties for the last segment + // This is currently applied to only empty runs + if( !nLen && ( ( aIt + 1 ) == aEnd ) ) + (*aIt)->getTextCharacterProperties().assignUsed( maEndProperties ); nCharHeight = std::max< sal_Int32 >( nCharHeight, (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle ) ); - nParagraphSize += (*aIt)->getText().getLength(); + nParagraphSize += nLen; } } xAt->gotoEnd( sal_True ); commit 27109f48d82af6b1058220340dfd17e912bc3dcf Author: Muthu Subramanian <sumu...@suse.com> Date: Mon Sep 10 18:26:13 2012 +0530 n#778859: Non autofit text are imported as autofit. Push default values if <bodyPr> exists. diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 711da4c..4cd0cfe 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -123,6 +123,10 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, } mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= mrTextBodyProp.meVA; } + + // Push defaults + mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false; + mrTextBodyProp.maPropertyMap[ PROP_TextFitToSize ] <<= drawing::TextFitToSizeType_NONE; } // -------------------------------------------------------------------- commit 28a2ae34a4bc97a526cf75a2766089ff0f2c54c1 Author: Muthu Subramanian <sumu...@suse.com> Date: Fri Jun 15 17:20:20 2012 +0530 n757419: Hidden/Non-wrapping text. Negative values for left-margin plays havoc with the text in this case. diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 16af6ec..4c21d47 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: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits