writerfilter/source/dmapper/StyleSheetTable.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit a59ecc3137cc59438cc2cf946223148b6d1a5600 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Fri Jul 17 18:41:25 2020 +0300 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Sat Jul 18 07:53:19 2020 +0200 tdf#68326 writerfilter: default style type is paragraph Don't ignore styles that don't specify their type. They are paragraph styles. 17.7.4.17 style (Style Definition) w:type "If this attribute is not specified, then the default value shall be assumed to be paragraph." No existing unit tests are missing this, and the bug example is a horrible document, so I'm going without a unit test for this one. Change-Id: Iaf97dc2d0a5701915f08b7be91fb983cf941380c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98980 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 80a0df186407..aa08e854ca08 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -947,6 +947,9 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) std::vector<beans::PropertyValue> aTableStylesVec; for( auto& pEntry : m_pImpl->m_aStyleSheetEntries ) { + if( pEntry->nStyleTypeCode == STYLE_TYPE_UNKNOWN ) + pEntry->nStyleTypeCode = STYLE_TYPE_PARA; // unspecified style types are considered paragraph styles + if( pEntry->nStyleTypeCode == STYLE_TYPE_CHAR || pEntry->nStyleTypeCode == STYLE_TYPE_PARA || pEntry->nStyleTypeCode == STYLE_TYPE_LIST ) { bool bParaStyle = pEntry->nStyleTypeCode == STYLE_TYPE_PARA; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits