StyleSheetTable::ApplyStyleSheets: stop clearing NumberingStyleName manually
This was introduced in commit9c7ffb6b61
([cbosdo03]Applied the patches to upstream, 2009-12-02), as setting the outline level also set the NumberingStyleName to "Outline" as well, which is not what we want. Since then, commitb95d203bc1
(Don't load the default values of the styles in writerfilter, 2012-08-20) already disabled default styles, so the previous manual clearing is no longer necessary (testcases already fail if this later commit is reverted). As a result, just remove this manual clearing, it's no longer necessary and it is problematic, as it triggers copying the SvxLRSpaceItem from the parent style with no good reason. Change-Id: Ie17547a979a6b0feadbd2eed0f06e84fcb17fca6
This commit is contained in:
@@ -1393,6 +1393,11 @@ void Test::testStyleInheritance()
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty<OUString>(properties, "FollowStyle"));
|
||||
properties = uno::Reference< beans::XPropertySet >(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getProperty<OUString>(properties, "FollowStyle"));
|
||||
|
||||
// Make sure style #2 is Heading 1.
|
||||
assertXPath(pXmlStyles, "/w:styles/w:style[2]", "styleId", "Heading1");
|
||||
// w:ind was copied from the parent (Normal) style without a good reason.
|
||||
assertXPath(pXmlStyles, "/w:styles/w:style[2]/w:pPr/w:ind", 0);
|
||||
}
|
||||
|
||||
void Test::testSmartart()
|
||||
|
@@ -814,15 +814,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
|
||||
uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
|
||||
beans::PropertyState_DIRECT_VALUE );
|
||||
aPropValues[ aPropValues.getLength( ) - 1 ] = aLvlVal;
|
||||
|
||||
if ( pStyleSheetProperties->GetOutlineLevel( ) == 0 )
|
||||
{
|
||||
aPropValues.realloc( aPropValues.getLength( ) + 1 );
|
||||
beans::PropertyValue aStyleVal( rPropNameSupplier.GetName( PROP_NUMBERING_STYLE_NAME ), 0,
|
||||
uno::makeAny( OUString() ),
|
||||
beans::PropertyState_DIRECT_VALUE );
|
||||
aPropValues[ aPropValues.getLength( ) - 1 ] = aStyleVal;
|
||||
}
|
||||
}
|
||||
|
||||
uno::Reference< beans::XPropertyState >xState( xStyle, uno::UNO_QUERY_THROW );
|
||||
|
Reference in New Issue
Block a user