summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-09-14 14:34:29 +0300
committerAndras Timar <andras.timar@collabora.com>2016-10-10 17:27:34 +0200
commit0174b9473021e6628924f38ba34dc2415e270cc8 (patch)
treeef0930d5666f22def5e2bae1cedf24a9d07b0dd4 /writerfilter
parent6c787e4a7a28d84b8a3f2ad5fa84d9d66ad4594e (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. 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> (cherry picked from commit b79b5e0df6dc5a0ba18054b0503d6fa804b69f02) Change-Id: I86d9965abb4ee90b04c713371529a679d045660c
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 5a2a46e2534c..8385964e03f3 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -963,7 +963,13 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
// Standard is handled already in applyDefaults().
if (sConvertedStyleName != "Standard")
+ {
m_pImpl->SetPropertiesToDefault(xStyle);
+
+ // resolve import conflicts with built-in styles
+ if( pEntry->sBaseStyleIdentifier.isEmpty() && !xStyle->getParentStyle().isEmpty() )
+ xStyle->setParentStyle( "Standard" );
+ }
}
else
{