diff options
author | Justin Luth <justin_luth@sil.org> | 2016-09-14 14:34:29 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-15 08:40:43 +0000 |
commit | b79b5e0df6dc5a0ba18054b0503d6fa804b69f02 (patch) | |
tree | 8c262f579fc3cdbb280eb845c2b7d5c49039c374 /writerfilter | |
parent | 7f0a219c9ad38ae33b51ff69d545f69659691c1e (diff) |
tdf#53856 writerfilter set parentless style based on default
docx import of base-less style "Text" was conflicting with
LibreOffice's builtin "Caption"->"Text" paragraph style.
This only worked when the parent .isEmpty(). Style names can
use localization, so forcing the imported parent-name will not
match between different language versions.
Change-Id: I86d9965abb4ee90b04c713371529a679d045660c
Reviewed-on: https://gerrit.libreoffice.org/28894
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index ae00da431bd3..c9ef06025378 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -943,7 +943,13 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) // Standard is handled already in applyDefaults(). if (sConvertedStyleName != "Standard") + { StyleSheetTable_Impl::SetPropertiesToDefault(xStyle); + + // resolve import conflicts with built-in styles + if( pEntry->sBaseStyleIdentifier.isEmpty() && !xStyle->getParentStyle().isEmpty() ) + xStyle->setParentStyle( "Standard" ); + } } else { |