Kaydet (Commit) 9dc26ca9 authored tarafından Miklos Vajna's avatar Miklos Vajna

TextParagraphProperties::pushToPropSet: limit effect of failed numrule import

Fixes missing paragraph properties in Writer when importing SmartArt.

Change-Id: I0091d7156b30b7ef99e550d7252a60676c23046e
üst 4d6368d6
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment