diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx | bin | 0 -> 5432 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx b/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx Binary files differnew file mode 100644 index 000000000000..e9df3b7048eb --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 96e0a342dc1a..c7a808a24e41 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -909,6 +909,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117297_tableStyle, "tdf117297_tableStyle.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 Paragraph3 double spacing", sal_Int16(200), getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height); } +DECLARE_OOXMLEXPORT_TEST(testTdf82175_noStyleInheritance, "tdf82175_noStyleInheritance.docx") +{ + // The document's "Default" paragraph style is 1 inch fixed line spacing, and that is what should not be inherited. + style::LineSpacing aSpacing = getProperty<style::LineSpacing>(getParagraph(1), "ParaLineSpacing"); + // MSWord uses 115% line spacing, but LO follows the documentation and sets single spacing. + CPPUNIT_ASSERT_MESSAGE("Text Body style 115% line spacing", sal_Int16(120) > aSpacing.Height); + CPPUNIT_ASSERT_MESSAGE("THANKS for *FIXING* line spacing", sal_Int16(115) != aSpacing.Height); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aSpacing.Mode); +} + DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx") { // Header was lost on export when the document had multiple columns. diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 1047d9c20904..7bb43fe5c6de 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -938,7 +938,7 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) && pEntry->sBaseStyleIdentifier.isEmpty() && !xStyle->getParentStyle().isEmpty() ) { - xStyle->setParentStyle( "Standard" ); + xStyle->setParentStyle( "" ); } } } |