summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-09-12 08:37:01 +0300
committerJustin Luth <justin_luth@sil.org>2018-09-12 20:11:59 +0200
commitca762d7016ac1271a17e2d4371cca71a78455376 (patch)
treeef07096a985884fafcfbcc8dc629f1c805a06f2a
parente95930d96459cc653342e78617db9498255569d0 (diff)
~revert tdf#103961: delay merge of default props until export
partial revert to fix tdf#119589 Although it was working fine for DOC/DOCX formats, ODT doesn't save the working document's defaults to the file. Instead it just writes the application's built-in docdefaults, and just throws away the current working state. Unbelievable. But changing this results in invalid ODF syntax, so not trivial. So, it wasn't working to change the format from DOCX to ODT. Since this patch was just "future-looking" and didn't immediately solve a particular problem, I'm just reverting part of it, so that parentless styles once again copy the default settings. This means that table-style settings cannot override system defaults since it cannot know whether the style specified that value, or if it just got a copy of the defaults. (Just becuase the style matches the docDefaults doesn't necessarily mean that it inherited them - unless it is parentless...) Change-Id: I61dd7866b42f79d91645ee65ff84b734ed2a53cf Reviewed-on: https://gerrit.libreoffice.org/60366 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
-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 a2fb4527b709..813c8772716d 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1015,6 +1015,9 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
}
else if( bParaStyle )
{
+ // Paragraph styles that don't inherit from some parent need to apply the DocDefaults
+ pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bAllowOverwrite=*/false );
+
//now it's time to set the default parameters - for paragraph styles
//Fonts: Western first entry in font table
//CJK: second entry