diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 45e50b1ce44a..0e19fcd60109 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1393,6 +1393,11 @@ void Test::testStyleInheritance() CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(properties, "FollowStyle")); properties = uno::Reference< beans::XPropertySet >(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getProperty(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() diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 9a419a66b1f8..44828b79b7ea 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -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 );