diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-06-05 16:13:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-05 16:14:32 +0200 |
commit | 9dc26ca9461dbb539c523c8bd68ce171aab25d90 (patch) | |
tree | b2976cd2a0f42d0ce2ff3911fd996d870a7f86b4 /oox | |
parent | 4d6368d6bba270f6f4d985eaac475be584d5d13d (diff) |
TextParagraphProperties::pushToPropSet: limit effect of failed numrule import
Fixes missing paragraph properties in Writer when importing SmartArt.
Change-Id: I0091d7156b30b7ef99e550d7252a60676c23046e
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index e82124d306a9..abd0b3b66b47 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -443,18 +443,25 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p aPropSet.getProperty( xNumRule, PROP_NumberingRules ); OSL_ENSURE( xNumRule.is(), "can't get Numbering rules"); - if( xNumRule.is() ) + try { - if( !rioBulletMap.empty() ) + if( xNumRule.is() ) { - // fix default bullet size to be 100% - if( rioBulletMap.find( PROP_BulletRelSize ) == rioBulletMap.end() ) - rioBulletMap[ PROP_BulletRelSize ] <<= static_cast< sal_Int16 >( 100 ); - Sequence< PropertyValue > aBulletPropSeq = rioBulletMap.makePropertyValueSequence(); - xNumRule->replaceByIndex( getLevel(), makeAny( aBulletPropSeq ) ); + if( !rioBulletMap.empty() ) + { + // fix default bullet size to be 100% + if( rioBulletMap.find( PROP_BulletRelSize ) == rioBulletMap.end() ) + rioBulletMap[ PROP_BulletRelSize ] <<= static_cast< sal_Int16 >( 100 ); + Sequence< PropertyValue > aBulletPropSeq = rioBulletMap.makePropertyValueSequence(); + xNumRule->replaceByIndex( getLevel(), makeAny( aBulletPropSeq ) ); + } + + aPropSet.setProperty( PROP_NumberingRules, xNumRule ); } - - aPropSet.setProperty( PROP_NumberingRules, xNumRule ); + } + catch (const Exception &) + { + // Don't warn for now, expected to fail for Writer. } } if ( noParaLeftMargin ) |