diff options
author | Justin Luth <justin.luth@collabora.com> | 2019-08-02 17:28:58 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-08-06 16:25:44 +0200 |
commit | 9a19a1235c301f2699157ab44049bdfd54955e8a (patch) | |
tree | 84a9b3322ba4e28dd60e5414b5639b86c5623c78 /writerfilter | |
parent | 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503 (diff) |
tdf#118936 writerfilter: MultiPropertySet exception lost properties
An unsupported character style property was causing the loss of
some properties - anything with a higher sorting value.
Another way to deal with this could be something similar
to section properties which retries properties individually
if multiset fails.
Another option is to add CHAR_SHADING_VALUE to aCharStyleMap
in unomap1.cxx, since it is already in aAutoCharStyleMap.
However, this is an area I completely don't understand.
Change-Id: I70676c7a35d0efc95222960609da039e26df8a58
Reviewed-on: https://gerrit.libreoffice.org/76875
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 5b23d9aaedb0..d3630e7a6f97 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -913,6 +913,7 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) if( pEntry->nStyleTypeCode == STYLE_TYPE_CHAR || pEntry->nStyleTypeCode == STYLE_TYPE_PARA || pEntry->nStyleTypeCode == STYLE_TYPE_LIST ) { bool bParaStyle = pEntry->nStyleTypeCode == STYLE_TYPE_PARA; + bool bCharStyle = pEntry->nStyleTypeCode == STYLE_TYPE_CHAR; bool bListStyle = pEntry->nStyleTypeCode == STYLE_TYPE_LIST; bool bInsert = false; uno::Reference< container::XNameContainer > xStyles = bParaStyle ? xParaStyles : (bListStyle ? xNumberingStyles : xCharStyles); @@ -1098,7 +1099,8 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) // Don't add the style name properties bool bIsParaStyleName = rValue.Name == "ParaStyleName"; bool bIsCharStyleName = rValue.Name == "CharStyleName"; - if ( !bIsParaStyleName && !bIsCharStyleName ) + bool bDirectFormattingOnly = bCharStyle && rValue.Name == "CharShadingValue"; + if ( !bIsParaStyleName && !bIsCharStyleName && !bDirectFormattingOnly ) { aSortedPropVals.Insert(rValue); } @@ -1133,6 +1135,7 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) aMessage += ": " + aUnknownPropertyException.Message; SAL_WARN("writerfilter", aMessage); + assert (false && "SERIOUS: remaining alphabetically sorted properties were lost"); #else (void) rWrapped; #endif |