diff options
author | Justin Luth <justin_luth@sil.org> | 2018-07-27 07:22:02 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-07-28 06:16:38 +0200 |
commit | a56e2bba046b569e8923a438996bc6185037d3ed (patch) | |
tree | ed134265c8bb7a1b05659039033e629a7e7516e1 /writerfilter | |
parent | f458dabcaa18d66b054d00f5d9a389c06240f0eb (diff) |
writerfilter: unit test that no w:default still uses "Normal"
Note: the unit test does NOT test the changes in
GetCurrentParaStyleName. That is just a logical change and this
unit test asserts the validity of the intention.
Word 2013 was used to confirm that Normal is used for styleless
paragraphs even if it is not marked as "default".
Change-Id: I405591b40ed9028b292e99ba2833c25a24e089ac
Reviewed-on: https://gerrit.libreoffice.org/58161
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6bfb6d7b65b6..469d8d0ce1fd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -662,6 +662,13 @@ const OUString DomainMapper_Impl::GetCurrentParaStyleName() if ( pParaContext && pParaContext->isSet(PROP_PARA_STYLE_NAME) ) pParaContext->getProperty(PROP_PARA_STYLE_NAME)->second >>= sName; + // In rare situations the name might still be blank, so use the default style, + // despite documentation that states, "If this attribute is not specified for any style, + // then no properties shall be applied to objects of the specified type." + // Word, however, assigns "Normal" style even in these situations. + if ( !m_bInStyleSheetImport && sName.isEmpty() ) + sName = GetDefaultParaStyleName(); + return sName; } |