summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-07-17 18:41:25 +0300
committerJustin Luth <justin_luth@sil.org>2020-07-18 07:53:19 +0200
commita59ecc3137cc59438cc2cf946223148b6d1a5600 (patch)
treeefaf9ebff2ea1b0a8d53c7e6a68a9a79969e08d4 /writerfilter
parenta83c69c291196a8325fd973df180e88ba9c625d3 (diff)
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_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx3
1 files changed, 3 insertions, 0 deletions
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;