[Libreoffice-commits] core.git: sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Oct 3 03:51:13 PDT 2013
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 5 +++++
writerfilter/source/dmapper/StyleSheetTable.cxx | 9 ---------
2 files changed, 5 insertions(+), 9 deletions(-)
New commits:
commit df60b2f7685e5a2b732a49cb6f9954d2dfcfce16
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Oct 3 11:15:59 2013 +0200
StyleSheetTable::ApplyStyleSheets: stop clearing NumberingStyleName manually
This was introduced in commit 9c7ffb6b61f7c94ca5b38d11be1807f1e29ff4bc
([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 b95d203bc17c83ec0fe5139f519d53ed1d842d3a (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
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 45e50b1..0e19fcd 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<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()
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 9a419a6..44828b7 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 );
More information about the Libreoffice-commits
mailing list