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

StyleSheetTable::ApplyStyleSheets: stop clearing NumberingStyleName manually

This was introduced in commit 9c7ffb6b
([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, commit b95d203b (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
üst 78016742
...@@ -1393,6 +1393,11 @@ void Test::testStyleInheritance() ...@@ -1393,6 +1393,11 @@ void Test::testStyleInheritance()
CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty<OUString>(properties, "FollowStyle")); CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty<OUString>(properties, "FollowStyle"));
properties = uno::Reference< beans::XPropertySet >(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY); properties = uno::Reference< beans::XPropertySet >(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getProperty<OUString>(properties, "FollowStyle")); 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() void Test::testSmartart()
......
...@@ -814,15 +814,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) ...@@ -814,15 +814,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ), uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
beans::PropertyState_DIRECT_VALUE ); beans::PropertyState_DIRECT_VALUE );
aPropValues[ aPropValues.getLength( ) - 1 ] = aLvlVal; 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 ); uno::Reference< beans::XPropertyState >xState( xStyle, uno::UNO_QUERY_THROW );
......
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